public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/65884] New: libgccjit fails to link on ia64-linux-gnu
@ 2015-04-25 12:29 doko at gcc dot gnu.org
  2022-04-06 18:37 ` [Bug jit/65884] " glaubitz at physik dot fu-berlin.de
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: doko at gcc dot gnu.org @ 2015-04-25 12:29 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 65884
           Summary: libgccjit fails to link on ia64-linux-gnu
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at gcc dot gnu.org

seen on the gcc-5-branch, ignoring PR65874, and trying to build libgccjit with
the just build gcc. binutils used is 2.22.

/build/buildd/gcc-5-5.1.0/build/gcc/xg++ -B/build/buildd/gcc-5-5.1.0/build/gcc/
-B/build/buildd/gcc-5-5.1.0/build/ia64-linux-gnu/libstdc++-v3/src/.libs
-B/build/buildd/gcc-5-5.1.0/build/ia64-linux-gnu/libstdc++-v3/libsupc++/.libs
-I/build/buildd/gcc-5-5.1.0/build/ia64-linux-gnu/libstdc++-v3/include
-I/build/buildd/gcc-5-5.1.0/build/ia64-linux-gnu/libstdc++-v3/include/ia64-linux-gnu
-I/build/buildd/gcc-5-5.1.0/src/libstdc++-v3/libsupc++
-L/build/buildd/gcc-5-5.1.0/build/ia64-linux-gnu/libstdc++-v3/src/.libs
-L/build/buildd/gcc-5-5.1.0/build/ia64-linux-gnu/libstdc++-v3/libsupc++/.libs 
-DUSE_LIBUNWIND_EXCEPTIONS  -g -O2 -DIN_GCC -fPIC   -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H
-static-libstdc++ -static-libgcc -lm -o libgccjit.so.0.0.1 -shared \
         attribs.o jit/dummy-frontend.o jit/libgccjit.o jit/jit-logging.o
jit/jit-recording.o jit/jit-playback.o jit/jit-result.o jit/jit-tempdir.o
jit/jit-builtins.o jit/jit-spec.o gcc.o libbackend.a libcommon-target.a
libcommon.a \
         ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a
../libcpp/libcpp.a   ../libbacktrace/.libs/libbacktrace.a
../libiberty/pic/libiberty.a ../libdecnumber/libdecnumber.a   -lmpc -lmpfr
-lgmp -rdynamic -ldl  -lz \
          \
         -Wl,--version-script=../../src/gcc/jit/libgccjit.map \
         -Wl,-soname,libgccjit.so.0
/usr/bin/ld: libgccjit.so.0.0.1: short data segment overflowed (0x422788 >=
0x400000)
collect2: error: ld returned 1 exit status
make[4]: *** [libgccjit.so.0.0.1] Error 1
make[4]: Leaving directory `/build/buildd/gcc-5-5.1.0/build-jit/gcc'
make[3]: *** [all-gcc] Error 2

complete build log at
https://launchpadlibrarian.net/204459587/buildlog_ubuntu-lucid-ia64.gcc-5_5.1.0-0ubuntu11~10.04.1_BUILDING.txt.gz


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

* [Bug jit/65884] libgccjit fails to link on ia64-linux-gnu
  2015-04-25 12:29 [Bug other/65884] New: libgccjit fails to link on ia64-linux-gnu doko at gcc dot gnu.org
@ 2022-04-06 18:37 ` glaubitz at physik dot fu-berlin.de
  2022-04-06 21:16 ` slyfox at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2022-04-06 18:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> ---
The problem is still present in gcc-12:

/usr/bin/time -v /home/glaubitz/gcc-12-new/gcc-12-12-20220319/build/gcc/xg++
-B/home/glaubitz/gcc-12-new/gcc-12-12-20220319/build/gcc/
-B/home/glaubitz/gcc-12-new/gcc-12-12-20220319/build/ia64-linux-gnu/libatomic/.libs
-B/home/glaubitz/gcc-12-new/gcc-12-12-20220319/build/ia64-linux-gnu/libstdc++-v3/src/.libs
-B/home/glaubitz/gcc-12-new/gcc-12-12-20220319/build/ia64-linux-gnu/libstdc++-v3/libsupc++/.libs
-I/home/glaubitz/gcc-12-new/gcc-12-12-20220319/build/ia64-linux-gnu/libstdc++-v3/include
-I/home/glaubitz/gcc-12-new/gcc-12-12-20220319/build/ia64-linux-gnu/libstdc++-v3/include/ia64-linux-gnu
-I/home/glaubitz/gcc-12-new/gcc-12-12-20220319/src/libstdc++-v3/libsupc++
-L/home/glaubitz/gcc-12-new/gcc-12-12-20220319/build/ia64-linux-gnu/libatomic/.libs
-L/home/glaubitz/gcc-12-new/gcc-12-12-20220319/build/ia64-linux-gnu/libstdc++-v3/src/.libs
-L/home/glaubitz/gcc-12-new/gcc-12-12-20220319/build/ia64-linux-gnu/libstdc++-v3/libsupc++/.libs
-no-pie -DUSE_LIBUNWIND_EXCEPTIONS  -g -O2     -DIN_GCC -fPIC   
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings  
-DHAVE_CONFIG_H -static-libstdc++ -static-libgcc  -o libgccjit.so.0.0.1 -shared
\
     attribs.o jit/dummy-frontend.o jit/libgccjit.o jit/jit-logging.o
jit/jit-recording.o jit/jit-playback.o jit/jit-result.o jit/jit-tempdir.o
jit/jit-builtins.o jit/jit-spec.o gcc.o libbackend.a libcommon-target.a
libcommon.a \
     ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a  libcommon.a
../libcpp/libcpp.a   ../libbacktrace/.libs/libbacktrace.a
../libiberty/pic/libiberty.a ../libdecnumber/libdecnumber.a  -lisl -lmpc -lmpfr
-lgmp -rdynamic -ldl  -lz -lzstd  \
      \
      -Wl,--version-script,../../src/gcc/jit/libgccjit.map 
-Wl,-soname,libgccjit.so.0
/usr/bin/ia64-linux-gnu-ld: libgccjit.so.0.0.1: short data segment overflowed
(0x400a68 >= 0x400000)
collect2: error: ld returned 1 exit status
Command exited with non-zero status 1
        Command being timed:
"/home/glaubitz/gcc-12-new/gcc-12-12-20220319/build/gcc/xg++
-B/home/glaubitz/gcc-12-new/gcc-12-12-20220319/build/gcc/
-B/home/glaubitz/gcc-12-new/gcc-12-12-20220319/build/ia64-linux-gnu/libatomic/.libs
-B/home/glaubitz/gcc-12-new/gcc-12-12-20220319/build/ia64-linux-gnu/libstdc++-v3/src/.libs
-B/home/glaubitz/gcc-12-new/gcc-12-12-20220319/build/ia64-linux-gnu/libstdc++-v3/libsupc++/.libs
-I/home/glaubitz/gcc-12-new/gcc-12-12-20220319/build/ia64-linux-gnu/libstdc++-v3/include
-I/home/glaubitz/gcc-12-new/gcc-12-12-20220319/build/ia64-linux-gnu/libstdc++-v3/include/ia64-linux-gnu
-I/home/glaubitz/gcc-12-new/gcc-12-12-20220319/src/libstdc++-v3/libsupc++
-L/home/glaubitz/gcc-12-new/gcc-12-12-20220319/build/ia64-linux-gnu/libatomic/.libs
-L/home/glaubitz/gcc-12-new/gcc-12-12-20220319/build/ia64-linux-gnu/libstdc++-v3/src/.libs
-L/home/glaubitz/gcc-12-new/gcc-12-12-20220319/build/ia64-linux-gnu/libstdc++-v3/libsupc++/.libs
-no-pie -DUSE_LIBUNWIND_EXCEPTIONS -g -O2 -DIN_GCC -fPIC -fno-exceptions
-fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H
-static-libstdc++ -static-libgcc -o libgccjit.so.0.0.1 -shared attribs.o
jit/dummy-frontend.o jit/libgccjit.o jit/jit-logging.o jit/jit-recording.o
jit/jit-playback.o jit/jit-result.o jit/jit-tempdir.o jit/jit-builtins.o
jit/jit-spec.o gcc.o libbackend.a libcommon-target.a libcommon.a
../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a
../libcpp/libcpp.a ../libbacktrace/.libs/libbacktrace.a
../libiberty/pic/libiberty.a ../libdecnumber/libdecnumber.a -lisl -lmpc -lmpfr
-lgmp -rdynamic -ldl -lz -lzstd
-Wl,--version-script,../../src/gcc/jit/libgccjit.map
-Wl,-soname,libgccjit.so.0"
        User time (seconds): 24.17
        System time (seconds): 0.71
        Percent of CPU this job got: 99%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 0:24.89
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 662704
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 0
        Minor (reclaiming a frame) page faults: 50658
        Voluntary context switches: 13
        Involuntary context switches: 59
        Swaps: 0
        File system inputs: 0
        File system outputs: 0
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 16384
        Exit status: 1

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

* [Bug jit/65884] libgccjit fails to link on ia64-linux-gnu
  2015-04-25 12:29 [Bug other/65884] New: libgccjit fails to link on ia64-linux-gnu doko at gcc dot gnu.org
  2022-04-06 18:37 ` [Bug jit/65884] " glaubitz at physik dot fu-berlin.de
@ 2022-04-06 21:16 ` slyfox at gcc dot gnu.org
  2022-04-07  8:34 ` slyfox at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: slyfox at gcc dot gnu.org @ 2022-04-06 21:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
> /usr/bin/ia64-linux-gnu-ld: libgccjit.so.0.0.1: short data segment overflowed (0x400a68 >= 0x400000)

It's the ia64 way to say that .sdata overflowed 4MB of 'static' constants and
variables (which is not that much by modern standards). I think libgccjit.so is
only a victim of it's big size.

I wonder if it will builds successfully if you configure gcc with -mno-sdata
added:
    $ ./configure CFLAGS="-O2 -g -mno-sdata" CXXFLAGS="-O2 -g -mno-sdata"

It should be a safe option that generates slightly less efficient code when
accesses gp-relative data.

(I'll need some time to set the cross-compiler up locally to test myself)

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

* [Bug jit/65884] libgccjit fails to link on ia64-linux-gnu
  2015-04-25 12:29 [Bug other/65884] New: libgccjit fails to link on ia64-linux-gnu doko at gcc dot gnu.org
  2022-04-06 18:37 ` [Bug jit/65884] " glaubitz at physik dot fu-berlin.de
  2022-04-06 21:16 ` slyfox at gcc dot gnu.org
@ 2022-04-07  8:34 ` slyfox at gcc dot gnu.org
  2022-04-07  8:37 ` glaubitz at physik dot fu-berlin.de
  2022-04-07 10:14 ` glaubitz at physik dot fu-berlin.de
  4 siblings, 0 replies; 6+ messages in thread
From: slyfox at gcc dot gnu.org @ 2022-04-07  8:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
Created attachment 52765
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52765&action=edit
ia64-disable-sdata-by-default.patch

We can try a radical thing: make -mno-sdata a default:
ia64-disable-sdata-by-default.patch . That allows me to link libgccjit on ia64
cross-compiler.

It might break boot loader, kernel and glibc. Worth a test on real hardware.

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

* [Bug jit/65884] libgccjit fails to link on ia64-linux-gnu
  2015-04-25 12:29 [Bug other/65884] New: libgccjit fails to link on ia64-linux-gnu doko at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2022-04-07  8:34 ` slyfox at gcc dot gnu.org
@ 2022-04-07  8:37 ` glaubitz at physik dot fu-berlin.de
  2022-04-07 10:14 ` glaubitz at physik dot fu-berlin.de
  4 siblings, 0 replies; 6+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2022-04-07  8:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> ---
(In reply to Sergei Trofimovich from comment #3)
> Created attachment 52765 [details]
> ia64-disable-sdata-by-default.patch
> 
> We can try a radical thing: make -mno-sdata a default:
> ia64-disable-sdata-by-default.patch . That allows me to link libgccjit on
> ia64 cross-compiler.

I'll give it a try.

> It might break boot loader, kernel and glibc. Worth a test on real hardware.

Oh, that would be a dealbreaker :D. I'll test that as well.

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

* [Bug jit/65884] libgccjit fails to link on ia64-linux-gnu
  2015-04-25 12:29 [Bug other/65884] New: libgccjit fails to link on ia64-linux-gnu doko at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2022-04-07  8:37 ` glaubitz at physik dot fu-berlin.de
@ 2022-04-07 10:14 ` glaubitz at physik dot fu-berlin.de
  4 siblings, 0 replies; 6+ messages in thread
From: glaubitz at physik dot fu-berlin.de @ 2022-04-07 10:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> ---
(In reply to John Paul Adrian Glaubitz from comment #4)
> (In reply to Sergei Trofimovich from comment #3)
> > Created attachment 52765 [details]
> > ia64-disable-sdata-by-default.patch
> > 
> > We can try a radical thing: make -mno-sdata a default:
> > ia64-disable-sdata-by-default.patch . That allows me to link libgccjit on
> > ia64 cross-compiler.
> 
> I'll give it a try.

By the way, wouldn't it be possible to patch the GCC sources so that just
libgccjit is built with -mno-sdata?

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

end of thread, other threads:[~2022-04-07 10:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-25 12:29 [Bug other/65884] New: libgccjit fails to link on ia64-linux-gnu doko at gcc dot gnu.org
2022-04-06 18:37 ` [Bug jit/65884] " glaubitz at physik dot fu-berlin.de
2022-04-06 21:16 ` slyfox at gcc dot gnu.org
2022-04-07  8:34 ` slyfox at gcc dot gnu.org
2022-04-07  8:37 ` glaubitz at physik dot fu-berlin.de
2022-04-07 10:14 ` glaubitz at physik dot fu-berlin.de

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