Opened 14 years ago

Closed 13 years ago

#3316 closed defect (fixed)

Build fails due to overlinking (gdal-config --dep-libs, pg_config --libs)

Reported by: strk Owned by: dmorissette
Priority: normal Milestone: 6.0 release
Component: Build Problems Version: svn-trunk (development)
Severity: normal Keywords:
Cc: warmerdam

Description

I'm trying to build mapserver on a machine where no mysql development environment is installed. Due to GDAL_LIB being constructed using gdal-config --dep-libs rather than gdal-config --libs the mysqlclient libraries get added to the LDFLAGS resulting in build failure. The runtime library are there so there should be no problem linking with just gdal-config --libs.

I couldn't verify as runnign autoconf after modifying configure.in resulted in a broken configure script. Is there a policy on when configure script is regenerated and how ? Shouldn't the configure script be removed from the repository ?

Attachments (1)

NoDepDeps.diff (971 bytes ) - added by strk 14 years ago.
do not import dependencies of postgresql and gdal into mapserver dependencies

Download all attachments as: .zip

Change History (8)

comment:1 by strk, 14 years ago

Summary: Build fails due to gdal-config --dep-libsBuild fails due to overlinking (gdal-config --dep-libs, pg_config --libs)

Same happens with pg_config --libs, bringing down too many dependencies which are not really mapserver ones.

by strk, 14 years ago

Attachment: NoDepDeps.diff added

do not import dependencies of postgresql and gdal into mapserver dependencies

comment:2 by strk, 14 years ago

The attached patch fixed the build problem for me avoiding to bring dependencies of dependencies in. My build config includes gdal and postgresql, so no problem getting deps at runtime. It's on opensuse here, but I'm pretty sure any unix would work fine.

comment:3 by tbonfort, 13 years ago

Cc: frankw added
Component: MapServer C LibraryBuild Problems
Owner: changed from sdlime to dmorissette

see #3708 for pg_config.

ccing frankw for using gdal-config --dep-libs

comment:4 by dmorissette, 13 years ago

Cc: warmerdam added; frankw removed
Status: newassigned

I came across this issue as well a few weeks ago with a 6.0-beta. I was hesitant to make that change but since I'm not the only one to have hit the problem, I'll make a few tests now and see if the change is safe.

comment:5 by dmorissette, 13 years ago

Milestone: 6.0 release

comment:6 by dmorissette, 13 years ago

The "gdal-config --dep-libs" was added by myself in r5887 for ticket #2004, to work around an issue with FGS builds when the LD_LIBRARY_PATH variable is not set at compile/link time.

Properly setting the FGS env vars (which includes LD_LIBRARY_PATH) at compile time solves the issue, so it should be safe to remove it. doing that now.

comment:7 by dmorissette, 13 years ago

Resolution: fixed
Status: assignedclosed

Fix committed in r11618.

Note: See TracTickets for help on using tickets.