can't get opencv to run on Macbook older than mine

asked 2018-03-14 18:17:41 -0600

SFJim gravatar image

I have tried several different ways to compile OpenCV on the Mac in order to get it to work on a computer older than mine but have not been successful. My application is and has been running for months on 50+ Macs but they are all Late 2013 Macbooks or newer. I have confirmed that it runs on older operating systems. For example, I run High Sierra 10.13 but I have seen my application run on a system with 10.10.5 and 10.12 systems. Even Early 2013 Macbooks don't run my application. My goal is to get the application to run on older Macs than mine which is a Late 2013 Macbook Pro.

I use Xcode 9.2. I use brew to compile OpenCV. In this example, I was using opencv 3.4.0. I also tried 3.4.1 and it didn't work either. I'm sure I'm missing some simple setting.

I currently compile with this setting but it is not enough:

-DCMAKE_OSX_DEPLOYMENT_TARGET=10.9

I tried compiling with this flag but it didn't help. i thought this flag would tell the compiler to target an older architecture but it didn't work:

-DCMAKE_CXX_COMPILER_TARGET=x86_64-apple-darwin15.5.0

the crash log from the Macbook from 2010 looks like this:

Process: Brightday [17622]

Path: /Users/USER/Downloads/Brightday.app/Contents/MacOS/Brightday

Identifier: com.brightday.Brightday

Version: 47 (47)

Code Type: X86-64 (Native)

Parent Process: ??? [1]

Responsible: Brightday [17622]

User ID: 502

Date/Time: 2018-01-22 17:46:07.436 -0800

OS Version: Mac OS X 10.11.5 (15F34)

Report Version: 11

Anonymous UUID: 333100CF-2D55-443A-78BE-49F842AC3DD4

>

Sleep/Wake UUID: B8FBAF9B-42C4-450F-905D-74EAE4B19AD9

>

Time Awake Since Boot: 600000 seconds

Time Since Wake: 5100 seconds

>

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_INSTRUCTION (SIGILL)

Exception Codes: 0x0000000000000001, 0x0000000000000000

Exception Note: EXC_CORPSE_NOTIFY

>

Application Specific Information: /Users/xxxxx-peter/Downloads/Brightday.app/Contents/MacOS/../Frameworks/../Frameworks/opencv/libopencv_core.3.4.0.dylib

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread

0 libopencv_core.3.4.0.dylib 0x000000010f8e7556 _GLOBAL__sub_I_persistence.cpp + 44

1 dyld 0x00007fff6606510b ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 265

2 dyld 0x00007fff66065284 ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 40

3 dyld 0x00007fff660618bd ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 305

4 dyld 0x00007fff66061852 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 198

5 dyld 0x00007fff66061743 ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 127

6 dyld 0x00007fff660619b3 ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 75

7 dyld 0x00007fff660540f1 dyld::initializeMainExecutable() + 208

8 dyld 0x00007fff66057d98 dyld::_main(macho_header const, unsigned long, int, char const, char const, char const, unsigned long) + 3596

9 dyld 0x00007fff66053276 dyldbootstrap::start(macho_header const, int, char const, long, macho_header const, unsigned long*) + 512

10 dyld 0x00007fff66053036 _dyld_start + 54

>

Thread 0 crashed with X86 Thread State (64-bit): rax: 0x000000011003b6d1 rbx: 0x00007fff50563650 rcx: 0x00007fff50566d40 rdx: 0x00007fff50566ce0 rdi: 0x0000000000000001 rsi: 0x00007fff50566cd0 rbp: 0x00007fff505636c0 rsp: 0x00007fff50563650 r8: 0x00007fff6608b630 r9: 0x000000000000002c r10 ...

(more)
edit retag flag offensive close merge delete