Missing linking option (-lm)

Bug #686465 reported by ki-bi on 2007-12-30
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Panotools
Undecided
Unassigned

Bug Description

(This is not the same as 1599376.)

Version: 2.9.12

When passing LDFLAGS="-Wl,--as-needed" (so as to limit unnecessary linking), the link fails since the following files are using math functions, but aren't linked with "-lm". When not setting LDFLAGS this way, the undefined references get finally linked in during the final link, that's why one doesn't hit this error normally. IMHO, it'd be cleaner to properly link, using -lm, where it is needed, instead of relying on the final link.

Concerned source files:
adjust.c
ColourBrightness.c
correct.c
fftn.c
filter.c
fourier.c
hdrfile.c
lmdif.c
math.c
morpher.c
optimize.c
parser.c
perspect.c
ptpicker.c
remap.c
resample.c
seamer_.c

Concerned objects:
.libs/adjust.o
.libs/hdrfile.o
.libs/lmdif.o
.libs/seamer.o

In case someone needs a workaround, it is sufficient to also specify LIBS="-lm" on the ./configure line, and the build happens normally.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers