JakubOchnik / Cube-LUT-Loader

A simple command-line 1D/3D .cube LUT loader.
Other
24 stars 4 forks source link

Build for Mac OS Mojave (10.14.6) #33

Open stephane-archer opened 8 months ago

stephane-archer commented 8 months ago

I personally use Mac OS 13.4.1 and build the program with this version. Someone couldn't load the created binary because he was using Mac OS Mojave (10.14.6) dyld: cannot load 'my_program' (load command 0x80000034 is unknown) The solution is to force MacOS to build the program for this version. Starting with OpenCV: building OpenCV with cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DWITH_OPENEXR=OFF -DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 ../ made the trick but I had the following warning because I'm not building everything from source

ld: warning: dylib (/usr/local/Cellar/ffmpeg/6.0_1/lib/libavcodec.dylib) was built for newer macOS version (13.0) than being linked (10.14)
ld: warning: dylib (/usr/local/Cellar/ffmpeg/6.0_1/lib/libavformat.dylib) was built for newer macOS version (13.0) than being linked (10.14)
ld: warning: dylib (/usr/local/Cellar/ffmpeg/6.0_1/lib/libavutil.dylib) was built for newer macOS version (13.0) than being linked (10.14)
ld: warning: dylib (/usr/local/Cellar/ffmpeg/6.0_1/lib/libswscale.dylib) was built for newer macOS version (13.0) than being linked (10.14)

For Cube-LUT-Loader: I had to add set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14" CACHE STRING "Minimum OS X deployment version" FORCE) to src/CMakeLists.txt to make it work but once again I had warnings: ld: warning: object file (/usr/local/lib/libboost_program_options-mt.a(cmdline.o)) was built for newer macOS version (13.0) than being linked (10.14)

I'm not sure how relevant are all these warnings. Reducing the number of dependencies could greatly help make Cube-LUT-Loader more portable

stephane-archer commented 2 weeks ago

To build for MacOS 10.15 simply add os.version=10.15 to your conan2 profile located in ~/.conan2/profiles/

stephane-archer commented 1 week ago

but for MacOS 10.14 there are still some issues: see https://github.com/JakubOchnik/Cube-LUT-Loader/issues/55