Closed Nazariglez closed 6 days ago
Hmm ok, here's my config:
Here's what I do before building the actual samples:
git clone https://github.com/floooh/sokol-nim
cd sokol-nim
nimble uninstall sokol -Y
nimble install
...then build some of the samples, for instance
nimble cube
...this outputs the following and then starts the cube sample:
sokol-nim ➤ nimble cube git:master
Verifying dependencies for sokol@0.5.0
Executing task cube in /Users/floh/scratch/sokol-nim/sokol.nimble
Hint: used config file '/opt/homebrew/Cellar/nim/2.0.6/nim/config/nim.cfg' [Conf]
Hint: used config file '/opt/homebrew/Cellar/nim/2.0.6/nim/config/config.nims' [Conf]
..................................................................................
CC: sokol_log
CC: sokol_gfx
CC: sokol_app
CC: sokol_glue
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/system/exceptions.nim
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/std/private/since.nim
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/system/ctypes.nim
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/std/sysatomics.nim
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/system/ansi_c.nim
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/system/memory.nim
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/std/private/syslocks.nim
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/std/private/threadtypes.nim
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/std/private/digitsutils.nim
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/std/private/miscdollars.nim
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/std/assertions.nim
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/system/iterators.nim
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/system/coro_detection.nim
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/std/private/dragonbox.nim
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/std/private/schubfach.nim
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/std/formatfloat.nim
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/std/objectdollar.nim
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/system/dollars.nim
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/std/typedthreads.nim
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/system/stacktraces.nim
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/std/private/bitops_utils.nim
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/system/countbits_impl.nim
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/system/repr_v2.nim
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/std/widestrs.nim
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/std/syncio.nim
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/system.nim
CC: ../../../.nimble/pkgs2/sokol-0.5.0-a18f55ac213f621e6431a7f2a5e029e45fa9b89e/sokol/log.nim
CC: ../../../.nimble/pkgs2/sokol-0.5.0-a18f55ac213f621e6431a7f2a5e029e45fa9b89e/sokol/gfx.nim
CC: ../../../.nimble/pkgs2/sokol-0.5.0-a18f55ac213f621e6431a7f2a5e029e45fa9b89e/sokol/app.nim
CC: ../../../.nimble/pkgs2/sokol-0.5.0-a18f55ac213f621e6431a7f2a5e029e45fa9b89e/sokol/glue.nim
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/core/macros.nim
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/pure/bitops.nim
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/pure/fenv.nim
CC: ../../../../../opt/homebrew/Cellar/nim/2.0.6/nim/lib/pure/math.nim
CC: math/vec3.nim
CC: math/mat4.nim
CC: shaders/cube.nim
CC: cube.nim
Hint: [Link]
ld: warning: ignoring duplicate libraries: '-lm'
Hint: mm: orc; threads: on; opt: none (DEBUG BUILD, `-d:release` generates faster code)
35458 lines; 2.629s; 46.492MiB peakmem; proj: examples/cube; out: /Users/floh/scratch/sokol-nim/build/cube [SuccessX]
...can you run the following and paste the output here?
xcrun --sdk macosx --show-sdk-path
...on my setup this prints:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk
...from looking at your console output, it looks like the C build is using an SDK under /Library/Developer/CommandLineTools/
which doesn't look right, the SDK should be in /Applications/Xcode.app
.
...also, please check that there are no CFLAGS
and CXXFLAGS
set on your config, for some reason this seems to be pretty common on macOS, e.g. these should not print anything:
echo $CFLAGS
echo $CXXFLAGS
...that's all I can think of for now.
I had the same output for xcrun and the flags were empty too.
Then I downgrade Xcode to 15.3, nothing... removed commadlinetools directory and reinstalled, nothing... Then I remember that I had once a similar issue similar llvm, I uninstalled it and it works!
I am not sure why... but this works for me. Thank you so much for the help!
Hello! I am leaving this here as we talked in twitter.
I am having some issues running the examples:
I am using a Mac M3, OSX 14.5, XCode 15.4 and commit
commit b5baede27f2d6b9242b09d270d60c0935889bb64 (HEAD -> master, origin/master, origin/HEAD)
.Let me know how can I help! thanks
EDIT: It works on an old intel mac.