problem building fnord in 64 bit on a sparc running Linux

The Eye <[email protected]> Thu, 25 Mar 2004 20:11:13 +0100
Newsgroups gmane.comp.web.fnord
Message-ID <[email protected]>
Situation is the following:
Sun Ultra5 running Gentoo Linux, 2.6.4 kernel. dietlibc is built the
64 bit way (the ordinary dietlibc ebuild would break on sparc64 since
Gentoo has a 32 bit userland and you can't just assume it's 64 bit thing
and go "make". it works with make CC=sparc64-linux-gcc, though).

We (#gentoo-sparc on freenode) are right now trying to compile fnord-1.8
in a 64 bit version for this system, using the same make command. It
fails the following way:

diet -Os sparc64-linux-gcc -o httpd httpd.o libowfat.a -mcpu=ultrasparc
-O3 -pipe
httpd.o(.text+0x2238): In function `serve_read_write':
: undefined reference to `time'
httpd.o(.text+0x231c): In function `serve_read_write':
: undefined reference to `time'
httpd.o(.text+0x2438): In function `serve_mmap':
: undefined reference to `time'
httpd.o(.text+0x24d8): In function `serve_mmap':
: undefined reference to `time'
httpd.o(.text+0x279c): In function `main':
: undefined reference to `time'
httpd.o(.text+0x2804): more undefined references to `time' follow
collect2: ld returned 1 exit status
make: *** [httpd] Error 1


note: binutils, gcc and dietlibc are 64 bit, but nothing else is (and
the way the system is structured right now, it won't be in a while).

our take is that this fails because we have no 64 bit linker, but that
is just a guess.

trying in 32 bit way (with dietlibc also in 32 bit mode) fails in
another way, as reported on gentoo bugzilla.
Here the error is:

diet -Os gcc -o httpd httpd.o libowfat.a -mcpu=ultrasparc -O3 -pipe
httpd.o(.text+0x1774): In function `doit':
: undefined reference to `fstat64'
httpd.o(.text+0x1ca8): In function `handledirlist':
: undefined reference to `stat64'
httpd.o(.text+0x1e2c): In function `handledirlist':
: undefined reference to `lstat64'
httpd.o(.text+0x2084): In function `handleindexcgi':
: undefined reference to `stat64'
httpd.o(.text+0x247c): In function `serve_read_write':
: undefined reference to `lseek64'
httpd.o(.text+0x28b4): In function `serve_static_data':
: undefined reference to `lseek64'
collect2: ld returned 1 exit status
make: *** [httpd] Error 1


If access to a sparc64 computer running Gentoo is required for testing,
this can be arranged. Thanks for any help here ...

-- 
Michael Hellwig  aka  The Eye                 olymp.idle.at admin
check out http://homepage.uibk.ac.at/~csaa5128 for gpg public key
        and don't hesitate to look at http://laerm.or.at