I am getting this error right here after upgrading to XCode 15 with react native version 0.72.4 in Macbook M1:
ld: warning: could not create compact unwind for _fa3d73c773a947d51: does not use RBP or RSP based frame
ld: warning: Could not find or use auto-linked framework 'CoreAudioTypes'
Undefined symbols for architecture x86_64:
"_qwjicc_jpeg_CreateCompress", referenced from:
_convertRGB2Jpeg in ToygerServiceAlgo(JpegTool.cpp.o)
"_qwjicc_jpeg_destroy_compress", referenced from:
_convertRGB2Jpeg in ToygerServiceAlgo(JpegTool.cpp.o)
"_qwjicc_jpeg_finish_compress", referenced from:
_convertRGB2Jpeg in ToygerServiceAlgo(JpegTool.cpp.o)
"_qwjicc_jpeg_mem_dest", referenced from:
_convertRGB2Jpeg in ToygerServiceAlgo(JpegTool.cpp.o)
"_qwjicc_jpeg_set_defaults", referenced from:
_convertRGB2Jpeg in ToygerServiceAlgo(JpegTool.cpp.o)
"_qwjicc_jpeg_set_quality", referenced from:
_convertRGB2Jpeg in ToygerServiceAlgo(JpegTool.cpp.o)
"_qwjicc_jpeg_start_compress", referenced from:
_convertRGB2Jpeg in ToygerServiceAlgo(JpegTool.cpp.o)
"_qwjicc_jpeg_std_error", referenced from:
_convertRGB2Jpeg in ToygerServiceAlgo(JpegTool.cpp.o)
"_qwjicc_jpeg_write_scanlines", referenced from:
_convertRGB2Jpeg in ToygerServiceAlgo(JpegTool.cpp.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The app used to work on XCode 14.3, but after updating to OSX Sonoma, that is no longer an option since XCode 15 is the minimum.
Is anyone familiar with this error? How do I fix this?
Already tried adding the CoreAudioTypes framework to the build phases, also added arm64 to the excluded architectures only, but the error is still present.
2
Answers
The error you’re encountering is due to the linker not being able to find the symbols for the x86_64 architecture. This is because the library you’re using for JPEG compression (qwjicc) is built for the arm64 architecture, which is used by the M1 chip. The linker is trying to find the symbols for the x86_64 architecture, which are not present in the library you’re using.
To fix this issue, you need to recompile the library for the x86_64 architecture. Unfortunately, the qwjicc library does not seem to support this architecture. However, you can use an alternative library that supports both arm64 and x86_64. One such library is libjpeg-turbo.
you can add libjpeg-turbo as a dependency in your Podfile or other configuration file
same issue, any update for this issue ?