onflapp / gs-desktop

GNUstep Desktop
https://onflapp.github.io/gs-desktop/index.html
MIT License
101 stars 6 forks source link

problem building in Ubuntu 22.04 #22

Closed h-g-s closed 10 months ago

h-g-s commented 10 months ago

Hi,

I'm trying to build it on Ubuntu 22.04, but got the following error:

/usr/bin/ld.gold: error: cannot find -lstdc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Full log goes below. Any hint on how could I solve it ? Already installed the debian dependencies with the script.

sudo -E ./build_world.sh 01-build_libobjc2.sh

libobjc2

-- The C compiler identification is Clang 14.0.0 -- The ASM compiler identification is Clang with GNU-like command-line -- Found assembler: /usr/bin/clang -- The CXX compiler identification is Clang 14.0.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/clang - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - failed -- Check for working CXX compiler: /usr/bin/clang++ -- Check for working CXX compiler: /usr/bin/clang++ - broken CMake Error at /usr/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62 (message): The C++ compiler

"/usr/bin/clang++"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: /home/ANT.AMAZON.COM/sharoldo/git/libobjc2/_build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_5bf81/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_5bf81.dir/build.make CMakeFiles/cmTC_5bf81.dir/build
gmake[1]: Entering directory '/home/ANT.AMAZON.COM/sharoldo/git/libobjc2/_build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_5bf81.dir/testCXXCompiler.cxx.o
/usr/bin/clang++    -MD -MT CMakeFiles/cmTC_5bf81.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_5bf81.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_5bf81.dir/testCXXCompiler.cxx.o -c /home/ANT.AMAZON.COM/sharoldo/git/libobjc2/_build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
Linking CXX executable cmTC_5bf81
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_5bf81.dir/link.txt --verbose=1
/usr/bin/clang++ -fuse-ld=/usr/bin/ld.gold  CMakeFiles/cmTC_5bf81.dir/testCXXCompiler.cxx.o -o cmTC_5bf81 
/usr/bin/ld.gold: error: cannot find -lstdc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [CMakeFiles/cmTC_5bf81.dir/build.make:100: cmTC_5bf81] Error 1
gmake[1]: Leaving directory '/home/ANT.AMAZON.COM/sharoldo/git/libobjc2/_build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:127: cmTC_5bf81/fast] Error 2

CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:3 (project)

-- Configuring incomplete, errors occurred! See also "/home/ANT.AMAZON.COM/sharoldo/git/libobjc2/_build/CMakeFiles/CMakeOutput.log".

onflapp commented 10 months ago

is this "clean" system or has it been upgraded from earlier ubuntu versions? there is certainly something wrong with the clang. Maybe the build is getting confused about what version of clang to use.

h-g-s commented 10 months ago

It is not an upgraded ubuntu but has lots of packages installed. Seems that it tries to build with clang 14...

onflapp commented 10 months ago

I know it doesn't really help with resolving your problem, but I just test the build process on new Ubuntu 22 with default clang 14. All works as expected. My guess is there must be some kind of dependency problem on your end where something (maybe other installation of clang version) is preventing clang from finding standard C++ libraries. If you don't mind, I will close this issue for now.