[Users] [Bug 3673] Be more friendly instead of "configure: error: 'encrypt'-function not found."

Andrej Kacian andrej at kacian.sk
Fri Jan 13 20:03:04 CET 2017


On Fri, 13 Jan 2017 12:46:25 -0500
"Perry E. Metzger" <perry at piermont.com> wrote:

> On Fri, 13 Jan 2017 16:28:37 +0100 Andrej Kacian <andrej at kacian.sk>
> wrote:
> > On Fri, 13 Jan 2017 10:04:51 -0500
> > "Perry E. Metzger" <perry at piermont.com> wrote:
> >   
> > > Replying a month late: the MacPorts version of etpan IS over 0.57
> > > (and hasn't changed, and this configures and works fine for
> > > 3.14.0 on OS X.)
> > > 
> > > The question is why it can't find it but it could before. The only
> > > difference is quite literally the user of 3.14.1 vs. 3.14.0. :(
> > > 
> > > I will have to dig in to this more deeply it seems.    
> > 
> > Can you post complete config.log file from the build attempt
> > somewhere? That is probably the only place where clues can be found
> > as to why configure fails.  
> 
> I created a pair of github gists.
> 
> config.log for 3.14.0 (which works)
> 
> https://gist.github.com/pmetzger/628dd39f41568fb46bfd344321a3ca2b
> 
> config.log for 3.14.1 (which does not work)
> 
> https://gist.github.com/pmetzger/003c73d74927e0f213d7f637d7a4ea87
> 
> Perry

These two lines are telling:
ld: unknown option: -export-dynamic
clang: error: linker command failed with exit code 1 (use -v tosee invocation)

Looks like the recent patch from bug 3665, which was supposed to fix
building on OS X broke your Macports build, as it changed LDFLAGS to
use -export-dynamic, instead of --export-dynamic (one leading dash
instead of two).
(http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3665)

I guess this is an issue of correctly detecting the environment we are
in. I am not familiar with Apple Unix flavours, but my guess is that
the reporter of bug 3665 uses some native Apple build toolchain, which
has linker program that uses -export-dynamic, whereas Macports use
either GNU gcc toolchain, or perhaps clang, and linker program which
understands --export-dynamic.

We test for Apple OS simply by matching host triplet against pattern
"*-apple-*", but perhaps something more fine-grained is needed. I see
from your config.log that your build system shows host triplet
"x86_64-apple-darwin16.3.0", so perhaps we need to treat
"*-apple-darwin*" differently from just "*-apple-*"?

This could really use someone familiar with MacOS/OSX, as I'm just
blindly guessing.

As a quick&dirty workaround, you should be able to fix the Macports
build with a simple change:

--- a/configure.ac
+++ b/configure.ac
@@ -118,7 +118,7 @@ case "$host" in
     ;;
        *-apple-*)
                platform_osx=yes
-               LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
+               LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
                ;;
   *)
     platform_win32=no


Regards,
-- 
Andrej



More information about the Users mailing list