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

RESOLVED FIXED

Status

Testing
SUTAgent
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: sydpolk, Assigned: ted)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
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;
(Assignee)

Comment 1

3 years ago
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.
(Reporter)

Comment 2

3 years ago
Let's go as far back as we can without getting a custom impl. 10.7 is fine. Thanks.
(Assignee)

Comment 3

3 years ago
In patch form:
https://github.com/mozilla/Negatus/pull/14
Assignee: nobody → ted
(Reporter)

Comment 4

3 years ago
We also need to pull:

https://github.com/mozilla/Negatus/pull/16
Flags: needinfo?(ted)
(Assignee)

Comment 5

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