Page MenuHome GnuPG

libassuan mingw on Win7 compile problem with libtool EXPORTS def file
Closed, ResolvedPublic

Description

In the created libtool script a check is done on the file
'src/.libs/libassuan.def' to see if this is correct to create a
libassuan-0.dll.def file from.

The script checks if the first line of 'libassuan.def' contains 'EXPORTS' and if
not, first echo's this itself to a new file 'libassuan-0.dll.def', before
cat-ting 'libassuan.def' to the end of the new file. The problem is, however,
that 'libassuan.def' DOES contain the EXPORTS line, but not on line 1, as there
is a comment section there describing what the file is (and some licensing stuff).

The check looks something like this (from 'libtool' created by ./configure on

Win7 with mingw):

archive_expsym_cmds="if test \\\"x\\\\$SED 1q \$export_symbols\\\\\\" =
xEXPORTS; then

  cp \$export_symbols \$output_objdir/\$soname.def;
else
  echo EXPORTS > \$output_objdir/\$soname.def;
  cat \$export_symbols >> \$output_objdir/\$soname.def;
fi~
\$CC -shared \$output_objdir/\$soname.def \$libobjs \$deplibs

\$compiler_flags -o \$output_objdir/\$soname \${wl}--enable-auto-image-base

-Xlinker --out-implib -Xlinker \$lib"

The test on the first line is broken. It should probably be something like

(ignoring the escaping needed):

if grep EXPORTS $export_symbols; then

etcetc

Details

Version
2.1.1

Event Timeline

thijso added projects: libassuan, Bug Report.
thijso added a subscriber: thijso.

This has already been fixed in the repo:

commit e78abe490ff6806f8083b23075ae036e5894513a
Author: Werner Koch <wk@gnupg.org>
Date: Mon Jan 6 16:16:24 2014 +0100

Update libtool and autogen.sh.

--

This is the version from current libgpg-error which already has the
changes done here plus these:

  bf0d67db * Update libtool to support Android.
  dd05f379 * Fix libtool 2.4.2 to correctly detect .def files.
  6971fe55 * Update to libtool 2.4.2.
aheinecke claimed this task.

I can confirm that this is fixed with libassuan 2.1.2