public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* undefined reference to `stpcpy'
@ 2021-08-25  3:30 bootmgr
  2021-08-25  8:24 ` Yu Sheng Oh
  0 siblings, 1 reply; 3+ messages in thread
From: bootmgr @ 2021-08-25  3:30 UTC (permalink / raw)
  To: gcc-help

Hello,
I am trying to comile GCC 11.2.0 on msys2 (gcc version 10.3), but when compiling liblto_plugin.dll in stage 3, it says "undefined reference to `stpcpy'".


This GCC configured by ../gcc-11.2.0/configure --disable-multilib --disable-nls --disable-rpath --disable-symvers --disable-win32-registry --enable-languages=c,c++,lto --enable-mingw-wildcard --enable-threads=posix --enable-libgomp --disable-libstdcxx-verbose --enable-fully-dynamic-string --with-build-config=bootstrap-lto-lean --with-system-zlib


Error Message:
/bin/sh ./libtool --tag=CC --tag=disable-static  --mode=link /h/build-gcc/./prev-gcc/xgcc -B/h/build-gcc/./prev-gcc/ -B/mingw64/x86_64-w64-mingw32/bin/ -L/mingw64/x86_64-w64-mingw32/lib -L/mingw64/lib -isystem /mingw64/x86_64-w64-mingw32/include -isystem /mingw64/include -B/mingw64/x86_64-w64-mingw32/bin/ -B/mingw64/x86_64-w64-mingw32/lib/ -isystem /mingw64/x86_64-w64-mingw32/include -isystem /mingw64/x86_64-w64-mingw32/sys-include   -fchecking=1 -Wall  -g -O2 -D__USE_MINGW_ACCESS -Wno-pedantic-ms-format -fchecking=1 -flto=jobserver -Wc,-static-libgcc -no-undefined -bindir "/mingw64/bin" -module -avoid-version -bindir /mingw64/libexec/gcc/x86_64-w64-mingw32/11.2.0  -Wc,../libiberty/libiberty.a  -Xcompiler '-static-libstdc++' -Xcompiler '-static-libgcc' '-Wl,--stack,12582912' -o liblto_plugin.la -rpath /mingw64/libexec/gcc/x86_64-w64-mingw32/11.2.0 lto-plugin.lo   
libtool: link: rm -fr  .libs/liblto_plugin.dll.a
libtool: link:  /h/build-gcc/./prev-gcc/xgcc -B/h/build-gcc/./prev-gcc/ -B/mingw64/x86_64-w64-mingw32/bin/ -L/mingw64/x86_64-w64-mingw32/lib -L/mingw64/lib -isystem /mingw64/x86_64-w64-mingw32/include -isystem /mingw64/include -B/mingw64/x86_64-w64-mingw32/bin/ -B/mingw64/x86_64-w64-mingw32/lib/ -isystem /mingw64/x86_64-w64-mingw32/include -isystem /mingw64/x86_64-w64-mingw32/sys-include   -fchecking=1 -shared  .libs/lto-plugin.o   -L/mingw64/x86_64-w64-mingw32/lib -L/mingw64/lib  -static-libgcc ../libiberty/libiberty.a -static-libstdc++ -static-libgcc -Wl,--stack -Wl,12582912   -o .libs/liblto_plugin.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/liblto_plugin.dll.a
D:\msys64\mingw64\x86_64-w64-mingw32\bin\ld.exe: C:\Users\Administrator\AppData\Local\Temp\ccjN6XVa.ltrans0.ltrans.o:<artificial>:(.text+0x5208): undefined reference to `stpcpy'
collect2.exe: error: ld returned 1 exit status
make[4]: *** [Makefile:465: liblto_plugin.la] Error 1
make[4]: Leaving directory '/h/build-gcc/lto-plugin'
make[3]: *** [Makefile:376: all] Error 2
make[3]: Leaving directory '/h/build-gcc/lto-plugin'
make[2]: *** [Makefile:15247: all-stage3-lto-plugin] Error 2
make[2]: Leaving directory '/h/build-gcc'
make[1]: *** [Makefile:23519: stage3-bubble] Error 2
make[1]: Leaving directory '/h/build-gcc'
make: *** [Makefile:1013: all] Error 2
How can I solve this problem?
Thanks.

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

* Re: undefined reference to `stpcpy'
  2021-08-25  3:30 undefined reference to `stpcpy' bootmgr
@ 2021-08-25  8:24 ` Yu Sheng Oh
  2021-08-25  8:33   ` LIU Hao
  0 siblings, 1 reply; 3+ messages in thread
From: Yu Sheng Oh @ 2021-08-25  8:24 UTC (permalink / raw)
  To: bootmgr; +Cc: gcc-help

It has been reported before. Don't know if it has been fixed or not.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66014


On Wed, Aug 25, 2021 at 11:32 AM bootmgr--- via Gcc-help <
gcc-help@gcc.gnu.org> wrote:

> Hello,
> I am trying to comile GCC 11.2.0 on msys2 (gcc version 10.3), but when
> compiling liblto_plugin.dll in stage 3, it says "undefined reference to
> `stpcpy'".
>
>
> This GCC configured by ../gcc-11.2.0/configure --disable-multilib
> --disable-nls --disable-rpath --disable-symvers --disable-win32-registry
> --enable-languages=c,c++,lto --enable-mingw-wildcard --enable-threads=posix
> --enable-libgomp --disable-libstdcxx-verbose --enable-fully-dynamic-string
> --with-build-config=bootstrap-lto-lean --with-system-zlib
>
>
> Error Message:
> /bin/sh ./libtool --tag=CC --tag=disable-static  --mode=link
> /h/build-gcc/./prev-gcc/xgcc -B/h/build-gcc/./prev-gcc/
> -B/mingw64/x86_64-w64-mingw32/bin/ -L/mingw64/x86_64-w64-mingw32/lib
> -L/mingw64/lib -isystem /mingw64/x86_64-w64-mingw32/include -isystem
> /mingw64/include -B/mingw64/x86_64-w64-mingw32/bin/
> -B/mingw64/x86_64-w64-mingw32/lib/ -isystem
> /mingw64/x86_64-w64-mingw32/include -isystem
> /mingw64/x86_64-w64-mingw32/sys-include   -fchecking=1 -Wall  -g -O2
> -D__USE_MINGW_ACCESS -Wno-pedantic-ms-format -fchecking=1 -flto=jobserver
> -Wc,-static-libgcc -no-undefined -bindir "/mingw64/bin" -module
> -avoid-version -bindir /mingw64/libexec/gcc/x86_64-w64-mingw32/11.2.0
> -Wc,../libiberty/libiberty.a  -Xcompiler '-static-libstdc++' -Xcompiler
> '-static-libgcc' '-Wl,--stack,12582912' -o liblto_plugin.la -rpath
> /mingw64/libexec/gcc/x86_64-w64-mingw32/11.2.0 lto-plugin.lo
> libtool: link: rm -fr  .libs/liblto_plugin.dll.a
> libtool: link:  /h/build-gcc/./prev-gcc/xgcc -B/h/build-gcc/./prev-gcc/
> -B/mingw64/x86_64-w64-mingw32/bin/ -L/mingw64/x86_64-w64-mingw32/lib
> -L/mingw64/lib -isystem /mingw64/x86_64-w64-mingw32/include -isystem
> /mingw64/include -B/mingw64/x86_64-w64-mingw32/bin/
> -B/mingw64/x86_64-w64-mingw32/lib/ -isystem
> /mingw64/x86_64-w64-mingw32/include -isystem
> /mingw64/x86_64-w64-mingw32/sys-include   -fchecking=1 -shared
> .libs/lto-plugin.o   -L/mingw64/x86_64-w64-mingw32/lib -L/mingw64/lib
> -static-libgcc ../libiberty/libiberty.a -static-libstdc++ -static-libgcc
> -Wl,--stack -Wl,12582912   -o .libs/liblto_plugin.dll
> -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker
> .libs/liblto_plugin.dll.a
> D:\msys64\mingw64\x86_64-w64-mingw32\bin\ld.exe:
> C:\Users\Administrator\AppData\Local\Temp\ccjN6XVa.ltrans0.ltrans.o:<artificial>:(.text+0x5208):
> undefined reference to `stpcpy'
> collect2.exe: error: ld returned 1 exit status
> make[4]: *** [Makefile:465: liblto_plugin.la] Error 1
> make[4]: Leaving directory '/h/build-gcc/lto-plugin'
> make[3]: *** [Makefile:376: all] Error 2
> make[3]: Leaving directory '/h/build-gcc/lto-plugin'
> make[2]: *** [Makefile:15247: all-stage3-lto-plugin] Error 2
> make[2]: Leaving directory '/h/build-gcc'
> make[1]: *** [Makefile:23519: stage3-bubble] Error 2
> make[1]: Leaving directory '/h/build-gcc'
> make: *** [Makefile:1013: all] Error 2
> How can I solve this problem?
> Thanks.

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

* Re: undefined reference to `stpcpy'
  2021-08-25  8:24 ` Yu Sheng Oh
@ 2021-08-25  8:33   ` LIU Hao
  0 siblings, 0 replies; 3+ messages in thread
From: LIU Hao @ 2021-08-25  8:33 UTC (permalink / raw)
  To: Yu Sheng Oh, bootmgr; +Cc: gcc-help


[-- Attachment #1.1: Type: text/plain, Size: 466 bytes --]

在 8/25/21 4:24 PM, Yu Sheng Oh via Gcc-help 写道:
> It has been reported before. Don't know if it has been fixed or not.
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66014
> 
> 

As this seems to have something to do with LTO, would you please try building with `--enable-lto` [1] ?


[1] 
https://github.com/lhmouse/MINGW-packages-dev/blob/ddafe5bc97e027627900b95a96eacbcabdc889d7/mingw-w64-gcc-git/PKGBUILD#L183


-- 
Best regards,
LIU Hao


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

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

end of thread, other threads:[~2021-08-25  8:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-25  3:30 undefined reference to `stpcpy' bootmgr
2021-08-25  8:24 ` Yu Sheng Oh
2021-08-25  8:33   ` LIU Hao

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