xen-devel
[Xen-devel] Re: Pesky '#define current' in mini-os/sched.h
Samuel Thibault <samuel.thibault@xxxxxxxxxxxx> writes:
> Ferenc Wagner, le Mon 27 Apr 2009 21:42:42 +0200, a écrit :
>
>> Of course if I add -lncurses to the above command, I get lots of
>> undefined references to the libc functions from ncurses.
>
> Which ones?
/home/wferi/xen/xen-3.3.1/stubdom/ncurses-x86_32/ncurses/../ncurses/./base/lib_color.c:265:
undefined reference to `calloc'
etc.
No wonder, as the linker command originally had a single object
(mini-os.o), and if I put -lncurses before it, it wasn't pulled in,
and if I put -lncurses after it, then every single libc function
became undefined.
> Adding -lncurses really is the correct way, just like is done for
> libpci & libz for qemu-stubdom.
Yes, but I tried the crazy way first, which was bound to fail. Setting
LDLIBS := -L/home/wferi/xen/xen-3.3.1/stubdom/ncurses-x86_32/lib -lncurses
in mini-os/Makefile got me further, but may still not be the correct
way. I couldn't track how it's done for libpci & libz for
qemu-stubdom (ioemu?) yet. This make magic is somewhat convoluted,
and I'm not too much into linker scripts et al.
So, where should I add it for proper operation?
Anyway, now I'm down to
/home/wferi/xen/xen-3.3.1/stubdom/mini-os-x86_32-c/mini-os.o: In function
`grub_memalign':
/home/wferi/xen/grub2/util/misc.c:263: undefined reference to `posix_memalign'
/home/wferi/xen/xen-3.3.1/stubdom/mini-os-x86_32-c/mini-os.o: In function
`find_root_device':
/home/wferi/xen/grub2/util/getroot.c:215: undefined reference to `lstat'
/home/wferi/xen/xen-3.3.1/stubdom/mini-os-x86_32-c/mini-os.o: In function
`tstp':
/home/wferi/xen/xen-3.3.1/stubdom/ncurses-x86_32/ncurses/../ncurses/./tty/lib_tstp.c:159:
undefined reference to `tcgetpgrp'
/home/wferi/xen/xen-3.3.1/stubdom/ncurses-x86_32/ncurses/../ncurses/./tty/lib_tstp.c:159:
undefined reference to `getpgrp'
/home/wferi/xen/xen-3.3.1/stubdom/mini-os-x86_32-c/mini-os.o: In function
`baudrate':
/home/wferi/xen/xen-3.3.1/stubdom/ncurses-x86_32/ncurses/../ncurses/./tinfo/lib_baudrate.c:244:
undefined reference to `cfgetospeed'
/home/wferi/xen/xen-3.3.1/stubdom/mini-os-x86_32-c/mini-os.o: In function
`flushinp':
/home/wferi/xen/xen-3.3.1/stubdom/ncurses-x86_32/ncurses/../ncurses/./tinfo/lib_kernel.c:143:
undefined reference to `tcflush'
/home/wferi/xen/xen-3.3.1/stubdom/mini-os-x86_32-c/mini-os.o: In function
`_nc_vdisable':
/home/wferi/xen/xen-3.3.1/stubdom/ncurses-x86_32/ncurses/../ncurses/./tinfo/lib_kernel.c:67:
undefined reference to `fpathconf'
/home/wferi/xen/xen-3.3.1/stubdom/mini-os-x86_32-c/mini-os.o: In function
`_nc_access':
/home/wferi/xen/xen-3.3.1/stubdom/ncurses-x86_32/ncurses/../ncurses/./tinfo/access.c:112:
undefined reference to `access'
/home/wferi/xen/xen-3.3.1/stubdom/ncurses-x86_32/ncurses/../ncurses/./tinfo/access.c:125:
undefined reference to `access'
make[1]: *** [/home/wferi/xen/xen-3.3.1/stubdom/mini-os-x86_32-c/mini-os] Error
1
make[1]: Leaving directory `/home/wferi/xen/xen-3.3.1/extras/mini-os'
make: *** [c-stubdom] Error 2
for grub-emu, which may be far or close, I don't know yet...
--
Thank,
Feri.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] Re: Pesky '#define current' in mini-os/sched.h, (continued)
- [Xen-devel] Re: Pesky '#define current' in mini-os/sched.h, Samuel Thibault
- [Xen-devel] Re: Pesky '#define current' in mini-os/sched.h,
Ferenc Wagner <=
- [Xen-devel] Re: Pesky '#define current' in mini-os/sched.h, Samuel Thibault
- [Xen-devel] Re: Pesky '#define current' in mini-os/sched.h, Ferenc Wagner
- [Xen-devel] Re: Pesky '#define current' in mini-os/sched.h, Samuel Thibault
- [Xen-devel] Re: Pesky '#define current' in mini-os/sched.h, Ferenc Wagner
- [Xen-devel] Re: Pesky '#define current' in mini-os/sched.h, Samuel Thibault
- [Xen-devel] Re: Pesky '#define current' in mini-os/sched.h, Ferenc Wagner
- [Xen-devel] Re: Pesky '#define current' in mini-os/sched.h, Samuel Thibault
- Re: [Xen-devel] Re: Pesky '#define current' in mini-os/sched.h, Samuel Thibault
- [Xen-devel] Re: Pesky '#define current' in mini-os/sched.h, Ferenc Wagner
- [Xen-devel] Re: Pesky '#define current' in mini-os/sched.h, Samuel Thibault
|
|
|