public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/110550] New: libintl build without -fPIC even though --enable-shared is configured
@ 2023-07-04 17:08 swilde@sha-bang.de
  2023-07-05  7:05 ` [Bug bootstrap/110550] " rguenth at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: swilde@sha-bang.de @ 2023-07-04 17:08 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110550
           Summary: libintl build without -fPIC even though
                    --enable-shared is configured
           Product: gcc
           Version: 12.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: swilde@sha-bang.de
  Target Milestone: ---

This is kind of a sequel to #100096

Building on NetBSD 9.3 amd64

Configured with:
LDFLAGS="-L/usr/local/lib -R/usr/local/lib" ../gcc-12.3.0/configure \
  --enable-shared \
  --enable-host-shared \
  --enable-checking=release \
  --enable-languages=jit \
  --disable-multilib \
  --disable-libssp \
  --disable-lto \
  --disable-libquadmath \
  --disable-liboffloadmic \
  --disable-libada \
  --disable-libsanitizer \
  --disable-libquadmath-support \
  --disable-libgomp \
  --disable-libvtv \
  --disable-libsanitizer \
  --with-gmp=/usr/local \
  --with-mpc=/usr/local \
  --with-mpfr=/usr/local

building fails, because libintl.a is build without -fPIC:

/usr/bin/ld: ./../intl/libintl.a(bindtextdom.o): relocation R_X86_64_32 against
symbol `libintl_nl_default_dirname' can not be used when making a shared
object; recompile with -fPIC
/usr/bin/ld: ./../intl/libintl.a(loadmsgcat.o): relocation R_X86_64_32 against
`.rodata.str1.1' can not be used when making a shared object; recompile with
-fPIC
/usr/bin/ld: ./../intl/libintl.a(textdomain.o): relocation R_X86_64_32 against
symbol `libintl_nl_default_default_domain' can not be used when making a shared
object; recompile with -fPIC
/usr/bin/ld: ./../intl/libintl.a(dcigettext.o): relocation R_X86_64_32S against
`.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ./../intl/libintl.a(plural-exp.o): relocation R_X86_64_32 against
`.rodata.str1.1' can not be used when making a shared object; recompile with
-fPIC
/usr/bin/ld: ./../intl/libintl.a(localcharset.o): relocation R_X86_64_32
against `.rodata.str1.1' can not be used when making a shared object; recompile
with -fPIC
/usr/bin/ld: ./../intl/libintl.a(localename.o): relocation R_X86_64_32 against
`.rodata.str1.1' can not be used when making a shared object; recompile with
-fPIC
/usr/bin/ld: ./../intl/libintl.a(log.o): relocation R_X86_64_32 against
`.rodata.str1.1' can not be used when making a shared object; recompile with
-fPIC
/usr/bin/ld: ./../intl/libintl.a(finddomain.o): relocation R_X86_64_32 against
`.bss' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ./../intl/libintl.a(localealias.o): relocation R_X86_64_32 against
`.rodata.str1.1' can not be used when making a shared object; recompile with
-fPIC
/usr/bin/ld: ./../intl/libintl.a(plural.o): relocation R_X86_64_32S against
`.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: nonrepresentable section on output
collect2: error: ld returned 1 exit status
gmake[3]: *** [../../gcc-12.3.0/gcc/jit/Make-lang.in:168: libgccjit.so.0.0.1]
Error 1
gmake[3]: *** Waiting for unfinished jobs....
rm gcc.pod
gmake[3]: Leaving directory '/home/wilde/src/gcc/gcc-12.3.0-build_noboot/gcc'
gmake[2]: *** [Makefile:5038: all-stage3-gcc] Error 2
gmake[2]: Leaving directory '/home/wilde/src/gcc/gcc-12.3.0-build_noboot'
gmake[1]: *** [Makefile:22605: stage3-bubble] Error 2
gmake[1]: Leaving directory '/home/wilde/src/gcc/gcc-12.3.0-build_noboot'
gmake: *** [Makefile:1067: all] Error 2

Strange enough, when manually entering the directory `intl` and
rebuilding the library simply by issuing `make clean ; make` it _will_
be build with -fPIC as expected.

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

* [Bug bootstrap/110550] libintl build without -fPIC even though --enable-shared is configured
  2023-07-04 17:08 [Bug other/110550] New: libintl build without -fPIC even though --enable-shared is configured swilde@sha-bang.de
@ 2023-07-05  7:05 ` rguenth at gcc dot gnu.org
  2023-07-14 12:06 ` swilde@sha-bang.de
  2023-07-28  8:19 ` swilde@sha-bang.de
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-05  7:05 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |x86_64-netbsd
                 CC|                            |dmalcolm at gcc dot gnu.org

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Can you check if this only happens when you enable the JIT?  That is,
does it work when you remove --enable-languages=jit?

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

* [Bug bootstrap/110550] libintl build without -fPIC even though --enable-shared is configured
  2023-07-04 17:08 [Bug other/110550] New: libintl build without -fPIC even though --enable-shared is configured swilde@sha-bang.de
  2023-07-05  7:05 ` [Bug bootstrap/110550] " rguenth at gcc dot gnu.org
@ 2023-07-14 12:06 ` swilde@sha-bang.de
  2023-07-28  8:19 ` swilde@sha-bang.de
  2 siblings, 0 replies; 4+ messages in thread
From: swilde@sha-bang.de @ 2023-07-14 12:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Sascha Wilde <swilde@sha-bang.de> ---
(please excuse my late reply)

Indeed without jit the build works as expected.

However, jit is the primary reason I'm building gcc on NetBSD.  
Building relocateable code also in the supporting libraries is essential 
for jit to work. (see also #100096 for reference)

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

* [Bug bootstrap/110550] libintl build without -fPIC even though --enable-shared is configured
  2023-07-04 17:08 [Bug other/110550] New: libintl build without -fPIC even though --enable-shared is configured swilde@sha-bang.de
  2023-07-05  7:05 ` [Bug bootstrap/110550] " rguenth at gcc dot gnu.org
  2023-07-14 12:06 ` swilde@sha-bang.de
@ 2023-07-28  8:19 ` swilde@sha-bang.de
  2 siblings, 0 replies; 4+ messages in thread
From: swilde@sha-bang.de @ 2023-07-28  8:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Sascha Wilde <swilde@sha-bang.de> ---
Are there any additional tests i could provide to help resolving this issue?

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

end of thread, other threads:[~2023-07-28  8:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-04 17:08 [Bug other/110550] New: libintl build without -fPIC even though --enable-shared is configured swilde@sha-bang.de
2023-07-05  7:05 ` [Bug bootstrap/110550] " rguenth at gcc dot gnu.org
2023-07-14 12:06 ` swilde@sha-bang.de
2023-07-28  8:19 ` swilde@sha-bang.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).