Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

makensis failed to build on 10.9 (13A603) #23913

Closed
jodygarnett opened this issue Nov 3, 2013 · 12 comments
Closed

makensis failed to build on 10.9 (13A603) #23913

jodygarnett opened this issue Nov 3, 2013 · 12 comments

Comments

@jodygarnett
Copy link

After updating to 10.9 makensis no longer builds, this worked in the previous OS X release. I would like to determine if this is an environmental difference that can be addressed in home-brew, or something I should report to the NSIS project.

==> scons makensis
int close(int) __DARWIN_ALIAS_C(close);
^
1 error generated.
scons: *** [build/release/makensis/script.o] Error 1
scons: building terminated because of errors.

Long form output requested by issue reporting process (brew doctor etc...):

https://gist.github.com/jodygarnett/7286977

Detailed log reported by: brew gist-logs --config --doctor makensis output:

https://gist.github.com/anonymous/7286964

@jodygarnett
Copy link
Author

Reported build issue to NSIS:

https://sourceforge.net/p/nsis/bugs/1085/

@jodygarnett
Copy link
Author

I checked that headers were available /usr/include/unistd.h contains:

int  close(int) __DARWIN_ALIAS_C(close);

I have tried reinstalling command line tools as per discussion here: http://clang-developers.42468.n3.nabble.com/Naive-Mavericks-Trunk-Build-Errors-td4035480.html

@allengeorge
Copy link

Have you tried adding unistd.h as a header to Source/util.h?

@jodygarnett
Copy link
Author

Apparently in 10.9 clang compiler has changed its default std lib from libstdc++ to libc++

Details here: https://jira.mongodb.org/browse/SERVER-10644

I would like to try and add the compile option -stdlib=libstdc++ but I am not sure where.

@jodygarnett
Copy link
Author

Thanks for the suggestion allengeorge - I modified util.h and have a build. Not sure how that helps home-brew but still.

The result fails to run:

Error: opening stub "/usr/local/share/nsis/Stubs/zlib"
Error initalizing CEXEBuild: error setting default stub

@jodygarnett
Copy link
Author

Alternative that made a bit of progress, update formulate to have:

scons APPEND_CCFLAGS=--stdlib=libstdc++ makensis

The build gets further and then fails with link errors.

@kridgeway
Copy link

@jodygarnett
clang needs the --stdlib=libstdc++ linker flag too:

scons makensis APPEND_CCFLAGS=--stdlib=libstdc++ APPEND_LINKFLAGS=--stdlib=libstdc++

The above worked for me!

@jodygarnett
Copy link
Author

That worked for me as well! Thank you!

@jodygarnett
Copy link
Author

So do we do a pull request or something to contribute this back?

@adamv
Copy link
Contributor

adamv commented Nov 20, 2013

Yes, please make a pull request.

jodygarnett added a commit to jodygarnett/homebrew that referenced this issue Nov 20, 2013
@jodygarnett
Copy link
Author

See pull request: #24545

jodygarnett added a commit to jodygarnett/homebrew that referenced this issue Dec 6, 2013
See issue Homebrew#23913

Update makensis.rb

Updated based on pull request feedback
@mistydemeo
Copy link
Member

Pushed a fix for this - thanks for the report!

ehershey pushed a commit to ehershey/homebrew that referenced this issue Apr 4, 2014
makensis only builds with libstdc++. This isn't a huge deal in itself
as it's just a binary, not a library, and has no deps in Homebrew.
More of a problem is the fact that it provides zero mechanism to
govern compiler choice, forcing us to patch the SCons/config.py in
order to make sure the right compiler gets used.

Fixes Homebrew#23913.
Closes Homebrew#24545.
@Homebrew Homebrew locked and limited conversation to collaborators Feb 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants