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

Re: linking to Math library with OSKit 20000202



> The math library is liboskit_freebsd_m.a
> 
> You still seem to have both the freebsd C library and the minimal C
> library, -loskit_freebsd_c and -loskit_c above.

With the following link command:

kissmeimage: /home/jewel/oskit-install/lib/oskit/multiboot.o $(DEPENDLIBS) 
$(MYOBJECTS)
        $(LD) -Ttext 100000 $(LDFLAGS) $(OSKIT_LDFLAGS) \
        -o $@ $(filter-out %.a,$^) \
        -loskit_clientos -loskit_startup -loskit_com -loskit_freebsd_c
	-loskit_kern -loskit_fsnamespace -loskit_memfs -loskit_lmm /home/jewel/oskit-install/lib/oskit/crtn.o -loskit_posix
	-loskit_freebsd_dev  -loskit_freebsd_m

I get errors for missing pthread functions (as expected), but I also have
errors for:


home/jewel/oskit-20000202/kern/../kern/x86/pc/base_console_init.c:141:
undefined reference to `getenv'
/home/jewel/oskit-20000202/kern/../kern/x86/pc/base_console_init.c:142:
undefined reference to `atol'
/home/jewel/oskit-20000202/kern/../kern/x86/pc/base_multiboot_main.c:92:
undefined reference to `environ'
/home/jewel/oskit-20000202/kern/../kern/x86/pc/base_multiboot_main.c:68:
undefined reference to `strtoul'
/home/jewel/oskit-install/lib//liboskit_kern.a(com_console.o): In function
`cons_getchar':
/home/jewel/oskit-20000202/kern/../kern/x86/pc/com_console.c:27: undefined
reference to `oskit_trivial_stream_ops'
/home/jewel/oskit-install/lib//liboskit_kern.a(direct_console.o): In
function `direct_console_init':
/home/jewel/oskit-20000202/kern/../kern/x86/pc/direct_console.c:45:
undefined reference to `oskit_trivial_stream_ops'
/home/jewel/oskit-install/lib//liboskit_kern.a(gdb_serial.o): In function
`gdb_serial_converse': 


When I link against -loskit_c as well as -loskit_freebsd_c these go away
and I am left with only the pthread references.

When add -loskit_threads, I get:


kissmeimage: /home/jewel/oskit-install/lib/oskit/multiboot.o $(DEPENDLIBS)
$(MYOBJECTS)
        $(LD) -Ttext 100000 $(LDFLAGS) $(OSKIT_LDFLAGS) \
        -o $@ $(filter-out %.a,$^) \
        -loskit_clientos -loskit_startup -loskit_com -loskit_freebsd_c
-loskit_kern -loskit_fsnamespace -loskit_memfs -los\ kit_lmm
/home/jewel/oskit-install/lib/oskit/crtn.o -loskit_posix
-loskit_freebsd_dev -loskit_freebsd_m -loskit_c -loskit_threads  


/home/jewel/oskit-install/lib//liboskit_threads.a(pthread_cond.o): In
function `pthread_cond_destroy':
/home/jewel/oskit-20000202/threads/pthread_cond.c:68: undefined reference
to `osenv_intr_enabled'
/home/jewel/oskit-20000202/threads/pthread_cond.c:104: undefined reference
to `osenv_intr_disable'
/home/jewel/oskit-20000202/threads/pthread_cond.c:220: undefined reference
to `oskit_system_clock'
/home/jewel/oskit-20000202/threads/../threads/x86/pthread_guard.c:35:
undefined reference to `svm_init'
/home/jewel/oskit-20000202/threads/pthread_init.c:104: undefined reference
to `oskit_init_libc'
/home/jewel/oskit-20000202/threads/pthread_init.c:105: undefined reference
to `oskit_clock_init'
/home/jewel/oskit-20000202/threads/pthread_init.c:187: undefined reference
to `osenv_timer_register'



What is missing here?

> I once tried using the freebsd math library with the minimal C library.
> I decided the freebsd math library depended too heavily on the freebsd
> C libray, so I switched C libraries.
> 
> PS. If I'm treading on any toes by trying to answer questions like this
>     then please say!

No, I appreciate your help very much!

Am I using functions that are missing in the FBSD library but present in
the minimal library?

John



References: