gcc and glibc: big troubles
I'm trying to upgrade my glibc and compiler to 001024 snapshot + RCS patches up to 037 (for gcc) and glibc 2.2 plus patches (not CVS), but it fails on the whole... Compiler used is 001024 snapshot but with backward compatibility ABI patch applied.
First, glibc. I obtain this error:
-----
gcc -nostdlib -nostartfiles -o /usr/src/RPM/BUILD/glibc-2.2/build-ia64-linux/iconv/iconv_prog -Wl,-dynamic-linker=/lib/ld-linux-ia64.so.2 /usr/src/RPM/BUILD/glibc-2.2/build-ia64-linux/csu/crt1.o /usr/src/RPM/BUILD/glibc-2.2/build-ia64-linux/csu/crti.o gcc --print-file-name=crtbegin.o /usr/src/RPM/BUILD/glibc-2.2/build-ia64-linux/iconv/iconv_prog.o -Wl,-rpath-link=/usr/src/RPM/BUILD/glibc-2.2/build-ia64-linux:/usr/ src/RPM/BUILD/glibc-2.2/build-ia64-linux/math:/usr/src/RPM/BUILD/ glibc-2.2/build-ia64-linux/elf:/usr/src/RPM/BUILD/glibc-2.2/ build-ia64-linux/dlfcn:/usr/src/RPM/BUILD/glibc-2.2/build-ia64-linux/ nss:/usr/src/RPM/BUILD/glibc-2.2/build-ia64-linux/nis:/usr/src/RPM/ BUILD/glibc-2.2/build-ia64-linux/rt:/usr/src/RPM/BUILD/glibc-2.2/ build-ia64-linux/resolv:/usr/src/RPM/BUILD/glibc-2.2/build-ia64-linux/ crypt:/usr/src/RPM/BUILD/glibc-2.2/build-ia64-linux/linuxthreads /usr/src/RPM/BUILD/glibc-2.2/build-ia64-linux/libc.so.6.1 /usr/src/RPM/BUILD/glibc-2.2/build-ia64-linux/libc_nonshared.a -lgcc gcc --print-file-name=crtend.o /usr/src/RPM/BUILD/glibc-2.2/build-ia64-linux/csu/crtn.o
/usr/src/RPM/BUILD/glibc-2.2/build-ia64-linux/libc.so.6.1:
undefined reference to `__syscall_getpagesize'
collect2: ld returned 1 exit status
-----
Does CVS glibc cure this? If yes I guess I'll upgrade to the latest toolchain snapshot too...
Now, trying to recompile the 001024 toolchain, but *without* the ABI patch, I get the following:
-----
gcc -c -O2 -I../../../tk/unix -I../../../tk/unix/../generic
-I../../../tk/unix/../bitmaps -I/usr/src/RPM/BUILD/src/tcl/generic -I/usr/X11R6/include -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 ../../../tk/unix/../generic/tkImgPhoto.c ../../../tk/unix/../generic/tkImgPhoto.c: In function `ImgPhotoCmd':../../../tk/unix/../generic/tkImgPhoto.c:601: warning: passing arg 2 of `Tcl_GetStringFromObj' from
incompatible pointer type/tmp/ccalpirm.s: Assembler messages:/tmp/ccalpirm.s:6579: Internal error, aborting at ../../gas/config/tc-ia64.c line 5190 in errata_nop_necessary_p
Please report this bug.
-----
Culprit line:
-----
if (insn_unit = IA64_UNIT_F)
{
for (i = 0; i < idesc->num_outputs; i++)
if (idesc->operands[i] = IA64_OPND_P1
|| idesc->operands[i] = IA64_OPND_P2)
{
int regno = slot->opnd[i].X_add_number - REG_P;
if (regno > 16)
abort (); <----- This one
this_group->p_reg_set[regno] = 1;
}
}-----
One thing I don't get is: why all this in the toolchain? Why make, why bison, why tk, why tcl? Whats more there's no README at all on how to *avoid* having them compiled. I tried --without-x, --disable-x but to no avail... Stock bison for example works perfectly fine here, so does make. Any solution?
Signature · 4 lines
Francis Galiegue, [email protected] "Programming is a race between programmers, who try and make more and more idiot-proof software, and universe, which produces more and more remarkable idiots. Until now, universe leads the race" -- R. Cook
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Francis" = Francis Galiegue <[email protected]> writes:
Francis> I'm trying to upgrade my glibc and compiler to 001024 Francis> snapshot + RCS patches up to 037 (for gcc) and glibc 2.2 plus Francis> patches (not CVS), but it fails on the whole... Compiler used Francis> is 001024 snapshot but with backward compatibility ABI patch Francis> applied.
Francis> First, glibc. I obtain this error:
Please read the warning messages from the compiler when you compile glibc and get errors like this. Higher up in the compiler output it had warned you that it couldn't find the definition of __NR_getpagesize(). It's because David took it out as we are switching to AT_PAGESZ support instead. Until glibc gets fixed you can just reenable it in include/asm/unistd.h.
Jes
Quoted 8 lines · Jes Sorensen
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Francis" = Francis Galiegue <[email protected]> writes:
Francis> I'm trying to upgrade my glibc and compiler to 001024 Francis> snapshot + RCS patches up to 037 (for gcc) and glibc 2.2 plus Francis> patches (not CVS), but it fails on the whole... Compiler used Francis> is 001024 snapshot but with backward compatibility ABI patch Francis> applied.
Quoted 9 lines
Francis> First, glibc. I obtain this error:
Please read the warning messages from the compiler when you compile glibc and get errors like this. Higher up in the compiler output it had warned you that it couldn't find the definition of
__NR_getpagesize(). It's because David took it out as we are switching toAT_PAGESZsupport instead. Until glibc gets fixed you can just reenable it ininclude/asm/unistd.h.
This is an untested patch. Let me know what you get.
Thanks.
H.J.
----
2000-11-21 H.J. Lu <[email protected]>
* sysdeps/unix/sysv/linux/ia64/getpagesize.c (__getpagesize):
Don't call __syscall_getpagesize. Set to 8K by default.
* sysdeps/unix/sysv/linux/ia64/syscalls.list (s_getpagesize):
Removed.
Index: sysdeps/unix/sysv/linux/ia64/getpagesize.c
=================================RCS file: /work/cvs/gnu/glibc/sysdeps/unix/sysv/linux/ia64/getpagesize.c,v retrieving revision 1.1.1.1
unix/sysv/linux/ia64/getpagesize.c +1 -7
@@ -27,19 +27,13 @@determine the page size to ensure proper alignment for calls such as mmap and friends. --davidm 99/11/30 */ -/* If we are not a static program, this value is collected from the system -via the AT_PAGESZ auxiliary argument. If we are a static program, we -use the getpagesize system call. */ -extern size_t _dl_pagesize; -extern size_t __syscall_getpagesize (void ); -int __getpagesize () {if (_dl_pagesize =0 ) - _dl_pagesize =INLINE_SYSCALL (getpagesize,0 ); + _dl_pagesize =8192 ;/* use a reasonable default */ return _dl_pagesize; }
Index: sysdeps/unix/sysv/linux/ia64/syscalls.list
=================================RCS file: /work/cvs/gnu/glibc/sysdeps/unix/sysv/linux/ia64/syscalls.list,v retrieving revision 1.1.1.8
unix/sysv/linux/ia64/syscalls.list +0 -1
@@ -72,7 +72,6 @@ s_getdents64 getdents64 getdents64 i:ipi s_mknod xmknod mknod i:sii __syscall_mknod s_readv readv readv i:ipi __syscall_readv s_writev writev writev i:ipi __syscall_writev -s_getpagesize getpagesize getpagesize 0 __syscall_getpagesize s_poll poll poll i:pii __syscall_poll s_reboot reboot reboot i:iii __syscall_reboot s_ustat ustat ustat i:ip __syscall_ustat
Quoted 4 lines
/tmp/ccalpirm.s:6579: Internal error, aborting at../../gas/config/tc-ia64.cline 5190 inerrata_nop_necessary_pif (regno > 16) abort (); <----- This one
This is a bug in the hardware errata workaround patch. This should be
if (regno >= 64) abort ();
I found this problem in pre-release testing, so it is fixed in the 001117 release, but I didn't release a separate patch for this bug fix.
Quoted 4 lines
One thing I don't get is: why all this in the toolchain? Why make, why bison, why tk, why tcl? Whats more there's no README at all on how to *avoid* having them compiled. I tried --without-x, --disable-x but to no avail... Stock bison for example works perfectly fine here, so does make. Any solution?
This is the "Cygnus" way of making releases. This is necessary for "Cygnus" to make sure that our customers can rebuild our toolchains. Otherwise, they may not have the necessary tools (e.g. GNU make), or they may have incompatible versions of them (tcl/tk).
This style of release is not appropriate for GNU/Linux distributors, but unfortunately, we are stuck with it for now. I'd like to get people moved to FSF style releases as soon as possible, but I couldn't easily do that until after most of the development work was done. I expect the next release will be from the FSF gcc/binutils/gdb sources, so this should not be a problem with the next release.
tcl/tk/tix/itcl are there for the gdb gui. This requires the specific versions of tcl/tk/etc in the toolchain, otherwise you will run into versioning problems. The reasons for the rest of the stuff is probably obvious, they all come standard with linux, but not with SunOS/Solaris/AIX/Irix/NT/etc.
You can build specific tools, like gcc, by using
make all-gcc
There are makefile dependencies which will force everything gcc requires (opcodes/bfd/binutils/gas/ld) to also be built. You can build specific target libraries, like libstdc++, by using
make all-target-libstdc++
Making all-gcc, all-gdb, and all-target-libstdc++, will probably build everything you want.
You can install specific tools, like gcc, by using
make install-gcc
There are no dependencies here, so you need to separately install everything you want, e.g. bfd, binutils, gas, ld, gdb, gcc, target-libstdc++, and maybe some other stuff.
You can disable building the gdb gui by using --disable-gdbtk
You can also disable building stuff by renaming/deleting the directories. This will work for all of the optional stuff like flex/bison/make/patch/etc that comes standard with Linux and which are unlikely to suffer versioning problems.
All of this stuff I just described also works exactly the same way in FSF gcc/binutils/gdb releases. We just bundle everything together instead of shipping everything separately.
There is documentation explaining all of this stuff, but it is maintained by the documentation group not the engineers, and is usually distributed on paper. A "Cygnus" customer would get it, but it is hard to distribute to everyone trying to use my Trillian releases.
I like to point out again that my releases are primarily for the Trillian group, to enable kernel, glibc, and Linux distribution work. It was never the intent to recommend them to everyone. I'd rather recommend the compilers that come with the Linux distributions, but unfortunately, all IA-64 GNU/Linux distributions are still using the old February toolchain, so as a stop gap measure I'm making my toolchains available to everyone. Since you are Linux distributor though, you'd probably have to build my toolchain anyways.
Jim
On Tue, 21 Nov 2000, Jim Wilson wrote:
Jim,
Thanks very much for your complete answer. I'm afraid I'm not as good as you guys, but I'm doing my best to follow :)
Quoted 6 lines
Quoted 5 lines
/tmp/ccalpirm.s:6579: Internal error, aborting at../../gas/config/tc-ia64.cline 5190 inerrata_nop_necessary_pif (regno > 16) abort (); <----- This one
Quoted 6 lines
This is a bug in the hardware errata workaround patch. This should be
if (regno >= 64) abort ();I found this problem in pre-release testing, so it is fixed in the 001117 release, but I didn't release a separate patch for this bug fix.
OK, I made a patch over the 001124 release... Compiling with it right now.
Quoted 10 lines
You can build specific tools, like gcc, by using
make all-gcc
There are makefile dependencies which will force everything gcc requires (opcodes/bfd/binutils/gas/ld) to also be built. You can build specific target libraries, like libstdc++, by using
make all-target-libstdc++
Making all-gcc, all-gdb, and all-target-libstdc++, will probably build everything you want.
Quoted 6 lines
You can install specific tools, like gcc, by using
make install-gcc
There are no dependencies here, so you need to separately install everything you want, e.g. bfd, binutils, gas, ld, gdb, gcc, target-libstdc++, and maybe some other stuff.
Thanks, rebuilding with these right now.
Quoted 2 lines
You can disable building the gdb gui by using --disable-gdbtk
Already in my spec file.
Quoted 9 lines
I like to point out again that my releases are primarily for the Trillian group, to enable kernel, glibc, and Linux distribution work. It was never the intent to recommend them to everyone. I'd rather recommend the compilers that come with the Linux distributions, but unfortunately, all IA-64 GNU/Linux distributions are still using the old February toolchain, so as a stop gap measure I'm making my toolchains available to everyone. Since you are Linux distributor though, you'd probably have to build my toolchain anyways.
Yep, very useful for building from a chroot... Thanks for your time again.
Signature · 4 lines
Francis Galiegue, [email protected] "Programming is a race between programmers, who try and make more and more idiot-proof software, and universe, which produces more and more remarkable idiots. Until now, universe leads the race" -- R. Cook