GNU bug report logs -
#78682
Building libltdl with MSVC fails
Previous Next
To reply to this bug, email your comments to 78682 AT debbugs.gnu.org.
There is no need to reopen the bug first.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-libtool <at> gnu.org
:
bug#78682
; Package
libtool
.
(Tue, 03 Jun 2025 16:58:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Kirill Makurin <maiddaisuki <at> outlook.com>
:
New bug report received and forwarded. Copy sent to
bug-libtool <at> gnu.org
.
(Tue, 03 Jun 2025 16:58:02 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)]
Hi,
Building libltdl with MSVC fails:
```
libltdl_la-ltdl.obj : error LNK2019: unresolved external symbol lt_ltdl_LTX_preloaded_symbols referenced in function lt_dlinit
libltdl\.libs\libltdl-7.dll : fatal error LNK1120: 1 unresolved externals
```
I attached full invocation in separate file since it's quite messy.
I did some investigation.
Apparently, `lt_ltdl_LTX_preloaded_symbols` is supposed to be defined in libtool-generated `libltdl/.libs/libltdlS.c`, however it defines `lt_libltdl_LTX_preloaded_symbols` instead, as if it was mingw build.
I was building from libtool-2.5.4 release tarball. I tried building from `master` and the issue also exist there.
Thank you for working on MSVC-related issues. I have some other things to report/suggest.
- Kirill Makurin
[Message part 2 (text/html, inline)]
[cmd.txt (text/plain, attachment)]
Information forwarded
to
bug-libtool <at> gnu.org
:
bug#78682
; Package
libtool
.
(Wed, 04 Jun 2025 15:15:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 78682 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 03/06/2025 17:29, Kirill Makurin wrote:
> Hi,
Hi!
>
> Building libltdl with MSVC fails:
>
> ```
> libltdl_la-ltdl.obj : error LNK2019: unresolved external symbol
> lt_ltdl_LTX_preloaded_symbols referenced in function lt_dlinit
> libltdl\.libs\libltdl-7.dll : fatal error LNK1120: 1 unresolved externals
> ```
>
> I attached full invocation in separate file since it's quite messy.
>
> I did some investigation.
>
> Apparently, `lt_ltdl_LTX_preloaded_symbols` is supposed to be defined in
> libtool-generated `libltdl/.libs/libltdlS.c`, however it defines
> `lt_libltdl_LTX_preloaded_symbols` instead, as if it was mingw build.
>
> I was building from libtool-2.5.4 release tarball. I tried building from
> `master` and the issue also exist there.
Most if not all MSVC-related fixes are in the 'development' branch for
review and testing before I migrate them to master. Would you try
building libltdl with MSVC using development source code?
> Thank you for working on MSVC-related issues. I have some other things
> to report/suggest.
Thank you for your detailed bug reports!
--
Ileana Dumitrescu
GPG Public Key: FA26 CA78 4BE1 8892 7F22 B99F 6570 EA01 146F 7354
[OpenPGP_0x6570EA01146F7354.asc (application/pgp-keys, attachment)]
[OpenPGP_signature.asc (application/pgp-signature, attachment)]
Information forwarded
to
bug-libtool <at> gnu.org
:
bug#78682
; Package
libtool
.
(Thu, 05 Jun 2025 09:14:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 78682 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi Ileana,
I tried building from development branch and it has the same issue.
Out of curiosity I also tried to use clang-cl.exe (this is a clang which understands many of cl.exe's options), and I see the following:
```
H:/git/libtool/libltdl/ltdl.c(781,19): error: call to undeclared function 'access'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
781 | int notfound = access (filename, R_OK);
| ^
H:/git/libtool/libltdl/ltdl.c(781,19): note: did you mean 'accept'?
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um\winsock.h(739,19): note: 'accept' declared here
739 | SOCKET PASCAL FAR accept (
| ^
```
On native Windows (mingw/MSVC), `access` function is declared in io.h. You may use the following condition to recognize native Windows:
```
#if defined (_WIN32) && !defined (__CYGWIN__)
#endif
```
- Kirill Makurin
________________________________
From: Ileana Dumitrescu
Sent: Thursday, June 5, 2025 12:13 AM
To: 78682 <at> debbugs.gnu.org
Cc: Kirill Makurin
Subject: Re: bug#78682: Building libltdl with MSVC fails
On 03/06/2025 17:29, Kirill Makurin wrote:
> Hi,
Hi!
>
> Building libltdl with MSVC fails:
>
> ```
> libltdl_la-ltdl.obj : error LNK2019: unresolved external symbol
> lt_ltdl_LTX_preloaded_symbols referenced in function lt_dlinit
> libltdl\.libs\libltdl-7.dll : fatal error LNK1120: 1 unresolved externals
> ```
>
> I attached full invocation in separate file since it's quite messy.
>
> I did some investigation.
>
> Apparently, `lt_ltdl_LTX_preloaded_symbols` is supposed to be defined in
> libtool-generated `libltdl/.libs/libltdlS.c`, however it defines
> `lt_libltdl_LTX_preloaded_symbols` instead, as if it was mingw build.
>
> I was building from libtool-2.5.4 release tarball. I tried building from
> `master` and the issue also exist there.
Most if not all MSVC-related fixes are in the 'development' branch for
review and testing before I migrate them to master. Would you try
building libltdl with MSVC using development source code?
> Thank you for working on MSVC-related issues. I have some other things
> to report/suggest.
Thank you for your detailed bug reports!
--
Ileana Dumitrescu
GPG Public Key: FA26 CA78 4BE1 8892 7F22 B99F 6570 EA01 146F 7354
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-libtool <at> gnu.org
:
bug#78682
; Package
libtool
.
(Thu, 05 Jun 2025 15:47:04 GMT)
Full text and
rfc822 format available.
Message #14 received at 78682 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 05/06/2025 12:13, Kirill Makurin wrote:
> Hi Ileana,
>
> I tried building from development branch and it has the same issue.
Could you provide logs for this test? Also, looking over the previous
attached logs, NM may be the issue. In my test environment, I set
NM="dumpbin -all".
> Out of curiosity I also tried to use clang-cl.exe (this is a clang which
> understands many of cl.exe's options), and I see the following:
>
> ```
> H:/git/libtool/libltdl/ltdl.c(781,19): error: call to undeclared
> function 'access'; ISO C99 and later do not support implicit function
> declarations [-Wimplicit-function-declaration]
> 781 | int notfound = access (filename, R_OK);
> | ^
> H:/git/libtool/libltdl/ltdl.c(781,19): note: did you mean 'accept'?
> C:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\
> \um\winsock.h(739,19): note: 'accept' declared here
> 739 | SOCKET PASCAL FAR accept (
> | ^
> ```
>
> On native Windows (mingw/MSVC), `access` function is declared in io.h.
> You may use the following condition to recognize native Windows:
>
> ```
> #if defined (_WIN32) && !defined (__CYGWIN__)
> #endif
> ```
Since this looks like a separate issue, could you submit a new bug for
it? I am also happy to review patches if you have a possible solution.
--
Ileana Dumitrescu
GPG Public Key: FA26 CA78 4BE1 8892 7F22 B99F 6570 EA01 146F 7354
[OpenPGP_0x6570EA01146F7354.asc (application/pgp-keys, attachment)]
[OpenPGP_signature.asc (application/pgp-signature, attachment)]
Information forwarded
to
bug-libtool <at> gnu.org
:
bug#78682
; Package
libtool
.
(Thu, 05 Jun 2025 16:09:07 GMT)
Full text and
rfc822 format available.
Message #17 received at 78682 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I will submit a separate bug report for issue with clang-cl.
I'm setting NM="dumpbin.exe -nologo -symbols", this works for all packages I tried to build so far.
I'm building multiple GNU packages with a script which invokes `configure` -> `make` -> `make check` -> `make install DESTDIR=...` for each package.
I attached gziped output from both `configure` and `make`. (building from development branch)
Let me know if there's anything else that could be useful.
- Kirill Makurin
________________________________
From: Ileana Dumitrescu
Sent: Friday, June 6, 2025 12:46 AM
To: 78682 <at> debbugs.gnu.org
Cc: Kirill Makurin
Subject: Re: bug#78682: Building libltdl with MSVC fails
On 05/06/2025 12:13, Kirill Makurin wrote:
> Hi Ileana,
>
> I tried building from development branch and it has the same issue.
Could you provide logs for this test? Also, looking over the previous
attached logs, NM may be the issue. In my test environment, I set
NM="dumpbin -all".
> Out of curiosity I also tried to use clang-cl.exe (this is a clang which
> understands many of cl.exe's options), and I see the following:
>
> ```
> H:/git/libtool/libltdl/ltdl.c(781,19): error: call to undeclared
> function 'access'; ISO C99 and later do not support implicit function
> declarations [-Wimplicit-function-declaration]
> 781 | int notfound = access (filename, R_OK);
> | ^
> H:/git/libtool/libltdl/ltdl.c(781,19): note: did you mean 'accept'?
> C:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\
> \um\winsock.h(739,19): note: 'accept' declared here
> 739 | SOCKET PASCAL FAR accept (
> | ^
> ```
>
> On native Windows (mingw/MSVC), `access` function is declared in io.h.
> You may use the following condition to recognize native Windows:
>
> ```
> #if defined (_WIN32) && !defined (__CYGWIN__)
> #endif
> ```
Since this looks like a separate issue, could you submit a new bug for
it? I am also happy to review patches if you have a possible solution.
--
Ileana Dumitrescu
GPG Public Key: FA26 CA78 4BE1 8892 7F22 B99F 6570 EA01 146F 7354
[Message part 2 (text/html, inline)]
[build.log.gz (application/x-gzip, attachment)]
[configure.log.gz (application/x-gzip, attachment)]
Information forwarded
to
bug-libtool <at> gnu.org
:
bug#78682
; Package
libtool
.
(Thu, 05 Jun 2025 16:22:07 GMT)
Full text and
rfc822 format available.
Message #20 received at 78682 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 05/06/2025 19:07, Kirill Makurin wrote:
> I will submit a separate bug report for issue with clang-cl.
Thank you!
> I'm setting NM="dumpbin.exe -nologo -symbols", this works for all
> packages I tried to build so far.
Okay, if you do try it, I would be interested to see if the behaviour
changes.
> I'm building multiple GNU packages with a script which invokes
> `configure` -> `make` -> `make check` -> `make install DESTDIR=...` for
> each package.
>
> I attached gziped output from both `configure` and `make`. (building
> from development branch)
Thank you for the logs! I will look through them and see if I can
reproduce your issue.
--
Ileana Dumitrescu
GPG Public Key: FA26 CA78 4BE1 8892 7F22 B99F 6570 EA01 146F 7354
[OpenPGP_0x6570EA01146F7354.asc (application/pgp-keys, attachment)]
[OpenPGP_signature.asc (application/pgp-signature, attachment)]
Information forwarded
to
bug-libtool <at> gnu.org
:
bug#78682
; Package
libtool
.
(Thu, 05 Jun 2025 17:22:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 78682 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
If I look at output from configure...
When configure checks for Fortran compiler, it finds mingw's gfortran:
```
checking for gfortran... gfortran
```
And then:
```
checking whether the gfortran linker (link.exe -nologo) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
```
Could this be the cause?
- Kirill Makurin
________________________________
From: Ileana Dumitrescu
Sent: Friday, June 6, 2025 1:21 AM
To: 78682 <at> debbugs.gnu.org
Cc: Kirill Makurin
Subject: Re: bug#78682: Building libltdl with MSVC fails
On 05/06/2025 19:07, Kirill Makurin wrote:
> I will submit a separate bug report for issue with clang-cl.
Thank you!
> I'm setting NM="dumpbin.exe -nologo -symbols", this works for all
> packages I tried to build so far.
Okay, if you do try it, I would be interested to see if the behaviour
changes.
> I'm building multiple GNU packages with a script which invokes
> `configure` -> `make` -> `make check` -> `make install DESTDIR=...` for
> each package.
>
> I attached gziped output from both `configure` and `make`. (building
> from development branch)
Thank you for the logs! I will look through them and see if I can
reproduce your issue.
--
Ileana Dumitrescu
GPG Public Key: FA26 CA78 4BE1 8892 7F22 B99F 6570 EA01 146F 7354
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-libtool <at> gnu.org
:
bug#78682
; Package
libtool
.
(Thu, 05 Jun 2025 18:04:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 78682 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I can confirm that this was the issue.
I had to explicitly set both F77 and FC to "no". Even if there is no Fortran compiler found, configure sets them to "ifc".
I was thinking to suggest both libtool and automake to add options to explicitly disable checks and test for specific languages. Obviously, this needs a separate discussion.
- Kirill Makurin
________________________________
From: bug-libtool-bounces+maiddaisuki=outlook.com <at> gnu.org <bug-libtool-bounces+maiddaisuki=outlook.com <at> gnu.org> on behalf of Kirill Makurin <maiddaisuki <at> outlook.com>
Sent: Friday, June 6, 2025 2:21 AM
To: ileanadumitrescu95 <at> gmail.com <ileanadumitrescu95 <at> gmail.com>
Cc: 78682 <at> debbugs.gnu.org <78682 <at> debbugs.gnu.org>
Subject: bug#78682: Building libltdl with MSVC fails
If I look at output from configure...
When configure checks for Fortran compiler, it finds mingw's gfortran:
```
checking for gfortran... gfortran
```
And then:
```
checking whether the gfortran linker (link.exe -nologo) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
```
Could this be the cause?
- Kirill Makurin
________________________________
From: Ileana Dumitrescu
Sent: Friday, June 6, 2025 1:21 AM
To: 78682 <at> debbugs.gnu.org
Cc: Kirill Makurin
Subject: Re: bug#78682: Building libltdl with MSVC fails
On 05/06/2025 19:07, Kirill Makurin wrote:
> I will submit a separate bug report for issue with clang-cl.
Thank you!
> I'm setting NM="dumpbin.exe -nologo -symbols", this works for all
> packages I tried to build so far.
Okay, if you do try it, I would be interested to see if the behaviour
changes.
> I'm building multiple GNU packages with a script which invokes
> `configure` -> `make` -> `make check` -> `make install DESTDIR=...` for
> each package.
>
> I attached gziped output from both `configure` and `make`. (building
> from development branch)
Thank you for the logs! I will look through them and see if I can
reproduce your issue.
--
Ileana Dumitrescu
GPG Public Key: FA26 CA78 4BE1 8892 7F22 B99F 6570 EA01 146F 7354
[Message part 2 (text/html, inline)]
Reply sent
to
Ileana Dumitrescu <ileanadumitrescu95 <at> gmail.com>
:
You have taken responsibility.
(Thu, 05 Jun 2025 18:22:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Kirill Makurin <maiddaisuki <at> outlook.com>
:
bug acknowledged by developer.
(Thu, 05 Jun 2025 18:22:03 GMT)
Full text and
rfc822 format available.
Message #31 received at 78682-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 05/06/2025 21:03, Kirill Makurin wrote:
> I can confirm that this was the issue.
>
> I had to explicitly set both F77 and FC to "no". Even if there is no
> Fortran compiler found, configure sets them to "ifc".
Great! I am glad you found a simple fix. I have set F77 and FC to no in
my test environment, but I could not remember why.
> I was thinking to suggest both libtool and automake to add options to
> explicitly disable checks and test for specific languages. Obviously,
> this needs a separate discussion.
For now, I will update notes.texi to inform users about this
configuration issue and close the bug.
Thank you for debugging!
--
Ileana Dumitrescu
GPG Public Key: FA26 CA78 4BE1 8892 7F22 B99F 6570 EA01 146F 7354
[OpenPGP_0x6570EA01146F7354.asc (application/pgp-keys, attachment)]
[OpenPGP_signature.asc (application/pgp-signature, attachment)]
This bug report was last modified 9 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.