[Aboriginal] /usr/src <-> README mismatch

Rob Landley rob at landley.net
Thu Aug 14 13:59:14 PDT 2014


On Wed, Aug 13, 2014 at 6:58 PM, Tim Bird <tbird20d at gmail.com> wrote:
> Hey Rob,

Hello. I just posted over on the toybox list about my email+backup
machine having died tuesday. (In the past month my house got flooded,
the dog suddenly died... honestly I'm expecting something to eat my
homework any day now. This would sound like a horrible array of
excuses except it KEEPS HAPPENING TO ME. Grrr.)

Oh, and the kernel guys went INSANE and checked in commit 5d2acfc7b974
which breaks THE VERY IDEA OF MINICONFIG. So I have to revert that to
get a release out. That took a while to bisect.

(And I completely rewrote your find.c submission, FYI.)

> I've been playing around with aboriginal, and I noticed a discrepancy between
> the contents of /usr/src (for system-image-armv6l) and the online README.
>
> The README says you can do:
>
> cc /usr/src/hello.c
>
> but there is no hello.c in /usr/src:
>
> (armv6l:1) /home # ls /usr/src
> MANIFEST       config-linux  hello.cpp thread-hello.c
> config-busybox config-uClibc host-info thread-hello2.c

Sigh. There should be one.

I 99% of the time test with thread-hello2.c, which is a threaded hello
world program that actually tests mutex and event semaphores to pass
the string to be printed through a shared memory mailbox. (It doesn't
test TLS, but gets all the the pthreads stuff.)

> I tried "cc /usr/src/thread-hello.c" and got the following:
>
> (armv6l:1) /home # cc /usr/src/thread-hello.c
> /tmp/cc42f7aq.o: In function `main':
> thread-hello.c:(.text+0x58): undefined reference to `pthread_create'

You need to do:

cc thread-hello2.c -lpthread

> I tried "cpp /usr/src/hello.cpp", and got this:
>
> /home # cpp /usr/src/hello.cpp
> # 1 "/usr/src/hello.cpp"
> # 1 "<built-in>"
> # 1 "<command-line>"
> # 1 "/usr/src/hello.cpp"
> /usr/src/hello.cpp:1:20: error: iostream: No such file or directory

Huh. Ok, _that_ should be working. New wrapper has to be getting the
search paths wrong. I'll add it to the todo heap. Thanks.

> using namespace std;
>
> int main()
> {
>     cout << "hello world" << endl;
>     return 0;
> }
>
> I wrote my own hello.c in my home directory, and things worked fine.
>
> None of this is major stuff - just a slight discrepancy between the image
> contents and the README, but I thought I'd report it anyhow.

Thanks. There's been a certain amount of bit-rot along the way. Toybox
has been eating all my time, and what time I've had for aboriginal has
been taken over by the musl switchover.

Which is like 80% done: you can build a musl version for most targets
by commenting out the UCLIBC_CONFIG stanza in the appropriate target
file. (Before release I should add a MUSL=1 thing to configure so you
can trigger that without having to edit the target file.)

Unfortunately I can't switch over to musl this release because the
toolchain isn't honoring -Bsymbolic-functions and that means building
anything more complicated than hello world gets confused for reasons I
have to go re-read the explanation for every time I try to fix them
(ask Rich Felker, I.E. dalias on freenode), and some targets (ala
http://landley.net/notes.html#03-07-2014) don't work at all.

So yeah: I was debugging the new "find.c" forever (lots tricksy corner
cases), and debugging musl forever, and debugging the 3.15 kernel
which despite http://lists.landley.net/pipermail/aboriginal-landley.net/2014-July/001402.html
doesn't give me a serial console on i586 unless I fix the config thing
above...

> Thanks for all your great work!
>
>  -- Tim Bird
> Senior Software Engineer, Sony Mobile
> Architecture Group Chair, CE Workgroup, Linux Foundation

I'm glad you're finding it useful. I'm coding as fast as I can...

Speaking of which, I'm honestly tempted to apply for
http://www.openbsdfoundation.org/gsoc2014.html#systemd since it's
something I have to do for toybox _anyway_ and having somebody mentor
me with what they actually need the result to _do_ would save a lot of
time...

(Someday, LFS build update! Honest and truly, it is a thing I mean to do...)

Rob

 1408049954.0


More information about the Aboriginal mailing list