Opened 7 years ago
Closed 7 years ago
#56082 closed defect (invalid)
libsdl2 @2.0.8: error: unrecognized platform name macOS
Reported by: | adamb2903 | Owned by: | jmroot (Joshua Root) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | highsierra | Cc: | |
Port: | libsdl2 |
Description
Another day, another buggered port. Seems to have all dependancies satisfied. Logfile attached.
Attachments (3)
Change History (20)
Changed 7 years ago by adamb2903
comment:1 follow-up: 2 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | highsierra added |
---|---|
Owner: | set to jmroot |
Port: | libsdl2 added |
Status: | new → assigned |
Summary: | libsdl2 2.0.8 build failure → libsdl2 @2.0.8: error: unrecognized platform name macOS |
I see you're on High Sierra. The error in the log is:
src/render/metal/SDL_render_metal.m:643:20: error: unrecognized platform name macOS if (@available(macOS 10.13, *)) { ^ 1 error generated.
It looks like the @available
syntax was added to Objective-C in Xcode 9. What version of Xcode do you have?
It built successfully on our High Sierra buildbot, which uses Xcode 9.2.
The code in question is already in an #if
preprocessor block that only takes effect on High Sierra, so it would not affect earlier systems.
comment:2 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to ryandesign:
What version of Xcode do you have?
And do you have the corresponding version of the command line tools?
comment:3 follow-up: 4 Changed 7 years ago by thomaskchan (Thomas Chan)
I'm having this same issue with libsdl2 today when doing "port upgrade outdated".
High Sierra 10.13.4 Xcode command line tools 9.3
comment:4 Changed 7 years ago by jmroot (Joshua Root)
Replying to thomaskchan:
I'm having this same issue with libsdl2 today when doing "port upgrade outdated".
Are you also using +x11?
comment:5 Changed 7 years ago by thomaskchan (Thomas Chan)
I have XQuartz installed if that's what you mean by "+x11"?
comment:6 follow-up: 7 Changed 7 years ago by jmroot (Joshua Root)
I mean are you installing libsdl2 with the x11 variant.
comment:7 Changed 7 years ago by thomaskchan (Thomas Chan)
Replying to jmroot:
I mean are you installing libsdl2 with the x11 variant.
Not sure as it came in as a dependency and I'm just updating it. The log does seem to indicate that it's trying to archivefetch libsdl2-2.0.8_0+x11 tarballs, which fails before it grabs the source tarball, and configure looks like it's pulling in x11 stuff.
comment:8 follow-up: 9 Changed 7 years ago by jmroot (Joshua Root)
OK, so does it work if you turn off the x11 variant?
sudo port clean libsdl2 sudo port upgrade libsdl2 -x11
comment:9 Changed 7 years ago by thomaskchan (Thomas Chan)
Replying to jmroot:
OK, so does it work if you turn off the x11 variant?
sudo port clean libsdl2 sudo port upgrade libsdl2 -x11
Yes, that seems to work as it pulls in the binaries rather than compiling it.
comment:10 follow-up: 11 Changed 7 years ago by jmroot (Joshua Root)
OK, and what about if you try a build from source?
sudo port destroot libsdl2 -x11
comment:11 Changed 7 years ago by thomaskchan (Thomas Chan)
Replying to jmroot:
OK, and what about if you try a build from source?
sudo port destroot libsdl2 -x11
Fails due to same error:
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libsdl2/libsdl2/work/SDL2-2.0.8/src/render/metal/SDL_render_metal.m:643:20: error: unrecognized platform name macOS :info:build if (@available(macOS 10.13, *)) { :info:build :info:build 1 error generated. :info:build make: * [build/SDL_render_metal.lo] Error 1 :info:build make: * Waiting for unfinished jobs....
comment:12 Changed 7 years ago by jmroot (Joshua Root)
Ah. Well that's very interesting, since I can't reproduce the problem with the same OS and Xcode versions. Could you attach the full log please?
Changed 7 years ago by thomaskchan (Thomas Chan)
Attachment: | main.2.log added |
---|
port destroot libsdl2 -x11
comment:13 Changed 7 years ago by jmroot (Joshua Root)
The only differences I see between your log and mine so far are that you have gsed, gawk and nm in /opt/local/bin. Of those, I guess nm is the most suspicious. I believe it's provided by the cctools port.
Changed 7 years ago by thomaskchan (Thomas Chan)
Attachment: | main.3.log added |
---|
port destroot libsdl2 -x11 (without cctools)
comment:14 Changed 7 years ago by thomaskchan (Thomas Chan)
Removed cctools/libgcc and it still fails.
comment:15 Changed 7 years ago by jmroot (Joshua Root)
That's about it for external factors then. We could compare toolchain versions in more detail I guess?
% xcode-select -print-path /Applications/Xcode.app/Contents/Developer % xcodebuild -version Xcode 9.3 Build version 9E145 % /usr/bin/clang -v Apple LLVM version 9.1.0 (clang-902.0.39.1) Target: x86_64-apple-darwin17.5.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
comment:16 Changed 7 years ago by thomaskchan (Thomas Chan)
Ok, it's working now for me.
Apparently I had xcode command line tools 9.3, but xcode itself was still on 8.3.1.
Thanks for helping look into it!
comment:17 Changed 7 years ago by jmroot (Joshua Root)
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
Alright, assuming that was probably the original reporter's problem too then. Please reopen if not.
Buld failure log file