Opened 16 years ago
Closed 16 years ago
#467 closed defect (fixed)
Wrong detection on cairo
Reported by: | fundawang | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 6.4.0 |
Component: | Default | Version: | 6.4.0 RCs |
Keywords: | Cc: | ||
CPU: | All | Platform: | Linux |
Description
in configure.in:
ac_save_ldflags="$LDFLAGS" LDFLAGS="$LDFLAGS $CAIROLIB" AC_CHECK_FUNC(cairo_create,,[ AC_MSG_ERROR([*** Unable to locate cairo_create() function.]) ]) LDFLAGS=${ac_save_ldflags}
but CAIROLIB is a library, not a linker flag. as Mandriva will use LDFLAGS="-Wl,--as-needed" by default, such a wrong link order will make it impossible to test the program:
gcc -o conftest -Wl,--as-needed -lcairo conftest.c }} It will produces: undefined reference to `cairo_create', because -lcairo is considered as objects, rather than libs. You should change ldflags to LIBS.
Attachments (1)
Change History (7)
by , 16 years ago
Attachment: | grass-6.4.0-fix-cairo-detection.patch added |
---|
comment:1 by , 16 years ago
Replying to fundawang:
It will produces: undefined reference to `cairo_create', because -lcairo is considered as objects, rather than libs.
You should change ldflags to LIBS.
FWIW, 7.0 uses LIBS via LOC_CHECK_FUNC.
comment:2 by , 16 years ago
The 7 code is here: http://trac.osgeo.org/grass/browser/grass/trunk/configure.in#L1409
comment:6 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
patch here