Discussion:
[MacPorts] #57673: claws-mail: configure: error: libetpan 0.57 not found
MacPorts
2018-11-25 13:11:23 UTC
Permalink
#57673: claws-mail: configure: error: libetpan 0.57 not found
------------------------+------------------------
Reporter: ryandesign | Owner: pmetzger
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Keywords: | Port: claws-mail
------------------------+------------------------
[https://build.macports.org/builders/ports-10.6_i386_legacy-
builder/builds/56474/steps/install-port/logs/stdio claws-mail fails to
configure with gcc-4.2]:

{{{
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
}}}

libetpan is of course installed; config.log shows the reason why it wasn't
detected:

{{{
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
}}}
--
Ticket URL: <https://trac.macports.org/ticket/57673>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-25 15:18:54 UTC
Permalink
#57673: claws-mail: configure: error: libetpan 0.57 not found
-------------------------+----------------------
Reporter: ryandesign | Owner: pmetzger
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: claws-mail |
-------------------------+----------------------

Comment (by pmetzger):

This works under current Xcode. I'm not sure what the correct way to fix
this so it works across more compilers would be. What's recommended?
--
Ticket URL: <https://trac.macports.org/ticket/57673#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-25 15:47:57 UTC
Permalink
#57673: claws-mail: configure: error: libetpan 0.57 not found
-------------------------+----------------------
Reporter: ryandesign | Owner: pmetzger
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: claws-mail |
-------------------------+----------------------
Post by MacPorts
[https://build.macports.org/builders/ports-10.6_i386_legacy-
builder/builds/56474/steps/install-port/logs/stdio claws-mail fails to
{{{
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
}}}
libetpan is of course installed; config.log shows the reason why it
{{{
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
}}}
New description:

[https://build.macports.org/builders/ports-10.6_i386_legacy-
builder/builds/56474/steps/install-port/logs/stdio claws-mail fails to
configure on Snow Leopard]:

{{{
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
}}}

libetpan is of course installed; config.log shows the reason why it wasn't
detected:

{{{
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
}}}

--
Post by MacPorts
This works under current Xcode.
No doubt! But apparently the version of `ld` on Snow Leopard is too old to
know about `-export_dynamic`. (I was mistaken earlier when I thought it
was due to the old compiler because I saw `/usr/bin/gcc-4.2` on the line,
but `-Wl,-export_dynamic` means "pass `-export_dynamic` to the linker", so
it's actually the old linker that's causing the problem.)

Ideally, the configure script should first check whether the linker
understands a flag before trying to use it. That's the purpose of
configure scripts: to determine the capabilities of the system and not
make assumptions. Looking at configure.ac, it's unconditionally using
`-Wl,-export_dynamic` on macOS.
--
Ticket URL: <https://trac.macports.org/ticket/57673#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-25 17:00:26 UTC
Permalink
#57673: claws-mail: configure: error: libetpan 0.57 not found
-------------------------+----------------------
Reporter: ryandesign | Owner: pmetzger
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: claws-mail |
-------------------------+----------------------

Comment (by pmetzger):

Sure, but what should I do to fix this? I don't have a Snow Leopard
machine to test with, and I don't know enough about hacking configure.ac
files. If you have a few lines you could put into a patch and commit, it
would be a big help.
--
Ticket URL: <https://trac.macports.org/ticket/57673#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-25 17:11:33 UTC
Permalink
#57673: claws-mail: configure: error: libetpan 0.57 not found
-------------------------+----------------------
Reporter: ryandesign | Owner: pmetzger
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: claws-mail |
-------------------------+----------------------

Comment (by ryandesign):

I don't have that. I can read configure files ok, but I'm not great at
writing them. I've [http://www.thewildbeast.co.uk/claws-
mail/bugzilla/show_bug.cgi?id=4127 reported the problem to the
developers].
--
Ticket URL: <https://trac.macports.org/ticket/57673#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-25 20:29:20 UTC
Permalink
#57673: claws-mail: configure: error: libetpan 0.57 not found
-------------------------+----------------------
Reporter: ryandesign | Owner: pmetzger
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: claws-mail |
-------------------------+----------------------

Comment (by kencu):

I was going to help on this, but `libetpan` doesn't build any more against
the current `curl`, so I'm stuck for now. Of course, the `libetpan` issue
needs to be a separate ticket.
{{{
libtool: compile: /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I../../..
-I../../../include -I../../../src/data-types -I../../../src/low-level/imf
-I/opt/local/include -DDEBUG -I/opt/local/include -D_REENTRANT
-I/opt/local/include -I/opt/local/include -pipe -Os -arch x86_64 -W -Wall
-c newsfeed_item.c -fno-common -DPIC -o .libs/newsfeed_item.o
parser.c: In function ‘elparse_end_dummy’:
parser.c:135: warning: unused parameter ‘el’
parser.c: In function ‘unknown_encoding_handler’:
parser.c:342: warning: unused parameter ‘encdata’
newsfeed.c: In function ‘curl_error_convert’:
newsfeed.c:538: error: duplicate case value
newsfeed.c:533: error: previously used here
make[7]: *** [newsfeed.lo] Error 1
}}}
--
Ticket URL: <https://trac.macports.org/ticket/57673#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-25 21:18:32 UTC
Permalink
#57673: claws-mail: configure: error: libetpan 0.57 not found
-------------------------+----------------------
Reporter: ryandesign | Owner: pmetzger
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: claws-mail |
-------------------------+----------------------

Comment (by kencu):

It looks like this [https://git.claws-
mail.org/?p=claws.git;a=blobdiff;f=configure.ac;h=226ea172e81131e7bbffbccbcf61afe3f77d376f;hp=596535730c9453066e56bf00bdba5e53aaf1d33f;hb=HEAD;hpb=53a6a5a53c7a2ba98e40a65f54680bff5338cae4
commit] was the one that broke it for older systems. Reverting this little
bit of that commit:
{{{
*-apple-*)
platform_osx=yes
- LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
+ LDFLAGS="$LDFLAGS -Wl,-export_dynamic"

}}}
and success:
{{{
$ port -v installed claws-mail
The following ports are currently installed:
claws-mail @3.17.1_3 (active) platform='darwin 10' archs='x86_64'
date='2018-11-25T13:14:19-0800'
}}}
--
Ticket URL: <https://trac.macports.org/ticket/57673#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-25 21:25:05 UTC
Permalink
#57673: claws-mail: configure: error: libetpan 0.57 not found
-------------------------+----------------------
Reporter: ryandesign | Owner: pmetzger
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: claws-mail |
-------------------------+----------------------

Comment (by kencu):

BTW -- I tried all kinds of ways to force the build to use a newer `ld64`
but nothing worked. It seems determined to use the one baked into the
compiler, as far as I can see.
--
Ticket URL: <https://trac.macports.org/ticket/57673#comment:7>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-25 23:51:37 UTC
Permalink
#57673: claws-mail: configure: error: libetpan 0.57 not found
-------------------------+----------------------
Reporter: ryandesign | Owner: pmetzger
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: claws-mail |
-------------------------+----------------------

Comment (by pmetzger):

Ken, is there a good way to remove the -export_dynamic only on the older
platform?
--
Ticket URL: <https://trac.macports.org/ticket/57673#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-26 00:29:12 UTC
Permalink
#57673: claws-mail: configure: error: libetpan 0.57 not found
-------------------------+----------------------
Reporter: ryandesign | Owner: pmetzger
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: claws-mail |
-------------------------+----------------------

Comment (by jmroot):

The quick-fix way would be to only apply a patch removing that line on OS
versions that don't understand it. The better way suitable for sending
upstream would be to check the OS or ld version in the configure script
before adding the flag. It's only needed for ld versions that can do LTO.
--
Ticket URL: <https://trac.macports.org/ticket/57673#comment:9>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-26 04:07:20 UTC
Permalink
#57673: claws-mail: configure: error: libetpan 0.57 not found
-------------------------+----------------------
Reporter: ryandesign | Owner: pmetzger
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: claws-mail |
-------------------------+----------------------

Comment (by kencu):

Oh, it's all done -- the PR is waiting for you to hit "Commit"
<https://github.com/macports/macports-ports/pull/3083>
--
Ticket URL: <https://trac.macports.org/ticket/57673#comment:10>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-26 13:37:04 UTC
Permalink
#57673: claws-mail: configure: error: libetpan 0.57 not found
-------------------------+----------------------
Reporter: ryandesign | Owner: pmetzger
Type: defect | Status: closed
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: fixed | Keywords:
Port: claws-mail |
-------------------------+----------------------
Changes (by ken-cunningham-webuse):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"0cb9995304ff980b97e7b305bc95efbdc778eed0/macports-ports"
0cb9995304ff980b97e7b305bc95efbdc778eed0/macports-ports] (master):
{{{
#!ConfigurableCommitTicketReference repository="macports-ports"
revision="0cb9995304ff980b97e7b305bc95efbdc778eed0"
claws-mail: disable unrecognized ld flag on older systems

closes: https://trac.macports.org/ticket/57673
}}}
--
Ticket URL: <https://trac.macports.org/ticket/57673#comment:11>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-26 13:37:35 UTC
Permalink
#57673: claws-mail: configure: error: libetpan 0.57 not found
-------------------------+----------------------
Reporter: ryandesign | Owner: pmetzger
Type: defect | Status: closed
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: fixed | Keywords:
Port: claws-mail |
-------------------------+----------------------

Comment (by pmetzger):

I merged it. If it needs more love, we can of course fine tune the fix.
--
Ticket URL: <https://trac.macports.org/ticket/57673#comment:12>
MacPorts <https://www.macports.org/>
Ports system for macOS
Loading...