Opened 10 years ago

Closed 7 years ago

#2886 closed defect (wontfix)

Linking the shared library liblwgeom.la against the loadable module *** libSFCGAL.dll is not portable!

Reported by: robe Owned by: colivier
Priority: medium Milestone: PostGIS 2.4.0
Component: sfcgal Version: master
Keywords: Cc:

Description

*** Warning: This system can not link to static lib archive /projects/json-c/rel-0.12w64gcc48/lib/libjson-c.la.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have.
libtool: link: warning: library `/projects/CGAL/rel-sfcgal-1.0.4w64gcc48/lib/libSFCGAL.la' was moved.

*** Warning: Linking the shared library liblwgeom.la against the loadable module
*** libSFCGAL.dll is not portable!
libtool: link: warning: undefined symbols not allowed in x86_64-w64-mingw32 shared libraries
copying selected object files to avoid basename conflicts...

I think this is harmless but does look scary and if we can get rid of it, would make me much happier.

Change History (6)

comment:1 by hmercier, 10 years ago

Hi,

I am not sure, but it may related to a mix between a static compilation (SFCGAL.la) and a dynamic compilation (SFCGAL.dll). What kind of compilation did you use ?

The second error seems to mean the .la file refers to some missing file. Can you share the content of the .la file (text file).

comment:2 by robe, 10 years ago

la is shown below. I think I had to hand edit the lib path since its not referencable from within mingw configure and also was pointing in the wrong folder before.

# E:/ming32gcc481/sources/build/libSFCGAL.la - a libtool library file
# Generated by CMake 2.8.12.2 (like GNU libtool)

# Please DO NOT delete this file!
# It is necessary for linking the library with libtool.

# The name that we can dlopen(3).
dlname='libSFCGAL.dll'

# Names of this library.
library_names='libSFCGAL.dll.0.0.0 libSFCGAL.dll.0 libSFCGAL.dll'

# The name of the static archive.
old_library=''

# Libraries that this one depends upon.
dependency_libs=''

# Names of additional weak libraries provided by this library
weak_library_names=

# Version information for E:/ming32gcc481/sources/build/libSFCGAL.la.
current=0
age=0
revision=0

# Is this an already installed library?
installed=yes

# Should we warn about portability when linking against -modules?
shouldnotlink=yes

# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''

# Directory that this library needs to be installed in:
libdir='/projects/CGAL/rel-sfcgal-1.0.4w32gcc481/lib'

I did a dynamic build of SFCGAL, however, I think CGAL I did have to do some static compilation with Boost.

Hard to follow (with my variable slots) but maybe this helps - my sfcgal build script:

	export SFCGAL_VER=1.0.4
	export PATH="/mingw/bin:/mingw/include:/c/Windows/system32" 
	PATH="${PATH}:${PROJECTS}/CGAL/rel-gmp-${GMP_VER}w${OS_BUILD}${GCC_TYPE}/include:${PROJECTS}/CGAL/rel-gmp-${GMP_VER}w${OS_BUILD}${GCC_TYPE}/lib:${PROJECTS}/CGAL/rel-gmp-${GMP_VER}w${OS_BUILD}${GCC_TYPE}/bin"
	PATH="${PATH}:${PROJECTS}/CGAL/rel-mpfr-${MPFR_VER}w${OS_BUILD}${GCC_TYPE}/include:${PROJECTS}/CGAL/rel-mpfr-${MPFR_VER}w${OS_BUILD}${GCC_TYPE}/lib:${PROJECTS}/CGAL/rel-mpfr-${MPFR_VER}w${OS_BUILD}${GCC_TYPE}/bin"
	PATH="${PATH}:${PROJECTS}/CGAL/rel-cgal-${CGAL_VER}w${OS_BUILD}${GCC_TYPE}/include:${PROJECTS}/CGAL/rel-cgal-${CGAL_VER}w${OS_BUILD}${GCC_TYPE}/lib"
	#PATH="${PATH}:${PROJECTS}/CGAL/gmp-${GMP_VER}"
	#PATH="${PATH}:.:/bin:/include"

	export PATH="${PATH}:/cmake/bin"
	cd ${PROJECTS}/CGAL
	cd ${SOURCES}
	
	rm -rf SFCGAL-${SFCGAL_VER}

	export MPFR_DIR=${PROJECTS}/CGAL/rel-mpfr-${MPFR_VER}w${OS_BUILD}${GCC_TYPE}
	export GMP_DIR=${PROJECTS}/CGAL/rel-gmp-${GMP_VER}w${OS_BUILD}${GCC_TYPE}
	export CPPFLAGS="-I${PROJECTS}/CGAL/rel-gmp-${GMP_VER}w${OS_BUILD}${GCC_TYPE}/include"
	export LDFLAGS="-L${PROJECTS}/CGAL/rel-gmp-${GMP_VER}w${OS_BUILD}${GCC_TYPE}/lib"
	tar xvfz SFCGAL-${SFCGAL_VER}.tar.gz
	export PATH="${PATH}:/cmake/bin"
	#make sure to change file src/CMakeList.txt move MPFR check before GMP
	rm -rf build
	mkdir -p build
	cd build
	cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=${PROJECTS}/CGAL/rel-sfcgal-${SFCGAL_VER}w${OS_BUILD}${GCC_TYPE} -DBoost_USE_STATIC_LIBS=ON -DCMAKE_CXX_FLAGS:STRING="-DBOOST_THREAD_USE_LIB -DBoost_USE_STATIC_LIBS -DBOOST_USE_WINDOWS_H" -DBOOST_ROOT:PATH=${PROJECTS}/boost/rel-${BOOST_VER_WU}w${OS_BUILD}${GCC_TYPE} ../SFCGAL-${SFCGAL_VER}
	make

comment:3 by vmo, 10 years ago

This looks like the same issue: https://github.com/Oslandia/SFCGAL/issues/41

I've been looking into it but haven't figured it out yet.

comment:4 by robe, 9 years ago

Milestone: PostGIS 2.2.0PostGIS 2.3.0

comment:5 by robe, 8 years ago

Milestone: PostGIS 2.3.0PostGIS 2.4.0

comment:6 by robe, 7 years ago

Resolution: wontfix
Status: newclosed

I'm going to dismiss this. It's an annoying message but aside from that haven't seen any issues with final runtime libraries

Note: See TracTickets for help on using tickets.