Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#1094 closed defect (fixed)

CMake issue with berrie (32-bit raspberry pi)

Reported by: robe Owned by: geos-devel@…
Priority: minor Milestone: 3.10.0
Component: Default Version: 3.9.0
Severity: Unassigned Keywords:
Cc:

Description

I recently switched from autotools to cmake build on the berrie bots. I don't think this is a new issue as it was failing in autotools as well as I recall.

The 64-bit chain is running fine under cmake (was broken in autotools), but 32-bit chain is having issues.

32-bit chain error is below:

Since there are way fewer 32-bit os now than in past, I consider this a minor issue.

23:11:24 [ 57%] Building CXX object CMakeFiles/geos.dir/src/triangulate/quadedge/QuadEdgeSubdivision.cpp.o
23:11:27 In file included from /usr/include/c++/8/vector:69,
23:11:27                  from /home/jenkins/workspace/GEOS_Worker_Run/label/berrie/dae18d6c6555b4b129ec053af3a50f7045fd5413/include/geos/triangulate/quadedge/QuadEdgeSubdivision.h:27,
23:11:27                  from /home/jenkins/workspace/GEOS_Worker_Run/label/berrie/dae18d6c6555b4b129ec053af3a50f7045fd5413/src/triangulate/quadedge/QuadEdgeSubdivision.cpp:19:
23:11:27 /usr/include/c++/8/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const geos::geom::Coordinate&}; _Tp = geos::geom::Coordinate; _Alloc = std::allocator<geos::geom::Coordinate>]’:
23:11:27 /usr/include/c++/8/bits/vector.tcc:413:7: note: parameter passing for argument of type ‘std::vector<geos::geom::Coordinate>::iterator’ {aka ‘__gnu_cxx::__normal_iterator<geos::geom::Coordinate*, std::vector<geos::geom::Coordinate> >’} changed in GCC 7.1
23:11:27        vector<_Tp, _Alloc>::
23:11:27        ^~~~~~~~~~~~~~~~~~~
23:11:27 In file included from /usr/include/c++/8/vector:64,
23:11:27                  from /home/jenkins/workspace/GEOS_Worker_Run/label/berrie/dae18d6c6555b4b129ec053af3a50f7045fd5413/include/geos/triangulate/quadedge/QuadEdgeSubdivision.h:27,
23:11:27                  from /home/jenkins/workspace/GEOS_Worker_Run/label/berrie/dae18d6c6555b4b129ec053af3a50f7045fd5413/src/triangulate/quadedge/QuadEdgeSubdivision.cpp:19:
23:11:27 /usr/include/c++/8/bits/stl_vector.h: In member function ‘std::unique_ptr<geos::geom::Geometry> geos::triangulate::quadedge::QuadEdgeSubdivision::getVoronoiCellEdge(const geos::triangulate::quadedge::QuadEdge*, const geos::geom::GeometryFactory&)’:
23:11:27 /usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<geos::geom::Coordinate*, std::vector<geos::geom::Coordinate> >’ changed in GCC 7.1
23:11:27     _M_realloc_insert(end(), __x);
23:11:27     ^~~~~~~~~~~~~~~~~
23:11:27 /usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<geos::geom::Coordinate*, std::vector<geos::geom::Coordinate> >’ changed in GCC 7.1
23:11:27     _M_realloc_insert(end(), __x);
23:11:27     ^~~~~~~~~~~~~~~~~
23:11:28 /usr/include/c++/8/bits/stl_vector.h: In member function ‘std::unique_ptr<geos::geom::Geometry> geos::triangulate::quadedge::QuadEdgeSubdivision::getVoronoiCellPolygon(const geos::triangulate::quadedge::QuadEdge*, const geos::geom::GeometryFactory&)’:
23:11:28 /usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<geos::geom::Coordinate*, std::vector<geos::geom::Coordinate> >’ changed in GCC 7.1
23:11:28     _M_realloc_insert(end(), __x);
23:11:28     ^~~~~~~~~~~~~~~~~
23:11:28 /usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<geos::geom::Coordinate*, std::vector<geos::geom::Coordinate> >’ changed in GCC 7.1
23:11:28     _M_realloc_insert(end(), __x);
23:11:28     ^~~~~~~~~~~~~~~~~
23:11:28 /usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<geos::geom::Coordinate*, std::vector<geos::geom::Coordinate> >’ changed in GCC 7.1
23:11:28     _M_realloc_insert(end(), __x);
23:11:28     ^~~~~~~~~~~~~~~~~
23:11:29 [ 57%] Building CXX object CMakeFiles/geos.dir/src/triangulate/quadedge/TrianglePredicate.cpp.o
23:11:29 [ 57%] Building CXX object CMakeFiles/geos.dir/src/triangulate/quadedge/Vertex.cpp.o
23:11:31 [ 57%] Building CXX object CMakeFiles/geos.dir/src/util/Assert.cpp.o
23:11:32 [ 57%] Building CXX object CMakeFiles/geos.dir/src/util/GeometricShapeFactory.cpp.o
23:11:35 [ 58%] Building CXX object CMakeFiles/geos.dir/src/util/Interrupt.cpp.o
23:11:35 [ 58%] Building CXX object CMakeFiles/geos.dir/src/util/Profiler.cpp.o
23:11:37 In file included from /usr/include/c++/8/vector:69,
23:11:37                  from /home/jenkins/workspace/GEOS_Worker_Run/label/berrie/dae18d6c6555b4b129ec053af3a50f7045fd5413/include/geos/profiler.h:25,
23:11:37                  from /home/jenkins/workspace/GEOS_Worker_Run/label/berrie/dae18d6c6555b4b129ec053af3a50f7045fd5413/src/util/Profiler.cpp:15:
23:11:37 /usr/include/c++/8/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const std::chrono::duration<long long int, std::ratio<1, 1000000> >&}; _Tp = std::chrono::duration<long long int, std::ratio<1, 1000000> >; _Alloc = std::allocator<std::chrono::duration<long long int, std::ratio<1, 1000000> > >]’:
23:11:37 /usr/include/c++/8/bits/vector.tcc:413:7: note: parameter passing for argument of type ‘std::vector<std::chrono::duration<long long int, std::ratio<1, 1000000> > >::iterator’ {aka ‘__gnu_cxx::__normal_iterator<std::chrono::duration<long long int, std::ratio<1, 1000000> >*, std::vector<std::chrono::duration<long long int, std::ratio<1, 1000000> > > >’} changed in GCC 7.1
23:11:37        vector<_Tp, _Alloc>::
23:11:37        ^~~~~~~~~~~~~~~~~~~
23:11:37 In file included from /usr/include/c++/8/vector:64,
23:11:37                  from /home/jenkins/workspace/GEOS_Worker_Run/label/berrie/dae18d6c6555b4b129ec053af3a50f7045fd5413/include/geos/profiler.h:25,
23:11:37                  from /home/jenkins/workspace/GEOS_Worker_Run/label/berrie/dae18d6c6555b4b129ec053af3a50f7045fd5413/src/util/Profiler.cpp:15:
23:11:37 /usr/include/c++/8/bits/stl_vector.h: In member function ‘void geos::util::Profiler::stop(std::__cxx11::string)’:
23:11:37 /usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<std::chrono::duration<long long int, std::ratio<1, 1000000> >*, std::vector<std::chrono::duration<long long int, std::ratio<1, 1000000> > > >’ changed in GCC 7.1
23:11:37     _M_realloc_insert(end(), __x);
23:11:37     ^~~~~~~~~~~~~~~~~
23:11:37 [ 58%] Building CXX object CMakeFiles/geos.dir/src/util/math.cpp.o
23:11:38 [ 58%] Building C object CMakeFiles/geos.dir/src/deps/ryu/d2s.c.o
23:11:38 cc1: warning: command line option ‘-fno-implicit-inline-templates’ is valid for C++/ObjC++ but not for C
23:11:38 /home/jenkins/workspace/GEOS_Worker_Run/label/berrie/dae18d6c6555b4b129ec053af3a50f7045fd5413/src/deps/ryu/d2s.c: In function ‘to_chars_uint64’:
23:11:38 /home/jenkins/workspace/GEOS_Worker_Run/label/berrie/dae18d6c6555b4b129ec053af3a50f7045fd5413/src/deps/ryu/d2s.c:534:9: warning: conversion to ‘int’ from ‘uint32_t’ {aka ‘unsigned int’} may change the sign of the result [-Wsign-conversion]
23:11:38   return i;
23:11:38          ^
23:11:38 /home/jenkins/workspace/GEOS_Worker_Run/label/berrie/dae18d6c6555b4b129ec053af3a50f7045fd5413/src/deps/ryu/d2s.c: In function ‘to_chars_fixed’:
23:11:38 /home/jenkins/workspace/GEOS_Worker_Run/label/berrie/dae18d6c6555b4b129ec053af3a50f7045fd5413/src/deps/ryu/d2s.c:553:28: warning: conversion to ‘uint32_t’ {aka ‘unsigned int’} from ‘int32_t’ {aka ‘int’} may change the sign of the result [-Wsign-conversion]
23:11:38    trailing_integer_zeros = exp;
23:11:38                             ^~~
23:11:38 /home/jenkins/workspace/GEOS_Worker_Run/label/berrie/dae18d6c6555b4b129ec053af3a50f7045fd5413/src/deps/ryu/d2s.c:561:34: warning: conversion to ‘uint32_t’ {aka ‘unsigned int’} from ‘int32_t’ {aka ‘int’} may change the sign of the result [-Wsign-conversion]
23:11:38     int32_t digits_to_trim = -exp - precision;
23:11:38                                   ^
23:11:38 /home/jenkins/workspace/GEOS_Worker_Run/label/berrie/dae18d6c6555b4b129ec053af3a50f7045fd5413/src/deps/ryu/d2s.c:561:29: warning: conversion to ‘int32_t’ {aka ‘int’} from ‘uint32_t’ {aka ‘unsigned int’} may change the sign of the result [-Wsign-conversion]
23:11:38     int32_t digits_to_trim = -exp - precision;
23:11:38                              ^
23:11:38 /home/jenkins/workspace/GEOS_Worker_Run/label/berrie/dae18d6c6555b4b129ec053af3a50f7045fd5413/src/deps/ryu/d2s.c:584:14: warning: conversion to ‘uint32_t’ {aka ‘unsigned int’} from ‘int32_t’ {aka ‘int’} may change the sign of the result [-Wsign-conversion]
23:11:38       olength -= digits_to_trim;
23:11:38               ^~
23:11:38 /home/jenkins/workspace/GEOS_Worker_Run/label/berrie/dae18d6c6555b4b129ec053af3a50f7045fd5413/src/deps/ryu/d2s.c:601:29: warning: conversion to ‘uint32_t’ {aka ‘unsigned int’} from ‘int32_t’ {aka ‘int’} may change the sign of the result [-Wsign-conversion]
23:11:38     trailing_integer_zeros = exp;
23:11:38                              ^~~
23:11:38 /home/jenkins/workspace/GEOS_Worker_Run/label/berrie/dae18d6c6555b4b129ec053af3a50f7045fd5413/src/deps/ryu/d2s.c:609:34: warning: conversion to ‘uint32_t’ {aka ‘unsigned int’} from ‘int32_t’ {aka ‘int’} may change the sign of the result [-Wsign-conversion]
23:11:38     integer_part_length = olength - nexp;
23:11:38                                   ^
23:11:38 /home/jenkins/workspace/GEOS_Worker_Run/label/berrie/dae18d6c6555b4b129ec053af3a50f7045fd5413/src/deps/ryu/d2s.c:611:50: warning: conversion to ‘int32_t’ {aka ‘const int’} from ‘uint32_t’ {aka ‘unsigned int’} may change the sign of the result [-Wsign-conversion]
23:11:38     if (decimal_part < pow_10(decimal_part_length - 1))
23:11:38                               ~~~~~~~~~~~~~~~~~~~~^~~
23:11:38 /home/jenkins/workspace/GEOS_Worker_Run/label/berrie/dae18d6c6555b4b129ec053af3a50f7045fd5413/src/deps/ryu/d2s.c:623:33: warning: conversion to ‘uint32_t’ {aka ‘unsigned int’} from ‘int32_t’ {aka ‘int’} may change the sign of the result [-Wsign-conversion]
23:11:38     leading_decimal_zeros = nexp - olength;
23:11:38                                  ^
23:11:40 [ 58%] Linking CXX shared library lib/libgeos.so
23:11:41 /usr/bin/ld: CMakeFiles/geos.dir/src/noding/BasicSegmentString.cpp.o:(.rodata+0x0): multiple definition of `typeinfo name for geos::noding::BasicSegmentString'; CMakeFiles/geos.dir/src/inlines.cpp.o:(.rodata+0x50): first defined here
23:11:41 /usr/bin/ld: CMakeFiles/geos.dir/src/noding/BasicSegmentString.cpp.o:(.data.rel.ro+0x0): multiple definition of `typeinfo for geos::noding::BasicSegmentString'; CMakeFiles/geos.dir/src/inlines.cpp.o:(.data.rel.ro+0x18): first defined here
23:11:41 /usr/bin/ld: CMakeFiles/geos.dir/src/noding/BasicSegmentString.cpp.o:(.data.rel.ro+0xc): multiple definition of `vtable for geos::noding::BasicSegmentString'; CMakeFiles/geos.dir/src/inlines.cpp.o:(.data.rel.ro+0xa0): first defined here
23:11:41 /usr/bin/ld: CMakeFiles/geos.dir/src/noding/MCIndexNoder.cpp.o:(.data.rel.ro+0x30): multiple definition of `vtable for geos::noding::MCIndexNoder'; CMakeFiles/geos.dir/src/inlines.cpp.o:(.data.rel.ro+0xc4): first defined here
23:11:41 /usr/bin/ld: CMakeFiles/geos.dir/src/noding/MCIndexNoder.cpp.o:(.rodata+0x34): multiple definition of `typeinfo name for geos::noding::MCIndexNoder'; CMakeFiles/geos.dir/src/inlines.cpp.o:(.rodata+0x74): first defined here
23:11:41 /usr/bin/ld: CMakeFiles/geos.dir/src/noding/MCIndexNoder.cpp.o:(.data.rel.ro+0xc): multiple definition of `typeinfo for geos::noding::MCIndexNoder'; CMakeFiles/geos.dir/src/inlines.cpp.o:(.data.rel.ro+0x24): first defined here
23:11:41 collect2: error: ld returned 1 exit status
23:11:41 make[2]: *** [CMakeFiles/geos.dir/build.make:5379: lib/libgeos.so.3.10.0dev] Error 1
23:11:41 make[1]: *** [CMakeFiles/Makefile2:585: CMakeFiles/geos.dir/all] Error 2
23:11:41 make: *** [Makefile:163: all] Error 2
23:11:41 Test project /home/jenkins/workspace/GEOS_Worker_Run/label/berrie/dae18d6c6555b4b129ec053af3a50f7045fd5413/build
23:11:41         Start   1: unit-algorithm-Angle
23:11:41 Could not find executable /home/jenkins/workspace/GEOS_Worker_Run/label/berrie/dae18d6c6555b4b129ec053af3a50f7045fd5413/build/bin/test_geos_unit

