Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
0
votes
1
answers
1889
views
CentOS 7: When building Mapnik, the configure step does not find optional dependencies like libpng-devel, libjpeg-devel, etc
I am trying to build/install Mapnik (3.0.10) on a CentOS 7 system and I am having trouble getting all the dependencies in place and recognized. I have installed gcc/g++ compiler from the gcc6 series to ensure c++14 support, which Mapnik needs. If I point directly to my new `gcc` and poll its version...
I am trying to build/install Mapnik (3.0.10) on a CentOS 7 system and I am having trouble getting all the dependencies in place and recognized.
I have installed gcc/g++ compiler from the gcc6 series to ensure c++14 support, which Mapnik needs. If I point directly to my new
gcc
and poll its version I get this:
[root@raven ~]# /usr/local/bin/gcc --version
gcc (GCC) 6.5.0
Copyright (C) 2017 Free Software Foundat/..snip..
Next I temporarily overrode the $CC
and $CXX
environment variables so the updated compiler would be used for subsequent builds, then I installed Boost 1.69.0 from source, like this. Note that this actually installs a second Boost, so the --prefix
parameter establishes where this alternative Boost will install to:
export CC=/usr/local/bin/gcc
export CXX=/usr/local/bin/g++
cd /root/downloads
wget https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.tar.gz
tar -xzf boost_1_*
cd boost_1_*
./bootstrap.sh --prefix=/opt/boost
./b2 install --prefix=/opt/boost --with=all
Now, if I check /opt/boost
, I see what I expect..
[root@raven ~]# dir /opt/boost/
include lib
Finally I get to installing Mapnik itself. I'm basically using the approach noted here . However, I've already got several of the dependencies in place due to previously installing GDAL and PostGIS. But, when I run Mapnik's .configure
step, it fails to find my optional dependencies.
For example, I built proj
from source and know exactly where it is..
[root@raven ~]# dir /usr/proj49/
bin include lib share
And ldconfig
finds it too..
[root@raven mapnik-v3.0.10]# ldconfig -p | grep libproj
libproj.so.12 (libc6,x86-64) => /usr/proj49/lib/libproj.so.12
libproj.so.0 (libc6,x86-64) => /lib64/libproj.so.0
libproj.so (libc6,x86-64) => /usr/proj49/lib/libproj.so
libproj.so (libc6,x86-64) => /lib64/libproj.so
So I specify my alternative Boost location as well as PROJ_LIBS
and PROJ_INCLUDES
as .configure
parameters.....but it still fails to find proj
? Here's some abridged output. Note that it finds my Boost, as specified, but it fails to find proj
, in spite of the config params..
[root@raven ~]# cd /root/downloads/mapnik-v3.0.10
[root@raven mapnik-v3.0.10]# ./configure BOOST_LIBS=/opt/boost/lib BOOST_INCLUDES=/opt/boost/includes PROJ_LIBS=/usr/proj49/lib PROJ_INCLUDES=/usr/proj49/include
..snip..
Searching for boost libs and headers... (cached)
Found boost libs: /opt/boost/lib
Found boost headers: /opt/boost/include
Checking for C++ header file boost/version.hpp... yes
Checking for Boost version >= 1.47... yes
Found boost lib version... 1_69
..snip..
Checking for C library proj... no
Could not find optional header or shared library for proj
..snip..
Most of the optional dependencies seem to be similarly overlooked—libpng-devel
, libjpeg-devel
, sqlite3, the tiff stuff, proj, etc. And most of those are package installs, not source builds.
As we'll be using this server for quite some time I would like to have the latest Mapnik with its full complement of support (especially for proj, png, and jpeg). It's especially vexing that my proj
install isn't tying in, because I know exactly where it is and provided Mapnik those parameters.
I apologize for the long noisy read, but does anyone see what I am missing?
[**Update**: 4.24.19 5pm]
Ok, I may have figured it out. I was hoping it had something to do with environment/shell setup, rather than having to build all dependencies from source with the same compiler, and stumbled onto an old post where a "Dom Lehr" recommended modifying the LD_LIBRARY_PATH
environment variable to include specifically /usr/local/lib
. Well, I tried that, and it didn't solve the problem. However, I optimistically expanded the parameter values to include some additional locations, and now I can complete the .configure
step with all dependencies recognized. Here's how I did it..
vi /etc/profile.d/sh.local
# Add colon-separated paths to the LD_LIBRARY_PATH variable like this..
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/local/lib64:/usr/lib:/usr/lib64:
I added everything I could think of where I found seemingly related .so files. Save the file, then..
/sbin/ldconfig
ldconfig
Then I logged out of my terminal session and logged back in to refresh the shell. Then double-checked that it worked:
[root@raven mapnik-v3.0.10]# echo $LD_LIBRARY_PATH
/opt/remi/php70/root/usr/lib64::/usr/local/lib:/usr/local/lib64:/usr/lib:/usr/lib64:
It did. So I refreshed my temporary compiler arguments, went to the Mapnik source folder, and re-ran the .configure
instruction, and it worked without issue..
export CC=/usr/local/bin/gcc
export CXX=/usr/local/bin/g++
cd /root/downloads/mapnik-v3.0.10
./configure BOOST_LIBS=/opt/boost/lib BOOST_INCLUDES=/opt/boost/includes
And it worked. Now, whether it will build without issue is still a mystery, but this seems to have done the trick!
Well I spoke to soon. Now make
fails with..
> >&&’
scons: *** [src/json/mapnik_json_geometry_grammar.o] Error 1
scons: building terminated because of errors.
make: *** [src/json/libmapnik-json.a] Error 2
....which is in-line with a lot of others posts I've found where folks are having trouble with mismatched compiler/dependency issues. Back to the drawing board.
elrobis
(101 rep)
Apr 24, 2019, 03:44 PM
• Last activity: Jun 5, 2025, 03:05 AM
0
votes
1
answers
261
views
CMake error: In the make step, compiler is unable to see header file that does exist. Exporting pasth to CPATH doesn't help
On Pop!_OS 22.04 LTS x86_64, I am trying to install libLAS-1.8.1 from source (downloaded as a targz2)(as a dependency of ESRI - 3DForests. I am following the official? [tutorial][1] but am stuck. **"Issue" 1:** Per the guide, I need to - $ cd liblas $ mkdir makefiles $ cd makefiles $ cmake -G "Unix...
On Pop!_OS 22.04 LTS x86_64, I am trying to install libLAS-1.8.1 from source (downloaded as a targz2)(as a dependency of ESRI - 3DForests. I am following the official? tutorial but am stuck.
**"Issue" 1:** Per the guide, I need to -
$ cd liblas
$ mkdir makefiles
$ cd makefiles
$ cmake -G "Unix Makefiles"
However, this gives -
> CMake Error: The source directory "/home/sd/myApps/libLAS-1.8.1/makefiles" does not appear to contain CMakeLists.txt.
So I instead add the following, and it works (for now) -
$ cmake -G "Unix Makefiles" -S "./.."
**Issue 2:** (The actual issue) When I do make, the following error occurs:
> /home/sd/myApps/libLAS-1.8.1/src/../include/liblas/detail/binary.hpp:28:10: fatal error: boost/detail/endian.hpp: No such file or directory
I verify (using ls) that the file "/usr/include/boost/endian/endian.hpp" does indeed exist.
Next I search around and it seems I need to add it to CMake path, for which I do -
> export CPATH=/usr/include/boost
This however does not help. And I keep getting the error.
Any help as to why this is happening and how I can fix this is much appreciated. Also, I believe there are binaries for liblas on "DebianGIS's" repositories. Is there any way to get and install that on other debian based OSs'?
**EDIT1:**
Per a comment, tried deleting the directory and doing it again (after export CPATH). Didn't work.
The following is the full error line, reading which again, makes me think that it was looking for the endian.hpp within the sourcefiles.
> /home/sd/myApps/libLAS-1.8.1/src/../include/liblas/detail/binary.hpp:28:10:
> fatal error: boost/detail/endian.hpp: No such file or directory
Doing find, I see the file exists.
sd@pop-os:~/myApps/libLAS-1.8.1$ find ~/myApps/libLAS-1.8.1 -type f -iname *endian.hpp
/home/sd/myApps/libLAS-1.8.1/include/liblas/detail/endian.hpp
sd@pop-os:~/myApps/libLAS-1.8.1$
**EDIT2:**
Per suggestion of user @steeldriver , downloaded the source using git clone (was using the targz2 before). This fixed it.
ChiggyClaus
(13 rep)
May 11, 2024, 10:57 AM
• Last activity: May 11, 2024, 04:50 PM
3
votes
1
answers
323
views
I need a program to read the US Census's geodatabase files
I downloaded a file from [here](http://www.census.gov/geo/maps-data/data/tiger-geodatabases.html), and got something with extension `.gdb.zip`. I want to get one of the tables out of this "geodatabase" and into a format that's easily accessible to other programs; csv or some such would be the obviou...
I downloaded a file from [here](http://www.census.gov/geo/maps-data/data/tiger-geodatabases.html) , and got something with extension
.gdb.zip
. I want to get one of the tables out of this "geodatabase" and into a format that's easily accessible to other programs; csv or some such would be the obvious goal but anything moderately open will work. The Census Bureau's description of the files is:
> TIGER Geodatabases are spatial extracts from the Census Bureau’s MAF/TIGER database for use with Esri’s ArcGIS.
Since ArcGIS for home users costs $100, and I don't want any of its features other than the ability to read this file, I'm hoping there's an open source option.
Anschel Schaffer-Cohen
(157 rep)
Jan 24, 2014, 11:42 PM
• Last activity: Jan 25, 2014, 12:01 AM
2
votes
2
answers
1629
views
How to configure offline map viewer for openstreetmaps on debian?
I've installed Gosmore and was going to download some maps in `osm.bz2` format from [here][2]. How can I add them to Gosmore? I was googling but didn't manage to find any solution, so I'm not sure if I will manage to make it work or not. Maybe there is another good solution for fully legal free offl...
I've installed Gosmore and was going to download some maps in
osm.bz2
format from here .
How can I add them to Gosmore? I was googling but didn't manage to find any solution, so I'm not sure if I will manage to make it work or not.
Maybe there is another good solution for fully legal free offline maps?
**Update**: tried using command
bzcat /file_location/filename.osm.bz2 | gosmore rebuild
Got some errors (no any icons found) and then
1 while (xmlTextReaderRead (xml) == 1)
and nothing happens. Maybe that is so because I installed gosmore from Debian repository, I'll try the way it told in official documentation (though it told that I CAN install from Debian repo).
**Update:** Tried manual installation - the same result. Gave up with gosmore, tried to configure navit, and it doesn't work as well, I see no maps - only rose screen, it seems like maps just not loaded. I found a solution for the same problem on official maillists , but the solution provided did not work for me.
**Update** I think I found quite good solution, see bellow.
user63130
(21 rep)
Nov 20, 2013, 12:29 AM
• Last activity: Nov 21, 2013, 02:09 AM
Showing page 1 of 4 total questions