Skip to contentSkip to conversation

Progress with -bb4.

uml-devel Rob Landley 2 participants 2 messages Jan 15, 2005 – Jan 19, 2005 User-mode Linux (UML)

lore
Share & tools
lore
#0 lore raw

Running ptrace under uml found the problem with gcc: UML's default environment includes "." at the end of $PATH, and if you have that gcc doesn't search the path for ld.

So I took "." out of the path, and it started working. Yay! (Cool stuff, guys.)

Along the way, I found some interesting quirks:

1) I mentioned the gratuitous use of perl earlier. This is only for --show-config, which could A) be replaced by a sed script, B) should presumably be wrapped in CONFIG_IKCONFIG anyway.

I ripped it out of the makefile and it built fine without it. I'll see about patching the makefile with the sed thing and/or the CONFIG option this weekend, although I'm not good at makefiles...

2) Building under uclibc dies with a conflicting definition error, due to arch/um/include/user.h containing "extern int strlcpy(char *, const char *, int);", when uclibc's string.h contains:

extern size_t strlcpy(char *__restrict dst, const char *__restrict src,

                      size_t n) __THROW;

I yanked the strlcpy line from arch/um/include/user.h and everything built fine without it (didn't even see any new warnings), both under both uclibc (more or less 0.9.27, a cvs snapshot a couple weeks before release) and glibc (knoppix 3.6, comes with glibc 2.3.2), possibly because it's still in include/linux/string.h...

The resulting uclibc binaries seemed to work fine in both environments. I could even run the uclibc one from within the uclibc chroot environment via "./vmlinux rootfs=hostfs rootflags=/ rw init=/bin/sh" and it behaved pretty well. (Overmount /proc and /dev/pts and life is good...)

3) Running my big build script, it hangs between ./configure and make of binutils. No idea why yet. Just sits there spinning, with vmlinux eating 100% of the CPU, and if you leave it for half an hour it still won't advance, and this is something that should only take a second or so...

4) I can get all sorts of things to segfault under uclibc with ptrace -f. For example, just try ptrace -f on a shellscript and watch the segfaults fly. Is it just me?

#4 makes #3 a bit harder to debug.

I'll try upgrading to -bs5 and see if that makes anything better.

Query: is a 2.6.10-bb likely in future, or should I just try -bk or -mm or some such?

Rob

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#1 lore raw
Quoted 11 lines · Rob Landley

Running ptrace under uml found the problem with gcc: UML's default environment includes "." at the end of $PATH, and if you have that gcc doesn't search the path for ld.

So I took "." out of the path, and it started working. Yay! (Cool stuff, guys.)

Along the way, I found some interesting quirks:

1) I mentioned the gratuitous use of perl earlier. This is only for --show-config, which could A) be replaced by a sed script,

I've just answered with a patch.

Quoted 2 lines

B) should
presumably be wrapped in CONFIG_IKCONFIG anyway.

No, no more possible - I planned doing that but then the plain-text version went away... in the kernel normally only the gzip'ed version is saved.

Quoted 8 lines

I ripped it out of the makefile and it built fine without it. I'll see about patching the makefile with the sed thing and/or the CONFIG option this weekend, although I'm not good at makefiles...

2) Building under uclibc dies with a conflicting definition error, due to arch/um/include/user.h containing "extern int strlcpy(char *, const char *, int);", when uclibc's string.h contains:

Quoted 8 lines

extern size_t strlcpy(char *__restrict dst, const char *__restrict src,

                      size_t n) __THROW;

I yanked the strlcpy line from arch/um/include/user.h and everything built fine without it (didn't even see any new warnings), both under both uclibc (more or less 0.9.27, a cvs snapshot a couple weeks before release) and glibc (knoppix 3.6, comes with glibc 2.3.2), possibly because it's still in include/linux/string.h...

More likely because it's not used in UML "userspace" code - it cannot include include/linux/string.h (it could include the host's version, but I don't think it will do this for <linux/string.h> - it's unlikely).

Quoted 9 lines

The resulting uclibc binaries seemed to work fine in both environments. I could even run the uclibc one from within the uclibc chroot environment via "./vmlinux rootfs=hostfs rootflags=/ rw init=/bin/sh" and it behaved pretty well. (Overmount /proc and /dev/pts and life is good...)

3) Running my big build script, it hangs between ./configure and make of binutils. No idea why yet. Just sits there spinning, with vmlinux eating 100% of the CPU, and if you leave it for half an hour it still won't advance, and this is something that should only take a second or so...

Well, try doing things at hand, and using sh -x (or the new bash-debugging of 3.0, I've not yet learned it but it could be useful maybe).

Quoted 1 line

4) I can get all sorts of things to segfault under uclibc with ptrace -f.

You mean strace, right?

Quoted 2 lines

For example, just try ptrace -f on a shellscript and watch the segfaults fly. Is it just me?

No, it's me too, but I never got to understanding what's going on there.

Quoted 3 lines

#4 makes #3 a bit harder to debug.

I'll try upgrading to -bs5 and see if that makes anything better.

Well, I don't think -bs5 it's worth the effort - the problems fixed from -bb4 likely don't affect you in this case (they cause early breakage in the boot).

Quoted 2 lines

Query: is a 2.6.10-bb likely in future, or should I just try -bk or -mm or some such?

Watch the site, there will be upgrades on this... raw 2.6.10 isn't good for UML... however the first 2.6.10-bb probably won't be better / stabler than 2.6.9-bb, at least until the issue you are experiencing won't be debugged...

Signature · 14 lines
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel