Ticket #467 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

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:
Platform: Linux CPU: All

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

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

Change History

Changed 3 years ago by fundawang

patch here

in reply to: ↑ description   Changed 3 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.

  Changed 3 years ago by fundawang

I think I'm talking about 6.4x

  Changed 3 years ago by fundawang

still valid for 6.4 rc4

  Changed 3 years ago by fundawang

ping??

  Changed 3 years ago by neteler

  • status changed from new to closed
  • resolution set to fixed

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.