[Barrelfish-users] requesting for Help

ben eslami beneslami72 at gmail.com
Sat Jun 2 16:16:26 CEST 2018


Hi again.
I used xmpl-msg. Here is my procedures:
1- ../hake/hake.sh -s .. -a x86_64
2- make x86_64/sbin/examples/xmpl-msg
but in the second stage, I encounter this error which is showed in
attachment.

If someone knows how to fix this, I would appreciate in advance.

On Sat, Jun 2, 2018 at 3:46 PM, ben eslami <beneslami72 at gmail.com> wrote:

>     Hi all,
> I have decided to run simple Hello World program using IDC.
> I follow the document 'TN-018-PracticalGuide' to implement the simple
> scenario. but I have some questions and one problem that I face every time
> I do procedures:
> ------------------------------------------------------------
> ------------------------------------------------------------
> ------------------------------------------------------------
> ------------------------------------------------------------
> -------------------------------
> Question 1:First of all, I've created a folder in usr/ directory called
> myapp. Inside of it, I have some C files and a Hakefile such that :
> myapp.c -> main of my program
> start_server.c -> server code
> start_client.c -> client code
> Hakefile
> and menu.lst.
> Should I type all these C codes just in one file?
> ------------------------------------------------------------
> ------------------------------------------------------------
> ------------------------------------------------------------
> ------------------------------------------------------------
> -------------------------------
> Question 2: I have to include some files to my codes as the document says
> like `barrelfish.h' and 'nameservice_client.h`. As my codes are in
> usr/myapp/ directory, should I include these headers like this
> #include <../../include/barrelfish/barrelfish.h>
> #include <../../include/barrelfish/nameservice_client.h>
> ------------------------------------------------------------
> ------------------------------------------------------------
> ------------------------------------------------------------
> ------------------------------------------------------------
> -------------------------------
> Problem: When I complete all the documents instructions, I run
> `../hake/hake.sh -s .. -a x86_64' in build directory, but I see outputs
> like this:
> Makefile:7127: x86_64/usr/myapp/_for_app_myapp/myapp_flounder_bindings.o.depend:
> No such file or directory
> Makefiel:7221: x86_64/usr/myapp/_for_app_myapp/start_client.o.depend: No
> such file or directory
> Makefiel:7238: x86_64/usr/myapp/_for_app_myapp/start_server.o.depend: No
> such file or directory
> make:*** No rule to make target 'x86_64/include/if/myapp_defs.h', needed
> by 'x86_64/usr/myapp/_for_app_myapp/start_server.o.depend'. stop.
> ------------------------------------------------------------
> ------------------------------------------------------------
> ------------------------------------------------------------
> ------------------------------------------------------------
> -------------------------------
>
>
>
>
> I assume myapp_defs.h is not created when I define an interface called
> hello.if and append "hello"  in if/Hakefile.
> I would be happy if you could help me.
>
> Thank you
>
> On Wed, Apr 4, 2018 at 11:21 AM, Reto Achermann <
> reto.achermann at inf.ethz.ch> wrote:
>
>> Dear Ben,
>>
>> please always write to the list. Answers inline below.
>>
>> -- Reto
>>
>> On 04/03/2018 11:33 AM, ben eslami wrote:
>>
>>>    Dear Reto
>>> I am so sorry to email you directly, but I've stuck in a bad situation.
>>> I understand what you said about running an app on Barrelfish, but there
>>> are still some problems.
>>>
>>> 1- I wrote a Hakefile in 'usr/example/xmpl-hello/Hakefile' like this:
>>> [ build application {target = {"examples/xmpl-hello", cFiles =
>>> ["hello.c"] } }
>>>
>>
>> seems good to me.
>>
>>
>>> 2- I need to tell Hake to include this when building the Makefile. It
>>> means I have to add the created Hakefile to 'platforms/Hakefile' in order
>>> to automatically build the app. So the problem is where should I put the
>>> address of the created Hakefile in 'platform/Hakefile' ? There are several
>>> fields and I can see the address of the created Hakefile in field
>>> 'modules_xmpl'. So I assume there is no need to add anything in
>>> 'platform/Hakefile'. and run '../hake/hake.sh -s .. -a x86_64' in build dir.
>>>
>>
>> Yes, you are right, if you use examples/xmpl-hello, this is already added
>> in modules_xmpl. The command for runnin hake is fine too. Yous should be
>> able to do make x86_64/sbin/examples/xmpl-hello now.
>>
>> In general, for new modules, you can add just them to 'modules_x86_64'.
>> (for x86_64)
>>
>> 3- Weh I run '../hake/hake.sh -s .. -a x86_64' , there is a Makefile
>>> appeared in build directory. I can see the path
>>> './x86_64/usr/examples/xmpl-hello/_for_app_examples/xmpl-hello/hello.o'
>>> and other similar paths for hello.s and hello.o.depend inside Makefile. So
>>> I assume the app is ready to be built. Now I run 'make -j 4 X86_64_Basic'
>>>
>>
>> Not exactly, when you look at the platform directive in the
>> platforms/Hakefile, you see that the 'modules_xmpl' are part of the
>> X86_64_Full. So you need to run make X86_64_Full in order to build the
>> examples.
>>
>>
>>
>>> 4-Now in this stage, I look for built/platform/x86/menu.lst.x86_64, but
>>> there is nothing there until I run 'make qemu_x86_64'. I realized that
>>> menu.lst is built after running 'make qemu_x86_64'. So I open
>>> 'built/platform/x86/menu.lst.x86_64' and add 'module  >
>>>
>> /x86_64/usr/examples/xmpl-hello/_for_app_examples/xmpl-hello
>> /hello.o.depend'.
>>
>> No, you need to add the targets as defined in the hake file.
>>
>> module /x86_64/sbin/examples/xmpl-hello
>>
>> Also note, that make qemu_x86_64 will only build the modules defined in
>> modules_x86_64 and modules_generic.
>>
>>
>>> I understand your instructions as like above but I got nothing. I
>>> was wondering if you could explain in more detail please.
>>>
>>> Regards,
>>> Ben
>>>
>>>
>>> On Mon, Apr 2, 2018 at 11:44 PM, Reto Achermann <
>>> reto.achermann at inf.ethz.ch <mailto:reto.achermann at inf.ethz.ch>> wrote:
>>>
>>>     Dear Ben,
>>>
>>>     When you like run something on Barrelfish a few things need to be in
>>>     place
>>>
>>>     1) You need to write a Hakefile, which contains the target to be
>>>     built and how it is built.
>>>
>>>     2) Then you need to tell Hake to include this when building the
>>>     Makefile, This is done by re-running hake. After this step you can
>>>     actually type 'make x86_64/sbin/<target>' assuming you want to build
>>>     it for x86.
>>>
>>>     2) In order to have it build automatically when you type 'make
>>>     X86_64_Basic' or 'make qemu_x86_64' you need to add it to the list
>>>     of targets in platforms/Hakefile.
>>>
>>>     3) You need to tell grub or qemu to load your binary. For this you
>>>     will need to add it to the menu.lst used by grub or qemu. In case of
>>>     qemu, its located in $build/platforms/x86/ (again for x86 platforms)
>>>
>>>     4) then your program will either run directly after Barrelfish has
>>>     booted or you can type <target> in Fish.
>>>
>>>     -- Reto
>>>
>>>
>>>
>>>     On 02/04/18 18:58, ben eslami wrote:
>>>
>>>         There is some examples in usr/examples/. As a first step, I want
>>>         to run xmpl-hello.
>>>         -what I should do is first I should introduce xmpl-hello to
>>>         Hakefile in platform/Hakefile, but I can see "modules_xmpl" that
>>>         contains all of examples including xmpl-hello. So I assume there
>>>         is no need to add xmpl-hello to the Hakefile. Am I right or not?
>>>         - The second thing I should do is to add "module
>>>         build/x86_64/sbin/examples/xmpl-hello" to
>>>         build/platform/x86/menu.lst.x86_64, but there is nothing in
>>>         build/x86_64/sbin/examples. Should I copy examples from
>>>         usr/examples to build/x86_64/sbin/examples ??
>>>
>>>         Could anyone pleeeaase help me ?
>>>
>>>         On Mon, Apr 2, 2018 at 4:13 PM, ben eslami
>>>         <beneslami72 at gmail.com <mailto:beneslami72 at gmail.com>
>>>         <mailto:beneslami72 at gmail.com <mailto:beneslami72 at gmail.com>>>
>>>         wrote:
>>>
>>>              Hi
>>>              Can anyone please help me to run "hello world" in
>>> BarrelFish?
>>>              I think the tutorial is not up to date.
>>>
>>>              Thanks
>>>
>>>              On Sat, Mar 17, 2018 at 6:13 PM, ben eslami
>>>         <beneslami72 at gmail.com <mailto:beneslami72 at gmail.com>
>>>              <mailto:beneslami72 at gmail.com
>>>         <mailto:beneslami72 at gmail.com>>> wrote:
>>>
>>>                  -in the file platform/Hakefile, there are some
>>>         sections. In section of
>>>                  modules_common, I should add the following line
>>>                  "/sbin/examples/xmpl-hello", but in section
>>>         modules_xmpl, the mentioned
>>>                  line exists. Is this correct or I should add in the
>>>         sections of
>>>                  "modules_common" and "modules_x86_64"
>>>
>>>                  -in the file build/platform/x86/menu.lst.x86_64, I
>>>         added the following
>>>                  line " module /x86_64/sbin/examples/xmpl-hello in the
>>>         General user
>>>                  domain section.
>>>
>>>                  "../hake/hake.sh -s .. -a x86_64" and "make -j 4
>>>         X86_64_Basic" are run
>>>                  without error. But "make qemu_x86_64" encounters this
>>>         error:
>>>                  Failed to open file 'x86_64/sbin/examples/xmpl-hello
>>>
>>>                  what should I do now ?
>>>
>>>                  On Sat, Mar 17, 2018 at 3:00 PM, Joel Busch
>>>         <buschjo at student.ethz.ch <mailto:buschjo at student.ethz.ch>
>>>                  <mailto:buschjo at student.ethz.ch
>>>
>>>         <mailto:buschjo at student.ethz.ch>>> wrote:
>>>
>>>                      Hello Ben
>>>
>>>                      This is actually one I can help with I think,
>>>         because I ran into
>>>                      some of the same roadblocks.
>>>
>>>         symbolic_targets.mk <http://symbolic_targets.mk>
>>>         <http://symbolic_targets.mk> does no longer
>>>                      exists, instead you can add modules to the file
>>>         platforms/Hakefile
>>>                      there are different sections just make sure you use
>>>         the one that's
>>>                      generic or the one specific to the architecture you
>>>         want to run on.
>>>
>>>                      The menu.lst is now platform specific and you can
>>>         either change the
>>>                      one generated during hake in
>>>         build/platforms/<arch>/menu.ls <http://menu.ls>
>>>                      <http://menu.ls>t.<plat> or the one that is read
>>>         during the hake
>>>                      process in hake/menu.lst.<plat>, in your case
>>>         <arch> is x86 and
>>>                      <plat> is x86_64.
>>>
>>>                      And yes the make target sim doesn't exist anymore
>>>         and qemu_x86_64 is
>>>                      what you want to use instead.
>>>
>>>                      Best Regards,
>>>                      Joel Busch
>>>
>>>
>>>                      On 17.03.2018 11:10, ben eslami wrote:
>>>
>>>                          Dear folks,
>>>                          -after booting Barrelfish, I tend to run "hello
>>>             world". According
>>>                          to
>>>             "http://wiki.barrelfish.org/Programming_for_Barrelfish
>>>             <http://wiki.barrelfish.org/Programming_for_Barrelfish>
>>>                                     <http://wiki.barrelfish.org/Pr
>>> ogramming_for_Barrelfish
>>>             <http://wiki.barrelfish.org/Programming_for_Barrelfish>>",
>>>             To get
>>>                          Hake to include a target for the hello world
>>>             program in the
>>>                          generated Makefile, we must first add the
>>>             target to the
>>>             symbolic_targets.mk <http://symbolic_targets.mk>
>>>             <http://symbolic_targets.mk> file, located in
>>>                          the build directory. But I don't have this
>>>             file. should I create
>>>                          it first?
>>>
>>>                          -Suppose I created "symbolic_targets.mk
>>>             <http://symbolic_targets.mk>
>>>                          <http://symbolic_targets.mk>" in build/ , then
>>>             I did
>>>                          "../hake/hake.sh -s .. -a  x86_64" in build/
>>>             directory. After
>>>                          this, i run "make -j 8 X86_64_Basic" to compile
>>>             Hello World file.
>>>                          But fir I should append "module
>>>             /x86_64/sbin/examples/xmpl-hello"
>>>                          in menu.lst, but I don't see any file named
>>>             menu.lst either.
>>>                          Should I create this first also ?
>>>
>>>                          -After all of these, I should run make sim.
>>>             Does this mean that I
>>>                          should run "make qemu_x86_64?
>>>
>>>                          Thank you
>>>
>>>
>>>
>>>
>>>                          _______________________________________________
>>>                          Barrelfish-users mailing list
>>>             Barrelfish-users at lists.inf.ethz.ch
>>>             <mailto:Barrelfish-users at lists.inf.ethz.ch>
>>>                          <mailto:Barrelfish-users at lists.inf.ethz.ch
>>>             <mailto:Barrelfish-users at lists.inf.ethz.ch>>
>>>             https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users
>>>             <https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users
>>> >
>>>                                     <https://lists.inf.ethz.ch/mai
>>> lman/listinfo/barrelfish-users
>>>             <https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users
>>> >>
>>>
>>>
>>>
>>>                      _______________________________________________
>>>                      Barrelfish-users mailing list
>>>         Barrelfish-users at lists.inf.ethz.ch
>>>         <mailto:Barrelfish-users at lists.inf.ethz.ch>
>>>                      <mailto:Barrelfish-users at lists.inf.ethz.ch
>>>         <mailto:Barrelfish-users at lists.inf.ethz.ch>>
>>>         https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users
>>>         <https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users>
>>>                             <https://lists.inf.ethz.ch/mai
>>> lman/listinfo/barrelfish-users
>>>         <https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>         _______________________________________________
>>>         Barrelfish-users mailing list
>>>         Barrelfish-users at lists.inf.ethz.ch
>>>         <mailto:Barrelfish-users at lists.inf.ethz.ch>
>>>         https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users
>>>         <https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users>
>>>
>>>
>>>
>> --
>> Reto Achermann,
>> http://people.inf.ethz.ch/acreto
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/barrelfish-users/attachments/20180602/35b063a7/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BF.JPG
Type: image/jpeg
Size: 54077 bytes
Desc: not available
URL: <http://lists.inf.ethz.ch/pipermail/barrelfish-users/attachments/20180602/35b063a7/attachment-0001.jpe>


More information about the Barrelfish-users mailing list