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

Rob Landley rob at landley.net
Sun Aug 17 21:28:27 PDT 2014


On 08/13/2014 06:58 PM, Tim Bird wrote:
> Hey Rob,
> 
> I've been playing around with aboriginal,

Me too. :)

Got my email machine fixed (bad ram), catching up on a week's worth of
messages. Don't remember if I already replied to this one...

> 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:

Fixed in the repository, but there's still some other fallout from
adding musl support that I need to fix before I can cut a release. (I
haven't fully debugged the musl build stuff yet so I need to cut a
release still using uClibc so I don't fall too far behind the kernel
releases, but the new infrastructure that can do musl or uClibc
introduced a couple uClibc regressions I'm still squashing.)

Next release I want to make use of the initmpfs patches I sent upstream
and put simple-root-filesystem in initramfs, and then have the init
script call a splice-toolchain.sh to add the native-compiler stuff into
the $PATH at runtime. (Probably by adding symlinks to the rootfs.)

Longer term I'd like to let the native compiler, the writeable /home
space, and the build control image all live in network filesystems. That
way sh4 would have an easier time getting supported...

> (armv6l:1) /home # ls /usr/src
> MANIFEST       config-linux  hello.cpp thread-hello.c
> config-busybox config-uClibc host-info thread-hello2.c
> 
> 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 -lpthread for that. And thread-hello2.c is the one that proves
thread infrastructure works, the other one's too simple to actually
prove anything. :)

> 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
> 
> using namespace std;
> 
> int main()
> {
>     cout << "hello world" << endl;
>     return 0;
> }

Hmmm, the c++ header path isn't set right. Is this the previous release
(using the old ccwrap) or the current source control version (using the
new ccwrap?) I rewrote this infrastructure recently, and it's entirely
possible I broke the parts I haven't managed to test yet. I keep running
the lfs-bootstrap.hdc build, finding something wrong, fixing that, rinse
repeat.

Kinda slow from my netbook. Nice to have the big machine back, even if
it's only got half the memory right now. (One of the memory sticks went
bad, that's why it was bricked.)

> 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. It's very helpful.

Rob

 1408336107.0


More information about the Aboriginal mailing list