Beep6581 / RawTherapee

A powerful cross-platform raw photo processing program
https://rawtherapee.com
GNU General Public License v3.0
2.67k stars 306 forks source link

MSYS2: last version of libjpeg-turbo triggers a link error #4713

Closed gaaned92 closed 3 years ago

gaaned92 commented 5 years ago

The last update of package mingw-w64-x86_64-libjpeg-turbo-2.0.0-1 triggers following error at link step:

C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../rtengine/librtengine.a(jdatasrc.cc.obj):jdatasrc.cc:(.rdata$.refptr.jpeg_std_message_table[.refptr.jpeg_std_message_table]+0x0): undefined reference to `jpeg_std_message_table'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [rtgui/CMakeFiles/rth.dir/build.make:2278: rtgui/rawtherapee.exe] Error 1
make[1]: *** [CMakeFiles/Makefile2:282: rtgui/CMakeFiles/rth.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

There is no error during compilation.

the version 1.5.3 is ok

The two versions are uploaded here https://filebin.net/qglvvp0b2d2q8brl

TooWaBoo commented 5 years ago

How do I install the older version? EDIT: Found it. :-)

TooWaBoo commented 5 years ago

@gaaned92 Looks like your linked file 1.5.3 is for 32bit and not 64bit? Still get the error after downgrade.

gaaned92 commented 5 years ago

@TooWaBoo Thanks, I forgot to include the 64 bits versions. You can verify the libjpeg version installed: pacman -Qs libjpeg I can build with gcc 8.2 and libjpeg-turbo 1.5.3

@heckflosse @Floessie @agriggio can you identify the reason of issue and which of libjpeg or Rawtherapee is responsible?

TooWaBoo commented 5 years ago

@gaaned92 Works now, it was my fault. I had to many backups. :-)

Floessie commented 5 years ago

Neither RT's nor libjpeg-turbo's code changed in respect of jpeg_std_message_table, so my wild guess is, that MinGW's linker was overly aggressive when building libjpeg-turbo, or that there's an incompatibility between the toolchain used for building libjpeg-turbo and the one you're using to build RT. The variable signature is fine. The error shouldn't strike RT alone, so keep on googling for "undefined reference to `jpeg_std_message_table'".

Desmis commented 5 years ago

Hello I have been away some days, and I discover this problem

What must I do ? Is the command : $ pacman -U /var/cache/pacman/pkg/mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz Solved the problem (as for lensfun)

Or must I do another thing Thank you :) jacques

gaaned92 commented 5 years ago
Is the command :
$ pacman -U /var/cache/pacman/pkg/mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz
Solved the problem (as for lensfun)

Yes

Furthermore, if you want to avoid update of libjpeg-turbo until issue is solved,

in `/msys64/etc/pacman.conf` insert after
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup

IgnorePkg   =  mingw-w64-x86_64-libjpeg-turbo
Desmis commented 5 years ago

thank you :)

TheSquirrelMafia commented 5 years ago

Thanks for working on this issue!

TooWaBoo commented 5 years ago

I was able to compile successfully with the latest libjpeg-turbo by changing following in jdatasrc.cc.

Line 252

old

//const char * const jpeg_std_message_table[] = {
//#include "jerror.h"
//  NULL
//};
extern const char * const jpeg_std_message_table[];

new

const char * const jpeg_std_message_table[] = {
#include "jerror.h"
  NULL
};
//extern const char * const jpeg_std_message_table[];

I don't think that's the right way 'cause I don't know what I'm doing😄 but perhaps this helps to fix it.

gaaned92 commented 5 years ago

@TooWaBoo good catch! At least we can compile with last libjpeg turbo :satisfied:

But, a while ago, a dev modified on purpose jdatasrc.cc to override the corresponding jdatasrc.c of libjpegturbo package and this change is reverting one of the modifications. So there is a risk that it breaks the jpeg error handler in some way. @Floessie @heckflosse @agriggio is it safe to do that?

heckflosse commented 5 years ago

@gaaned92

But, a while ago, a dev modified on purpose jdatasrc.cc to override the corresponding jdatasrc.c of libjpegturbo package and this change is reverting one of the modifications.

I don't remember which dev that was. Can you shed some light into (I hope it wasn't me)?

gaaned92 commented 5 years ago

@heckflosse It dates back to the night of times when you were not yet active on the project. A jdatasrc.c (not .cc) is already present at flag Dev-3.0 "initial import" in 2010 with the same code

//const char * const jpeg_std_message_table[] = {
//#include "jerror.h"
//  NULL
//};
extern const char * const jpeg_std_message_table[];
TooWaBoo commented 5 years ago

I've found this info for libjpeg 2.0. Perhaps it helps.

4. Improved error handling in the TurboJPEG API library:

Introduced a new function (tjGetErrorStr2()) in the TurboJPEG C API that allows compression/decompression/transform error messages to be retrieved in a thread-safe manner. Retrieving error messages from global functions, such as tjInitCompress() or tjBufSize(), is still thread-unsafe, but since those functions will only throw errors if passed an invalid argument or if a memory allocation failure occurs, thread safety is not as much of a concern.

Introduced a new function (tjGetErrorCode()) in the TurboJPEG C API and a new method (TJException.getErrorCode()) in the TurboJPEG Java API that can be used to determine the severity of the last compression/decompression/transform error. This allows applications to choose whether to ignore warnings (non-fatal errors) from the underlying libjpeg API or to treat them as fatal.

Introduced a new flag (TJFLAG_STOPONWARNING in the TurboJPEG C API and TJ.FLAG_STOPONWARNING in the TurboJPEG Java API) that causes the library to immediately halt a compression/decompression/transform operation if it encounters a warning from the underlying libjpeg API (the default behavior is to allow the operation to complete unless a fatal error is encountered.)

Hombre57 commented 5 years ago

I have this problem too. I can compile thanks to @TooWaBoo 's patch, but I'd set a top priority for a clean bugfix (if anyone knows how to fix that).

aferrero2707 commented 5 years ago

@gaaned92 @TooWaBoo @Hombre57 I'm hitting this very same problem while trying to set-up a new cross-compiling build environment based on MSYS2.

FYI, the goal is to have a continuous integration environment for automated Win64 builds that uses the same packages as @gaaned92, but working inside a linux Manjaro (therefore Arch-based) docker container instead of a native Windows system. This way, the Win64 packages can be compiled under Travis CI.

What is the recommended solution? Patching the jdatasrc.cc or down-grading the MSYS2 libjpeg-turbo package?

TooWaBoo commented 5 years ago

@aferrero2707 We downgrade to version mingw-w64-x86_64-libjpeg-turbo-1.5.3-1. http://repo.msys2.org/mingw/x86_64/

gaaned92 commented 5 years ago

@aferrero2707 we downgrade now following packages:

mingw-w64-x86_64-gtk3-3.22.30-1-any.pkg.tar.xz mingw-w64-x86_64-gtkmm3-3.22.3-1-any.pkg.tar.xz mingw-w64-x86_64-lensfun-0.3.2-4-any.pkg.tar.xz mingw-w64-x86_64-libjpeg-turbo-1.5.3-1-any.pkg.tar.xz

http://rawpedia.rawtherapee.com/Windows

gaaned92 commented 4 years ago

Is there a foreseen action to use libjpegturbo2?

Beep6581 commented 4 years ago

Status?

gaaned92 commented 4 years ago

I still build with 1.5.3-1 The last version is libjipeg-turbo 2.0.3-1. I will try to build with it.

gaaned92 commented 4 years ago

libjipeg-turbo 2.0.3-1 triggers the same link error

aferrero2707 commented 3 years ago

@gaaned92 I am resurrecting this discussion, because version 1.5.3-1 seems to have disappeared from the MSYS2 repositories:

Screen Shot 2020-10-13 at 5 02 26 PM

This means the automated builds, which install the MSYS2 packages at each execution, are currently stuck... any idea how to proceed?

Thanatomanic commented 3 years ago

From the people currently available, maybe @Floessie can take a renewed look at this issue?

Thanatomanic commented 3 years ago

At the least I can confirm that the problem still exists with libjpeg-turbo-2.0.5:

