Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LD Flag -s Obselete #41

Open
btnwtn opened this issue Mar 16, 2017 · 4 comments
Open

LD Flag -s Obselete #41

btnwtn opened this issue Mar 16, 2017 · 4 comments

Comments

@btnwtn
Copy link

btnwtn commented Mar 16, 2017

Building guetzli via make on Mac OS X 10.11.3 results in this error for me:

ld: warning: option -s is obsolete and being ignored
ld: internal error: atom not found in symbolIndex(__ZN7guetzli21ButteraugliComparatorD2Ev) for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [bin/Release/guetzli] Error 1
make: *** [guetzli] Error 2

To fix this error I edited guetzli.make and made these changes:

- ALL_LDFLAGS += $(LDFLAGS) -s
+ ALL_LDFLAGS += $(LDFLAGS) #-s

This successfully linked the build and generated the guetzli executable in bin/Release.
I don't know anything about make, but if someone could point me in the proper direction for detecting OS X in a make file I would be willing to open a PR to fix this issue.

Cheers!

@fkistner
Copy link
Contributor

fkistner commented Mar 17, 2017

That's weird.
I tried making guetzli available in Homebrew, see Homebrew/homebrew-core#11190.
The homebrew build bot did not encounter this problem on El Capitan, neither did my local test on Sierra. It did however on Yosemite (for different symbol though):

Linking guetzli
ld: internal error: atom not found in symbolIndex(__ZN11butteraugli5ImageIfE3RowEm) for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [bin/Release/guetzli] Error 1
make: *** [guetzli] Error 2

@robryk
Copy link
Contributor

robryk commented Mar 17, 2017

This seems to be something related to premake/premake-core#133, premake/premake-core#270 and http://industriousone.com/topic/how-remove-flags-ldflags

I don't really understand the problem right now; I'll work it around by actually causing debugging symbols to be emitted (this doesn't impact performance).

@fkistner @btnwtn Are you both using Clang?

@fkistner
Copy link
Contributor

Yes, Homebrew uses clang by default, but uses a custom cc script to inject additional command line options that tend to be necessary.
I don't have a Yosemite system to reproduce, but here are the actual command invocations for Sierra (for which it works fine): https://gist.github.com/fkistner/effbd64115a382df9bfe7e3f500b1046

robryk added a commit to robryk/guetzli that referenced this issue Mar 17, 2017
This is a workaround for google#41. I don't understand why it should help. The
only downside is that it increased on-disk binary size (but not
in-memory size).
robryk added a commit to robryk/guetzli that referenced this issue Mar 17, 2017
This is a workaround for google#41. I don't understand why it should help. The
only downside is that it increased on-disk binary size (but not
in-memory size).
jyrkialakuijala pushed a commit that referenced this issue Mar 17, 2017
This is a workaround for #41. I don't understand why it should help. The
only downside is that it increased on-disk binary size (but not
in-memory size).
@robryk
Copy link
Contributor

robryk commented Mar 17, 2017

This should now be effectively worked around. If it still manifests, please comment here. I'm keeping the issue open until we figure out what's actually happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants