Ticket #493 (closed defect: fixed)

Opened 6 months ago

Last modified 5 months ago

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

Changed 6 months ago by mloskot

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.

Changed 6 months ago by arencambre

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.

Changed 6 months ago by mloskot

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.

Changed 6 months ago by arencambre

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!

Changed 6 months ago by strk

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

Changed 5 months ago by strk

  • component changed from Documentation to Build/Install (cmake)
  • summary changed from Bad build instructions on wiki to cmake: Detected compiler does not support std namespace on STL classes

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

Changed 5 months ago by arencambre

Yes, I have g++.

Changed 5 months ago by mloskot

  • status changed from new to assigned

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

Changed 5 months ago by strk

  • milestone changed from 3.3.2 to GEOS Future

Changed 5 months ago by mloskot

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

Changed 5 months ago by arencambre

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.

Changed 5 months ago by strk

  • version changed from 3.3.1 to 3.3.2
  • milestone changed from GEOS Future to 3.3.3

@mloskot, can we do this for 3.3.3 then ?

Changed 5 months ago by mloskot

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

Changed 5 months ago by arencambre

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.

Changed 5 months ago by mloskot

  • status changed from assigned to closed
  • resolution set to fixed

Changed 5 months ago by strk

r3564 is the backport to 3.3 branch

Note: See TracTickets for help on using tickets.