[100%] Linking CXX executable rawtherapee.exe
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../rtengine/librtengine.a(jdatasrc.cc.obj):jdatasrc.cc:(.rdata$.refptr.jpeg_std_message_table[.refptr.jpeg_std_message_table]+0x0): undefined reference to `jpeg_std_message_table'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [rtgui/CMakeFiles/rth.dir/build.make:2465: rtgui/rawtherapee.exe] Error 1
make[1]: *** [CMakeFiles/Makefile2:294: rtgui/CMakeFiles/rth.dir/all] Error 2
make: *** [Makefile:150: all] Error 2
heckflosse commented 3 years ago

How about this hack?

diff --git a/rtengine/jdatasrc.cc b/rtengine/jdatasrc.cc
index a5008b00f..f9256899d 100644
--- a/rtengine/jdatasrc.cc
+++ b/rtengine/jdatasrc.cc
@@ -248,12 +248,18 @@ my_error_exit (j_common_ptr cinfo)
 }

-//const char * const jpeg_std_message_table[] = {
-//#include "jerror.h"
-//  NULL
-//};
+#ifdef WIN32
+#define JVERSION   "6b  27-Mar-1998"
+#define JCOPYRIGHT_SHORT   "(C) 1998, Thomas G. Lane"
+#define JMESSAGE(code,string)  string ,
+
+const char * const jpeg_std_message_table[] = {
+#include "jerror.h"
+  NULL
+};
+#else
 extern const char * const jpeg_std_message_table[];
-
+#endif

 /*
  * Actual output of an error or trace message.
heckflosse commented 3 years ago

I tested above hack with a CR2 file which I renamed to .jpg Seems to work. I get this in console:

Not a JPEG file: starts with 0xff 0x49

which proves the hack works correctly. Maybe we should commit it to dev to allow nighthly windows builds until we have a better solution.

gaaned92 commented 3 years ago

W10/MSYS2 @heckflosse The build is ok and I can open jpegs. It is only a hack as you say, do you think it can break some function. Do you know why it was modified from the original jdatasrc.c of the libjpeg-turbo package?

Anyway, I think you should commit.

heckflosse commented 3 years ago

@gaaned92

It is only a hack as you say, do you think it can break some function.

I think it is save to commit it.

Do you know why it was modified from the original jdatasrc.c of the libjpeg-turbo package?

Well, I tried the patch from https://github.com/Beep6581/RawTherapee/issues/4713#issuecomment-415740900 and it segfaulted (crashed) when opening corrupted jpegs. Though clearly I don't know why this was modified.

Now it works and we should commit the patch imho. @Thanatomanic @Beep6581 ?

Beep6581 commented 3 years ago

No issues linking in Linux.

+1 for imminent commit as it solves a problem and gets more testing.

P.S. are the first three defines (JVERSION, JCOPYRIGHT_SHORT and JMESSAGE) needed? Where do their values come from?

Thanatomanic commented 3 years ago

:+1: for a merge

Do you know why it was modified from the original jdatasrc.c of the libjpeg-turbo package?

Well, I tried the patch from #4713 (comment) and it segfaulted (crashed) when opening corrupted jpegs. Though clearly I don't know why this was modified.

It seems to me as an historic (possibly kinda misguided) attempt to reduce dependencies, but I'm not sure. Further investigation would be warranted imo.

Thanatomanic commented 3 years ago

After looking at the differences between the libjpeg-turbo code and our code, it seems to me the only reason for the existence of our code is to override this: https://github.com/libjpeg-turbo/libjpeg-turbo/blob/6d8caa9f88184ad1698e91c94b37acb9506dacf0/jerror.c#L55-L78 and have a more graceful error handling.

heckflosse commented 3 years ago

@Beep6581 Without the defines it doesn't compile. I got them from here https://github.com/avxsynth/avxsynth/commit/80dcb7ec8d314bc158130c92803308aa8e5e9242

heckflosse commented 3 years ago

Maybe we can port this back to RT for a cleaner solution: https://bitbucket.org/agriggio/art/commits/c05cb3142c4a466b0c3ad17053e7dec315594c1b

gaaned92 commented 3 years ago

On the user side, I don't see evidence that the ART solution brings a different behaviour. So it is up to the dev to make a decision. If you agree I think we can close this thread

heckflosse commented 3 years ago

Ok to close from me.

Thanatomanic commented 3 years ago

For me as well. I think this counts as one of the longest outstanding issues with critical priority that has finally been 'fixed' (more than two years!). We can finally lay it to rest. Thanks everyone involved!

barracuda156 commented 1 month ago

There is the same failure on some versions of MacOS when building with Clang:

:info:build [100%] Building CXX object rtgui/CMakeFiles/rth.dir/xtransrawexposure.cc.o
:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_rawtherapee/rawtherapee/work/build/rtgui && /opt/local/bin/clang++-mp-16 -DAUTO_GDK_FLUSH=0 -DCMS_NO_REGISTER_KEYWORD -DGUIVERSION -DMYFILE_MMAP -DNDEBUG -DNO_COCOA -DSTRICT_MUTEX=1 -DTRACE_MYRWMUTEX=0 -D_DNDEBUG -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_rawtherapee/rawtherapee/work/build/rtgui -I/opt/local/include -I/opt/local/lib -I/opt/local/include/giomm-2.4 -I/opt/local/lib/giomm-2.4/include -I/opt/local/include/glibmm-2.4 -I/opt/local/lib/glibmm-2.4/include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/sigc++-2.0 -I/opt/local/lib/sigc++-2.0/include -I/opt/local/include/gtkmm-3.0 -I/opt/local/lib/gtkmm-3.0/include -I/opt/local/include/atkmm-1.6 -I/opt/local/include/gtk-3.0/unix-print -I/opt/local/include/gdkmm-3.0 -I/opt/local/lib/gdkmm-3.0/include -I/opt/local/include/gtk-3.0 -I/opt/local/include/at-spi2-atk/2.0 -I/opt/local/include/at-spi-2.0 -I/opt/local/include/dbus-1.0 -I/opt/local/lib/dbus-1.0/include -I/opt/local/include/gio-unix-2.0 -I/opt/local/include/cairo -I/opt/local/include/atk-1.0 -I/opt/local/include/pangomm-1.4 -I/opt/local/lib/pangomm-1.4/include -I/opt/local/include/cairomm-1.0 -I/opt/local/lib/cairomm-1.0/include -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include/fribidi -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/libpng16 -I/opt/local/include/libiptcdata -I/opt/local/include/lensfun -I/opt/local/include/librsvg-2.0 -pipe -DNDEBUG -I/opt/local/include -stdlib=libc++ -std=c++11 -mtune=generic -Werror=unused-label -Werror=delete-incomplete -fno-math-errno -Wno-attributes -mmacosx-version-min=10.8 -Wall -Wuninitialized -Wcast-qual -Wno-deprecated-declarations -Wno-unused-result -Wunused-macros -O2 -g -DNDEBUG -arch x86_64 -mmacosx-version-min=10.8 -pipe -DNDEBUG -I/opt/local/include -stdlib=libc++ -std=c++11 -mtune=generic -Werror=unused-label -Werror=delete-incomplete -fno-math-errno -Wno-attributes -mmacosx-version-min=10.8 -Wall -Wuninitialized -Wcast-qual -Wno-deprecated-declarations -Wno-unused-result -Wunused-macros -MD -MT rtgui/CMakeFiles/rth.dir/xtransrawexposure.cc.o -MF CMakeFiles/rth.dir/xtransrawexposure.cc.o.d -o CMakeFiles/rth.dir/xtransrawexposure.cc.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtgui/xtransrawexposure.cc
:info:build 1 warning generated.
:info:build [100%] Building CXX object rtgui/CMakeFiles/rth.dir/zoompanel.cc.o
:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_rawtherapee/rawtherapee/work/build/rtgui && /opt/local/bin/clang++-mp-16 -DAUTO_GDK_FLUSH=0 -DCMS_NO_REGISTER_KEYWORD -DGUIVERSION -DMYFILE_MMAP -DNDEBUG -DNO_COCOA -DSTRICT_MUTEX=1 -DTRACE_MYRWMUTEX=0 -D_DNDEBUG -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_rawtherapee/rawtherapee/work/build/rtgui -I/opt/local/include -I/opt/local/lib -I/opt/local/include/giomm-2.4 -I/opt/local/lib/giomm-2.4/include -I/opt/local/include/glibmm-2.4 -I/opt/local/lib/glibmm-2.4/include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/sigc++-2.0 -I/opt/local/lib/sigc++-2.0/include -I/opt/local/include/gtkmm-3.0 -I/opt/local/lib/gtkmm-3.0/include -I/opt/local/include/atkmm-1.6 -I/opt/local/include/gtk-3.0/unix-print -I/opt/local/include/gdkmm-3.0 -I/opt/local/lib/gdkmm-3.0/include -I/opt/local/include/gtk-3.0 -I/opt/local/include/at-spi2-atk/2.0 -I/opt/local/include/at-spi-2.0 -I/opt/local/include/dbus-1.0 -I/opt/local/lib/dbus-1.0/include -I/opt/local/include/gio-unix-2.0 -I/opt/local/include/cairo -I/opt/local/include/atk-1.0 -I/opt/local/include/pangomm-1.4 -I/opt/local/lib/pangomm-1.4/include -I/opt/local/include/cairomm-1.0 -I/opt/local/lib/cairomm-1.0/include -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include/fribidi -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/libpng16 -I/opt/local/include/libiptcdata -I/opt/local/include/lensfun -I/opt/local/include/librsvg-2.0 -pipe -DNDEBUG -I/opt/local/include -stdlib=libc++ -std=c++11 -mtune=generic -Werror=unused-label -Werror=delete-incomplete -fno-math-errno -Wno-attributes -mmacosx-version-min=10.8 -Wall -Wuninitialized -Wcast-qual -Wno-deprecated-declarations -Wno-unused-result -Wunused-macros -O2 -g -DNDEBUG -arch x86_64 -mmacosx-version-min=10.8 -pipe -DNDEBUG -I/opt/local/include -stdlib=libc++ -std=c++11 -mtune=generic -Werror=unused-label -Werror=delete-incomplete -fno-math-errno -Wno-attributes -mmacosx-version-min=10.8 -Wall -Wuninitialized -Wcast-qual -Wno-deprecated-declarations -Wno-unused-result -Wunused-macros -MD -MT rtgui/CMakeFiles/rth.dir/zoompanel.cc.o -MF CMakeFiles/rth.dir/zoompanel.cc.o.d -o CMakeFiles/rth.dir/zoompanel.cc.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_rawtherapee/rawtherapee/work/rawtherapee-5.10/rtgui/zoompanel.cc
:info:build [100%] Linking CXX executable rawtherapee
:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_rawtherapee/rawtherapee/work/build/rtgui && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/rth.dir/link.txt --verbose=ON
:info:build /opt/local/bin/clang++-mp-16 -pipe -DNDEBUG -I/opt/local/include -stdlib=libc++ -std=c++11 -mtune=generic -Werror=unused-label -Werror=delete-incomplete -fno-math-errno -Wno-attributes -mmacosx-version-min=10.8 -Wall -Wuninitialized -Wcast-qual -Wno-deprecated-declarations -Wno-unused-result -Wunused-macros -O2 -g -DNDEBUG -arch x86_64 -mmacosx-version-min=10.8 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/local/lib -Wl,-headerpad_max_install_names -mtune=generic -Wl,-headerpad_max_install_names -mtune=generic -framework Foundation CMakeFiles/rth.dir/adjuster.cc.o CMakeFiles/rth.dir/alignedmalloc.cc.o CMakeFiles/rth.dir/batchqueue.cc.o CMakeFiles/rth.dir/batchqueuebuttonset.cc.o CMakeFiles/rth.dir/batchqueueentry.cc.o CMakeFiles/rth.dir/batchqueuepanel.cc.o CMakeFiles/rth.dir/batchtoolpanelcoord.cc.o CMakeFiles/rth.dir/bayerpreprocess.cc.o CMakeFiles/rth.dir/bayerprocess.cc.o CMakeFiles/rth.dir/bayerrawexposure.cc.o CMakeFiles/rth.dir/blackwhite.cc.o CMakeFiles/rth.dir/bqentryupdater.cc.o CMakeFiles/rth.dir/browserfilter.cc.o CMakeFiles/rth.dir/cacheimagedata.cc.o CMakeFiles/rth.dir/cachemanager.cc.o CMakeFiles/rth.dir/cacorrection.cc.o CMakeFiles/rth.dir/checkbox.cc.o CMakeFiles/rth.dir/chmixer.cc.o CMakeFiles/rth.dir/clipboard.cc.o CMakeFiles/rth.dir/coarsepanel.cc.o CMakeFiles/rth.dir/colorappearance.cc.o CMakeFiles/rth.dir/coloredbar.cc.o CMakeFiles/rth.dir/colortoning.cc.o CMakeFiles/rth.dir/controllines.cc.o CMakeFiles/rth.dir/controlspotpanel.cc.o CMakeFiles/rth.dir/coordinateadjuster.cc.o CMakeFiles/rth.dir/crop.cc.o CMakeFiles/rth.dir/crophandler.cc.o CMakeFiles/rth.dir/cropwindow.cc.o CMakeFiles/rth.dir/cursormanager.cc.o CMakeFiles/rth.dir/curveeditor.cc.o CMakeFiles/rth.dir/curveeditorgroup.cc.o CMakeFiles/rth.dir/darkframe.cc.o CMakeFiles/rth.dir/defringe.cc.o CMakeFiles/rth.dir/dehaze.cc.o CMakeFiles/rth.dir/diagonalcurveeditorsubgroup.cc.o CMakeFiles/rth.dir/dirbrowser.cc.o CMakeFiles/rth.dir/dirpyrdenoise.cc.o CMakeFiles/rth.dir/dirpyrequalizer.cc.o CMakeFiles/rth.dir/distortion.cc.o CMakeFiles/rth.dir/dynamicprofilepanel.cc.o CMakeFiles/rth.dir/editbuffer.cc.o CMakeFiles/rth.dir/editcallbacks.cc.o CMakeFiles/rth.dir/editorpanel.cc.o CMakeFiles/rth.dir/editwidgets.cc.o CMakeFiles/rth.dir/editwindow.cc.o CMakeFiles/rth.dir/epd.cc.o CMakeFiles/rth.dir/eventmapper.cc.o CMakeFiles/rth.dir/exiffiltersettings.cc.o CMakeFiles/rth.dir/exifpanel.cc.o CMakeFiles/rth.dir/exportpanel.cc.o CMakeFiles/rth.dir/externaleditorpreferences.cc.o CMakeFiles/rth.dir/extprog.cc.o CMakeFiles/rth.dir/fattaltonemap.cc.o CMakeFiles/rth.dir/filebrowser.cc.o CMakeFiles/rth.dir/filebrowserentry.cc.o CMakeFiles/rth.dir/filecatalog.cc.o CMakeFiles/rth.dir/filepanel.cc.o CMakeFiles/rth.dir/filethumbnailbuttonset.cc.o CMakeFiles/rth.dir/filmnegative.cc.o CMakeFiles/rth.dir/filmsimulation.cc.o CMakeFiles/rth.dir/filterpanel.cc.o CMakeFiles/rth.dir/flatcurveeditorsubgroup.cc.o CMakeFiles/rth.dir/flatfield.cc.o CMakeFiles/rth.dir/gradient.cc.o CMakeFiles/rth.dir/guiutils.cc.o CMakeFiles/rth.dir/histogrampanel.cc.o CMakeFiles/rth.dir/history.cc.o CMakeFiles/rth.dir/hsvequalizer.cc.o CMakeFiles/rth.dir/iccprofilecreator.cc.o CMakeFiles/rth.dir/icmpanel.cc.o CMakeFiles/rth.dir/imagearea.cc.o CMakeFiles/rth.dir/imageareapanel.cc.o CMakeFiles/rth.dir/impulsedenoise.cc.o CMakeFiles/rth.dir/indclippedpanel.cc.o CMakeFiles/rth.dir/inspector.cc.o CMakeFiles/rth.dir/iptcpanel.cc.o CMakeFiles/rth.dir/labcurve.cc.o CMakeFiles/rth.dir/labgrid.cc.o CMakeFiles/rth.dir/lensgeom.cc.o CMakeFiles/rth.dir/lensprofile.cc.o CMakeFiles/rth.dir/localcontrast.cc.o CMakeFiles/rth.dir/locallab.cc.o CMakeFiles/rth.dir/locallabtools.cc.o CMakeFiles/rth.dir/locallabtools2.cc.o CMakeFiles/rth.dir/lockablecolorpicker.cc.o CMakeFiles/rth.dir/lwbutton.cc.o CMakeFiles/rth.dir/lwbuttonset.cc.o CMakeFiles/rth.dir/main.cc.o CMakeFiles/rth.dir/metadatapanel.cc.o CMakeFiles/rth.dir/multilangmgr.cc.o CMakeFiles/rth.dir/mycurve.cc.o CMakeFiles/rth.dir/mydiagonalcurve.cc.o CMakeFiles/rth.dir/myflatcurve.cc.o CMakeFiles/rth.dir/navigator.cc.o CMakeFiles/rth.dir/options.cc.o CMakeFiles/rth.dir/paramsedited.cc.o CMakeFiles/rth.dir/partialpastedlg.cc.o CMakeFiles/rth.dir/pathutils.cc.o CMakeFiles/rth.dir/pcvignette.cc.o CMakeFiles/rth.dir/pdsharpening.cc.o CMakeFiles/rth.dir/perspective.cc.o CMakeFiles/rth.dir/placesbrowser.cc.o CMakeFiles/rth.dir/popupbutton.cc.o CMakeFiles/rth.dir/popupcommon.cc.o CMakeFiles/rth.dir/popuptogglebutton.cc.o CMakeFiles/rth.dir/preferences.cc.o CMakeFiles/rth.dir/preprocess.cc.o CMakeFiles/rth.dir/preprocesswb.cc.o CMakeFiles/rth.dir/previewhandler.cc.o CMakeFiles/rth.dir/previewloader.cc.o CMakeFiles/rth.dir/previewmodepanel.cc.o CMakeFiles/rth.dir/previewwindow.cc.o CMakeFiles/rth.dir/profilepanel.cc.o CMakeFiles/rth.dir/profilestorecombobox.cc.o CMakeFiles/rth.dir/prsharpening.cc.o CMakeFiles/rth.dir/rawcacorrection.cc.o CMakeFiles/rth.dir/rawexposure.cc.o CMakeFiles/rth.dir/recentbrowser.cc.o CMakeFiles/rth.dir/renamedlg.cc.o CMakeFiles/rth.dir/resize.cc.o CMakeFiles/rth.dir/retinex.cc.o CMakeFiles/rth.dir/rgbcurves.cc.o CMakeFiles/rth.dir/rotate.cc.o CMakeFiles/rth.dir/rtappchooserdialog.cc.o CMakeFiles/rth.dir/rtimage.cc.o CMakeFiles/rth.dir/rtscalable.cc.o CMakeFiles/rth.dir/rtsurface.cc.o CMakeFiles/rth.dir/rtwindow.cc.o CMakeFiles/rth.dir/saveasdlg.cc.o CMakeFiles/rth.dir/saveformatpanel.cc.o CMakeFiles/rth.dir/sensorbayer.cc.o CMakeFiles/rth.dir/sensorxtrans.cc.o CMakeFiles/rth.dir/shadowshighlights.cc.o CMakeFiles/rth.dir/sharpenedge.cc.o CMakeFiles/rth.dir/sharpening.cc.o CMakeFiles/rth.dir/sharpenmicro.cc.o CMakeFiles/rth.dir/shcselector.cc.o CMakeFiles/rth.dir/softlight.cc.o CMakeFiles/rth.dir/soundman.cc.o CMakeFiles/rth.dir/splash.cc.o CMakeFiles/rth.dir/spot.cc.o CMakeFiles/rth.dir/threadutils.cc.o CMakeFiles/rth.dir/thresholdadjuster.cc.o CMakeFiles/rth.dir/thresholdselector.cc.o CMakeFiles/rth.dir/thumbbrowserbase.cc.o CMakeFiles/rth.dir/thumbbrowserentrybase.cc.o CMakeFiles/rth.dir/thumbimageupdater.cc.o CMakeFiles/rth.dir/thumbnail.cc.o CMakeFiles/rth.dir/tonecurve.cc.o CMakeFiles/rth.dir/toneequalizer.cc.o CMakeFiles/rth.dir/toolbar.cc.o CMakeFiles/rth.dir/toollocationpref.cc.o CMakeFiles/rth.dir/toolpanel.cc.o CMakeFiles/rth.dir/toolpanelcoord.cc.o CMakeFiles/rth.dir/vibrance.cc.o CMakeFiles/rth.dir/vignetting.cc.o CMakeFiles/rth.dir/wavelet.cc.o CMakeFiles/rth.dir/whitebalance.cc.o CMakeFiles/rth.dir/xtransprocess.cc.o CMakeFiles/rth.dir/xtransrawexposure.cc.o CMakeFiles/rth.dir/zoompanel.cc.o -o rawtherapee  -Wl,-rpath,/opt/local/lib ../rtengine/librtengine.a -lexpat -lfftw3f -lgiomm-2.4 -lgio-2.0 -lglibmm-2.4 -lgobject-2.0 -lglib-2.0 -lintl -lsigc-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl -lglib-2.0 -lintl -lglibmm-2.4 -lgobject-2.0 -lglib-2.0 -lintl -lsigc-2.0 -lgobject-2.0 -lglib-2.0 -lintl -lgthread-2.0 -lglib-2.0 -lintl -lgtkmm-3.0 -latkmm-1.6 -lgdkmm-3.0 -lgiomm-2.4 -lgtk-3 -lgdk-3 -latk-1.0 -lcairo-gobject -lgio-2.0 -lpangomm-1.4 -lglibmm-2.4 -lcairomm-1.0 -lsigc-2.0 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -lcairo -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lintl -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl -liptcdata /opt/local/lib/libjpeg.dylib -llcms2 /opt/local/lib/libpng.dylib /opt/local/lib/libz.dylib /opt/local/lib/libtiff.dylib /opt/local/lib/libz.dylib -llensfun -lrsvg-2 -lm -lgio-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lintl -lcairo /opt/local/lib/libexiv2.dylib -lgtkmm-3.0 -latkmm-1.6 -lgdkmm-3.0 -lgtk-3 -lgdk-3 -latk-1.0 -lcairo-gobject -lpangomm-1.4 -lcairomm-1.0 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -lgtk-3 -lgdk-3 -latk-1.0 -lcairo-gobject -lpangomm-1.4 -lcairomm-1.0 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -lgio-2.0 -lglibmm-2.4 -lgobject-2.0 -lglib-2.0 -lintl -lsigc-2.0 -lgthread-2.0 -lgdk_pixbuf-2.0 -liptcdata /opt/local/lib/libjpeg.dylib -llcms2 /opt/local/lib/libpng.dylib /opt/local/lib/libz.dylib /opt/local/lib/libtiff.dylib -llensfun -lrsvg-2 -lm -lgio-2.0 -lglibmm-2.4 -lgobject-2.0 -lglib-2.0 -lintl -lsigc-2.0 -lgthread-2.0 -lgdk_pixbuf-2.0 -liptcdata /opt/local/lib/libjpeg.dylib -llcms2 /opt/local/lib/libpng.dylib /opt/local/lib/libz.dylib /opt/local/lib/libtiff.dylib -llensfun -lrsvg-2 -lm -lcairo
:info:build Undefined symbols for architecture x86_64:
:info:build   "_jpeg_std_message_table", referenced from:
:info:build       _my_jpeg_std_error in librtengine.a(jdatasrc.cc.o)
:info:build ld: symbol(s) not found for architecture x86_64
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)
:info:build make[2]: *** [rtgui/rawtherapee] Error 1
barracuda156 commented 1 month ago

In fact on all macOS version if built with clang, as an example: https://build.macports.org/builders/ports-14_x86_64-builder/builds/39199/steps/install-port/logs/stdio

UPD. Hmm, perhaps it is caused by libjpeg-turbo 3.0.3, not by Clang. I just built the thing with gcc before libjpeg-turbo was updated.