Subject: glibc-2.3.4 mips64 compilation failure

From: Maxim Osipov <[email-masked]>
Date: Thu, 26 May 2005 20:32:59 +0400

Hello,

I am trying to build glibc-2.3.4 using binutils-2.15 and gcc-3.4.3
from ftp://ftp.linux-mips.org/pub/linux/mips/crossdev/i386-linux/mips64-linux.
Compilation fails with following messages:

clude/libc-symbols.h -DPIC -DASSEMBLER -x assembler-with-cpp -o
/home/maxim/temp/build-glibc/io/sendfile.o -
.././scripts/mkinstalldirs /home/maxim/temp/build-glibc/io
(echo '#include <sysdep.h>'; \
 echo 'PSEUDO (sendfile64, sendfile64, 4)'; \
 echo ' ret'; \
 echo 'PSEUDO_END(sendfile64)'; \
 echo 'libc_hidden_def (sendfile64)'; \
) | mips64-linux-gcc -mabi=64 -c -I../include -I.
-I/home/maxim/temp/build-glibc/io -I.. -I../libio
-I/home/maxim/temp/build-glibc -I../sysdeps/mips/elf
-I../linuxthreads/sysdeps/unix/sysv/linux/mips/mips64
-I../linuxthreads/sysdeps/unix/sysv/linux/mips
-I../linuxthreads/sysdeps/unix/sysv/linux
-I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread
-I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix
-I../linuxthreads/sysdeps/mips
-I../sysdeps/unix/sysv/linux/mips/mips64/n64
-I../sysdeps/unix/sysv/linux/mips/mips64
-I../sysdeps/unix/sysv/linux/mips -I../sysdeps/unix/sysv/linux
-I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman
-I../sysdeps/unix/inet -I../sysdeps/unix/sysv
-I../sysdeps/unix/mips/mips64/n64 -I../sysdeps/unix/mips/mips64
-I../sysdeps/unix/mips -I../sysdeps/unix -I../sysdeps/posix
-I../sysdeps/mips/mips64/n64 -I../sysdeps/ieee754/ldbl-128
-I../sysdeps/mips/mips64 -I../sysdeps/ieee754/flt-32
-I../sysdeps/ieee754/dbl-64 -I../sysdeps/mips -I../sysdeps/wordsize-64
-I../sysdeps/mips/fpu -I../sysdeps/ieee754 -I../sysdeps/generic/elf
-I../sysdeps/generic -nostdinc -isystem
/usr/lib/gcc/mips64-linux/3.4.3/include -isystem
/usr/local/tools/mips64-linux/mips64-linux/sys-root/usr/include
-D_LIBC_REENTRANT -include ../include/libc-symbols.h -DPIC -DASSEMBLER
-x assembler-with-cpp -o /home/maxim/temp/build-glibc/io/sendfile64.o
-
<stdin>: Assembler messages:
<stdin>:2: Error: absolute expression required `li'
make[2]: *** [/home/maxim/temp/build-glibc/io/sendfile64.o] Error 1
make[2]: Leaving directory `/home/maxim/temp/glibc-2.3.4/io'
make[1]: *** [io/subdir_lib] Error 2
make[1]: Leaving directory `/home/maxim/temp/glibc-2.3.4'

Has anyone seen it before? And one more thing - are there srpms for
the above mentioned tools available?

Best regards,
Maxim

---

From: Daniel Jacobowitz <[email-masked]>
Date: Thu, 26 May 2005 13:06:03 -0400

> Compilation fails with following messages:

Looks like your kernel headers are too old.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

---

From: "Maciej W. Rozycki" <[email-masked]>
Date: Thu, 26 May 2005 18:26:10 +0100 (BST)

> Looks like your kernel headers are too old.

 Or too new, sigh...  See: 
"http://sources.redhat.com/bugzilla/show_bug.cgi?id=758".  Unfortunately 
it's not clear to me what "the 2.3 branch inclusion criteria" are and it's 
a pity the MIPS port of glibc is unmaintained these days...

  Maciej

---

From: Daniel Jacobowitz <[email-masked]>
Date: Thu, 26 May 2005 15:05:54 -0400

> a pity the MIPS port of glibc is unmaintained these days...

He did post the criteria.  You can find them in the list archives
though I don't have a URL handy.

I'm hoping to improve the maintenance in the near future.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

---

From: "Maciej W. Rozycki" <[email-masked]>
Date: Thu, 26 May 2005 20:34:28 +0100 (BST)

> though I don't have a URL handy.

 Well, the criteria probably don't change that much if at all from one 
stable branch to another, so having them somewhere at one of the GNU libc 
web pages (probably the sourceware's is the right one for such internal 
guidelines) wouldn't hurt, like it's done e.g. with GCC.  I can't recall 
if I tried searching the mailing list previously, but now "branch 
inclusion criteria" doesn't return anything, so even your hint isn't 
especially useful (and I don't want to spend my life digging the archives, 
sorry).  I'm somewhat surprised, actually, as I'm subscribed to the 
libc-alpha list for quite some time now, certainly since before the branch 
was created and I haven't noticed such an announcement.

> I'm hoping to improve the maintenance in the near future.

 Well, if you have resources for doing that, it will be most welcomed.

  Maciej

---

From: Daniel Jacobowitz <[email-masked]>
Date: Thu, 26 May 2005 16:08:04 -0400

> was created and I haven't noticed such an announcement.

It's buried in:
  http://sourceware.org/ml/libc-alpha/2004-12/msg00063.html

-- 
Daniel Jacobowitz
CodeSourcery, LLC

---

From: Daniel Jacobowitz <[email-masked]>
Date: Thu, 26 May 2005 16:15:03 -0400

>   http://sourceware.org/ml/libc-alpha/2004-12/msg00063.html

... not that those will be very useful to you, unless you want to
suddenly become Fedora.  They'll only be useful to Debian once in a
blue moon.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

---

From: "Maciej W. Rozycki" <[email-masked]>
Date: Thu, 26 May 2005 21:22:47 +0100 (BST)

> suddenly become Fedora.  They'll only be useful to Debian once in a

 Thanks for the link and indeed -- I don't think we have any setup 
available that would qualify as a "distribution" as referred to by the 
rules.  Especially as for MIPS you'd have to multiply that by three for 
the supported ABIs.

 As a result we have no glibc release that would work for a reasonably 
modern setup of MIPS/Linux.

  Maciej

---

From: Daniel Jacobowitz <[email-masked]>
Date: Thu, 26 May 2005 16:24:15 -0400

> modern setup of MIPS/Linux.

HEAD does work, however.  I will even get around to the MIPS64 NPTL
bits for HEAD very soon.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

---

From: "Maciej W. Rozycki" <[email-masked]>
Date: Thu, 26 May 2005 21:33:49 +0100 (BST)

> HEAD does work, however.  I will even get around to the MIPS64 NPTL

 Hmm, has #933 been applied to HEAD?  Apparently not.  I have more stuff 
to come that's less obvious, but what's the point if even basic one is 
stuck?  I put such bits at my FTP site of course, so that people can still 
benefit.

  Maciej

---

From: Maxim Osipov <[email-masked]>
Date: Fri, 27 May 2005 14:15:13 +0400

Hmm... I don't know. Both 2.4.26 and 2.6.10 headers do not contain
this call number in unistd.h for N64, but glibc tries to generate a
stub referencing to undefined __NR_sendfile64, and I got this
assembler error.

I tried various kernel/glibc configurations and result is the same -
we fail on sendfile64 or time.

Do anyone have a clue what is happening? AFAIK, some people already
had success building glibc for mips64. Probably I miss something?

Best regards,
Maxim

---

From: "Maciej W. Rozycki" <[email-masked]>
Date: Tue, 31 May 2005 15:28:39 +0100 (BST)

> had success building glibc for mips64. Probably I miss something?

 Please feel free to have a look at packages available at my site -- the 
setup may seem a little bit odd (n64 is used as the default format and 
actually the only one supported), but if you are after general setup, 
patches, etc. it is still relevant; just ignore the odd stuff.  Binary 
packages have been built with GCC 4.0.0, so probably the sources + patches 
are going to work with older tools as well.  You may consider using 
binutils 2.16, though (in general, not to solve your particular problem).

  Maciej