[Prev][Next][Index][Thread]

OSKit build




Hi,

I'm trying to build the OSKit valentines day release and I'm
cross-compiling for HURD from linux.

Here's what I did to set up:


<download, untar>
cd oskit-20010214
mkdir build
mkdir install
cd build
../configure --prefix=/usr/src/HURD/oskit-20010214/install --build i686-linux --host i386-gnu
make


But when it comes to building the hello example I get:


make[1]: Entering directory `/usr/src/HURD/oskit-20010214/build/examples/x86'
i386-gnu-ld -Ttext 100000  -L../../lib \
        -o hello ../../lib/multiboot.o hello.o          \
        -loskit_clientos -loskit_kern -loskit_lmm \
	-loskit_c ../../lib/crtn.o
i386-gnu-ld: warning: cannot find entry symbol _start; defaulting to 00100000
../../lib/multiboot.o: In function `boot_entry':
../../lib/multiboot.o(.text+0x49): undefined reference to `_multiboot_main'
../../lib/multiboot.o: In function `_start_of_data':
../../lib/multiboot.o(.data+0x4): undefined reference to `_oskit_version_string'
../../lib/liboskit_clientos.a(mem.o): In function `mem_realloc':
/usr/src/HURD/oskit-20010214/build/clientos/../../clientos/mem.c:143: undefined reference to `memcpy\'
/usr/src/HURD/oskit-20010214/build/clientos/../../clientos/mem.c:155: undefined reference to `memcpy\'
../../lib/liboskit_kern.a(gdb_pc_com.o): In function `gdb_pc_com_init':
/usr/src/HURD/oskit-20010214/build/kern/../../kern/x86/pc/gdb_pc_com.c:73: undefined reference to `g\db_trap_ss'
../../lib/liboskit_kern.a(gdb_pc_com.o): In function `gdb_pc_com_init':
/usr/src/HURD/oskit-20010214/build/kern/../../oskit/x86/seg.h:210: undefined reference to `gdb_pc_co\m_intr'
../../lib/liboskit_kern.a(gdb_serial.o): In function `gdb_serial_converse':
/usr/src/HURD/oskit-20010214/build/kern/../../kern/gdb_serial.c:382: undefined reference to `gdb_cop\yin'
/usr/src/HURD/oskit-20010214/build/kern/../../kern/gdb_serial.c:418: undefined reference to `gdb_cop\yout'
/usr/src/HURD/oskit-20010214/build/kern/../../kern/gdb_serial.c:474: undefined reference to `gdb_cop\yout'
../../lib/liboskit_kern.a(killswitch.o): In function `gdb_pc_set_killswitch':
/usr/src/HURD/oskit-20010214/build/kern/../../oskit/x86/seg.h:211: undefined reference to `com_kill_\intr'
make[1]: *** [hello] Error 1
make[1]: Leaving directory `/usr/src/HURD/oskit-20010214/build/examples/x86'
make: *** [examples/x86/all.MAKE] Error 2
althea:/usr/src/HURD/oskit-20010214/build# 


It seems like the gdb_copy{in|out} refs would be a good place to
start.  Here's some other random info I collected:


althea:/usr/src/HURD/oskit-20010214/build# nm kern/gdb_copy.o
00000000 T _gdb_copyin
0000003c T _gdb_copyout
         U _gdb_trap_recover
00000035 t copy_fail
00000028 t copy_ret
althea:/usr/src/HURD/oskit-20010214/build#


Digging around in asm.h it looks like you need to have __ELF__ defined
in order to get rid of the underscore when using EXT .  The arm
definition of the function (in a .c file, not .S) doesn't have an
underscore.

But how do I get __ELF__ defined (properly).  Does gcc set that?

Here's my gcc/ld versions:


althea:/usr/src/HURD/oskit-20010214/build# i386-gnu-gcc --version
2.95.4
althea:/usr/src/HURD/oskit-20010214/build# i386-gnu-ld --version
GNU ld version 2.11.92.0.12.3 20011121 Debian/GNU Linux
Copyright 2001 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
althea:/usr/src/HURD/oskit-20010214/build#


I can't think of what else to include, so please ask for any other
info that is needed.

Thanks,
Derek