LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Can't build 2geom from slackbuilds.org on Slackware 15.0 (https://www.linuxquestions.org/questions/slackware-14/cant-build-2geom-from-slackbuilds-org-on-slackware-15-0-a-4175731790/)

M0M0 12-14-2023 06:26 AM

Can't build 2geom from slackbuilds.org on Slackware 15.0
 
When I try to build 2geom, I get:
Code:

[ 45%] Building CXX object src/2geom/CMakeFiles/2geom.dir/utils.cpp.o
[ 45%] Linking CXX shared library lib2geom.so
[ 45%] Built target 2geom
[ 45%] Building CXX object tests/CMakeFiles/intersection-graph-test.dir/intersection-graph-test.cpp.o
[ 48%] Linking CXX executable intersection-graph-test
/usr/bin/ld: CMakeFiles/intersection-graph-test.dir/intersection-graph-test.cpp.o: in function `void testing::internal::DefaultPrintTo<Geom::Path>(testing::internal::WrapPrinterType<(testing::internal::DefaultPrinterType)0>, Geom::Path const&, std::ostream*) [clone .isra.0]':
intersection-graph-test.cpp:(.text._ZN7testing8internal14DefaultPrintToIN4Geom4PathEEEvNS0_15WrapPrinterTypeILNS0_18DefaultPrinterTypeE0EEERKT_PSo.isra.0[_ZN7testing8internal18CmpHelperEQFailureIN4Geom10PathVectorENS2_4PathEEENS_15AssertionResultEPKcS7_RKT_RKT0_]+0x10b): undefined reference to `testing::internal2::PrintBytesInObjectTo(unsigned char const*, unsigned long, std::ostream*)'
collect2: Fehler: ld gab 1 als Ende-Status zurück
make[2]: *** [tests/CMakeFiles/intersection-graph-test.dir/build.make:101: tests/intersection-graph-test] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:501: tests/CMakeFiles/intersection-graph-test.dir/all] Fehler 2
make: *** [Makefile:146: all] Fehler 2

Is this just me or is there a general problem?

willysr 12-14-2023 10:50 AM

It should built fine on latest stable
https://github.com/SlackBuildsOrg/slackbuilds/pull/4063

MDKDIO 12-14-2023 02:54 PM

I built 2geom 5 days ago, worked fine.

Did you install the dependencies ok?

M0M0 12-15-2023 07:55 AM

Rebuild the dependencies, double-conversion, and gtest, did not help.

BrunoLafleur 12-15-2023 09:55 AM

Quote:

Originally Posted by M0M0 (Post 6470371)
When I try to build 2geom, I get:
Code:

[ 45%] Building CXX object src/2geom/CMakeFiles/2geom.dir/utils.cpp.o
[ 45%] Linking CXX shared library lib2geom.so
[ 45%] Built target 2geom
[ 45%] Building CXX object tests/CMakeFiles/intersection-graph-test.dir/intersection-graph-test.cpp.o
[ 48%] Linking CXX executable intersection-graph-test
/usr/bin/ld: CMakeFiles/intersection-graph-test.dir/intersection-graph-test.cpp.o: in function `void testing::internal::DefaultPrintTo<Geom::Path>(testing::internal::WrapPrinterType<(testing::internal::DefaultPrinterType)0>, Geom::Path const&, std::ostream*) [clone .isra.0]':
intersection-graph-test.cpp:(.text._ZN7testing8internal14DefaultPrintToIN4Geom4PathEEEvNS0_15WrapPrinterTypeILNS0_18DefaultPrinterTypeE0EEERKT_PSo.isra.0[_ZN7testing8internal18CmpHelperEQFailureIN4Geom10PathVectorENS2_4PathEEENS_15AssertionResultEPKcS7_RKT_RKT0_]+0x10b): undefined reference to `testing::internal2::PrintBytesInObjectTo(unsigned char const*, unsigned long, std::ostream*)'
collect2: Fehler: ld gab 1 als Ende-Status zurück
make[2]: *** [tests/CMakeFiles/intersection-graph-test.dir/build.make:101: tests/intersection-graph-test] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:501: tests/CMakeFiles/intersection-graph-test.dir/all] Fehler 2
make: *** [Makefile:146: all] Fehler 2

Is this just me or is there a general problem?

It seems your extract is too short to tell something. Were the 2 dependencies correctly generated and installed ? Have you a full Slackware install (maybe without one or other desktop) ?

saxa 12-16-2023 06:41 AM

would be good to see the verbose output of cmake and even the configure phase.

M0M0 12-27-2023 08:44 AM

Since the routines which could not be linked had the namespace `testing::`, I added `-D2GEOM_TESTING=OFF` to the Slackbuild's cmake line. Using this modification, it build (and works) fine.

Not sure what the actual problem was, but since the tests are not run anyway, their building should probably be removed from the Slackbuild script anyway.

willysr 12-27-2023 09:35 AM

It seems you missed gtest?

M0M0 12-29-2023 05:35 AM

No, gtest is installed. I can also link arbitrary objects against it without any problem (so the linker does normally find it). The header files are also found when building 2geom. Just the linking seems to fail.

brobr 12-29-2023 06:15 AM

Although not really understanding why, but sometimes, when compiling inkscape I had to remove the old inkscape package first as 2geom did not get built properly (it was omitted/skipped).

Does it help to remove the old 2geom package first, before compiling the new one?

(hmmm; at my end on current the error does not show up, and compiling works when 2geom is present; so dunno whether this would work)

litelinux 12-30-2023 03:27 AM

When compiling Inkscape 1.3.2 with a modified SlackBuild from SBo, it didn't build successfully until I enabled -DWITH_INTERNAL_2GEOM=ON in the cmake options. I forgot what was causing the original to not build though.

--ltlnx


All times are GMT -5. The time now is 09:15 PM.