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

Support for older OS X versions #102

Closed
mbudisic opened this issue Dec 12, 2014 · 8 comments
Closed

Support for older OS X versions #102

mbudisic opened this issue Dec 12, 2014 · 8 comments
Assignees

Comments

@mbudisic
Copy link
Collaborator

Sometimes between now and Snow Leopard, Apple made a change in their OS X standard libraries. This means that binaries compiled in Mavericks and later might not work on Snow Leopard and earlier. An example error generated is
Symbol not found: __sincos_stret
...
Expected in /usr/lib/libSystem.B.dylib.
The fix should be to issue -mmacosx-version-min=10.8 (or earlier) during makedist compile step in braidlab.

See StackExchange:
http://stackoverflow.com/questions/19015780/sincos-stret-undefined-symbol-when-linking here
http://stackoverflow.com/questions/2923502/what-does-macosx-version-min-imply

I'll see if this does the trick.

@mbudisic mbudisic self-assigned this Dec 12, 2014
@mbudisic
Copy link
Collaborator Author

mmacosx-version-min=10.8 forces C++ compiler to link against libstdc++ over (the default for > 10.8) libc++. This is exactly what it should be, but now linking fails because somehow wrong symbols are being defined. For example

Building with 'Xcode Clang++'.
Undefined symbols for architecture x86_64:
  "std::ios_base::Init::Init()", referenced from:
      __GLOBAL__I_a in randomwalk_helper.o
  "std::ios_base::Init::~Init()", referenced from:
      __GLOBAL__I_a in randomwalk_helper.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

This happens whenever one of the headers from stdlib is used (iostream, vector, etc...)

@mbudisic
Copy link
Collaborator Author

This is a pretty painful thing to hunt down... do we have someone running Snow Leopard? :)

@jeanluct
Copy link
Owner

Is this in response to a user?

@mbudisic
Copy link
Collaborator Author

Yes, Cecily at UCSD. I'm trying to see if she can compile on her end.

It looks like most of the things still run fine except, surprisingly, randomwalk_helper.cpp. Now, if I define MACOSX_DEPLOYMENT_TARGET=10.8 which should target her version of the OS, I cannot link things on my end. But this is the way that Apple approaches issue of backward compatibility so it's hard to say what is going wrong...

@jeanluct
Copy link
Owner

Has she considered upgrading OSX? It's a free upgrade... Snow Leopard is
getting long in the tooth, so to speak.

On Fri, Dec 12, 2014 at 5:09 PM, Marko Budisic notifications@github.com
wrote:

Yes, Cecily at UCSD. I'm trying to see if she can compile on her end.

It looks like most of the things still run fine except, surprisingly,
randomwalk_helper.cpp. Now, if I define MACOSX_DEPLOYMENT_TARGET=10.8
which should target her version of the OS, I cannot link things on my end.
But this is the way that Apple approaches issue of backward compatibility
so it's hard to say what is going wrong...


Reply to this email directly or view it on GitHub
#102 (comment).

@mbudisic
Copy link
Collaborator Author

Yeah, that's definitely true. No pun intended? :)

@mbudisic
Copy link
Collaborator Author

I'm putting this on hold until I reconnect with Cecily as she's the only one who had an interest in this.

@jeanluct
Copy link
Owner

jeanluct commented Jan 2, 2015

Ok, I'll close it. Reopen if necessary.

@jeanluct jeanluct closed this as completed Jan 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants