Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined libjpeg symbols for architecture arm64 (macOS) #859

Closed
JetForMe opened this issue Apr 12, 2023 · 9 comments
Closed

Undefined libjpeg symbols for architecture arm64 (macOS) #859

JetForMe opened this issue Apr 12, 2023 · 9 comments

Comments

@JetForMe
Copy link

Getting link errors when building on an M1 Mac under Ventura 13.3.1

CMakeCache.txt shows

//Path to a library.
JPEG_LIBRARY_RELEASE:FILEPATH=/opt/homebrew/lib/libjpeg.dylib

And checking the exports using nm -gU /opt/homebrew/lib/libjpeg.dylib | grep std_error

…
0000000000023da8 T _jpeg_std_error
…
$ cmake -B build
-- The C compiler identification is AppleClang 14.0.3.14030022
-- The CXX compiler identification is AppleClang 14.0.3.14030022
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting build type to 'Release' as none was specified.
-- libpng Found and Enabled
-- libjpeg Found and Enabled
-- libtiff Found and Enabled
-- liblz4 Found and Enabled
-- libzstd Found and Enabled
-- Found Eigen: '/opt/homebrew/include/eigen3'
-- pybind11 v2.10.2 
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Performing Test HAS_FLTO_THIN
-- Performing Test HAS_FLTO_THIN - Success
-- Selected Python: '/opt/homebrew/Frameworks/Python.framework/Versions/3.11/bin/python3.11'. cmake --build . -t pypangolin_pip_install to use pypangolin module.
-- Performing Test HAVE_FFMPEG_MAX_ANALYZE_DURATION
-- Performing Test HAVE_FFMPEG_MAX_ANALYZE_DURATION - Success
-- Performing Test HAVE_FFMPEG_AVFORMAT_ALLOC_OUTPUT_CONTEXT2
-- Performing Test HAVE_FFMPEG_AVFORMAT_ALLOC_OUTPUT_CONTEXT2 - Success
-- Performing Test HAVE_FFMPEG_AVPIXELFORMAT
-- Performing Test HAVE_FFMPEG_AVPIXELFORMAT - Success
-- ffmpeg Found and Enabled: /opt/homebrew/include;/opt/homebrew/include;/opt/homebrew/include;/opt/homebrew/include;/opt/homebrew/include
-- Found PkgConfig: /opt/homebrew/bin/pkg-config (found version "0.29.2") 
-- Found Threads: TRUE  
-- Configuring done (8.0s)
-- Generating done (0.1s)
-- Build files have been written to: /Users/rmann/Projects/Personal/ORB-SLAM2/Pangolin/build

