public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* How to fix these errors with glibc 2.37?
@ 2023-10-11 12:20 Dingjun Chen
  2023-10-11 13:36 ` Kai Ruottu
  0 siblings, 1 reply; 3+ messages in thread
From: Dingjun Chen @ 2023-10-11 12:20 UTC (permalink / raw)
  To: gcc-help

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

Hi, guys,

I want to install glibc 2.37 for 32-bit applications.  However, there are some errors occurred and please see below for details.

I enter the following command in the build directory: build_glibc

 ../glibc-2.37/configure --prefix=/usr/glibc2.37 CC="gcc -m32" CFLAGS="-O3"

The following is the outputs:
......................................
......................................
gcc -m32 -Wl,-rpath-link=/home/dingjun/glibc-2.37/build_glibc:/home/dingjun/glibc-2.37/build_glibc/math:/home/dingjun/glibc-2.37/build_glibc/elf:/home/dingjun/glibc-2.37/build_glibc/dlfcn:/home/dingjun/glibc-2.37/build_glibc/nss:/home/dingjun/glibc-2.37/build_glibc/nis:/home/dingjun/glibc-2.37/build_glibc/rt:/home/dingjun/glibc-2.37/build_glibc/resolv:/home/dingjun/glibc-2.37/build_glibc/mathvec:/home/dingjun/glibc-2.37/build_glibc/support:/home/dingjun/glibc-2.37/build_glibc/crypt:/home/dingjun/glibc-2.37/build_glibc/nptl -o /home/dingjun/glibc-2.37/build_glibc/support/links-dso-program -pie -Wl,-z,pack-relative-relocs -Wl,-O1 -nostdlib -nostartfiles    -Wl,-z,relro  /home/dingjun/glibc-2.37/build_glibc/csu/Scrt1.o /home/dingjun/glibc-2.37/build_glibc/csu/crti.o `gcc -m32  --print-file-name=crtbeginS.o` /home/dingjun/glibc-2.37/build_glibc/support/links-dso-program.o -lstdc++ -lgcc -lgcc_s  -Wl,-dynamic-linker=/usr/glibc2.37/lib/ld-linux.so.2  /home/dingjun/glibc-2.37/build_glibc/libc.so.6 /home/dingjun/glibc-2.37/build_glibc/libc_nonshared.a -Wl,--as-needed /home/dingjun/glibc-2.37/build_glibc/elf/ld.so -Wl,--no-as-needed -lgcc  `gcc -m32  --print-file-name=crtendS.o` /home/dingjun/glibc-2.37/build_glibc/csu/crtn.o
/usr/bin/ld: i386:x86-64 architecture of input file `/home/dingjun/glibc-2.37/build_glibc/support/links-dso-program.o' is incompatible with i386 output
/usr/bin/ld: /home/dingjun/glibc-2.37/build_glibc/support/links-dso-program.o: in function `main':
links-dso-program.cc:(.text.startup+0x4f): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long)'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/32/libstdc++.so: undefined reference to `__ctzdi2@GCC_3.4'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/32/libstdc++.so: undefined reference to `__divmoddi4@GCC_7.0.0'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/32/libstdc++.so: undefined reference to `__popcountsi2@GCC_3.4'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/32/libstdc++.so: undefined reference to `_Unwind_GetIPInfo@GCC_4.2.0'
collect2: error: ld returned 1 exit status
make[2]: *** [../Rules:230: /home/dingjun/glibc-2.37/build_glibc/support/links-dso-program] Error 1
make[2]: Leaving directory '/home/dingjun/glibc-2.37/glibc-2.37/support'
make[1]: *** [Makefile:484: support/others] Error 2
make[1]: Leaving directory '/home/dingjun/glibc-2.37/glibc-2.37'
make: *** [Makefile:9: all] Error 2


Thanks & regards,

Dingjun
Dingjun Chen  | Software Developer

[Geotech Airborne Geophysical Surveys]

Geotech Ltd. dba Geotech Airborne | 270 INDUSTRIAL PKY S | AURORA ON CA | L4G 3T9
T: +1 905 841 5004 | Dingjun.Chen@geotechairborne.com<mailto:Dingjun.Chen@geotechairborne.com> | www.geotechairborne.com<www.geotech.ca>

P Please consider the environment before printing this email

This message may contain PRIVILEGED AND PROPRIETARY INFORMATION intended solely for the use of the addressee (s) named above. Any disclosure, distribution, copying, or use of the information by others is strictly prohibited. If you have received this message in error, please advise the sender by immediate reply and delete the original message.

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

* Re: How to fix these errors with glibc 2.37?
  2023-10-11 12:20 How to fix these errors with glibc 2.37? Dingjun Chen
@ 2023-10-11 13:36 ` Kai Ruottu
  2023-10-11 13:46   ` Xi Ruoyao
  0 siblings, 1 reply; 3+ messages in thread
From: Kai Ruottu @ 2023-10-11 13:36 UTC (permalink / raw)
  To: Dingjun Chen, gcc-help

Dingjun Chen kirjoitti 11.10.2023 klo 15.20:
> Hi, guys,
>
> I want to install glibc 2.37 for 32-bit applications.
Is this unrelated to your goal to produce a crosscompiler for the
"RTD single board computer with Linux 2.4.36.1 2009, i686"?

If not, why you are trying to produce a new glibc from scratch?
Doesn't the RTD Linux system already have its own glibc-<something>,
prebuilt and "acid tested"? If it has, why you don't want to use it in
the crosscompiler as the target C library?

>    However, there are some errors occurred and please see below for details.
>
> I enter the following command in the build directory: build_glibc
>
>   ../glibc-2.37/configure --prefix=/usr/glibc2.37 CC="gcc -m32" CFLAGS="-O3"
Using some other $prefix than the '/usr' in glibc build is rare. Most 
people want it to
serve as the 'run-time library' in the produced "own Linux distro" and 
also as the
'development library' in the native tools on the 'own Linux distro' and 
in the crosstools
for this 'own Linux distro' on other development hosts.

If you still want crosstools for producing executables for the existing 
RTD Linux system
"as it is now", then just copy its own glibc into your crosstoolchain as 
the "target C library",
and not try to replace it with something "self-made". Whatever the "we 
want to make a
better world"-people in the net are trying to suggest - "destroy 
everything created by the
capitalism and start everything from absolute scratch!", please don't 
believe them.

Ok, via the document :
https://www.rtd.com/NEW_appnote/LinuxSupport_SWM640000020F.pdf
I understood that RTD doesn't provide any "RTD Linux distro" but trusts 
the common
Linux distros like Debian, RedHat, SuSE etc being installable on its 
single board computers.
So your first task would be to find out which Linux distro you have on 
your target system.

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

* Re: How to fix these errors with glibc 2.37?
  2023-10-11 13:36 ` Kai Ruottu
@ 2023-10-11 13:46   ` Xi Ruoyao
  0 siblings, 0 replies; 3+ messages in thread
From: Xi Ruoyao @ 2023-10-11 13:46 UTC (permalink / raw)
  To: Kai Ruottu, Dingjun Chen, gcc-help

On Wed, 2023-10-11 at 16:36 +0300, Kai Ruottu wrote:
> Dingjun Chen kirjoitti 11.10.2023 klo 15.20:
> > Hi, guys,
> > 
> > I want to install glibc 2.37 for 32-bit applications.
> Is this unrelated to your goal to produce a crosscompiler for the
> "RTD single board computer with Linux 2.4.36.1 2009, i686"?
> 
> If not, why you are trying to produce a new glibc from scratch?
> Doesn't the RTD Linux system already have its own glibc-<something>,
> prebuilt and "acid tested"? If it has, why you don't want to use it in
> the crosscompiler as the target C library?

FWIW it's impossible to run Glibc-2.37 on Linux 2.4.36.1.  As I've said
in a previous reply, Glibc-2.37 requires Linux 3.2 or later.

Anyway this is off-topic.  gcc-help is not a support channel of Glibc. 
We often try to help even if the post is off-topic, but now to me we are
just encouraging off-topic posts.  PITA.

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-11 12:20 How to fix these errors with glibc 2.37? Dingjun Chen
2023-10-11 13:36 ` Kai Ruottu
2023-10-11 13:46   ` Xi Ruoyao

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