Bug 4127

Summary: configure script assumes -export_dynamic always works on macOS
Product: Claws Mail (GTK 2) Reporter: claws-mail
Component: OtherAssignee: users
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 3.17.1   
Hardware: Macintosh   
OS: other   

Description claws-mail 2018-11-25 18:10:57 UTC
claws-mail fails to configure on the admittedly old Mac OS X 10.6.8:


checking whether to use libetpan... yes
checking for libetpan-config... /opt/local/bin/libetpan-config
checking libetpan/libetpan.h usability... yes
checking libetpan/libetpan.h presence... yes
checking for libetpan/libetpan.h... yes
checking whether libetpan-config hints compiles and links fine... no
*** Claws Mail requires libetpan 0.57 or newer. See http://www.etpan.org/ 
*** You can use --disable-libetpan if you don't need IMAP4 and/or NNTP support.
configure: error: libetpan 0.57 not found


Here's the full log from the MacPorts build system:

https://build.macports.org/builders/ports-10.6_i386_legacy-builder/builds/56474/steps/install-port/logs/stdio


libetpan is installed, but the configure script fails to detect it because it is giving the linker a flag it does not understand, which causes an error message. From config.log:


configure:20395: checking whether libetpan-config hints compiles and links fine
configure:20409: /usr/bin/gcc-4.2 -o conftest -pipe -Os -arch x86_64 -Wno-unused-function -Wno-pointer-sign -Wall -no-cpp-precomp -fno-common -I/opt/local/include -I/opt/local/include -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -Wl,-export_dynamic conftest.c  -lm -lresolv -L/opt/local/lib -letpan -L/opt/local/lib -Wl,-headerpad_max_install_names -L/opt/local/lib -L/opt/local/lib -L/opt/local/lib -lcurl -lidn2 -lpsl -lssl -lcrypto -lssl -lcrypto -lz -lexpat -lz -lssl -lcrypto -liconv -lsasl2 -lssl -lcrypto >&5
ld: unknown option: -export_dynamic
collect2: ld returned 1 exit status


Newer versions of Apple's ld understand -export_dynamic, but older ones don't. You should check whether the linker understands the flag before you try to use it.