GNU bug report logs -
#30127
ICC: 'entry point must be defined' error for shared builds on Windows
Previous Next
Reported by: sav_ix <at> ukr.net
Date: Mon, 15 Jan 2018 16:17:02 UTC
Severity: normal
Done: Mike Frysinger <vapier <at> gentoo.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 30127 in the body.
You can then email your comments to 30127 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-automake <at> gnu.org
:
bug#30127
; Package
automake
.
(Mon, 15 Jan 2018 16:17:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
sav_ix <at> ukr.net
:
New bug report received and forwarded. Copy sent to
bug-automake <at> gnu.org
.
(Mon, 15 Jan 2018 16:17:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello everyone,
For libiconv builds using Windows ICC got error:
===============================================================
builddir="`pwd`"; cd libcharset && make all && make install-lib libdir="$builddir/lib" includedir="$builddir/lib"
make[1]: Entering directory '/c/libICONV-1.15/build/libcharset'
cd lib && make all
make[2]: Entering directory '/c/libICONV-1.15/build/libcharset/lib'
/bin/sh ../libtool --mode=link /c/libICONV-1.15/build/libcharset/../build-aux/compile icl -Zc:wchar_t -nologo -DWIN32 -D_WIN32 -DWIN64 -D_WIN64 -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -Od -Zi -GS -DDEBUG -D_DEBUG -MDd -o libcharset.la -rpath /c/libICONV-1.15/build/../ICC64DH/lib -version-info 1:0:0 -no-undefined localcharset.lo relocatable.lo
libtool: link: rm -fr .libs/charset.exp
libtool: link: /usr/bin/nm -B .libs/localcharset.obj .libs/relocatable.obj | sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)\{0,1\}$/\1 \2 \2/p' | sed '/ __gnu_lto/d' | /usr/bin/sed -e '/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/' | /usr/bin/sed -e '/^[AITW][ ]/s/.*[ ]//' | sort | uniq > .libs/charset.exp
libtool: link: if test DEF = "`/usr/bin/sed -n -e 's/^[ ]*//' -e '/^\(;.*\)*$/d' -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' -e q .libs/charset.exp`" ; then cp ".libs/charset.exp" ".libs/charset-1.dll.def"; echo ".libs\\charset-1.dll.def" > ".libs/charset-1.dll.exp"; else /usr/bin/sed -e 's/^/-link -EXPORT:/' < .libs/charset.exp > .libs/charset-1.dll.exp; fi
libtool: link: /c/libICONV-1.15/build/libcharset/../build-aux/compile icl -o .libs\\charset-1.dll .libs/localcharset.obj .libs/relocatable.obj -Od "@.libs\\charset-1.dll.exp" -Wl,-DLL,-IMPLIB:".libs\\charset.lib"
icl .libs\charset-1.dll .libs/localcharset.obj .libs/relocatable.obj -Od -Wl,-DLL,-IMPLIB:.libs\charset.lib
Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 18.0.1.156 Build 20171018
Copyright (C) 1985-2017 Intel Corporation. All rights reserved.
icl: command line warning #10157: ignoring option '/W'; argument is of wrong type
Microsoft (R) Incremental Linker Version 14.12.25830.2
Copyright (C) Microsoft Corporation. All rights reserved.
-out:.libs\charset-1.dll
-EXPORT:DllMain
-EXPORT:__local_stdio_printf_options
-EXPORT:_vsnprintf_l
-EXPORT:_vsprintf_l
-EXPORT:libcharset_relocate
-EXPORT:libcharset_set_relocation_prefix
-EXPORT:locale_charset
-EXPORT:sprintf
-EXPORT:DllMain
-EXPORT:__local_stdio_printf_options
-EXPORT:_vsnprintf_l
-EXPORT:_vsprintf_l
-EXPORT:libcharset_relocate
-EXPORT:libcharset_set_relocation_prefix
-EXPORT:locale_charset
-EXPORT:sprintf
.libs/localcharset.obj
.libs/relocatable.obj
Creating library .libs\charset-1.lib and object .libs\charset-1.exp
LINK : fatal error LNK1561: entry point must be defined
make[2]: *** [Makefile:59: libcharset.la] Error 25
make[2]: Leaving directory '/c/libICONV-1.15/build/libcharset/lib'
make[1]: *** [Makefile:34: all] Error 2
make[1]: Leaving directory '/c/libICONV-1.15/build/libcharset'
make: *** [Makefile:42: lib/localcharset.h] Error 2
===============================================================
which relate to missing Windows ICC support in 'compile' (http://git.savannah.gnu.org/cgit/automake.git/tree/lib/compile) script.
Reproduced for:
- shared builds using Windows ICC,
not reproduced for:
- static builds using Windows ICC,
- shared builds using mingw-w64 and MSVC.
Environment:
- Windows 10 x64,
- ICC 2018 Update 1,
- MSVC 2017 15.5.0,
- Windows SDK 10.0.16299.15,
- mingw-w64 x86_64 7.2.0,
- MSYS2 x86_64 20170918,
- libiconv 1.15.
The same error reproduced for shared builds of other OSS Projects with Autotools-based build systems.
MSYS2 (msys2.org) Project provide a fix for 'compile' script, which they distribute:
===============================================================
diff --git a/compile b/compile
index 531136b..2be28ec 100644
--- a/compile
+++ b/compile
@@ -255,7 +255,8 @@ EOF
echo "compile $scriptversion"
exit $?
;;
- cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
+ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
===============================================================
but it's not convenient to update build system of OSS Projects before each build.
Can this fix be merged to Automake sources directly?
Best,
Alexander
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-automake <at> gnu.org
:
bug#30127
; Package
automake
.
(Wed, 17 Jan 2018 22:58:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 30127 <at> debbugs.gnu.org (full text, mbox):
Hello,
sav_ix <at> ukr.net writes:
> For libiconv builds using Windows ICC got error:
> ===============================================================
> builddir="`pwd`"; cd libcharset && make all && make install-lib libdir="$builddir/lib" includedir="$builddir/lib"
> make[1]: Entering directory '/c/libICONV-1.15/build/libcharset'
> cd lib && make all
> make[2]: Entering directory '/c/libICONV-1.15/build/libcharset/lib'
> /bin/sh ../libtool --mode=link /c/libICONV-1.15/build/libcharset/../build-aux/compile icl -Zc:wchar_t -nologo -DWIN32 -D_WIN32 -DWIN64 -D_WIN64 -D_CRT_SECURE_NO_DEPRECATE
> -D_SCL_SECURE_NO_DEPRECATE -Od -Zi -GS -DDEBUG -D_DEBUG -MDd -o libcharset.la -rpath /c/libICONV-1.15/build/../ICC64DH/lib -version-info 1:0:0 -no-undefined localcharset.lo relocatable.lo
> libtool: link: rm -fr .libs/charset.exp
> libtool: link: /usr/bin/nm -B .libs/localcharset.obj .libs/relocatable.obj | sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)\{0,1\}$/\1 \2 \2/p' | sed '/ __gnu_lto/d' | /usr/bin/sed
> -e '/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/' | /usr/bin/sed -e '/^[AITW][ ]/s/.*[ ]//' | sort | uniq > .libs/charset.exp
> libtool: link: if test DEF = "`/usr/bin/sed -n -e 's/^[ ]*//' -e '/^\(;.*\)*$/d' -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' -e q .libs/charset.exp`" ; then cp ".libs/charset.exp" ".libs/charset-1.dll.def"; echo
> ".libs\\charset-1.dll.def" > ".libs/charset-1.dll.exp"; else /usr/bin/sed -e 's/^/-link -EXPORT:/' < .libs/charset.exp > .libs/charset-1.dll.exp; fi
> libtool: link: /c/libICONV-1.15/build/libcharset/../build-aux/compile icl -o .libs\\charset-1.dll .libs/localcharset.obj .libs/relocatable.obj -Od "@.libs\\charset-1.dll.exp" -Wl,-DLL,-IMPLIB:".libs\\charset.lib"
> icl .libs\charset-1.dll .libs/localcharset.obj .libs/relocatable.obj -Od -Wl,-DLL,-IMPLIB:.libs\charset.lib
>
> Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 18.0.1.156 Build 20171018
> Copyright (C) 1985-2017 Intel Corporation. All rights reserved.
> icl: command line warning #10157: ignoring option '/W'; argument is of wrong type
>
> Microsoft (R) Incremental Linker Version 14.12.25830.2
> Copyright (C) Microsoft Corporation. All rights reserved.
>
> -out:.libs\charset-1.dll
> -EXPORT:DllMain
> -EXPORT:__local_stdio_printf_options
> -EXPORT:_vsnprintf_l
> -EXPORT:_vsprintf_l
> -EXPORT:libcharset_relocate
> -EXPORT:libcharset_set_relocation_prefix
> -EXPORT:locale_charset
> -EXPORT:sprintf
> -EXPORT:DllMain
> -EXPORT:__local_stdio_printf_options
> -EXPORT:_vsnprintf_l
> -EXPORT:_vsprintf_l
> -EXPORT:libcharset_relocate
> -EXPORT:libcharset_set_relocation_prefix
> -EXPORT:locale_charset
> -EXPORT:sprintf
> .libs/localcharset.obj
> .libs/relocatable.obj
> Creating library .libs\charset-1.lib and object .libs\charset-1.exp
> LINK : fatal error LNK1561: entry point must be defined
> make[2]: *** [Makefile:59: libcharset.la] Error 25
> make[2]: Leaving directory '/c/libICONV-1.15/build/libcharset/lib'
> make[1]: *** [Makefile:34: all] Error 2
> make[1]: Leaving directory '/c/libICONV-1.15/build/libcharset'
> make: *** [Makefile:42: lib/localcharset.h] Error 2
> ===============================================================
>
> which relate to missing Windows ICC support in 'compile' (http://git.savannah.gnu.org/cgit/automake.git/tree/lib/compile) script.
>
> Reproduced for:
> - shared builds using Windows ICC,
>
> not reproduced for:
> - static builds using Windows ICC,
> - shared builds using mingw-w64 and MSVC.
>
> Environment:
> - Windows 10 x64,
> - ICC 2018 Update 1,
> - MSVC 2017 15.5.0,
> - Windows SDK 10.0.16299.15,
> - mingw-w64 x86_64 7.2.0,
> - MSYS2 x86_64 20170918,
> - libiconv 1.15.
>
> The same error reproduced for shared builds of other OSS Projects with Autotools-based build systems.
>
> MSYS2 (msys2.org) Project provide a fix for 'compile' script, which they distribute:
> ===============================================================
> diff --git a/compile b/compile
> index 531136b..2be28ec 100644
> --- a/compile
> +++ b/compile
> @@ -255,7 +255,8 @@ EOF
> echo "compile $scriptversion"
> exit $?
> ;;
> - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
> + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
> + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
> func_cl_wrapper "$@" # Doesn't return...
> ;;
> esac
> ===============================================================
>
> but it's not convenient to update build system of OSS Projects before each build.
> Can this fix be merged to Automake sources directly?
Indeed, The great news is that support for ‘icl’ has already been added
in Automake 1.15.1 [1]. :-)
Could you confirm it works correctly with Automake 1.15.1?
Note: When building libiconv you have to use ‘autoreconf -i’ or
something similar in order to have the local ‘compile’ script updated.
Thanks for the report.
[1] https://lists.gnu.org/archive/html/info-gnu/2017-06/msg00007.html
--
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37
Information forwarded
to
bug-automake <at> gnu.org
:
bug#30127
; Package
automake
.
(Sun, 21 Jan 2018 17:27:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 30127 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
--- Оригінальне повідомлення ---
Від кого: "Mathieu Lirzin" <mthl <at> gnu.org>
Дата: 18 січня 2018, 00:57:33
> Indeed, The great news is that support for ‘icl’ has already been added
> in Automake 1.15.1 [1]. :-)
Thought I checked Automake master before filling report. In any case thank you for a good news.
Though there is lot of code in Automake (and Autotools in general), not covered by commit (http://git.savannah.gnu.org/cgit/automake.git/commit/?id=c40e27e1c2a60f58e72e65d73d808f782d55494a). At least all occurrences of 'cl' and 'cl.exe'should checked and fixed to match 'icl' and 'icl.exe' conditions too. But this, obviously, is out if scope of current issue.
> Could you confirm it works correctly with Automake 1.15.1?
Yes, me used that patch for GMP, MPIR, MPFR and libiconv builds using Windows ICC and it works fine.
In case you're interested, there is a patch to 'lib/ar-lib', which I use for libiconv builds using Windows ICC:
===============================================================
diff --git a/build-aux/ar-lib b/build-aux/ar-lib
index 463b9ec..3cfddbc 100644
--- a/build-aux/ar-lib
+++ b/build-aux/ar-lib
@@ -127,8 +127,10 @@ do
fi
case $1 in
-lib | -LIB \
+ | -xilib | -XILIB \
| -ltcg | -LTCG \
| -machine* | -MACHINE* \
+ | -nologo | -NOLOGO \
| -subsystem* | -SUBSYSTEM* \
| -verbose | -VERBOSE \
| -wx* | -WX* )
===============================================================
since ICC linker 'xilink' and librarian 'xilib' are just a wrappers to MSVC 'link' and librarian 'lib' respectively, and ' -nologo ' use reduces noise in stderr.
CC: Jonathan L Peyton,
as Author of patch for 'compile', mentioned above. In case he'll be interested to make a review aor join this discussion.
Odd, that current 'ar-lib' implementation covers only a part of MSVC 'lib' flags:
===============================================================
c:\>lib /?
Microsoft (R) Library Manager Version 14.12.25830.2
Copyright (C) Microsoft Corporation. All rights reserved.
usage: LIB [options] [files]
options:
/DEF[:filename]
/ERRORREPORT:{NONE|PROMPT|QUEUE|SEND}
/EXPORT:symbol
/EXTRACT:membername
/INCLUDE:symbol
/LIBPATH:dir
/LIST[:filename]
/LTCG
/MACHINE:{ARM|ARM64|EBC|X64|X86}
/NAME:filename
/NODEFAULTLIB[:library]
/NOLOGO
/OUT:filename
/REMOVE:membername
/SUBSYSTEM:{BOOT_APPLICATION|CONSOLE|EFI_APPLICATION|
EFI_BOOT_SERVICE_DRIVER|EFI_ROM|EFI_RUNTIME_DRIVER|
NATIVE|POSIX|WINDOWS|WINDOWSCE}[,#[.##]]
/VERBOSE
/WX[:NO]
===============================================================
Wondering, what was a reason for this.
Best,
Alexander
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-automake <at> gnu.org
:
bug#30127
; Package
automake
.
(Tue, 23 Jan 2018 14:47:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 30127 <at> debbugs.gnu.org (full text, mbox):
sav_ix <at> ukr.net writes:
> In case you're interested, there is a patch to 'lib/ar-lib', which I use for libiconv builds using Windows ICC:
> ===============================================================
> diff --git a/build-aux/ar-lib b/build-aux/ar-lib
> index 463b9ec..3cfddbc 100644
> --- a/build-aux/ar-lib
> +++ b/build-aux/ar-lib
> @@ -127,8 +127,10 @@ do
> fi
> case $1 in
> -lib | -LIB \
> + | -xilib | -XILIB \
> | -ltcg | -LTCG \
> | -machine* | -MACHINE* \
> + | -nologo | -NOLOGO \
> | -subsystem* | -SUBSYSTEM* \
> | -verbose | -VERBOSE \
> | -wx* | -WX* )
> ===============================================================
> since ICC linker 'xilink' and librarian 'xilib' are just a wrappers to MSVC 'link' and librarian 'lib' respectively, and ' -nologo ' use reduces noise in stderr.
>
> CC: Jonathan L Peyton,
> as Author of patch for 'compile', mentioned above. In case he'll be interested to make a review aor join this discussion.
>
> Odd, that current 'ar-lib' implementation covers only a part of MSVC 'lib' flags:
> ===============================================================
> c:\>lib /?
> Microsoft (R) Library Manager Version 14.12.25830.2
> Copyright (C) Microsoft Corporation. All rights reserved.
>
> usage: LIB [options] [files]
>
> options:
>
> /DEF[:filename]
> /ERRORREPORT:{NONE|PROMPT|QUEUE|SEND}
> /EXPORT:symbol
> /EXTRACT:membername
> /INCLUDE:symbol
> /LIBPATH:dir
> /LIST[:filename]
> /LTCG
> /MACHINE:{ARM|ARM64|EBC|X64|X86}
> /NAME:filename
> /NODEFAULTLIB[:library]
> /NOLOGO
> /OUT:filename
> /REMOVE:membername
> /SUBSYSTEM:{BOOT_APPLICATION|CONSOLE|EFI_APPLICATION|
> EFI_BOOT_SERVICE_DRIVER|EFI_ROM|EFI_RUNTIME_DRIVER|
> NATIVE|POSIX|WINDOWS|WINDOWSCE}[,#[.##]]
> /VERBOSE
> /WX[:NO]
> ===============================================================
>
> Wondering, what was a reason for this.
I am definitely not competent for reviewing Windows related stuff. So
that would be great if Jonathan or anyone with more experience with
‘ar-lib’ could help reviewing this patch.
Thanks for your patch.
--
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37
Information forwarded
to
bug-automake <at> gnu.org
:
bug#30127
; Package
automake
.
(Tue, 23 Jan 2018 18:43:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 30127 <at> debbugs.gnu.org (full text, mbox):
I think the –xilib option is invalid when using:
$ xilink –xilib …
This just gives me an “unrecognized option '/xilib'; ignored” warning, but if I use
$ xilink –lib …
Then it calls xilib similar to how
$ link.exe –lib …
calls lib.exe
Or in short:
$ xilink.exe –lib = xilib.exe
$ link.exe –lib = lib.exe
I don't think it would hurt if -xilib is converted to -lib, but that is what needs to happen if the option is accepted.
-nologo looks good to me.
-- Jonathan Peyton
Information forwarded
to
bug-automake <at> gnu.org
:
bug#30127
; Package
automake
.
(Tue, 08 Feb 2022 04:33:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 30127 <at> debbugs.gnu.org (full text, mbox):
We already invoke $AR with -NOLOGO all the time, so we can ignore the
option entirely if the user specifies it.
* lib/ar-lib: Ignore -NOLOGO.
---
lib/ar-lib | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/ar-lib b/lib/ar-lib
index 9dc8ef6df054..54c6bdbf7f1b 100755
--- a/lib/ar-lib
+++ b/lib/ar-lib
@@ -135,6 +135,10 @@ do
AR="$AR $1"
shift
;;
+ -nologo | -NOLOGO)
+ # We always invoke AR with -nologo, so don't need to add it again.
+ shift
+ ;;
*)
action=$1
shift
--
2.34.1
bug closed, send any further explanations to
30127 <at> debbugs.gnu.org and sav_ix <at> ukr.net
Request was from
Mike Frysinger <vapier <at> gentoo.org>
to
control <at> debbugs.gnu.org
.
(Tue, 08 Feb 2022 05:56:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-automake <at> gnu.org
:
bug#30127
; Package
automake
.
(Tue, 08 Feb 2022 22:52:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 30127 <at> debbugs.gnu.org (full text, mbox):
* lib/ar-lib: Ignore -NOLOGO.
Certainly. (No need to wait for confirmation to push such things, as far
as I'm concerned ...)
Information forwarded
to
bug-automake <at> gnu.org
:
bug#30127
; Package
automake
.
(Wed, 09 Feb 2022 04:09:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 30127-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
closing this issue out. the original report has been settled, we've merged
support for ignoring -nologo, but the -xilib suggestion looks like it needs
more work. feel free to post a patch to automake-patches <at> gnu.org if you have
something you think we can merge.
-mike
[signature.asc (application/pgp-signature, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 09 Mar 2022 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 41 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.