public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* gcc with the new WIN32 threads fails to compile libstdc++
@ 2023-04-10  7:14 Julian Waters
  2023-04-10  7:20 ` Andrew Pinski
  2023-04-10  8:02 ` Eric Botcazou
  0 siblings, 2 replies; 4+ messages in thread
From: Julian Waters @ 2023-04-10  7:14 UTC (permalink / raw)
  To: gcc

[-- Attachment #1: Type: text/plain, Size: 1246 bytes --]

Hi all,

When trying to compile gcc with the revamped WIN32 threading model which
supports C++11 threads, libstdc++ always fails to link with the following
error:

C:\msys64\ucrt64\x86_64-w64-mingw32\bin\ld.exe:
../src/c++11/.libs/libc++11convenience.a(thread.o):
in function `__gthread_join':
D:/Eclipse/MINGW-packages/mingw-w64-gcc/src/build-UCRT64/x86_64-w64-mingw32/libstdc++-v3/include/x86
_64-w64-mingw32/bits/gthr-default.h:451: undefined reference to
`__gthr_win32_join'
C:\msys64\ucrt64\x86_64-w64-mingw32\bin\ld.exe:
../src/c++11/.libs/libc++11convenience.a(thread.o):
in function `__gthread_create':
D:/Eclipse/MINGW-packages/mingw-w64-gcc/src/build-UCRT64/x86_64-w64-mingw32/libstdc++-v3/include/x86
_64-w64-mingw32/bits/gthr-default.h:445: undefined reference to
`__gthr_win32_create'
C:\msys64\ucrt64\x86_64-w64-mingw32\bin\ld.exe:
D:/Eclipse/MINGW-packages/mingw-w64-gcc/src/build-UC
RT64/x86_64-w64-mingw32/libstdc++-v3/include/x86_64-w64-mingw32/bits/gthr-default.h:445:
undefined r
eference to `__gthr_win32_create'

I'm assuming the problem also extends to the other __gthr_win32 routines as
well, __gthr_win32_create just happens to be the first symbol it cannot
find.

Is there a way to fix this issue?

best regards,
Julian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gcc with the new WIN32 threads fails to compile libstdc++
  2023-04-10  7:14 gcc with the new WIN32 threads fails to compile libstdc++ Julian Waters
@ 2023-04-10  7:20 ` Andrew Pinski
  2023-04-10 11:09   ` Julian Waters
  2023-04-10  8:02 ` Eric Botcazou
  1 sibling, 1 reply; 4+ messages in thread
From: Andrew Pinski @ 2023-04-10  7:20 UTC (permalink / raw)
  To: Julian Waters; +Cc: gcc

On Mon, Apr 10, 2023 at 12:16 AM Julian Waters via Gcc <gcc@gcc.gnu.org> wrote:
>
> Hi all,
>
> When trying to compile gcc with the revamped WIN32 threading model which
> supports C++11 threads, libstdc++ always fails to link with the following
> error:

those functions should have been included in newly built libgcc.
Since you didn't show the link line it is hard to tell what is going wrong.

Thanks,
Andrew Pinski

>
> C:\msys64\ucrt64\x86_64-w64-mingw32\bin\ld.exe:
> ../src/c++11/.libs/libc++11convenience.a(thread.o):
> in function `__gthread_join':
> D:/Eclipse/MINGW-packages/mingw-w64-gcc/src/build-UCRT64/x86_64-w64-mingw32/libstdc++-v3/include/x86
> _64-w64-mingw32/bits/gthr-default.h:451: undefined reference to
> `__gthr_win32_join'
> C:\msys64\ucrt64\x86_64-w64-mingw32\bin\ld.exe:
> ../src/c++11/.libs/libc++11convenience.a(thread.o):
> in function `__gthread_create':
> D:/Eclipse/MINGW-packages/mingw-w64-gcc/src/build-UCRT64/x86_64-w64-mingw32/libstdc++-v3/include/x86
> _64-w64-mingw32/bits/gthr-default.h:445: undefined reference to
> `__gthr_win32_create'
> C:\msys64\ucrt64\x86_64-w64-mingw32\bin\ld.exe:
> D:/Eclipse/MINGW-packages/mingw-w64-gcc/src/build-UC
> RT64/x86_64-w64-mingw32/libstdc++-v3/include/x86_64-w64-mingw32/bits/gthr-default.h:445:
> undefined r
> eference to `__gthr_win32_create'
>
> I'm assuming the problem also extends to the other __gthr_win32 routines as
> well, __gthr_win32_create just happens to be the first symbol it cannot
> find.
>
> Is there a way to fix this issue?
>
> best regards,
> Julian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gcc with the new WIN32 threads fails to compile libstdc++
  2023-04-10  7:14 gcc with the new WIN32 threads fails to compile libstdc++ Julian Waters
  2023-04-10  7:20 ` Andrew Pinski
@ 2023-04-10  8:02 ` Eric Botcazou
  1 sibling, 0 replies; 4+ messages in thread
From: Eric Botcazou @ 2023-04-10  8:02 UTC (permalink / raw)
  To: Julian Waters; +Cc: gcc

> I'm assuming the problem also extends to the other __gthr_win32 routines as
> well, __gthr_win32_create just happens to be the first symbol it cannot
> find.
> 
> Is there a way to fix this issue?

How did you configure the compiler and what version of MinGW64 do you use?

-- 
Eric Botcazou



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gcc with the new WIN32 threads fails to compile libstdc++
  2023-04-10  7:20 ` Andrew Pinski
@ 2023-04-10 11:09   ` Julian Waters
  0 siblings, 0 replies; 4+ messages in thread
From: Julian Waters @ 2023-04-10 11:09 UTC (permalink / raw)
  To: Andrew Pinski, gcc

[-- Attachment #1: Type: text/plain, Size: 4531 bytes --]

Sorry, I omitted the linker command since it was absolutely massive:

libtool: link:
 /d/Eclipse/MINGW-packages/mingw-w64-gcc/src/build-UCRT64/./gcc/xgcc
-shared-libgcc
-B/d/Eclipse/MINGW-packages/mingw-w64-gcc/src/build-UCRT64/./gcc
-nostdinc++
-L/d/Eclipse/MINGW-packages/mingw-w64-gcc/src/build-UCRT64/x86_64-w64-mingw32/libstdc++-v3/src
-L/d/Eclipse/MINGW-packages/mingw-w64-gcc/src/build-UCRT64/x86_64-w64-mingw32/libstdc++-v3/src/.libs
-L/d/Eclipse/MINGW-packages/mingw-w64-gcc/src/build-UCRT64/x86_64-w64-mingw32/libstdc++-v3/libsupc++/.libs
-L/ucrt64/x86_64-w64-mingw32/lib -L/ucrt64/lib -isystem
/ucrt64/x86_64-w64-mingw32/include -isystem /ucrt64/include
-B/ucrt64/x86_64-w64-mingw32/bin/ -B/ucrt64/x86_64-w64-mingw32/lib/
-isystem /ucrt64/x86_64-w64-mingw32/include -isystem
/ucrt64/x86_64-w64-mingw32/sys-include    -shared -nostdlib
C:/msys64/ucrt64/lib/../lib/dllcrt2.o
D:/Eclipse/MINGW-packages/mingw-w64-gcc/src/build-UCRT64/gcc/crtbegin.o
 .libs/compatibility.o .libs/compatibility-debug_list.o
.libs/compatibility-debug_list-2.o .libs/compatibility-atomic-c++0x.o
.libs/compatibility-c++0x.o .libs/compatibility-chrono.o
.libs/compatibility-condvar.o .libs/compatibility-thread-c++0x.o
 -Wl,--whole-archive ../libsupc++/.libs/libsupc++convenience.a
../src/c++98/.libs/libc++98convenience.a
../src/c++11/.libs/libc++11convenience.a
../src/c++17/.libs/libc++17convenience.a
../src/c++20/.libs/libc++20convenience.a -Wl,--no-whole-archive
 -L/d/Eclipse/MINGW-packages/mingw-w64-gcc/src/build-UCRT64/x86_64-w64-mingw32/libstdc++-v3/libsupc++/.libs
-L/d/Eclipse/MINGW-packages/mingw-w64-gcc/src/build-UCRT64/x86_64-w64-mingw32/libstdc++-v3/src
-L/d/Eclipse/MINGW-packages/mingw-w64-gcc/src/build-UCRT64/x86_64-w64-mingw32/libstdc++-v3/src/.libs
-L/ucrt64/x86_64-w64-mingw32/lib -L/ucrt64/lib -liconv
-LD:/Eclipse/MINGW-packages/mingw-w64-gcc/src/build-UCRT64/x86_64-w64-mingw32/libstdc++-v3/src
-LD:/Eclipse/MINGW-packages/mingw-w64-gcc/src/build-UCRT64/x86_64-w64-mingw32/libstdc++-v3/src/.libs
-LD:/Eclipse/MINGW-packages/mingw-w64-gcc/src/build-UCRT64/x86_64-w64-mingw32/libstdc++-v3/libsupc++/.libs
-LC:/msys64/ucrt64/x86_64-w64-mingw32/lib -LC:/msys64/ucrt64/lib
-LD:/Eclipse/MINGW-packages/mingw-w64-gcc/src/build-UCRT64/gcc
-LC:/msys64/ucrt64/x86_64-w64-mingw32/bin -LC:/msys64/ucrt64/lib/../lib
-lssp_nonshared -lssp -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt
-lkernel32 -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc_s -lgcc
-lmoldname -lmingwex -lmsvcrt -lkernel32
D:/Eclipse/MINGW-packages/mingw-w64-gcc/src/build-UCRT64/gcc/crtend.o
 -Wl,-O1 -Wl,--gc-sections   -o .libs/libstdc++-6.dll
-Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker
.libs/libstdc++.dll.a

On Mon, Apr 10, 2023 at 3:21 PM Andrew Pinski <pinskia@gmail.com> wrote:

> On Mon, Apr 10, 2023 at 12:16 AM Julian Waters via Gcc <gcc@gcc.gnu.org>
> wrote:
> >
> > Hi all,
> >
> > When trying to compile gcc with the revamped WIN32 threading model which
> > supports C++11 threads, libstdc++ always fails to link with the following
> > error:
>
> those functions should have been included in newly built libgcc.
> Since you didn't show the link line it is hard to tell what is going wrong.
>
> Thanks,
> Andrew Pinski
>
> >
> > C:\msys64\ucrt64\x86_64-w64-mingw32\bin\ld.exe:
> > ../src/c++11/.libs/libc++11convenience.a(thread.o):
> > in function `__gthread_join':
> >
> D:/Eclipse/MINGW-packages/mingw-w64-gcc/src/build-UCRT64/x86_64-w64-mingw32/libstdc++-v3/include/x86
> > _64-w64-mingw32/bits/gthr-default.h:451: undefined reference to
> > `__gthr_win32_join'
> > C:\msys64\ucrt64\x86_64-w64-mingw32\bin\ld.exe:
> > ../src/c++11/.libs/libc++11convenience.a(thread.o):
> > in function `__gthread_create':
> >
> D:/Eclipse/MINGW-packages/mingw-w64-gcc/src/build-UCRT64/x86_64-w64-mingw32/libstdc++-v3/include/x86
> > _64-w64-mingw32/bits/gthr-default.h:445: undefined reference to
> > `__gthr_win32_create'
> > C:\msys64\ucrt64\x86_64-w64-mingw32\bin\ld.exe:
> > D:/Eclipse/MINGW-packages/mingw-w64-gcc/src/build-UC
> >
> RT64/x86_64-w64-mingw32/libstdc++-v3/include/x86_64-w64-mingw32/bits/gthr-default.h:445:
> > undefined r
> > eference to `__gthr_win32_create'
> >
> > I'm assuming the problem also extends to the other __gthr_win32 routines
> as
> > well, __gthr_win32_create just happens to be the first symbol it cannot
> > find.
> >
> > Is there a way to fix this issue?
> >
> > best regards,
> > Julian
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-04-10 11:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-10  7:14 gcc with the new WIN32 threads fails to compile libstdc++ Julian Waters
2023-04-10  7:20 ` Andrew Pinski
2023-04-10 11:09   ` Julian Waters
2023-04-10  8:02 ` Eric Botcazou

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).