Project

General

Profile

Bug #922

Release for MacOS: compilation on 10.11 incompatible with 10.6.8

Added by Anna Maria Bigatti over 7 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Category:
Portability
Target version:
Start date:
16 Sep 2016
Due date:
% Done:

100%

Estimated time:
1.25 h
Spent time:

Description

Binary from 10.11 gives Illegal instruction on 10.6.8.

Investigate how to solve this, and at what OS version the incompatibility started.


Related issues

Related to CoCoA-5 - Support #851: Release: CoCoA-5.2.0Closed2014-08-01

History

#1 Updated by John Abbott over 7 years ago

  • Category set to Portability
  • Assignee set to Anna Maria Bigatti
  • Target version set to CoCoA-5.?.?

The nm function on my computer (Mac OS X 10.6.8) complains that a compiled program from Anna's 10.11 Mac is malformed object (unknown load command 9). A quick web search found the following link:
http://stackoverflow.com/questions/9496100/mac-load-commands-corruption

#2 Updated by John Abbott over 7 years ago

See also this link http://grauonline.de/wordpress/?p=71
JAA thinks it could be useful.

#3 Updated by Anna Maria Bigatti over 7 years ago

I tried the suggestion:

bash-3.2$ export MACOSX_DEPLOYMENT_TARGET=10.6; g++ -Wall -pedantic -fPIC -m64 -mtune=core2 -march=core2 -O2 -DCoCoA_ULONG2LONG=1        -DCoCoA_WITH_READLINE  -I../../include -isystem ../../configuration/ExternalLibs/include -o test-BigRat3 test-BigRat3.C ../../lib/libcocoa.a -L../../configuration/ExternalLibs/lib            -lgmpxx-symlink  -lgmp-symlink      -lreadline -Wl,-no_pie

and got
ld: warning: object file (../../lib/libcocoa.a(BigRat.o)) was built for newer OSX version (10.11) than being linked (10.6)

This means that everything should be compiled in this way (gmp, boost, normaliz, ....)
and then maybe it works: is it worth it? For the time being it seems easier to have a double binary (as for linux) in the CoCoA-5/bin/ directory.
Probably we have done that for 10.5/10.6 (should search for the script John wrote)

#4 Updated by Anna Maria Bigatti over 7 years ago

Tried: John's compilation (for 10.6) works on 10.11.
So for next release we can use his compilation.
(it's on my white USB key ;-)

#6 Updated by Anna Maria Bigatti over 7 years ago

#7 Updated by Anna Maria Bigatti about 3 years ago

  • Target version changed from CoCoA-5.?.? to CoCoA-5.4.0

#8 Updated by Anna Maria Bigatti about 2 years ago

  • % Done changed from 0 to 40

Does it still matter?
Should we worry about 10.6? I guess John can still compile it for any user who asks for it.
My version is 10.15, and not the latest.

#9 Updated by John Abbott about 2 years ago

  • Status changed from New to Closed
  • % Done changed from 40 to 100
  • Estimated time set to 1.25 h

My 13 year old MacBook now has MacOS 10.11.6. So if anyone is stuck on 10.6.8, they must have a very old computer.
We are a small project, and can ill afford to spend resources for "extreme edge cases". So if someone has an old
computer with an old version of MacOS, they can still download the sources and compile (assuming they can find a
compiler which accepts std=c++14).

Closing!

Also available in: Atom PDF