$ cmake --build build
[  1%] Building CXX object CMakeFiles/pango_core.dir/components/pango_core/src/file_extension.cpp.o
[  1%] Building CXX object CMakeFiles/pango_core.dir/components/pango_core/src/file_utils.cpp.o
[  2%] Building CXX object CMakeFiles/pango_core.dir/components/pango_core/src/sigstate.cpp.o
[  2%] Building CXX object CMakeFiles/pango_core.dir/components/pango_core/src/threadedfilebuf.cpp.o
[  3%] Building CXX object CMakeFiles/pango_core.dir/components/pango_core/src/avx_math.cpp.o
[  3%] Building CXX object CMakeFiles/pango_core.dir/components/pango_core/src/uri.cpp.o
[  4%] Building CXX object CMakeFiles/pango_core.dir/components/pango_core/src/param_set.cpp.o
[  4%] Building CXX object CMakeFiles/pango_core.dir/components/pango_core/src/factory/factory_registry.cpp.o
[  5%] Building CXX object CMakeFiles/pango_core.dir/components/pango_core/src/factory/factory_help.cpp.o
[  5%] Building CXX object CMakeFiles/pango_core.dir/components/pango_core/src/posix/condition_variable.cpp.o
[  6%] Building CXX object CMakeFiles/pango_core.dir/components/pango_core/src/posix/semaphore.cpp.o
[  6%] Building CXX object CMakeFiles/pango_core.dir/components/pango_core/src/posix/shared_memory_buffer.cpp.o
[  7%] Linking CXX shared library libpango_core.dylib
[  7%] Built target pango_core
[  7%] Building CXX object CMakeFiles/pango_image.dir/components/pango_image/src/pixel_format.cpp.o
[  8%] Building CXX object CMakeFiles/pango_image.dir/components/pango_image/src/image_io.cpp.o
[  8%] Building CXX object CMakeFiles/pango_image.dir/components/pango_image/src/image_io_exr.cpp.o
[  9%] Building CXX object CMakeFiles/pango_image.dir/components/pango_image/src/image_io_jpg.cpp.o
[  9%] Building CXX object CMakeFiles/pango_image.dir/components/pango_image/src/image_io_lz4.cpp.o
[ 10%] Building CXX object CMakeFiles/pango_image.dir/components/pango_image/src/image_io_packed12bit.cpp.o
[ 10%] Building CXX object CMakeFiles/pango_image.dir/components/pango_image/src/image_io_pango.cpp.o
[ 11%] Building CXX object CMakeFiles/pango_image.dir/components/pango_image/src/image_io_png.cpp.o
[ 11%] Building CXX object CMakeFiles/pango_image.dir/components/pango_image/src/image_io_ppm.cpp.o
[ 12%] Building CXX object CMakeFiles/pango_image.dir/components/pango_image/src/image_io_raw.cpp.o
[ 12%] Building CXX object CMakeFiles/pango_image.dir/components/pango_image/src/image_io_tga.cpp.o
[ 12%] Building CXX object CMakeFiles/pango_image.dir/components/pango_image/src/image_io_bmp.cpp.o
[ 13%] Building CXX object CMakeFiles/pango_image.dir/components/pango_image/src/image_io_zstd.cpp.o
/Users/rmann/Projects/Personal/ORB-SLAM2/Pangolin/components/pango_image/src/image_io_zstd.cpp:29:32: warning: unknown warning group '-Wstringop-truncation', ignored [-Wunknown-warning-option]
#pragma GCC diagnostic ignored "-Wstringop-truncation"
                               ^
