Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#493 closed defect (fixed)

cmake: Detected compiler does not support std namespace on STL classes

Reported by: arencambre Owned by: mloskot
Priority: major Milestone: 3.3.3
Component: Build/Install (cmake) Version: 3.3.2
Severity: Unassigned Keywords:
Cc: aren@…

Description

Both the instructions for building GEOS on Unix are bad.

http://trac.osgeo.org/geos/wiki/BuildingOnUnixWithAutotools references an autogen.sh file. However, this file is not in geos-3.3.1.tar.bz2, which was downloaded from http://trac.osgeo.org/geos/. All that's there is autogen.bat.

http://trac.osgeo.org/geos/wiki/BuildingOnUnixWithCMake also does not work from 3.3.1.tar.bz2. The install always fails with:

CMake Error at CMakeLists.txt:161 (message): Detected compiler does not support std namespace on STL classes

I have all requirements listed at the top of the page, verified through aptitude.

This was all run on a fresh install Ubuntu 11.10 32-bit desktop version.

Change History (16)

comment:1 by mloskot, 12 years ago

I think it clearly says you need to call autogen.sh (not autogen.bat) only if you build from sources grabbed from SVN repo in order to generate configure script. You don't do that if you build from packaged sources.

If you feel the instructions need to be clarified, just update the wiki.

How do you run CMake, give details.

comment:2 by arencambre, 12 years ago

Thanks. I altered the autotools instructions to make that point more clear. I incorrectly assumed that the .tar.bz2 files were mostly point in time snapshots of the SVN.

Should users run ldconfig after make install?

On cmake, I may be running into the same problem. I used the 3.3.1 download. I extracted it to ~/geos-3.3.1 and ran ../geos-3.3.1/cmake from ~/build.

comment:3 by mloskot, 12 years ago

Thanks for the Wiki update.

AFAIK, if you need to run ldconfig or not depends on your Linux distribution. It does not hurt to run it though.

There is no command like ../geos-3.3.1/cmake, but you should run cmake ../geos-3.3.1/ assuming ../geos-3.3.1/ points to GEOS sources.

comment:4 by arencambre, 12 years ago

Sorry, I mistyped. I did do cmake ../geos-3.3.1/.

Here's what happens:

~/build$ cmake ../geos-3.3.1
-- Setting GEOS version 3.3.0 as port of JTS 1.10.0
-- Setting GEOS C API version 1.6.1
-- Setting GEOS build type - Debug
-- Forcing IEEE 754 using flag -ffloat-store - ON
-- Setting GEOS compilation with small functions inlining - OFF
-- Setting GEOS compilation with assert() macro enabled - OFF
CMake Error at CMakeLists.txt:161 (message):
  Detected compiler does not support std namespace on STL classes


-- Configuring incomplete, errors occurred!

comment:5 by strk, 12 years ago

Mateusz: did I see you editing the wiki page recently ?

comment:6 by strk, 12 years ago

Component: DocumentationBuild/Install (cmake)
Summary: Bad build instructions on wikicmake: Detected compiler does not support std namespace on STL classes

arencambre: do you have a c++ compiler installed ?

comment:7 by arencambre, 12 years ago

Yes, I have g++.

comment:8 by mloskot, 12 years ago

Status: newassigned

This is weird. You can try to comment the lines 158-161 here and see if it works.

comment:9 by strk, 12 years ago

Milestone: 3.3.2GEOS Future

comment:10 by mloskot, 12 years ago

@arencambre Have you tried my suggestion above? I wonder if it worked.

comment:11 by arencambre, 12 years ago

Sorry for my slow response. Commenting out those lines appears to fix it. Uncommenting the lines brings back the old error.

Note that I am still using the build I downloaded in late November. I noticed that 3.3.2 is the current version. I had to comment out lines starting at 159, not 158. I can update to the latest if you want.

comment:12 by strk, 12 years ago

Milestone: GEOS Future3.3.3
Version: 3.3.13.3.2

@mloskot, can we do this for 3.3.3 then ?

comment:13 by mloskot, 12 years ago

@arencambre Can you try the recent trunk. I have removed the test (r3563) and hopefully it fixes the problem. Please, confirm if it does.

comment:14 by arencambre, 12 years ago

OK. I followed the instructions at http://trac.osgeo.org/geos/wiki/BuildingOnUnixWithCMake#Configure, except I ran svn checkout http://svn.osgeo.org/geos/trunk@3563 trunk to get that specific version. I was able to make it through cmake ../trunk with no errors.

comment:15 by mloskot, 12 years ago

Resolution: fixed
Status: assignedclosed

comment:16 by strk, 12 years ago

r3564 is the backport to 3.3 branch

Note: See TracTickets for help on using tickets.