Opened 11 years ago

Closed 11 years ago

#467 closed defect (fixed)

Wrong detection on cairo

Reported by: fundawang Owned by: grass-dev@…
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)

grass-6.4.0-fix-cairo-detection.patch (444 bytes) - added by fundawang 11 years ago.
patch here

Download all attachments as: .zip

Change History (7)

Changed 11 years ago by fundawang

patch here

comment:1 in reply to:  description Changed 11 years ago by glynn

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:3 Changed 11 years ago by fundawang

I think I'm talking about 6.4x

comment:4 Changed 11 years ago by fundawang

still valid for 6.4 rc4

comment:5 Changed 11 years ago by fundawang

ping??

comment:6 Changed 11 years ago by neteler

Resolution: fixed
Status: newclosed

Fixed in 6.5.svn (r36869) and 6.4.0svn (r36870) for the 6.4.0final.

Thanks for the patch.

Markus

Note: See TracTickets for help on using tickets.