Summary: | sci-geosciences/mapnik-0.6.0 build failure: ld: cannot find -lmapnik | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | vyp08 <vyp08> |
Component: | Current packages | Assignee: | Steve Arnold <nerdboy> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bertrand, james, sci-geosciences |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
mapnik-0.6.0: ld: cannot find -lmapnik
emerge --info. Successful mapnik buildlog. |
Please paste the output of 'emerge --info' into a bugzilla comment to assist the maintainers in resolving this issue *** Bug 280957 has been marked as a duplicate of this bug. *** libmapnik is supposed to be created during the mapnik build, so it would be good if you attach a full build log in addition to 'emerge --info' already requested. Created attachment 201494 [details]
mapnik-0.6.0: ld: cannot find -lmapnik
(In reply to comment #3) > libmapnik is supposed to be created during the mapnik build, so it would be > good if you attach a full build log in addition to 'emerge --info' already > requested. > Ok. IMHO, scons try build plugins/input/raster before libmapnik.so. And because I not have previous version libmapnik.so in my gentoo, ld really cannot find libmapnik.so. :) May be just comment lines 44-46 in ebuild? Based on the build log, I disabled cairo and enabled sqlite, but it still builds fine for me. Please post your emerge --info as requested, otherwise I probably have no hope of ever reproducing this. Created attachment 201775 [details]
emerge --info.
I don't really see anything that stands out in your --info, plus this build setup uses scons, so I'd recommend updating to dev-util/scons-1.2.0-r1 if you still have an older version installed. Other than that, I'm open to suggestions... In the meanwhile, I'll see if I can get it to fail on another box or two. Nope, still builds for me, even on an older install: $ emerge mapnik -vp These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] sci-geosciences/mapnik-0.6.0 USE="curl python sqlite -cairo -debug -gdal -postgres" 0 kB [?=>1] Total: 1 package (1 reinstall), Size of downloads: 0 kB Portage tree and overlays: [0] /usr/portage [1] /usr/local/portage [?] indicates that the source repository could not be determined Please sync and make sure you're trying to build the latest mapnik; thanks. > Please sync and make sure you're trying to build the latest mapnik; thanks.
[..]
ld: cannot find -lmapnik
[..]
Please try:
# emerge -C mapnik
Make sure that the library file "libmapnik.so*" is missing on your system (may be in your home dir or in /usr/local/lib, ..).
# emerge mapnik
If build ok, please, attach your build log. Thanks.
Created attachment 201963 [details]
Successful mapnik buildlog.
I'm a little confused by your last comment, but here it is...
Thanks. In your case, first building the libmapnik.so, and then plugins. On my system scons attempts to gather first plugins and ld can't found library :(( Why? Because: 1. USE in my make.conf "-python". 2. "-python" leads to the fact that configure get option "BINDINGS=none". 3. scons try building plugins without library. Therefore I'm comment lines 62,78,83 in mapnik-0.6.0.ebuild and emerge it. Well, I'm certainly not an SConscript guru-dude, but it sure looks like the correct order in the #### Builds #### listed at the end of the main SConstruct file excerpt below. Of course, the order might mean nothing at all, so feel free to submit a patch if you know how to make it behave. I'm still investigating, but I haven't seen anything I can tweak yet... # export env so it is available in Sconscript files Export('env') # Build agg first, doesn't need anything special if env['INTERNAL_LIBAGG']: SConscript('agg/SConscript') # Build the core library SConscript('src/SConscript') # Build the c++ rundemo app if requested if env['DEMO']: SConscript('demo/c++/SConscript') # Build the pgsql2psqlite app if requested if env['PGSQL2SQLITE']: SConscript('utils/pgsql2sqlite/SConscript') # Build shapeindex and remove its dependency from the LIBS if 'boost_program_options%s' % env['BOOST_APPEND'] in env['LIBS']: SConscript('utils/shapeindex/SConscript') env['LIBS'].remove('boost_program_options%s' % env['BOOST_APPEND']) else : color_print(1,"WARNING: Cannot find boost_program_options. 'shapeindex' won' t be available") GDAL_BUILT = False OGR_BUILT = False # Build the requested and able-to-be-compiled input plug-ins for plugin in env['REQUESTED_PLUGINS']: details = env['PLUGINS'][plugin] if details['lib'] in env['LIBS']: SConscript('plugins/input/%s/SConscript' % plugin) if plugin == 'ogr': OGR_BUILT = True if plugin == 'gdal': GDAL_BUILT = True if plugin == 'ogr' or plugin == 'gdal': if GDAL_BUILT and OGR_BUILT: env['LIBS'].remove(details['lib']) else: env['LIBS'].remove(details['lib']) elif not details['lib']: # build internal shape and raster plugins SConscript('plugins/input/%s/SConscript' % plugin) # Build the Python bindings if 'python' in env['BINDINGS']: SConscript('bindings/python/SConscript') The original package "mapnik-0.6.0.tar.bz2" have similar behavior: plugins build first, but not linked with libmapnik.so. Why your add patch 46 sed -i -e "s:libraries \= \[:libraries \= \[\'mapnik\',:g" \ 47 plugins/input/{gdal,postgis,shape,raster}/SConscript \ 48 || die "sed 2 failed" ? Without this patch all builds ok. The patch is there because it failed without it. I have several systems here, mostly desktop x86/amd64/ppc, plus some embedded ppc and some x86-hardened, and they all work the same way. All I can suggest is to keep mapnik in your overlay for now, and keep trying to figure out why your system acts differently wrt scons builds. I just added 0.6.1 to portage, and it seems to build fine with minimal changes to the scons build files (both with and without use=python). Give it a try and see if it works for you. Is this still a problem for current mapnik? Good day! sci-geosciences/mapnik-0.7.1-r1 builded ok, thanks. Fixed as per latest comment and my testing. |
Good day! I try emerge mapnik-0.6.0 and get error: #emerge mapnik [...skip...] *Configure complete* Now run "python scons/scons.py" to build or "python scons/scons.py install" to install >>> Source configured. >>> Compiling source in /var/tmp/portage/sci-geosciences/mapnik-0.6.0/work/mapnik-0.6.0 ... scons: Reading SConscript files ... Welcome to Mapnik... Using previous successful configuration... Re-configure by running "python scons/scons.py configure". scons: done reading SConscript files. scons: Building targets ... i686-pc-linux-gnu-g++ -o plugins/input/raster/raster_datasource.os -c -DHAVE_LIBXML2 -ansi -Wall -pthread -ftemplate- depth-100 -DLINUX -DBOOST_SPIRIT_THREADSAFE -DMAPNIK_THREADSAFE -O2 -finline-functions -Wno-inline -DNDEBUG -fPIC -DN one -Iinclude -I. -I/usr/include -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/agg2 plugins/input/ra ster/raster_datasource.cpp i686-pc-linux-gnu-g++ -o plugins/input/raster/raster_featureset.os -c -DHAVE_LIBXML2 -ansi -Wall -pthread -ftemplate- depth-100 -DLINUX -DBOOST_SPIRIT_THREADSAFE -DMAPNIK_THREADSAFE -O2 -finline-functions -Wno-inline -DNDEBUG -fPIC -DN one -Iinclude -I. -I/usr/include -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/agg2 plugins/input/ra ster/raster_featureset.cpp i686-pc-linux-gnu-g++ -o plugins/input/raster/raster_info.os -c -DHAVE_LIBXML2 -ansi -Wall -pthread -ftemplate-depth-100 -DLINUX -DBOOST_SPIRIT_THREADSAFE -DMAPNIK_THREADSAFE -O2 -finline-functions -Wno-inline -DNDEBUG -fPIC -DNone -Iinclude -I. -I/usr/include -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/agg2 plugins/input/raster/raster_info.cpp i686-pc-linux-gnu-g++ -o plugins/input/raster/raster.input -Wl,-rpath,/usr/lib -shared plugins/input/raster/raster_datasource.os plugins/input/raster/raster_featureset.os plugins/input/raster/raster_info.os -Lsrc -L/usr/lib -lmapnik /usr/lib/gcc/i686-pc-linux-gnu/4.3.2/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lmapnik collect2: ld returned 1 exit status scons: *** [plugins/input/raster/raster.input] Error 1 scons: building terminated because of errors. [...skip...] In my system I don't have libmapnik.so*. Where I can get it? Best regards. Reproducible: Always Steps to Reproduce: