public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/97618] New: undefined reference to LC11 building for target MinGW-w64 32-bit
@ 2020-10-28 13:46 brechtsanders at users dot sourceforge.net
  2020-10-28 14:17 ` [Bug c/97618] " brechtsanders at users dot sourceforge.net
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: brechtsanders at users dot sourceforge.net @ 2020-10-28 13:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97618

            Bug ID: 97618
           Summary: undefined reference to LC11 building for target
                    MinGW-w64 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: ---

When building GCC11 with MinGW-w64 32-bit it fails in the Fortran language with
undefined references to LC<number> symbols.

Continuing to build without Fortran works.

However when using the resulting compuler the same error reappears when
building other libraries like libffi and boost.

The output of boost is this:
gcc.link.dll.mingw
build_win\boost\bin.v2\libs\log\build\gcc-11.0.0\release\visibility-hidden\libboost_log-x32.dll.a
d:/prog/winlibs32_stage/mingw32/bin/../lib/gcc/i686-w64-mingw32/11.0.0/../../../../i686-w64-mingw32/bin/ld.exe:
build_win/boost/bin.v2/libs/log/build/gcc-11.0.0/release/visibility-hidden/dump_avx2.o:dump_avx2.cpp:(.text+0x3b9):
undefined reference to `LC10'
d:/prog/winlibs32_stage/mingw32/bin/../lib/gcc/i686-w64-mingw32/11.0.0/../../../../i686-w64-mingw32/bin/ld.exe:
build_win/boost/bin.v2/libs/log/build/gcc-11.0.0/release/visibility-hidden/dump_avx2.o:dump_avx2.cpp:(.text+0x3c9):
undefined reference to `LC11'
d:/prog/winlibs32_stage/mingw32/bin/../lib/gcc/i686-w64-mingw32/11.0.0/../../../../i686-w64-mingw32/bin/ld.exe:
build_win/boost/bin.v2/libs/log/build/gcc-11.0.0/release/visibility-hidden/dump_avx2.o:dump_avx2.cpp:(.text+0xce6):
undefined reference to `LC10'
d:/prog/winlibs32_stage/mingw32/bin/../lib/gcc/i686-w64-mingw32/11.0.0/../../../../i686-w64-mingw32/bin/ld.exe:
build_win/boost/bin.v2/libs/log/build/gcc-11.0.0/release/visibility-hidden/dump_avx2.o:dump_avx2.cpp:(.text+0xcee):
undefined reference to `LC11'
d:/prog/winlibs32_stage/mingw32/bin/../lib/gcc/i686-w64-mingw32/11.0.0/../../../../i686-w64-mingw32/bin/ld.exe:
build_win/boost/bin.v2/libs/log/build/gcc-11.0.0/release/visibility-hidden/dump_avx2.o:dump_avx2.cpp:(.text+0x19c6):
undefined reference to `LC10'
d:/prog/winlibs32_stage/mingw32/bin/../lib/gcc/i686-w64-mingw32/11.0.0/../../../../i686-w64-mingw32/bin/ld.exe:
build_win/boost/bin.v2/libs/log/build/gcc-11.0.0/release/visibility-hidden/dump_avx2.o:dump_avx2.cpp:(.text+0x19ce):
undefined reference to `LC11'
d:/prog/winlibs32_stage/mingw32/bin/../lib/gcc/i686-w64-mingw32/11.0.0/../../../../i686-w64-mingw32/bin/ld.exe:
build_win/boost/bin.v2/libs/log/build/gcc-11.0.0/release/visibility-hidden/dump_avx2.o:dump_avx2.cpp:(.text+0x2740):
undefined reference to `LC10'
d:/prog/winlibs32_stage/mingw32/bin/../lib/gcc/i686-w64-mingw32/11.0.0/../../../../i686-w64-mingw32/bin/ld.exe:
build_win/boost/bin.v2/libs/log/build/gcc-11.0.0/release/visibility-hidden/dump_avx2.o:dump_avx2.cpp:(.text+0x2750):
undefined reference to `LC11'
collect2.exe: error: ld returned 1 exit status

With libffi I noticed that when I replace -O3 with -O2 in each Makefile it does
actually build.

So it appears the issue is triggered by -O3 optimizations for MinGW Windows
32-bit builds.

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

* [Bug c/97618] undefined reference to LC11 building for target MinGW-w64 32-bit
  2020-10-28 13:46 [Bug c/97618] New: undefined reference to LC11 building for target MinGW-w64 32-bit brechtsanders at users dot sourceforge.net
@ 2020-10-28 14:17 ` brechtsanders at users dot sourceforge.net
  2020-10-28 15:48 ` brechtsanders at users dot sourceforge.net
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: brechtsanders at users dot sourceforge.net @ 2020-10-28 14:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97618

--- Comment #1 from Brecht Sanders <brechtsanders at users dot sourceforge.net> ---
I see a similar issue when building mpfr with the resulting compiler, but here
the error is:

build_mingw\i686-w64-mingw32\libgcc/../../../libgcc/config/libbid/bid128_div.c:616:
undefined reference to `LC4'

and replacing -O3 with -O2 or -Os didn't work.

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

* [Bug c/97618] undefined reference to LC11 building for target MinGW-w64 32-bit
  2020-10-28 13:46 [Bug c/97618] New: undefined reference to LC11 building for target MinGW-w64 32-bit brechtsanders at users dot sourceforge.net
  2020-10-28 14:17 ` [Bug c/97618] " brechtsanders at users dot sourceforge.net
@ 2020-10-28 15:48 ` brechtsanders at users dot sourceforge.net
  2021-02-07 12:21 ` brechtsanders at users dot sourceforge.net
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: brechtsanders at users dot sourceforge.net @ 2020-10-28 15:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97618

--- Comment #2 from Brecht Sanders <brechtsanders at users dot sourceforge.net> ---
To build mpfr wich fails with:
build_mingw\i686-w64-mingw32\libgcc/../../../libgcc/config/libbid/bid128_div.c:1523:
undefined reference to `LC4'
I figured out that the symbol LC4 is defined in libgcc.a, so I was able to
build mpfr by running:
make LIBS="-Wl,--as-needed -lgmp -lgcc"

It appears that in this case the GCC 11 linker doesn't automatically link with
libgcc.

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

* [Bug c/97618] undefined reference to LC11 building for target MinGW-w64 32-bit
  2020-10-28 13:46 [Bug c/97618] New: undefined reference to LC11 building for target MinGW-w64 32-bit brechtsanders at users dot sourceforge.net
  2020-10-28 14:17 ` [Bug c/97618] " brechtsanders at users dot sourceforge.net
  2020-10-28 15:48 ` brechtsanders at users dot sourceforge.net
@ 2021-02-07 12:21 ` brechtsanders at users dot sourceforge.net
  2021-02-07 13:50 ` brechtsanders at users dot sourceforge.net
  2021-03-05 12:44 ` brechtsanders at users dot sourceforge.net
  4 siblings, 0 replies; 6+ messages in thread
From: brechtsanders at users dot sourceforge.net @ 2021-02-07 12:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97618

--- Comment #3 from Brecht Sanders <brechtsanders at users dot sourceforge.net> ---
Issue is till present in GCC 11 snapshot 20210131.
When building GCC 11 with GCC 11 the error is still there when trying to build
fortran.
I also noticed the same error when using GCC 11 to build ccache 4.2.
Any updates on this issue?

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

* [Bug c/97618] undefined reference to LC11 building for target MinGW-w64 32-bit
  2020-10-28 13:46 [Bug c/97618] New: undefined reference to LC11 building for target MinGW-w64 32-bit brechtsanders at users dot sourceforge.net
                   ` (2 preceding siblings ...)
  2021-02-07 12:21 ` brechtsanders at users dot sourceforge.net
@ 2021-02-07 13:50 ` brechtsanders at users dot sourceforge.net
  2021-03-05 12:44 ` brechtsanders at users dot sourceforge.net
  4 siblings, 0 replies; 6+ messages in thread
From: brechtsanders at users dot sourceforge.net @ 2021-02-07 13:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97618

--- Comment #4 from Brecht Sanders <brechtsanders at users dot sourceforge.net> ---
Found a smaller project to reproduce the issue with: building BLAKE3 v0.3.7
from
https://github.com/BLAKE3-team/BLAKE3 also has the issue when building with
GCC11 for 32-bit MinGW-w64.
Here I noticed that compiling with -O0 works around the problem, so the issue
must be in the compiler optimization for i686.

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

* [Bug c/97618] undefined reference to LC11 building for target MinGW-w64 32-bit
  2020-10-28 13:46 [Bug c/97618] New: undefined reference to LC11 building for target MinGW-w64 32-bit brechtsanders at users dot sourceforge.net
                   ` (3 preceding siblings ...)
  2021-02-07 13:50 ` brechtsanders at users dot sourceforge.net
@ 2021-03-05 12:44 ` brechtsanders at users dot sourceforge.net
  4 siblings, 0 replies; 6+ messages in thread
From: brechtsanders at users dot sourceforge.net @ 2021-03-05 12:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97618

Brecht Sanders <brechtsanders at users dot sourceforge.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #5 from Brecht Sanders <brechtsanders at users dot sourceforge.net> ---
Seems to be the same issue as 99401.

*** This bug has been marked as a duplicate of bug 99401 ***

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

end of thread, other threads:[~2021-03-05 12:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-28 13:46 [Bug c/97618] New: undefined reference to LC11 building for target MinGW-w64 32-bit brechtsanders at users dot sourceforge.net
2020-10-28 14:17 ` [Bug c/97618] " brechtsanders at users dot sourceforge.net
2020-10-28 15:48 ` brechtsanders at users dot sourceforge.net
2021-02-07 12:21 ` brechtsanders at users dot sourceforge.net
2021-02-07 13:50 ` brechtsanders at users dot sourceforge.net
2021-03-05 12:44 ` 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).