1 warning generated.
[ 13%] Building CXX object CMakeFiles/pango_image.dir/components/pango_image/src/image_io_libraw.cpp.o
[ 14%] Building CXX object CMakeFiles/pango_image.dir/components/pango_image/src/image_io_tiff.cpp.o
[ 14%] Linking CXX shared library libpango_image.dylib
Undefined symbols for architecture arm64:
  "jpeg_std_error(jpeg_error_mgr*)", referenced from:
      pangolin::LoadJpg(std::__1::basic_istream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
      pangolin::GetMJpegOffsets(std::__1::basic_ifstream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
      pangolin::SaveJpg(pangolin::Image<unsigned char> const&, pangolin::PixelFormat const&, std::__1::basic_ostream<char, std::__1::char_traits<char>>&, float) in image_io_jpg.cpp.o
     (found _jpeg_std_error in /opt/homebrew/lib/libjpeg.dylib, declaration possibly missing extern "C")
  "jpeg_read_header(jpeg_decompress_struct*, int)", referenced from:
      pangolin::LoadJpg(std::__1::basic_istream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
      pangolin::GetMJpegOffsets(std::__1::basic_ifstream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
     (found _jpeg_read_header in /opt/homebrew/lib/libjpeg.dylib, declaration possibly missing extern "C")
  "jpeg_set_quality(jpeg_compress_struct*, int, int)", referenced from:
      pangolin::SaveJpg(pangolin::Image<unsigned char> const&, pangolin::PixelFormat const&, std::__1::basic_ostream<char, std::__1::char_traits<char>>&, float) in image_io_jpg.cpp.o
     (found _jpeg_set_quality in /opt/homebrew/lib/libjpeg.dylib, declaration possibly missing extern "C")
  "jpeg_set_defaults(jpeg_compress_struct*)", referenced from:
      pangolin::SaveJpg(pangolin::Image<unsigned char> const&, pangolin::PixelFormat const&, std::__1::basic_ostream<char, std::__1::char_traits<char>>&, float) in image_io_jpg.cpp.o
     (found _jpeg_set_defaults in /opt/homebrew/lib/libjpeg.dylib, declaration possibly missing extern "C")
  "jpeg_CreateCompress(jpeg_compress_struct*, int, unsigned long)", referenced from:
      pangolin::SaveJpg(pangolin::Image<unsigned char> const&, pangolin::PixelFormat const&, std::__1::basic_ostream<char, std::__1::char_traits<char>>&, float) in image_io_jpg.cpp.o
     (found _jpeg_CreateCompress in /opt/homebrew/lib/libjpeg.dylib, declaration possibly missing extern "C")
  "jpeg_read_scanlines(jpeg_decompress_struct*, unsigned char**, unsigned int)", referenced from:
      pangolin::LoadJpg(std::__1::basic_istream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
      pangolin::GetMJpegOffsets(std::__1::basic_ifstream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
     (found _jpeg_read_scanlines in /opt/homebrew/lib/libjpeg.dylib, declaration possibly missing extern "C")
  "jpeg_start_compress(jpeg_compress_struct*, int)", referenced from:
      pangolin::SaveJpg(pangolin::Image<unsigned char> const&, pangolin::PixelFormat const&, std::__1::basic_ostream<char, std::__1::char_traits<char>>&, float) in image_io_jpg.cpp.o
     (found _jpeg_start_compress in /opt/homebrew/lib/libjpeg.dylib, declaration possibly missing extern "C")
  "jpeg_finish_compress(jpeg_compress_struct*)", referenced from:
      pangolin::SaveJpg(pangolin::Image<unsigned char> const&, pangolin::PixelFormat const&, std::__1::basic_ostream<char, std::__1::char_traits<char>>&, float) in image_io_jpg.cpp.o
     (found _jpeg_finish_compress in /opt/homebrew/lib/libjpeg.dylib, declaration possibly missing extern "C")
  "jpeg_write_scanlines(jpeg_compress_struct*, unsigned char**, unsigned int)", referenced from:
      pangolin::SaveJpg(pangolin::Image<unsigned char> const&, pangolin::PixelFormat const&, std::__1::basic_ostream<char, std::__1::char_traits<char>>&, float) in image_io_jpg.cpp.o
     (found _jpeg_write_scanlines in /opt/homebrew/lib/libjpeg.dylib, declaration possibly missing extern "C")
  "jpeg_CreateDecompress(jpeg_decompress_struct*, int, unsigned long)", referenced from:
      pangolin::LoadJpg(std::__1::basic_istream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
      pangolin::GetMJpegOffsets(std::__1::basic_ifstream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
     (found _jpeg_CreateDecompress in /opt/homebrew/lib/libjpeg.dylib, declaration possibly missing extern "C")
  "jpeg_destroy_compress(jpeg_compress_struct*)", referenced from:
      pangolin::SaveJpg(pangolin::Image<unsigned char> const&, pangolin::PixelFormat const&, std::__1::basic_ostream<char, std::__1::char_traits<char>>&, float) in image_io_jpg.cpp.o
     (found _jpeg_destroy_compress in /opt/homebrew/lib/libjpeg.dylib, declaration possibly missing extern "C")
  "jpeg_start_decompress(jpeg_decompress_struct*)", referenced from:
      pangolin::LoadJpg(std::__1::basic_istream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
      pangolin::GetMJpegOffsets(std::__1::basic_ifstream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
     (found _jpeg_start_decompress in /opt/homebrew/lib/libjpeg.dylib, declaration possibly missing extern "C")
  "jpeg_finish_decompress(jpeg_decompress_struct*)", referenced from:
      pangolin::LoadJpg(std::__1::basic_istream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
      pangolin::GetMJpegOffsets(std::__1::basic_ifstream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
     (found _jpeg_finish_decompress in /opt/homebrew/lib/libjpeg.dylib, declaration possibly missing extern "C")
  "jpeg_resync_to_restart(jpeg_decompress_struct*, int)", referenced from:
      pangolin::LoadJpg(std::__1::basic_istream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
      pangolin::GetMJpegOffsets(std::__1::basic_ifstream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
     (found _jpeg_resync_to_restart in /opt/homebrew/lib/libjpeg.dylib, declaration possibly missing extern "C")
  "jpeg_destroy_decompress(jpeg_decompress_struct*)", referenced from:
      pangolin::LoadJpg(std::__1::basic_istream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
      pangolin::GetMJpegOffsets(std::__1::basic_ifstream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
     (found _jpeg_destroy_decompress in /opt/homebrew/lib/libjpeg.dylib, declaration possibly missing extern "C")
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libpango_image.dylib] Error 1
make[1]: *** [CMakeFiles/pango_image.dir/all] Error 2
make: *** [all] Error 2
@christian-rauch
Copy link
Collaborator

I added the macOS 13 (x86_64) runner in this PR: #903. This passes. Unfortunately, the arm64 runners for macOS are not for free. Can you reproduce this when compiling for the x86_64 architecture as on the CI?

@JetForMe
Copy link
Author

Oh gosh I don't have an x86 machine readily available to try.

@christian-rauch
Copy link
Collaborator

Can you run a compiler or VM through Apple's Intel->ARM translation? Or compile via cross-compilation?

@JetForMe
Copy link
Author

I don't think so, certainly not without a lot more effort than I have time to dedicate right now. How much money would the arm64 runners cost? Perhaps I can sponsor that work with cash?

@christian-rauch
Copy link
Collaborator

How much money would the arm64 runners cost? Perhaps I can sponsor that work with cash?

In the "M1 macOS larger runner" announcement (https://github.blog/2023-10-02-introducing-the-new-apple-silicon-powered-m1-macos-larger-runner-for-github-actions/) they say this will be $0.12 to $0.16 per minute. The two pipelines that currently run take approx. 6 minutes each. That would be at least $1.44 per pipeline run. That's quite a lot just for testing on a different CPU architecture. Also, I don't know who would need to manage the subscription.

I assume that those arm64 runners will be available in the free subscription over time.

Maybe a better solution would be cross-compiling to arm64 on the current macOS runners. I will leave this open for someone else to implement and test locally on Apple silicon hardware.

@christian-rauch
Copy link
Collaborator

The CI pipeline now tests on macos-14-arm64 (#935) and shows no issues.

@JetForMe
Copy link
Author

So sorry, I completely missed your reply about the cost of the runners!

@DeoLeung
Copy link

DeoLeung commented Aug 6, 2024

I just build v0.9.2 and v0.9.1 on m1(14.5) and experienced the same issue, any idea on how to fix it?


cmake -B build -GNinja
-- libpng Found and Enabled
-- libjpeg Found and Enabled
-- libtiff Found and Enabled
-- liblz4 Found and Enabled
-- libzstd Found and Enabled
-- Found Eigen: '/opt/homebrew/include/eigen3'
-- ffmpeg Found and Enabled: /opt/homebrew/include;/opt/homebrew/include;/opt/homebrew/include;/opt/homebrew/include;/opt/homebrew/include
-- Configuring done (1.4s)
-- Generating done (0.1s)
-- Build files have been written to: /Users/liangdeo/pyproj/Pangolin/build

cmake --build build
[24/158] Building CXX object CMakeFiles/pango_image.dir/components/pango_image/src/image_io_zstd.cpp.o
/Users/liangdeo/pyproj/Pangolin/components/pango_image/src/image_io_zstd.cpp:29:32: warning: unknown warning group '-Wstringop-truncation', ignored [-Wunknown-warning-option]
#pragma GCC diagnostic ignored "-Wstringop-truncation"
                               ^
1 warning generated.
[30/158] Linking CXX shared library libpango_image.dylib
FAILED: libpango_image.dylib
: && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -O3 -DNDEBUG -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -dynamiclib -Wl,-headerpad_max_install_names  -o libpango_image.dylib -install_name @rpath/libpango_image.dylib CMakeFiles/pango_image.dir/components/pango_image/src/pixel_format.cpp.o CMakeFiles/pango_image.dir/components/pango_image/src/image_io.cpp.o CMakeFiles/pango_image.dir/components/pango_image/src/image_io_exr.cpp.o CMakeFiles/pango_image.dir/components/pango_image/src/image_io_jpg.cpp.o CMakeFiles/pango_image.dir/components/pango_image/src/image_io_lz4.cpp.o CMakeFiles/pango_image.dir/components/pango_image/src/image_io_packed12bit.cpp.o CMakeFiles/pango_image.dir/components/pango_image/src/image_io_pango.cpp.o CMakeFiles/pango_image.dir/components/pango_image/src/image_io_png.cpp.o CMakeFiles/pango_image.dir/components/pango_image/src/image_io_ppm.cpp.o CMakeFiles/pango_image.dir/components/pango_image/src/image_io_raw.cpp.o CMakeFiles/pango_image.dir/components/pango_image/src/image_io_tga.cpp.o CMakeFiles/pango_image.dir/components/pango_image/src/image_io_bmp.cpp.o CMakeFiles/pango_image.dir/components/pango_image/src/image_io_zstd.cpp.o CMakeFiles/pango_image.dir/components/pango_image/src/image_io_libraw.cpp.o CMakeFiles/pango_image.dir/components/pango_image/src/image_io_tiff.cpp.o  -Wl,-rpath,/Users/liangdeo/pyproj/Pangolin/build  /opt/homebrew/lib/libpng.dylib  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/lib/libz.tbd  /opt/homebrew/lib/libjpeg.dylib  /opt/homebrew/lib/libtiff.dylib  /opt/homebrew/lib/liblz4.dylib  /opt/homebrew/lib/libzstd.dylib  libpango_core.dylib && :
Undefined symbols for architecture arm64:
  "jpeg_std_error(jpeg_error_mgr*)", referenced from:
      pangolin::LoadJpg(std::__1::basic_istream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
      pangolin::GetMJpegOffsets(std::__1::basic_ifstream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
      pangolin::SaveJpg(pangolin::Image<unsigned char> const&, pangolin::PixelFormat const&, std::__1::basic_ostream<char, std::__1::char_traits<char>>&, float) in image_io_jpg.cpp.o
   NOTE: found '_jpeg_std_error' in libjpeg.8.3.2.dylib, declaration possibly missing 'extern "C"'
  "jpeg_read_header(jpeg_decompress_struct*, int)", referenced from:
      pangolin::LoadJpg(std::__1::basic_istream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
      pangolin::GetMJpegOffsets(std::__1::basic_ifstream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
   NOTE: found '_jpeg_read_header' in libjpeg.8.3.2.dylib, declaration possibly missing 'extern "C"'
  "jpeg_set_quality(jpeg_compress_struct*, int, int)", referenced from:
      pangolin::SaveJpg(pangolin::Image<unsigned char> const&, pangolin::PixelFormat const&, std::__1::basic_ostream<char, std::__1::char_traits<char>>&, float) in image_io_jpg.cpp.o
   NOTE: found '_jpeg_set_quality' in libjpeg.8.3.2.dylib, declaration possibly missing 'extern "C"'
  "jpeg_set_defaults(jpeg_compress_struct*)", referenced from:
      pangolin::SaveJpg(pangolin::Image<unsigned char> const&, pangolin::PixelFormat const&, std::__1::basic_ostream<char, std::__1::char_traits<char>>&, float) in image_io_jpg.cpp.o
   NOTE: found '_jpeg_set_defaults' in libjpeg.8.3.2.dylib, declaration possibly missing 'extern "C"'
  "jpeg_CreateCompress(jpeg_compress_struct*, int, unsigned long)", referenced from:
      pangolin::SaveJpg(pangolin::Image<unsigned char> const&, pangolin::PixelFormat const&, std::__1::basic_ostream<char, std::__1::char_traits<char>>&, float) in image_io_jpg.cpp.o
   NOTE: found '_jpeg_CreateCompress' in libjpeg.8.3.2.dylib, declaration possibly missing 'extern "C"'
  "jpeg_read_scanlines(jpeg_decompress_struct*, unsigned char**, unsigned int)", referenced from:
      pangolin::LoadJpg(std::__1::basic_istream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
      pangolin::GetMJpegOffsets(std::__1::basic_ifstream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
   NOTE: found '_jpeg_read_scanlines' in libjpeg.8.3.2.dylib, declaration possibly missing 'extern "C"'
  "jpeg_start_compress(jpeg_compress_struct*, int)", referenced from:
      pangolin::SaveJpg(pangolin::Image<unsigned char> const&, pangolin::PixelFormat const&, std::__1::basic_ostream<char, std::__1::char_traits<char>>&, float) in image_io_jpg.cpp.o
   NOTE: found '_jpeg_start_compress' in libjpeg.8.3.2.dylib, declaration possibly missing 'extern "C"'
  "jpeg_finish_compress(jpeg_compress_struct*)", referenced from:
      pangolin::SaveJpg(pangolin::Image<unsigned char> const&, pangolin::PixelFormat const&, std::__1::basic_ostream<char, std::__1::char_traits<char>>&, float) in image_io_jpg.cpp.o
   NOTE: found '_jpeg_finish_compress' in libjpeg.8.3.2.dylib, declaration possibly missing 'extern "C"'
  "jpeg_write_scanlines(jpeg_compress_struct*, unsigned char**, unsigned int)", referenced from:
      pangolin::SaveJpg(pangolin::Image<unsigned char> const&, pangolin::PixelFormat const&, std::__1::basic_ostream<char, std::__1::char_traits<char>>&, float) in image_io_jpg.cpp.o
   NOTE: found '_jpeg_write_scanlines' in libjpeg.8.3.2.dylib, declaration possibly missing 'extern "C"'
  "jpeg_CreateDecompress(jpeg_decompress_struct*, int, unsigned long)", referenced from:
      pangolin::LoadJpg(std::__1::basic_istream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
      pangolin::GetMJpegOffsets(std::__1::basic_ifstream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
   NOTE: found '_jpeg_CreateDecompress' in libjpeg.8.3.2.dylib, declaration possibly missing 'extern "C"'
  "jpeg_destroy_compress(jpeg_compress_struct*)", referenced from:
      pangolin::SaveJpg(pangolin::Image<unsigned char> const&, pangolin::PixelFormat const&, std::__1::basic_ostream<char, std::__1::char_traits<char>>&, float) in image_io_jpg.cpp.o
   NOTE: found '_jpeg_destroy_compress' in libjpeg.8.3.2.dylib, declaration possibly missing 'extern "C"'
  "jpeg_start_decompress(jpeg_decompress_struct*)", referenced from:
      pangolin::LoadJpg(std::__1::basic_istream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
      pangolin::GetMJpegOffsets(std::__1::basic_ifstream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
   NOTE: found '_jpeg_start_decompress' in libjpeg.8.3.2.dylib, declaration possibly missing 'extern "C"'
  "jpeg_finish_decompress(jpeg_decompress_struct*)", referenced from:
      pangolin::LoadJpg(std::__1::basic_istream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
      pangolin::GetMJpegOffsets(std::__1::basic_ifstream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
   NOTE: found '_jpeg_finish_decompress' in libjpeg.8.3.2.dylib, declaration possibly missing 'extern "C"'
  "jpeg_resync_to_restart(jpeg_decompress_struct*, int)", referenced from:
      pangolin::LoadJpg(std::__1::basic_istream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
      pangolin::GetMJpegOffsets(std::__1::basic_ifstream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
   NOTE: found '_jpeg_resync_to_restart' in libjpeg.8.3.2.dylib, declaration possibly missing 'extern "C"'
  "jpeg_destroy_decompress(jpeg_decompress_struct*)", referenced from:
      pangolin::LoadJpg(std::__1::basic_istream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
      pangolin::GetMJpegOffsets(std::__1::basic_ifstream<char, std::__1::char_traits<char>>&) in image_io_jpg.cpp.o
   NOTE: found '_jpeg_destroy_decompress' in libjpeg.8.3.2.dylib, declaration possibly missing 'extern "C"'
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[39/158] Building CXX object CMakeFiles/pango_geometry.dir/components/pango_geometry/src/geometry_ply.cpp.o
ninja: build stopped: subcommand failed.

@christian-rauch
Copy link
Collaborator

any idea on how to fix it?

Hard to say without further information. Are you following the instructions to install the dependencies? The CI pipeline for macOS arm64 (https://github.com/stevenlovegrove/Pangolin/actions/runs/10222724033/job/28287848313) runs successfully.

I don't have access to macOS hardware and rely on the CI for testing. If you can reproduce this on the CI, I can check if there is something wrong with the installation scripts for the dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants