Library dependencies missing: stdlibs in directory

Marcus Hähnel mhaehnel at os.inf.tu-dresden.de
Thu Feb 20 07:53:57 CET 2014


Hi Emanuel,

it looks like you have some very basic misunderstandings of the build 
system. Looking at what the script you used seems to have done I 
recommend starting from scratch, because I suspect you abused the build 
directory to a point where it is no longer worth saving.

You main misunderstanding seems to be the use of the O= / OBJDIR= 
setting. This points to the root of your builddirectory. This means the 
build directory for the whole l4re tree. Not a new one for each package. 
As previous commenters on this thread wrote: when you use a runtime 
environment for another system the build system has to know about all 
the packages you want to use and how to find them.

So please: start from scratch (you can still use your packages you 
wrote of course).

Here are the basic steps you get you started with the runtime (which 
you could also have found at http://os.inf.tu-dresden.de/L4Re). I assume 
you already have a working / built Fiasco.OC kernel.

A) Download L4Re as instructed here: 
http://os.inf.tu-dresden.de/L4Re/download.html (I used the snapshot)
B) Follow the steps at http://os.inf.tu-dresden.de/L4Re/build.html
   1) Extract the source files
   2) Go to the extracted source (l4re-snapshot-2013123021/src/l4)
   3) Execute 'make B=path/to/builddir' with a build dir that is NOT 
inside the source directory!
   4) Execute 'make O=path/to/builddir config' to configure your l4re 
system.
   5) Type 'make O=path/to/builddir' (! in the directory 
'l4re-snapshot-2013123021/src/l4'! You never change directories in these 
steps!!!)
      Let this last step run to completion!! You do not have a working 
L4RE tree if it does not complete successfully.
Now you have a complete and working l4re source tree. You NEVER have to 
touch anything in the build directory.

If you do not want to type the O= part of the make command everytime 
just put that line into 'src/l4/Makeconf.local'. Then it will be added 
automatically.

C) You can now proceed to test your L4Re setup. Provide the file 
src/l4/conf/Makeconf.boot with the correct paths to the fiasco build 
directory (MODULE_SEARCH_PATH and command (QEMU_PATH) respective options 
(QEMU_OPTIONS). Look at  the example file in the same directory for 
verbose information on the config. Start a qemu with fiasco and an 
example application by typing 'make qemu' at the src/l4 directory (if 
you did not follow above advise about Makeconf.local include 
O=path/to/builddir but pointing it to the ROOT of the build dir! No 
fancy directory guessing please!) and selecting the application.

Once this works you can write your own application:

D) 1) Go into src/l4/pkg and make a new directory by doing 'mkdir 
myhello' then change into the new directory.
    2) issue the command '../../mk/tmpl/inst' to instantiate a template 
application. Edit the Control files with the correct
       dependencies (or remove the templates if you do not think you 
need any) and then edit server/src/main.cc at your leisure.
       I just used:
              #include <stdio.h>
              int main(int argc, char **argv)
              {
                 printf("My Hello!");
                 return 0;
              }

    3) To build the new application just issue 'make' (if you did not 
follow above advise about Makeconf.local include O=path/to/builddir but 
pointing it to the ROOT of the build dir! No fancy directory guessing 
please!) .

    4) To have a new configuration in the dialog window of the qemu boot 
to choose from edit src/l4/conf/mdoules.list and add a new entry. I 
used:
    entry myhello
    roottask moe --init=rom/myhello
    module l4re
    module myhello

    5) Now, in src/l4, type 'make qemu' again (if you did not follow 
above advise about Makeconf.local include O=path/to/builddir but 
pointing it to the ROOT of the build dir! No fancy directory guessing 
please!) and you should see your new myhello entry and be able to boot 
it.

I hope this gets you started...

Kind regards,

- Marcus




On 2014-02-19 17:48, Emanuel Berg wrote:
> Björn Döbel <doebel at os.inf.tu-dresden.de> writes:
> 
>> Why not start with a simple L4 application with a
>> rather simple Makefile (e.g., l4/pkg/hello) and copy
>> stuff from there? Basically the answer is that you
>> only have to set the SRC_C/SRC_CC and REQUIRES_LIBS
>> make variables and the build system will do the rest
>> for you.
> 
> If you read the first couple of messages in this very
> thread, you'll see that I have done just that.
> 
> I put some helpers in this file [1] - after setting up
> the src tree, and the obj dir, I had to 'oldconfig',
> then '-j4', and finally 'make'. That it was that
> complicated for just a toy program tells me there is no
> way around it, if I ever am to write a serious
> application, I need to understand the process.
> 
> Now, I have a C++ project, consisting of two files,
> that also has a ned Lua file.
> 
> It has the following includes:
> 
> #include <l4/re/env>
> #include <l4/cxx/ipc_stream>
> #include <l4/re/util/object_registry>
> #include <iostream>
> 
> I have been unable to compile it because I don't know
> what needs to be done. In the code provided, there are
> typically exports, and a module list (the flags in
> 'qhello' of my file, perhaps), use of ned, inclusion of
> the mk file I mentioned earlier, and more, so again, it
> is a bit to much to digest without knowing what it all
> does. A "hit list" (1, 2, 3, done) would be helpful.
> 
>> On the complex lab there are 4 slide sets - the first
>> two might include some useful information about what
>> needs to go into an L4Re Makefile, if that is what
>> you're specifically searching for.
> 
> Yes, but any reading is fine. Right now I don't know
> how to compile. But I'll read anything you suggest.
> 
> [1] http://user.it.uu.se/~embe8573/conf/.zsh/l4.rc




More information about the l4-hackers mailing list