Change History (9)

comment:2 by robe, 3 years ago

Summary: CMake issue with berrie32 (raspberry pi)CMake issue with berrie (32-bit raspberry pi)

comment:3 by dbaston, 3 years ago

Looks like the same problem we have on every platform where inlines.cpp isn't #ifdef'd-out. If nobody knows why we have that file, maybe we can remove it?

See https://github.com/libgeos/geos/issues/288 https://github.com/libgeos/geos/issues/353 and possibly others

comment:4 by bowguy, 3 years ago

Fyi Using make instead of CMake gives the same error

/usr/bin/ld: noding/.libs/libnoding.a(BasicSegmentString.o):(.rodata+0x0): multiple definition of `typeinfo name for geos::noding::BasicSegmentString'; .libs/inlines.o:(.rodata+0x6f0): first defined here /usr/bin/ld: noding/.libs/libnoding.a(BasicSegmentString.o):(.data.rel.ro+0x0): multiple definition of `typeinfo for geos::noding::BasicSegmentString'; .libs/inlines.o:(.data.rel.ro+0x18): first defined here /usr/bin/ld: noding/.libs/libnoding.a(BasicSegmentString.o):(.data.rel.ro+0xc): multiple definition of `vtable for geos::noding::BasicSegmentString'; .libs/inlines.o:(.data.rel.ro+0x94): first defined here

comment:5 by Dave Allured, 3 years ago

It looks like arm64 has the same issue. Linker gets the same duplicate symbols for BasicSegmentString. See Trac #1090.

comment:6 by pramsey, 3 years ago

Milestone: 3.9.13.9.2

comment:7 by Regina Obe <lr@…>, 3 years ago

In 6318f22/git:

Drop inlines.cpp for geos 3.10 to address duplicate symbols errors on many platforms
References #1094
References #1090

comment:8 by robe, 3 years ago

Resolution: fixed
Status: newclosed

dropping the inlines.cpp seems to have fixed berrie's issues

https://debbie.postgis.net/job/GEOS_Worker_Run/label=berrie/1061/console

comment:9 by robe, 3 years ago

Milestone: 3.9.23.10.0
Note: See TracTickets for help on using tickets.