vividos / UnderworldAdventures

Underworld Adventures is a project to recreate Ultima Underworld 1 on modern operating systems, using the original game files.
https://vividos.github.io/UnderworldAdventures/
GNU General Public License v2.0
57 stars 3 forks source link

unable to compile on OSX, library not found for -lc++ #10

Closed UncoolAsianDad closed 1 year ago

UncoolAsianDad commented 1 year ago

Describe the bug Unable to compile on OSx

To Reproduce Steps to reproduce the behavior:

  1. clone the repo
  2. navigate to uwadv folder
  3. enter cmake .

Expected behavior build the binrary

Output

❯ cmake . -- The CXX compiler identification is AppleClang 14.0.0.14000029 -- The C compiler identification is AppleClang 14.0.0.14000029 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - failed -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ - broken CMake Error at /usr/local/Cellar/cmake/3.26.0/share/cmake/Modules/CMakeTestCXXCompiler.cmake:60 (message): The C++ compiler

"/usr/bin/c++"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: /Users/hikaru/Projects/UnderworldAdventures/uwadv/CMakeFiles/CMakeScratch/TryCompile-KVUx4N

Run Build Command(s):/usr/local/Cellar/cmake/3.26.0/bin/cmake -E env VERBOSE=1 /usr/local/bin/gmake -f Makefile cmTC_644d9/fast && /usr/local/bin/gmake  -f CMakeFiles/cmTC_644d9.dir/build.make CMakeFiles/cmTC_644d9.dir/build
gmake[1]: Entering directory '/Users/hikaru/Projects/UnderworldAdventures/uwadv/CMakeFiles/CMakeScratch/TryCompile-KVUx4N'
Building CXX object CMakeFiles/cmTC_644d9.dir/testCXXCompiler.cxx.o
/usr/bin/c++   -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.0.sdk -MD -MT CMakeFiles/cmTC_644d9.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_644d9.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_644d9.dir/testCXXCompiler.cxx.o -c /Users/hikaru/Projects/UnderworldAdventures/uwadv/CMakeFiles/CMakeScratch/TryCompile-KVUx4N/testCXXCompiler.cxx
Linking CXX executable cmTC_644d9
/usr/local/Cellar/cmake/3.26.0/bin/cmake -E cmake_link_script CMakeFiles/cmTC_644d9.dir/link.txt --verbose=1
/usr/bin/c++  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.0.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/usr/local/opt/node@14/lib  CMakeFiles/cmTC_644d9.dir/testCXXCompiler.cxx.o -o cmTC_644d9
ld: library not found for -lc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [CMakeFiles/cmTC_644d9.dir/build.make:100: cmTC_644d9] Error 1
gmake[1]: Leaving directory '/Users/hikaru/Projects/UnderworldAdventures/uwadv/CMakeFiles/CMakeScratch/TryCompile-KVUx4N'
gmake: *** [Makefile:127: cmTC_644d9/fast] Error 2

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

-- Configuring incomplete, errors occurred!

Infos

Log file

vividos commented 1 year ago

It seems your development environment is fundamentally broken or not correctly installed. I suggest you set up a simple cmake project and try to complete that. Besides that, the uwadv cmake project is windows only, so it won't work anyway. I'm closing the issue as it's not uwadv related.