dhewm3 icon indicating copy to clipboard operation
dhewm3 copied to clipboard

compile issue with mac os 11.7.10

Open xmansch opened this issue 1 year ago • 8 comments

user @tomkidd reverse cmakelist.txt form mmacosx-version-min=10.9 to mmacosx-version-min=10.7 but with this settings i have complie error: /Users/mansch/Downloads/dhewm3/neo/sys/platform.h:242:10: fatal error: 'cstddef' file not found

i think we need for mac more complex compile logic

xmansch avatar Aug 03 '24 19:08 xmansch

Does it work better if in neo/sys/platform.h:242 you replace #include <cstddef> with #include <stddef.h>?

(That compile error is surprising anyway, because I think even C++98 had <cstddef>, so there's no reason why OSX 10.7 shouldn't have supported it)

DanielGibson avatar Aug 03 '24 20:08 DanielGibson

Try updating your xcode, maybe you have a buggy version

DanielGibson avatar Aug 04 '24 01:08 DanielGibson

Does it work better if in neo/sys/platform.h:242 you replace #include <cstddef> with #include <stddef.h>?

(That compile error is surprising anyway, because I think even C++98 had <cstddef>, so there's no reason why OSX 10.7 shouldn't have supported it)

this error in multiple c++ files

clang: warning: clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found] clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found] include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found] clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found] clang: warningclang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found] : include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found] clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found] clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found] In file included from /Users/mansch/Downloads/dhewm3/neo/idlib/bv/Sphere.cpp:29: /Users/mansch/Downloads/dhewm3/neo/sys/platform.h:242:10: fatal error: 'cstddef' file not found #include ^~~~~~~~~ In file included from /Users/mansch/Downloads/dhewm3/neo/idlib/geometry/DrawVert.cpp:29: /Users/mansch/Downloads/dhewm3/neo/sys/platform.h:242:10: fatal error: 'cstddef' file not found #include ^~~~~~~~~ In file included from /Users/mansch/Downloads/dhewm3/neo/idlib/bv/Frustum.cpp:29: /Users/mansch/Downloads/dhewm3/neo/sys/platform.h:242:10: fatal error: 'cstddef' file not found #include ^~~~~~~~~ In file included from /Users/mansch/Downloads/dhewm3/neo/idlib/bv/Box.cpp:29: /Users/mansch/Downloads/dhewm3/neo/sys/platform.h:242:10: fatal error: 'cstddef' file not found #include ^~~~~~~~~ In file included from /Users/mansch/Downloads/dhewm3/neo/idlib/bv/Bounds.cpp:29: /Users/mansch/Downloads/dhewm3/neo/sys/platform.h:242:10: fatal error: 'cstddef' file not found #include ^~~~~~~~~ In file included from /Users/mansch/Downloads/dhewm3/neo/idlib/geometry/Winding2D.cpp:29: /Users/mansch/Downloads/dhewm3/neo/sys/platform.h:242:10: fatal error: 'cstddef' file not found #include ^~~~~~~~~ In file included from /Users/mansch/Downloads/dhewm3/neo/idlib/geometry/Surface_SweptSpline.cpp:29: /Users/mansch/Downloads/dhewm3/neo/sys/platform.h:242:10: fatal error: 'cstddef' file not found #include ^~~~~~~~~ In file included from /Users/mansch/Downloads/dhewm3/neo/idlib/geometry/Winding.cpp:29: /Users/mansch/Downloads/dhewm3/neo/sys/platform.h:242:10: fatal error: 'cstddef' file not found #include ^~~~~~~~~

When i replace csrddef.h

/Users/mansch/Downloads/dhewm3/neo/sys/platform.h:242:10: fatal error: 'cstddef.h' file not found

xmansch avatar Aug 04 '24 10:08 xmansch

Try updating your xcode, maybe you have a buggy version

i don't use xcode only command lines tools - i use latest

Apple clang version 13.0.0 (clang-1300.0.29.30) Target: x86_64-apple-darwin20.6.0

i use only 2 coomands: git pull && make -j8

xmansch avatar Aug 04 '24 10:08 xmansch

i use only 2 coomands: git pull && make -j8

you should also run cmake at some point (maybe cmake needs updating?)

When i replace csrddef.h /Users/mansch/Downloads/dhewm3/neo/sys/platform.h:242:10: fatal error: 'cstddef.h' file not found

I wrote #include <stddef.h> not #include <cstddef.h>

clang: warning: clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]

Why is your clang trying to use libstdc++ for 10.7 even though the headers aren't available? Seems pretty broken (and not set like that by dhewm3's CMakeLists.txt, i.e. it must be the default from either the compiler itself or cmake)

DanielGibson avatar Aug 05 '24 12:08 DanielGibson

Have you tried creating a new build directory and running cmake in there to generate new makefiles? Maybe this is because of a mixture of the settings cmake set initially when you first built dhewm3, when mmacosx-version-min was still set to 10.9, and others that were updated now for 10.7, and it's somehow in an inconsistent state?

DanielGibson avatar Aug 05 '24 12:08 DanielGibson

i use only 2 coomands: git pull && make -j8

you should also run cmake at some point (maybe cmake needs updating?)

When i replace csrddef.h /Users/mansch/Downloads/dhewm3/neo/sys/platform.h:242:10: fatal error: 'cstddef.h' file not found

I wrote #include <stddef.h> not #include <cstddef.h>

clang: warning: clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]

Why is your clang trying to use libstdc++ for 10.7 even though the headers aren't available? Seems pretty broken (and not set like that by dhewm3's CMakeLists.txt, i.e. it must be the default from either the compiler itself or cmake)

i change to <stddef.h> then i have this error:

/Users/mansch/Downloads/dhewm3/neo/sys/platform.h:243:10: fatal error: 'typeinfo' file not found #include

xmansch avatar Aug 08 '24 07:08 xmansch

Have you tried creating a new build directory and running cmake in there to generate new makefiles? Maybe this is because of a mixture of the settings cmake set initially when you first built dhewm3, when mmacosx-version-min was still set to 10.9, and others that were updated now for 10.7, and it's somehow in an inconsistent state?

i delete build dir, then mkdir build cd build cmake .. cd .. make -j8

/Users/mansch/Downloads/dhewm3/neo/sys/platform.h:243:10: fatal error: 'typeinfo' file not found #include ^~~~~~~~~~

xmansch avatar Aug 08 '24 07:08 xmansch