davisking/dlib

[Bug]: Cannot build wheel on macOS since v19.24.2

AntonyM55 opened this issue · 4 comments

What Operating System(s) are you seeing this problem on?

macOS (Intel)

Version 14.5 (23F79)

dlib version

v19.24.2,v19.24.4

Python version

3.10.10

Compiler

Apple clang version 15.0.0 (clang-1500.3.9.4)

CMake version

cmake version 3.29.0

Current Behavior

python setup.py bdist_wheel

[ 98%] Building CXX object CMakeFiles/_dlib_pybind11.dir/src/gui.cpp.o
[100%] Linking CXX shared module /Users/anthony/Rnd/language/python/pkg/dlib/dlib-19.24.2/build/lib.macosx-13.3-x86_64-cpython-310/_dlib_pybind11.cpython-310-darwin.so
ld: warning: ignoring duplicate libraries: '-lAVFoundation', '-lAppKit', '-lAudioToolbox', '-lCoreAudio', '-lCoreFoundation', '-lCoreGraphics', '-lCoreImage', '-lCoreMedia', '-lCoreServices', '-lCoreVideo', '-lMetal', '-lOpenGL', '-lVideoToolbox', '-lavcodec', '-lavfilter', '-lavformat', '-lavutil', '-lbz2', '-liconv', '-llzma', '-lm', '-lswresample', '-lswscale', '-lz', '/usr/local/lib/libavcodec.a', '/usr/local/lib/libavfilter.a', '/usr/local/lib/libavformat.a', '/usr/local/lib/libavutil.a', '/usr/local/lib/libbz2.a', '/usr/local/lib/libswresample.a', '/usr/local/lib/libswscale.a'

ld: library 'AudioToolbox' not found

clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [/Users/anthony/Rnd/language/python/pkg/dlib/dlib-19.24.2/build/lib.macosx-13.3-x86_64-cpython-310/_dlib_pybind11.cpython-310-darwin.so] Error 1
make[1]: *** [CMakeFiles/_dlib_pybind11.dir/all] Error 2
make: *** [all] Error 2

Steps to Reproduce

python setup.py bdist_wheel

Anything else?

v19.24 is ok, since v19.24.2, python version will get link error "library 'AudioToolbox' not found", c++ version is ok,
I can't find AudioToolbox in CMakefile.txt, so I can't edit

Is it ffmpeg? Try telling cmake to set -DDLIB_USE_FFMPEG=off

Those errors look like cmake is finding ffmpeg but then your ffmpeg install is messed up in some way.

Warning: this issue has been inactive for 35 days and will be automatically closed on 2024-08-13 if there is no further activity.

If you are waiting for a response but haven't received one it's possible your question is somehow inappropriate. E.g. it is off topic, you didn't follow the issue submission instructions, or your question is easily answerable by reading the FAQ, dlib's official compilation instructions, dlib's API documentation, or a Google search.

Warning: this issue has been inactive for 42 days and will be automatically closed on 2024-08-13 if there is no further activity.

If you are waiting for a response but haven't received one it's possible your question is somehow inappropriate. E.g. it is off topic, you didn't follow the issue submission instructions, or your question is easily answerable by reading the FAQ, dlib's official compilation instructions, dlib's API documentation, or a Google search.

Notice: this issue has been closed because it has been inactive for 45 days. You may reopen this issue if it has been closed in error.