#57243 closed defect (fixed)
atom @1.30.0 fails to build on Mojave: linking against libstdc++ fails
Reported by: | michaellass (Michael Lass) | Owned by: | kurthindenburg (Kurt Hindenburg) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | mojave | Cc: | libsystem-ethan |
Port: | atom |
Description
On Mojave, the current atom port does not build. I guess the important section of the build log is the following:
:info:build clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated] :info:build ld: library not found for -lstdc++ :info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)
Full build log is attached.
Attachments (1)
Change History (11)
Changed 6 years ago by michaellass (Michael Lass)
Attachment: | atom-build.log added |
---|
comment:1 Changed 6 years ago by mf2k (Frank Schima)
Cc: | kurthindenburg removed |
---|---|
Owner: | set to kurthindenburg |
Status: | new → assigned |
comment:2 Changed 6 years ago by michaellass (Michael Lass)
To avoid duplicate work: I have a fix at hand which I'm currently testing. I hope to have a pull request ready soon.
comment:3 Changed 6 years ago by michaellass (Michael Lass)
Pull request: https://github.com/macports/macports-ports/pull/2727
comment:4 Changed 6 years ago by kurthindenburg (Kurt Hindenburg)
Thanks, I don't have Mojave installed so any of my ports that failed need someone else to look at.
comment:5 Changed 6 years ago by libsystem-ethan
Cc: | libsystem-ethan added |
---|
comment:6 Changed 6 years ago by Michael Lass <michael.lass@…>
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:7 follow-up: 10 Changed 6 years ago by kencu (Ken)
I don't completely understand what's going on with this fix, but it looked a bit strange and I deleted it out of the Portfile, and atom
built for me right through on Mojave with Xcode10. Perhaps some piece of atom was updated since the original report? At any rate, this might be looked at again at some time in the future to see if it is really needed any longer, as it does not seem to be needed for me.
comment:8 follow-up: 9 Changed 6 years ago by jmroot (Joshua Root)
It doesn't make much sense since MACOSX_DEPLOYMENT_TARGET is always set in the environment (which does the same thing as -mmacosx-version-min on the command line), and is set to the current OS by default. Unless the build system is changing that internally for some strange reason, it shouldn't have been building for an older target in the first place.
comment:9 Changed 6 years ago by michaellass (Michael Lass)
Replying to jmroot:
It doesn't make much sense since MACOSX_DEPLOYMENT_TARGET is always set in the environment (which does the same thing as -mmacosx-version-min on the command line), and is set to the current OS by default. Unless the build system is changing that internally for some strange reason, it shouldn't have been building for an older target in the first place.
Indeed it does. The build is performed by nodejs which in fact sets MACOSX_DEPLOYMENT_TARGET internally: https://github.com/nodejs/node/blob/master/common.gypi#L464
comment:10 Changed 6 years ago by michaellass (Michael Lass)
Replying to kencu:
I don't completely understand what's going on with this fix, but it looked a bit strange and I deleted it out of the Portfile, and
atom
built for me right through on Mojave with Xcode10. Perhaps some piece of atom was updated since the original report? At any rate, this might be looked at again at some time in the future to see if it is really needed any longer, as it does not seem to be needed for me.
Indeed the issue is magically gone with Atom 1.31.2. I can still reproduce it with 1.30.0 so there must be a change between these versions fixing it. Tracing this down is not worth the effort since many nodejs packages are built during installation and the output is not very verbose. I don't even know which one of those caused the issue in the first place.
So I guess we can just drop the workaround again. Here's a pull request: https://github.com/macports/macports-ports/pull/2874
Log of failed build