Closed treeform closed 4 years ago
I have done some change to make it work: in nimx/naketools.nim, find and change the correct macOSSDKPath:
b.macOSSDKPath = macosxDevRoot & "/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk"
and the SDKSettings.plist has to be xml format, use the following command to convert it:
sudo plutil -convert xml1 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/SDKSettings.plist
Fri Nov 01: nimx | sw_vers
ProductName: Mac OS X
ProductVersion: 10.15.1
BuildVersion: 19B88
I made the following changes also, but still get same error.
b.macOSSDKPath = macosxDevRoot & "/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk"
sudo plutil -convert xml1 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/SDKSettings.plist
nake
Compiling nakefile...
No task specified, running default task defined by nakefile.
/Users/nix/.nimble/pkgs/nake-1.9.3/nake.nim(93) moduleHook
/Users/nix/.nimble/pkgs/nake-1.9.3/nakelib.nim(252) runTask
/Users/nix/.env/nim/nimx/nimx/nimx/naketools.nim(940) :anonymous
/Users/nix/.env/nim/nimx/nimx/nimx/naketools.nim(293) newBuilder
/Users/nix/.env/nim/nimx/nimx/nimx/naketools.nim(257) newBuilder
/Users/nix/.nimble/pkgs/plists-0.1.0/plists.nim(80) loadPlist
/Users/nix/.choosenim/toolchains/nim-#devel/lib/pure/xmlparser.nim(146) loadXml
/Users/nix/.choosenim/toolchains/nim-#devel/lib/pure/xmlparser.nim(138) loadXml
Error: unhandled exception: Unable to read file: /Applications/Xcode.app/Contents/Developer/SDKs/MacOSX.sdk/SDKSettings.plist [IOError]
The only think that nake does is compile js correctly.
I can use nimx just fine though and cross compile to windows w/o using SDL2 (cause static linking isn't working form reason)
Thanks for a great framework -nix
You have to locate the SDKSettings.plist file, maybe it's not in the directory
Yeah still having issues with this
It should be fixed in the plists dependency. Please update it.
I have done some change to make it work: in nimx/naketools.nim, find and change the correct macOSSDKPath:
b.macOSSDKPath = macosxDevRoot & "/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk"
and the SDKSettings.plist has to be xml format, use the following command to convert it:
sudo plutil -convert xml1 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/SDKSettings.plist
Should I still add this ?
No, with the updated plists (and probably darwin) dependency it should just work
nake |tee nake.error [12:12:30]
/.nimble/pkgs/nake-1.9.3/nake.nim(93) moduleHook
/.nimble/pkgs/nake-1.9.3/nakelib.nim(252) runTask
/.env/nim/nimx/nimx/naketools.nim(931) :anonymous
/.env/nim/nimx/nimx/naketools.nim(282) newBuilder
env/nim/nimx/nimx/naketools.nim(246) newBuilder
/.nimble/pkgs/plists-0.1.0/plists.nim(80) loadPlist
/build/Nim/lib/pure/xmlparser.nim(146) loadXml
/build/Nim/lib/pure/xmlparser.nim(138) loadXml
Error: unhandled exception: Unable to read file: /Applications/Xcode.app/Contents/Developer/SDKs/MacOSX.sdk/SDKSettings.plist [IOError]
No task specified, running default task defined by nakefile.
Can I help with anything ? -- test something ?
Forgot to mention. After updating plists and darwin you also have to delete nakefile (exe).
I'm sorry nakefile exe ? on Osx ?
sudo plutil -convert xml1 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/SDKSettings.plist
aaronm:nimx/ (master*) $ rm -v nakefile [14:05:15]
nakefile
aaronm:nimx/ (master*) $ nake [14:05:24]
Compiling nakefile...
No task specified, running default task defined by nakefile.
.nimble/pkgs/nake-1.9.3/nake.nim(93) moduleHook
/.nimble/pkgs/nake-1.9.3/nakelib.nim(252) runTask
/.env/nim/nimx/nimx/naketools.nim(931) :anonymous
/.env/nim/nimx/nimx/naketools.nim(282) newBuilder
/.env/nim/nimx/nimx/naketools.nim(246) newBuilder
/.nimble/pkgs/plists-0.1.0/plists.nim(80) loadPlist
/build/Nim/lib/pure/xmlparser.nim(146) loadXml
/build/Nim/lib/pure/xmlparser.nim(138) loadXml
Error: unhandled exception: Unable to read file: /Applications/Xcode.app/Contents/Developer/SDKs/MacOSX.sdk/SDKSettings.plist [IOError]
Right, i meant the executable nakefile
. Apparently you haven't updated the plists dependency. Proof: there's no loadXml
on line 80 as your error suggests: https://github.com/yglukhov/plists/blob/master/plists.nim#L80. Do the following:
rm -r ~/.nimble/pkgs/plists-* ~/.nimble/pkgs/darwin-*
cd NIMX_DIR
nimble install -dy
rm nakefile
nake [15:53:19]
Compiling nakefile...
No task specified, running default task defined by nakefile.
/Users/aaronm/.nimble/pkgs/nake-1.9.3/nake.nim(93) moduleHook
/Users/aaronm/.nimble/pkgs/nake-1.9.3/nakelib.nim(252) runTask
/Users/aaronm/.env/nim/nimx/nimx/naketools.nim(931) :anonymous
/Users/aaronm/.env/nim/nimx/nimx/naketools.nim(282) newBuilder
/Users/aaronm/.env/nim/nimx/nimx/naketools.nim(248) newBuilder
/Users/aaronm/build/Nim/lib/pure/json.nim(464) []
/Users/aaronm/build/Nim/lib/system/assertions.nim(27) failedAssertImpl
/Users/aaronm/build/Nim/lib/system/assertions.nim(20) raiseAssert
/Users/aaronm/build/Nim/lib/system/fatal.nim(55) sysFatal
Error: unhandled exception: /Users/aaronm/build/Nim/lib/pure/json.nim(464, 9) `not isNil(node)` [AssertionError]
Please show me the output of:
xcode-select --print-path
ls -l /Applications/Xcode.app/Contents/Developer/SDKs/MacOSX.sdk/SDKSettings.plist
''' xcode-select --print-path [15:54:13] /Applications/Xcode.app/Contents/Developer
ls -l /Applications/Xcode.app/Contents/Developer/SDKs/MacOSX.sdk/SDKSettings.plist [16:02:39]
ls: /Applications/Xcode.app/Contents/Developer/SDKs/MacOSX.sdk/SDKSettings.plist: No such file or directory
Can you also run xcrun --show-sdk-path
please?
$ xcrun --show-sdk-path [16:16:06]
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
And xcrun --show-sdk-version
xcrun --show-sdk-version [16:16:08] 10.15
Can you try this patch please? https://github.com/yglukhov/nimx/pull/399
I will look at it more later on tonight
I appreciate the help
/Users/aaronm/.nimble/pkgs/ttf-0.2.11/ttf.nim(934, 19) Error: type mismatch: got <
(x, y: int): bool
first type mismatch at position: 2
missing parameter: y
proc <
(x, y: int64): bool
first type mismatch at position: 2
missing parameter: y
19 other mismatching symbols have been suppressed; compile with --showAllMismatches:on to see them
expression: <numTables
I was getting what I thought was a similar error, but I was wrong:
Error: unhandled exception: /Users/tl/.nimble/pkgs/nimx-0.1/nimx/naketools.nim(413, 26) `isValid(result)` /usr/local/Cellar/sdl2/2.0.10/lib [AssertionError]
In fact, all I needed to do was a brew install sdl2
. I had mistakenly thought this was already installed since it appeared it was installed as part of the script when installing nimx. So it appears the latest paths fixed has worked i.e. my SDK paths are the same as nixfreak and all works well.
Big thanks for sharing the library - only my second day with nim but very impressed so far!
I was getting what I thought was a similar error, but I was wrong:
Error: unhandled exception: /Users/tl/.nimble/pkgs/nimx-0.1/nimx/naketools.nim(413, 26) `isValid(result)` /usr/local/Cellar/sdl2/2.0.10/lib [AssertionError]
In fact, all I needed to do was a
brew install sdl2
. I had mistakenly thought this was already installed since it appeared it was installed as part of the script when installing nimx. So it appears the latest paths fixed has worked i.e. my SDK paths are the same as nixfreak and all works well.Big thanks for sharing the library - only my second day with nim but very impressed so far!
Are you able to successfully make (nake) nim files using OSx? 10.15?
I'm going to blow away nim and all libs and start fresh, if you want you can close this ticket. right now I'm rebuilding choosenim , after that I will try nimx again. Thanks again for all your help.
Yes I was able to for a couple of hours yesterday. I had the 10.12 SDK installed too though, so I can't guarantee that I was using the 10.15 SDK that is also present. Since then I managed to break everything and now can't even get a previously working sdl2 example running, tried completely reinstalling everything but to no avail, so I don't think I'm in a position to help unfortunately ha.
So this seems to be resolved.