Opened 15 years ago

Closed 15 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 15 years ago.
patch here

Download all attachments as: .zip

Change History (7)

by fundawang, 15 years ago

patch here

in reply to:  description comment:1 by glynn, 15 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:3 by fundawang, 15 years ago

I think I'm talking about 6.4x

comment:4 by fundawang, 15 years ago

still valid for 6.4 rc4

comment:5 by fundawang, 15 years ago

ping??

comment:6 by neteler, 15 years ago

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.