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)
Change History (8)
comment:1 by , 14 years ago
Summary: | Build fails due to gdal-config --dep-libs → Build fails due to overlinking (gdal-config --dep-libs, pg_config --libs) |
---|
by , 14 years ago
Attachment: | NoDepDeps.diff added |
---|
do not import dependencies of postgresql and gdal into mapserver dependencies
comment:2 by , 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 , 13 years ago
Cc: | added |
---|---|
Component: | MapServer C Library → Build Problems |
Owner: | changed from | to
see #3708 for pg_config.
ccing frankw for using gdal-config --dep-libs
comment:4 by , 13 years ago
Cc: | added; removed |
---|---|
Status: | new → assigned |
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 , 13 years ago
Milestone: | → 6.0 release |
---|
comment:6 by , 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.
Same happens with pg_config --libs, bringing down too many dependencies which are not really mapserver ones.