#753 closed defect (fixed)
cannot build geos 3.5.0
Reported by: | rashadkm | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 3.6.2 |
Component: | Build/Install (cmake) | Version: | 3.6.1 |
Severity: | Unassigned | Keywords: | |
Cc: | manuelgrizonnet |
Description
trying to make geos 3.5.0 package for osgeo4w.
include could not find load file: GenerateSourceGroups
-- Looking for stddef.h - found -- Check size of __int64 -- Check size of __int64 - done -- Performing Test HAVE_STD_ISNAN -- Performing Test HAVE_STD_ISNAN - Failed -- Performing Test HAVE_ISNAN -- Performing Test HAVE_ISNAN - Success -- Performing Test HAVE_STD_ISFINITE -- Performing Test HAVE_STD_ISFINITE - Failed -- Performing Test HAVE_FINITE -- Performing Test HAVE_FINITE - Success -- Generating revision header C:/OSGeo4W/usr/src/osgeo4w/geos/geos-3.5.0/geos_svn_revision.h Can't fetch local revision (neither .svn nor .git found) Not updating existing rev file at GEOS_SVN_REVISION CMake Error at CMakeLists.txt:326 (include): include could not find load file: GenerateSourceGroups CMake Error at include/CMakeLists.txt:57 (GenerateSourceGroups): Unknown CMake command "GenerateSourceGroups". -- Configuring incomplete, errors occurred! See also "C:/OSGeo4W/usr/src/osgeo4w/geos/geos-3.5.0-build/CMakeFiles/CMakeOutput.log". See also "C:/OSGeo4W/usr/src/osgeo4w/geos/geos-3.5.0-build/CMakeFiles/CMakeError.log". C:\OSGeo4W\usr\src\osgeo4w\geos\geos-3.5.0-build>cmake --build . --config Release --target INSTALL NMAKE : fatal error U1073: incapable d'obtenir 'INSTALL'
Change History (24)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
CMake (still) assumes you build source tree checked out from SVN or Git repository, not from the package.
Try this fixed CMakeLists.txt from trunk in r4112
comment:3 by , 8 years ago
Thanks for the quick fix.
I cannot checkout from svn as I am preparing a package for OSGeo4W.
Is it possible to get a n updated source archive with this patch. ?
follow-up: 5 comment:4 by , 8 years ago
No. First you need to check it out or just download CMakeLists.txt (https://trac.osgeo.org/geos/browser/trunk/CMakeLists.txt?rev=4112&format=txt), and test if solution works for you. Once you have tested it and confirmed it's sound, the package may be updated.
comment:5 by , 8 years ago
Replying to mloskot:
No. First you need to check it out or just download CMakeLists.txt (https://trac.osgeo.org/geos/browser/trunk/CMakeLists.txt?rev=4112&format=txt), and test if solution works for you. Once you have tested it and confirmed it's sound, the package may be updated.
okay. seems fair. I will test it tomorrow and update to you.
comment:6 by , 8 years ago
it is not working. the same problem. The error that there is no GenerateSourceGroups.cmake file existing in the source tree.
https://trac.osgeo.org/geos/browser/trunk/CMakeLists.txt#L329
comment:7 by , 8 years ago
I found the file in here https://trac.osgeo.org/geos/browser/trunk/cmake/modules. but it is not found in the downloaded archive.
copying the file from trac.osgeo.org into geos-3.5.0/cmake/modules fixed the problem for me
comment:8 by , 8 years ago
another error;
BufferOp.cpp C:\OSGeo4W\usr\src\osgeo4w\geos\geos-3.5.0\src\operation\buffer\BufferOp.cpp(92) : error C2589: '(' : illeg al token on right side of '::' C:\OSGeo4W\usr\src\osgeo4w\geos\geos-3.5.0\src\operation\buffer\BufferOp.cpp(92) : error C2059: syntax erro r : '::' C:\OSGeo4W\usr\src\osgeo4w\geos\geos-3.5.0\src\operation\buffer\BufferOp.cpp(92) : error C2589: '(' : illeg al token on right side of '::' C:\OSGeo4W\usr\src\osgeo4w\geos\geos-3.5.0\src\operation\buffer\BufferOp.cpp(92) : error C2589: '(' : illeg al token on right side of '::' C:\OSGeo4W\usr\src\osgeo4w\geos\geos-3.5.0\src\operation\buffer\BufferOp.cpp(92) : error C2589: '(' : illeg al token on right side of '::' C:\OSGeo4W\usr\src\osgeo4w\geos\geos-3.5.0\src\operation\buffer\BufferOp.cpp(92) : error C2589: '(' : illeg al token on right side of '::' NMAKE : fatal error U1077: 'C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe'á: code retour '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe"'á: code retour '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe"'á: code retour '0x2' Stop.
EDIT: please, learn how to mark code blocks on Trac using triple { and } ~mloskot
follow-up: 10 comment:9 by , 8 years ago
sucessfully built geos 3.5.0 for osgeo4W 32bit
- geos-3.5.0.tar.gz from http://download.osgeo.org/geos/geos-3.5.0.tar.bz2
- https://trac.osgeo.org/geos/browser/trunk/CMakeLists.txt?rev=4112&format=txt
- https://trac.osgeo.org/geos/browser/trunk/cmake/modules/GenerateSourceGroups.cmake?format=txt
and when running cmake, I added -DCMAKE_CXX_FLAGS:STRING="-DNOMINMAX"
TODO: backport (2) and (3) to 3.5.0 release include -DNOMINMAX patch inside the (1) if compiler is MSVC. optional. I would also added /EHsc for msvc compiler in the cmakelists.txt
Do you prefer to create a patch against trunk?
comment:10 by , 8 years ago
Replying to rashadkm:
sucessfully built geos 3.5.0 for osgeo4W 32bit
- geos-3.5.0.tar.gz from http://download.osgeo.org/geos/geos-3.5.0.tar.bz2
- https://trac.osgeo.org/geos/browser/trunk/CMakeLists.txt?rev=4112&format=txt
- https://trac.osgeo.org/geos/browser/trunk/cmake/modules/GenerateSourceGroups.cmake?format=txt
and when running cmake, I added -DCMAKE_CXX_FLAGS:STRING="-DNOMINMAX"
TODO: backport (2) and (3) to 3.5.0 release include -DNOMINMAX patch inside the (1) if compiler is MSVC. optional. I would also added /EHsc for msvc compiler in the cmakelists.txt
Do you prefer to create a patch against trunk?
Great job. That is the testing I was asking for.
No need for patch, I will merge the related changes from trunk to branches/3.5.
comment:11 by , 8 years ago
Fixes merged from trunk into branches/3.5 (r4115).
Regarding publishing new source package, please post request to geos-devel mailing list.
comment:16 by , 6 years ago
Cc: | added |
---|---|
Component: | Default → Build/Install (cmake) |
Milestone: | 3.5.1 → 3.6.2 |
Resolution: | fixed |
Status: | closed → reopened |
Version: | 3.5.0 → 3.6.1 |
The file cmake/modules/GenerateSourceGroups.cmake is not available in geos 3.6.1 source archive (http://download.osgeo.org/geos/geos-3.6.1.tar.bz2) which prevent to compile it using cmake on Linux.
This bug was discussing several problems which where fixed in trunk and branch 3.5 but I'm not sure what prevent to add this macro to geos source package. I'm perhaps missing something here.
Regards,
follow-up: 19 comment:17 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
I'm perhaps missing something here.
Just do not use CMake to build GEOS, especially if 0) you don't want to use experimental build configuration 1) it is not working for you 2) you are not able to patch & fix it.
It is indicated in red that The official build system is the GNU Automake - https://trac.osgeo.org/geos/wiki/BuildingOnUnixWithCMake
follow-up: 20 comment:18 by , 6 years ago
I guess fixing this bug is not hard. But to go unoffical on cmake support for this seems bad IMHO.
in case of projects with cross build, cmake does a nice job rather than using switching between nmake and autconf for windows and otherwise.
btw, the red text in wiki says official cmake support since 3.5.0.
follow-up: 21 comment:19 by , 6 years ago
Replying to mloskot:
I'm perhaps missing something here.
Just do not use CMake to build GEOS, especially if 0) you don't want to use experimental build configuration 1) it is not working for you 2) you are not able to patch & fix it.
It is indicated in red that The official build system is the GNU Automake - https://trac.osgeo.org/geos/wiki/BuildingOnUnixWithCMake
Sorry I did not put much context to explain why I reopened the discussion. I was updating the geos version from 3.5 to 3.6 in the orfeo toolbox superbuild which compiles geos using cmake.
I was able to patch & fix the issue by just adding the cmake macro GenerateSourceGroups to the geos source tree:
geos 3.6.1 compiles with cmake without error now. Let me know if there is something I can contribute upstream to improve the support of cmake.
Best,
Manuel
comment:20 by , 6 years ago
Replying to rashadkm:
btw, the red text in wiki says official cmake support since 3.5.0.
The wording on that wiki page is a bit unfortunate as it may suggest that in terms of feature and completeness GEOS supports CMake as well as Autotools. That is not true.
CMake is just officially shipped with GEOS, but as far as my info is up to date, it is secondary build configuration that may be lacking.
comment:21 by , 6 years ago
Replying to manuelgrizonnet:
geos 3.6.1 compiles with cmake without error now. Let me know if there is something I can contribute upstream to improve the support of cmake.
I'm not involved in releasing GEOS, but AFAIU /cmake
folder is not being copied into source package archive during ./autogen.sh && ./configure && make dist-bzip2
used to prepare the package.
So, seems like there is some autotools magic missing,.
comment:22 by , 6 years ago
Probably something that needs be added to EXTRA_DIST You're welcome to send patches, manuelgrizonnet
geos source downloaded from http://download.osgeo.org/geos/geos-3.5.0.tar.bz2