WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: Pesky '#define current' in mini-os/sched.h

To: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
Subject: [Xen-devel] Re: Pesky '#define current' in mini-os/sched.h
From: Ferenc Wagner <wferi@xxxxxxx>
Date: Mon, 27 Apr 2009 22:29:02 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 27 Apr 2009 13:29:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20090427200544.GN5965@xxxxxxxxxxxxxxxxxxxxxxxxx> (Samuel Thibault's message of "Mon, 27 Apr 2009 22:05:44 +0200")
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <87k5563r1v.fsf@xxxxxxxxxxxxx> <20090427182543.GD5965@xxxxxxxxxxxxxxxxxxxxxxxxx> <877i163pga.fsf@xxxxxxxxxxxxx> <20090427185955.GF5965@xxxxxxxxxxxxxxxxxxxxxxxxx> <873abt51e5.fsf@xxxxxxxxxxxxx> <20090427200544.GN5965@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)
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>