Closed Bug 1093810 Opened 10 years ago Closed 8 years ago

Negatus as compiled won't run on Mac OS X versions earlier than 10.8

Categories

(Testing Graveyard :: SUTAgent, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sydpolk, Assigned: ted)

Details

On Mac OS X 10.7:

Platform-QA-107-64-bit-1:tmp mozilla$ ./agent
Illegal instruction: 4

If I change the compilation command line to include 10.7, we get a compile error:

cc  -g -arch x86_64 -mmacosx-version-min=10.7 `/usr/local/bin/nspr-config --cflags` -MD -MP -MF .deps/CommandEventHandler.o.pp -c src/CommandEventHandler.cpp -o src/CommandEventHandler.o
In file included from src/CommandEventHandler.cpp:14:
src/Strings.h:25:14: error: no type named 'unique_ptr' in namespace 'std'
typedef std::unique_ptr<char[], freer> strdup_ptr;
I looked at this, turns out when targeting 10.9 clang uses libc++, but for earlier versions it uses libstdc++. The latter doesn't have unique_ptr. If we don't care about 10.6 we can make it work down to 10.7 by using:
clang++ -mmacosx-version-min=10.7 -std=c++11 -stdlib=libc++

This won't work to target 10.6, I guess it must not have a compatible libc++.

Other than that I'm not really sure how to fix this, aside from maybe pulling in a compatibly-licensed unique_ptr impl.
Let's go as far back as we can without getting a custom impl. 10.7 is fine. Thanks.
In patch form:
https://github.com/mozilla/Negatus/pull/14
Assignee: nobody → ted
We also need to pull:

https://github.com/mozilla/Negatus/pull/16
Flags: needinfo?(ted)
https://github.com/mozilla/Negatus/commit/a8be3412ee5e01e2984786e357c6bb64a1633d3c
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: needinfo?(ted)
Resolution: --- → FIXED
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.