public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/99913] New: GCC11 fails to build for MinGW-w64 for Windows 32-bit
@ 2021-04-05 8:11 brechtsanders at users dot sourceforge.net
2021-04-05 8:23 ` [Bug target/99913] " pinskia at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: brechtsanders at users dot sourceforge.net @ 2021-04-05 8:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99913
Bug ID: 99913
Summary: GCC11 fails to build for MinGW-w64 for Windows 32-bit
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: brechtsanders at users dot sourceforge.net
Target Milestone: ---
Created attachment 50509
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50509&action=edit
i686-w64-mingw32/libgomp/config.log
When building GCC 11 (including latest snapshot 20210404) against MinGW-w64 for
Windows 32-bit using an existing MinGW-w64 Windows 32-bit gcc configure stops
with the following error:
configure: error: unsupported system, cannot find sizeof (omp_lock_t)
This error is logged to file i686-w64-mingw32/libgomp/config.log which I have
attached.
At first glance it seems like it's not finding symbols that require
-lwinpthread
Note that there are no issues building GCC 11 against MinGW-w64 for Windows
64-bit.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/99913] GCC11 fails to build for MinGW-w64 for Windows 32-bit
2021-04-05 8:11 [Bug c/99913] New: GCC11 fails to build for MinGW-w64 for Windows 32-bit brechtsanders at users dot sourceforge.net
@ 2021-04-05 8:23 ` pinskia at gcc dot gnu.org
2021-04-05 10:02 ` brechtsanders at users dot sourceforge.net
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-04-05 8:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99913
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I Noticed:
--enable-threads=posix
and the error message is:
D:\prog\winlibs32_stage\mingw32\i686-w64-mingw32\bin\ld.exe:
R:/winlibs32_stage/gcc-11-20210404/build_mingw/gcc/libgcc_eh.a(unwind-dw2.o):
in function `_gthread_once':
R:\winlibs32_stage\gcc-11-20210404\build_mingw\i686-w64-mingw32\libgcc/./gthr-default.h:700:
undefined reference to `pthread_once'
....
More undefined references to pthread_*
Either pthreads-win32 is not installed correctly or is not being linked
correctly here.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/99913] GCC11 fails to build for MinGW-w64 for Windows 32-bit
2021-04-05 8:11 [Bug c/99913] New: GCC11 fails to build for MinGW-w64 for Windows 32-bit brechtsanders at users dot sourceforge.net
2021-04-05 8:23 ` [Bug target/99913] " pinskia at gcc dot gnu.org
@ 2021-04-05 10:02 ` brechtsanders at users dot sourceforge.net
2021-04-05 10:05 ` brechtsanders at users dot sourceforge.net
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: brechtsanders at users dot sourceforge.net @ 2021-04-05 10:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99913
--- Comment #2 from Brecht Sanders <brechtsanders at users dot sourceforge.net> ---
By the time I get to that error the build process already generated these
files:
- mingw-w64/mingw/lib/libwinpthread.a
- mingw-w64/mingw/lib/libwinpthread.dll.a
- mingw-w64/mingw/lib/libwinpthread.la
However I couldn't find a matching DLL, which I assume should be here:
- mingw-w64/mingw/bin/libwinpthread-1.dll
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/99913] GCC11 fails to build for MinGW-w64 for Windows 32-bit
2021-04-05 8:11 [Bug c/99913] New: GCC11 fails to build for MinGW-w64 for Windows 32-bit brechtsanders at users dot sourceforge.net
2021-04-05 8:23 ` [Bug target/99913] " pinskia at gcc dot gnu.org
2021-04-05 10:02 ` brechtsanders at users dot sourceforge.net
@ 2021-04-05 10:05 ` brechtsanders at users dot sourceforge.net
2024-01-16 5:17 ` lh_mouse at 126 dot com
2024-01-19 7:00 ` brechtsanders at users dot sourceforge.net
4 siblings, 0 replies; 6+ messages in thread
From: brechtsanders at users dot sourceforge.net @ 2021-04-05 10:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99913
--- Comment #3 from Brecht Sanders <brechtsanders at users dot sourceforge.net> ---
Just to clarify: libwinpthread is built as part of the GCC build against
MinGW-w64.
MinGW-w64 also already has a libwinpthread (including libwinpthread-1.dll which
can be found in the PATH).
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/99913] GCC11 fails to build for MinGW-w64 for Windows 32-bit
2021-04-05 8:11 [Bug c/99913] New: GCC11 fails to build for MinGW-w64 for Windows 32-bit brechtsanders at users dot sourceforge.net
` (2 preceding siblings ...)
2021-04-05 10:05 ` brechtsanders at users dot sourceforge.net
@ 2024-01-16 5:17 ` lh_mouse at 126 dot com
2024-01-19 7:00 ` brechtsanders at users dot sourceforge.net
4 siblings, 0 replies; 6+ messages in thread
From: lh_mouse at 126 dot com @ 2024-01-16 5:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99913
LIU Hao <lh_mouse at 126 dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |lh_mouse at 126 dot com
--- Comment #4 from LIU Hao <lh_mouse at 126 dot com> ---
Is there still such an error for you?
It looks to me that this linker command line did not contain `-pthread` unlike
the ones above. Maybe the configure script is worth looking at.
```
configure:16911: /R/winlibs32_stage/gcc-11-20210404/build_mingw/./gcc/xgcc
-B/R/winlibs32_stage/gcc-11-20210404/build_mingw/./gcc/
-L/R/winlibs32_stage/inst_gcc-11-20210404/share/gcc/i686-w64-mingw32/lib
-L/R/winlibs32_stage/inst_gcc-11-20210404/share/gcc/mingw/lib -isystem
/R/winlibs32_stage/inst_gcc-11-20210404/share/gcc/i686-w64-mingw32/include
-isystem /R/winlibs32_stage/inst_gcc-11-20210404/share/gcc/mingw/include
-B/R/winlibs32_stage/inst_gcc-11-20210404/share/gcc/i686-w64-mingw32/bin/
-B/R/winlibs32_stage/inst_gcc-11-20210404/share/gcc/i686-w64-mingw32/lib/
-isystem
/R/winlibs32_stage/inst_gcc-11-20210404/share/gcc/i686-w64-mingw32/include
-isystem
/R/winlibs32_stage/inst_gcc-11-20210404/share/gcc/i686-w64-mingw32/sys-include
--sysroot=/R/winlibs32_stage/gcc-11-20210404/build_mingw/mingw-w64 -o
conftest.exe -O0 -include confdefs.h -include
../../../libgomp/config/posix/omp-lock.h -s conftest.c -ldl >&5
D:\prog\winlibs32_stage\mingw32\i686-w64-mingw32\bin\ld.exe:
R:/winlibs32_stage/gcc-11-20210404/build_mingw/gcc/libgcc_eh.a(unwind-dw2.o):
in function `_gthread_once':
R:\winlibs32_stage\gcc-11-20210404\build_mingw\i686-w64-mingw32\libgcc/./gthr-default.h:700:
undefined reference to `pthread_once'
```
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/99913] GCC11 fails to build for MinGW-w64 for Windows 32-bit
2021-04-05 8:11 [Bug c/99913] New: GCC11 fails to build for MinGW-w64 for Windows 32-bit brechtsanders at users dot sourceforge.net
` (3 preceding siblings ...)
2024-01-16 5:17 ` lh_mouse at 126 dot com
@ 2024-01-19 7:00 ` brechtsanders at users dot sourceforge.net
4 siblings, 0 replies; 6+ messages in thread
From: brechtsanders at users dot sourceforge.net @ 2024-01-19 7:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99913
Brecht Sanders <brechtsanders at users dot sourceforge.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|UNCONFIRMED |RESOLVED
--- Comment #5 from Brecht Sanders <brechtsanders at users dot sourceforge.net> ---
I can confirm GCC 13.2.0 builds with MinGW-w64 11.0.1 without explicitly
configuring with LDFLAGS="-pthread"
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-01-19 7:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-05 8:11 [Bug c/99913] New: GCC11 fails to build for MinGW-w64 for Windows 32-bit brechtsanders at users dot sourceforge.net
2021-04-05 8:23 ` [Bug target/99913] " pinskia at gcc dot gnu.org
2021-04-05 10:02 ` brechtsanders at users dot sourceforge.net
2021-04-05 10:05 ` brechtsanders at users dot sourceforge.net
2024-01-16 5:17 ` lh_mouse at 126 dot com
2024-01-19 7:00 ` brechtsanders at users dot sourceforge.net
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).