Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Missing g++ erroneously indicates that zlib is not found #4462

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 1 comment
Closed

Missing g++ erroneously indicates that zlib is not found #4462

openstreetmap-trac opened this issue Jul 23, 2021 · 1 comment

Comments

@openstreetmap-trac
Copy link

Reporter: middleforkgis
[Submitted to the original trac issue database at 9.05am, Friday, 29th June 2012]

osm2pgsql SVN version 0.80.0 (64bit id space)

Various commenters (see for example #3505) have noted a failure to configure osm2pgsql, wherein the following error is displayed:

checking for xml2 libraries... yes
checking for zlib headers in /usr/include... not found
checking for zlib compression library... no
configure: error: required library not found

I have experienced the same [Debian, Wheezy AMD64] I believe I have isolated the problem.

Here is the proof that zlib.h is present:

root@ip-10-252-70-252:~/osm2pgsql# dpkg -L zlib1g-dev |grep zlib.h
/usr/include/zlib.h

Here is the relevant error in config.log:

configure:4327: checking for C++ compiler version
configure:4336: g++ --version >&5
./configure: line 4338: g++: command not found
configure:4347: $? = 127
configure:4336: g++ -v >&5
./configure: line 4338: g++: command not found
configure:4347: $? = 127
configure:4336: g++ -V >&5
./configure: line 4338: g++: command not found
configure:4347: $? = 127
configure:4336: g++ -qversion >&5
./configure: line 4338: g++: command not found
configure:4347: $? = 127
configure:4351: checking whether we are using the GNU C++ compiler
configure:4370: g++ -c   conftest.cpp >&5
./configure: line 1634: g++: command not found
configure:4370: $? = 127

So I install g++

apt-get install g++

Re-run configure

checking for xml2 libraries... yes
checking for zlib headers in /usr/include... found
checking for zlib library... found
checking for zlib compression library... yes

Configure concludes successfully as does make.

Conclusion: missing g++ erroneously indicates missing zlib.

Requested fix: test for g++ before testing for zlib and throw an error if g++ is not found.

@openstreetmap-trac
Copy link
Author

Author: amm
[Added to the original trac issue at 7.20pm, Saturday, 4th August 2012]

The configure script should now fail if no c++ compiler was found.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant