[Prev][Next][Index][Thread]
Re: linking to Math library with OSKit 20000202
<snip>
> does. Even if you are using the static versions, you simply cannot expect
> to link in random libraries compiled for your build system's native
> environment into an oskit kernel and just should not try. For -lm, you
> should be using -loskit_m, which is provided. For -lz, you should compile
> zlib in the oskit build environment like you commpile the rest of your
> oskit kernel, and use that instead of the build system's installed library.
I think my build system was not flexible enough to properly get all the
OSKIT include directories in when compiling the source. I changed this
around and now I no longer get the:
ld: kissmeimage: Not enough room for program headers (allocated 5, need 6)
ld: final link failed: Bad value
error.
I'm no longer using -lz, but I do need a Math library. You say that
liboskit_m is included, but I can't find it anywhere. Do I have to build
oskit with a special flag to build it?
Here is my link output (it just shows the Math functions that are missing
and some pthread references which I will fix later):
[jewel@svetlana kissme_makeme]$ make -f oskit-Makefile
ld -Ttext 100000 -L/home/jewel/oskit-install/lib/ -L/home/jewel/oskit-install/lib/oskit \
-o kissmeimage /home/jewel/oskit-install/lib/oskit/multiboot.o lib/indigenous/java.io/File.o
<snipped a whole lot of my object files>
-loskit_threads \
-loskit_startup -loskit_clientos -loskit_fsnamespace \
-loskit_memfs -loskit_dev -loskit_kern -loskit_lmm -loskit_posix \
/home/jewel/oskit-install/lib/oskit/crtn.o -loskit_freebsd_c -loskit_com -loskit_freebsd_net -loskit_bootp -loskit_linux_dev -loskit_bootp -loskit_c
lib/classpath/java.lang/atan2.o: In function `Java_java_lang_Math_atan2':
lib/classpath/java.lang/atan2.o(.text+0x9b): undefined reference to `atan'
lib/classpath/java.lang/atan2.o(.text+0x2ff): undefined reference to `atan'
lib/classpath/java.lang/cos.o: In function `Java_java_lang_Math_cos':
lib/classpath/java.lang/cos.o(.text+0x7e): undefined reference to `__ieee754_rem_pio2'
lib/classpath/java.lang/k_rem_pio2.o: In function `__kernel_rem_pio2':
lib/classpath/java.lang/k_rem_pio2.o(.text+0x40d): undefined reference to `scalbn'
lib/classpath/java.lang/k_rem_pio2.o(.text+0x443): undefined reference to `floor'
lib/classpath/java.lang/k_rem_pio2.o(.text+0x81e): undefined reference to `scalbn'
lib/classpath/java.lang/k_rem_pio2.o(.text+0xb24):/pow.o: In function `Java_java_lang_Math_pow':
lib/classpath/java.lang/pow.o(.text+0xe0e): undefined reference to `scalbn'
lib/classpath/java.lang/sin.o: In function `Java_java_lang_Math_sin':
lib/classpath/java.lang/sin.o(.text+0x7e): undefined reference to `__ieee754_rem_pio2'
lib/classpath/java.lang/tan.o: In function `Java_java_lang_Math_tan':
lib/classpath/java.lang/tan.o(.text+0x6e): undefined reference to `__ieee754_rem_pio2'
vm/classfil.o: In function `setupConstantPool':
vm/classfil.o(.text+0x9ab): undefined reference to `pow'
vm/classfil.o(.text+0xc7d): undefined reference to `pow'
vm/threads_native.o: In function `THREAD_WaitOnObject':
vm/threads_native.o(.text+0x7b4): undefined reference to `pthread_mutexattr_setkind_np'
vm/threads_native.o: In function `THREAD_SynchroniseEnter':
vm/threads_native.o(.text+0x9f5): undefined reference to `pthread_mutexattr_setkind_np'
/home/jewel/oskit-install/lib//liboskit_threads.a(pthread_guard.o): In function `pthread_init_guard':
/home/jewel/oskit-20000202/threads/../threads/x86/pthread_guard.c:35: undefined reference to `svm_init'
make: *** [kissmeimage] Error 1
[jewel@svetlana kissme_makeme]$
John
Follow-Ups:
References: