Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile issue with mac os 11.7.10 #600

Open
xmansch opened this issue Aug 3, 2024 · 8 comments
Open

compile issue with mac os 11.7.10 #600

xmansch opened this issue Aug 3, 2024 · 8 comments

Comments

@xmansch
Copy link

xmansch commented Aug 3, 2024

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

@DanielGibson
Copy link
Member

DanielGibson commented Aug 3, 2024

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
Copy link
Member

Try updating your xcode, maybe you have a buggy version

@xmansch
Copy link
Author

xmansch commented Aug 4, 2024

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
Copy link
Author

xmansch commented Aug 4, 2024

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

@DanielGibson
Copy link
Member

DanielGibson commented Aug 5, 2024

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
Copy link
Member

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?

@xmansch
Copy link
Author

xmansch commented Aug 8, 2024

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
Copy link
Author

xmansch commented Aug 8, 2024

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
^~~~~~~~~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants