hi,
I'm trying to build a new package following the instructions from the snapshot page [1]. However it fails (error message below).
steps:
1. download / extract the l4re-snapshot-25.03.0 snapshot
2. make setup (for the ia32 target) && make the hello world qemu example works correctly
3. add a new package, following instructions from "Adding your own code" [1] (of course the path placeholders are modified)
/tmp/myfirstpkg/Makefile ``` PKGDIR ?= . L4DIR ?= PATH/TO/SNAPSHOT/src/l4 TARGET = myfirstprogram SRC_C = main.c include $(L4DIR)/mk/prog.mk ```
/tmp/myfirstpkg/main.c ``` #include <stdio.h>
int main(void) { printf("Hello!\n"); return 0; } ```
4. and try to build it
$ cd myfirstpkg $ make O=/PATH/TO/SNAPSHOT/obj/l4/x86
error output:
[myfirstpkg] ... Building Dependencies path/to/src/l4/mk/binary.inc:396: *** /tmp/myfirstpkg/Makefile: 'stdlibs compiler-rt' in REQUIRES_LIBS in Makefile but not in Control file requires. Stop. make: *** [path/to/src/l4/mk/binary.inc:195: path/to/obj/l4/x86/ext-pkg/tmp/myfirstpkg/OBJ-x86_gen-std-l4f] Error 2
I attempted to add file `Control` to the package root conataining the following but it doesn't work.
requires: stdlibs compiler-rt
Am I doing anything wrong in adding a new package? Sorry for the newbie question, I'm learning L4RE :)
cheers, wth
[1] https://os.inf.tu-dresden.de/download/snapshots/
Hi,
On 2025-05-20 18:56, Tianhao Wang via l4-hackers wrote:
[…] 4. and try to build it
$ cd myfirstpkg $ make O=/PATH/TO/SNAPSHOT/obj/l4/x86error output:
[myfirstpkg] ... Building Dependencies path/to/src/l4/mk/binary.inc:396: *** /tmp/myfirstpkg/Makefile:'stdlibs compiler-rt' in REQUIRES_LIBS in Makefile but not in Control file requires. Stop. make: *** [path/to/src/l4/mk/binary.inc:195: path/to/obj/l4/x86/ext-pkg/tmp/myfirstpkg/OBJ-x86_gen-std-l4f] Error 2
I attempted to add file `Control` to the package root conataining the following but it doesn't work.
requires: stdlibs compiler-rtAm I doing anything wrong in adding a new package? Sorry for the newbie question, I'm learning L4RE :)
You actually did the right thing here! stdlibs should even suffice, since it pulls in the compiler-rt. However, for the L4Re buildsystem to pick up the new Control file you need to call make from the root directory of your l4re source tree at least once. An oldconfig should suffice to rebuild the dependency structure.
So just call `make oldconfig` in the directory `path/to/src/l4/` and you should be all set.
I hope that helped! I'll think about if I can improve that error message and / or maybe make this more intuitive and automated.
Best regards and have fun trying out L4Re!
- Marcus
PS: Also have a look on l4re.org! We have guides and first steps added there that can often help. And if not please let us know what you are missing.
cheers, wth
FYI: We were also bitten by this. We had to reinstall the OS and switch to Mint to make it go away. Perhaps consider a fix that will make the error unnecessary. KISS Principle should apply everywhere!
Richard
-----Original Message----- From: Marcus Hähnel marcus+l4@distos.org Sent: Wednesday, May 21, 2025 3:53 AM To: Tianhao Wang shrik3@mailbox.org Cc: l4-hackers@os.inf.tu-dresden.de Subject: Re: fail to build package with l4re snapshot
Hi,
On 2025-05-20 18:56, Tianhao Wang via l4-hackers wrote:
[…] 4. and try to build it
$ cd myfirstpkg $ make O=/PATH/TO/SNAPSHOT/obj/l4/x86error output:
[myfirstpkg] ... Building Dependencies path/to/src/l4/mk/binary.inc:396: *** /tmp/myfirstpkg/Makefile:'stdlibs compiler-rt' in REQUIRES_LIBS in Makefile but not in Control file requires. Stop. make: *** [path/to/src/l4/mk/binary.inc:195: path/to/obj/l4/x86/ext-pkg/tmp/myfirstpkg/OBJ-x86_gen-std-l4f] Error 2
I attempted to add file `Control` to the package root conataining the following but it doesn't work.
requires: stdlibs compiler-rtAm I doing anything wrong in adding a new package? Sorry for the newbie question, I'm learning L4RE :)
You actually did the right thing here! stdlibs should even suffice, since it pulls in the compiler-rt. However, for the L4Re buildsystem to pick up the new Control file you need to call make from the root directory of your l4re source tree at least once. An oldconfig should suffice to rebuild the dependency structure.
So just call `make oldconfig` in the directory `path/to/src/l4/` and you should be all set.
I hope that helped! I'll think about if I can improve that error message and / or maybe make this more intuitive and automated.
Best regards and have fun trying out L4Re!
- Marcus
PS: Also have a look on l4re.org! We have guides and first steps added there that can often help. And if not please let us know what you are missing.
cheers, wth
_______________________________________________ l4-hackers mailing list -- l4-hackers@os.inf.tu-dresden.de To unsubscribe send an email to l4-hackers-leave@os.inf.tu-dresden.de
Hi Richard,
On 2025-05-21 13:34, Richard Clark wrote:
FYI: We were also bitten by this. We had to reinstall the OS and switch to Mint to make it go away. Perhaps consider a fix that will make the error unnecessary. KISS Principle should apply everywhere!
A reinstall wouldn't have been necessary (let alone switching distributions). Just calling `make` from the root of the source (or object) trees would have sufficed. The error itself is actually a useful feature because it prevents sporadic bogus errors on highly parallel builds, if people forget to specify dependencies in the Control file.
However, seeing that this check is causing more issues than it solves I decided to restrict it to those global builds. There it is always ensured that the dependency graph is up-to-date anyways. And there is no expectation that dependencies are automatically build.
So that should restrict the error to cases where there really might be a problem. The change will likely hit the public release in a few days after finalizing internal review and QA.
Best regards,
- Marcus
Richard
-----Original Message----- From: Marcus Hähnel marcus+l4@distos.org Sent: Wednesday, May 21, 2025 3:53 AM To: Tianhao Wang shrik3@mailbox.org Cc: l4-hackers@os.inf.tu-dresden.de Subject: Re: fail to build package with l4re snapshot
Hi,
On 2025-05-20 18:56, Tianhao Wang via l4-hackers wrote:
[…] 4. and try to build it
$ cd myfirstpkg $ make O=/PATH/TO/SNAPSHOT/obj/l4/x86error output:
[myfirstpkg] ... Building Dependencies path/to/src/l4/mk/binary.inc:396: *** /tmp/myfirstpkg/Makefile:'stdlibs compiler-rt' in REQUIRES_LIBS in Makefile but not in Control file requires. Stop. make: *** [path/to/src/l4/mk/binary.inc:195: path/to/obj/l4/x86/ext-pkg/tmp/myfirstpkg/OBJ-x86_gen-std-l4f] Error 2
I attempted to add file `Control` to the package root conataining the following but it doesn't work.
requires: stdlibs compiler-rtAm I doing anything wrong in adding a new package? Sorry for the newbie question, I'm learning L4RE :)
You actually did the right thing here! stdlibs should even suffice, since it pulls in the compiler-rt. However, for the L4Re buildsystem to pick up the new Control file you need to call make from the root directory of your l4re source tree at least once. An oldconfig should suffice to rebuild the dependency structure.
So just call `make oldconfig` in the directory `path/to/src/l4/` and you should be all set.
I hope that helped! I'll think about if I can improve that error message and / or maybe make this more intuitive and automated.
Best regards and have fun trying out L4Re!
- Marcus
PS: Also have a look on l4re.org! We have guides and first steps added there that can often help. And if not please let us know what you are missing.
cheers, wth
l4-hackers mailing list -- l4-hackers@os.inf.tu-dresden.de To unsubscribe send an email to l4-hackers-leave@os.inf.tu-dresden.de
Hi,
On Wed May 21, 2025 at 9:52 AM CEST, Marcus Hähnel wrote:
[...] However, for the L4Re buildsystem to pick up the new Control file you need to call make from the root directory of your l4re source tree at least once. An oldconfig should suffice to rebuild the dependency structure.
So just call `make oldconfig` in the directory `path/to/src/l4/` and you should be all set.
This works for me, thanks! But if I understand correctly, this only covers packages defined under `src/l4/pkg/`
How to do the same when the new package is defined outside of the l4re tree, which is recommended by the docs? e.g.
l4re-snapshot # make setup && make ├── obj │ ├── fiasco │ └── l4 │ └── x86 # the l4 build dir └── src ├── fiasco └── l4 # make O=<obj/l4/x86> oldconfig
mypkg # make O=<obj/l4/x86> ---> ERROR ├── Control ├── main.c └── Makefile
have fun trying out L4Re!
I certainly do!
cheers
Hi,
On 2025-05-22 15:25, Tianhao Wang wrote:
How to do the same when the new package is defined outside of the l4re tree, which is recommended by the docs? e.g.
l4re-snapshot # make setup && make ├── obj │ ├── fiasco │ └── l4 │ └── x86 # the l4 build dir └── src ├── fiasco └── l4 # make O=<obj/l4/x86> oldconfig
mypkg # make O=<obj/l4/x86> ---> ERROR ├── Control ├── main.c └── Makefile
Packages that are outside the L4Re source tree are, by default, already excluded from the Control file consistency check since the concept of build order doesn't make much sense for packages that are built in isolation. So that error should not happen there. What is the error you see? Did you set the L4DIR correctly (which is required for the package to find the L4Re buildsystem)?
Best regards,
- Marcus
On Thu May 22, 2025 at 3:51 PM CEST, Marcus Hähnel wrote:
Hi,
On 2025-05-22 15:25, Tianhao Wang wrote:
How to do the same when the new package is defined outside of the l4re tree, which is recommended by the docs? e.g.
l4re-snapshot # make setup && make ├── obj │ ├── fiasco │ └── l4 │ └── x86 # the l4 build dir └── src ├── fiasco └── l4 # make O=<obj/l4/x86> oldconfig
mypkg # make O=<obj/l4/x86> ---> ERROR ├── Control ├── main.c └── Makefile
Packages that are outside the L4Re source tree are, by default, already excluded from the Control file consistency check since the concept of build order doesn't make much sense for packages that are built in isolation. So that error should not happen there. What is the error you see? Did you set the L4DIR correctly (which is required for the package to find the L4Re buildsystem)?
So in this case the Control file should not be needed right?
Here is the Makefile:
``` PKGDIR ?= . L4DIR ?= /path/to/l4re-snapshot-25.03.0/src/l4
TARGET = myfirstprogram SRC_C = main.c
include $(L4DIR)/mk/prog.mk ```
build commands and error
``` # in snapshot root: make setup make
# in /tmp/testpkg/ make O=PATH/TO/OBJ/L4
# error (same as before) path/to/src/l4/mk/binary.inc:396: *** /tmp/testpkg/Makefile: 'stdlibs compiler-rt' in REQUIRES_LIBS in Makefile but not in Control file requires. Stop.
make: *** [/path/to/l4re-snapshot-25.03.0/src/l4/mk/binary.inc:195: /path/to/l4re-snapshot-25.03.0/obj/l4/x86/ext-pkg/tmp/testpkg/OBJ-x86_gen-std-l4f] Error 2 ```
cheers wth
Hi,
On 2025-05-22 16:03, Tianhao Wang wrote:
On Thu May 22, 2025 at 3:51 PM CEST, Marcus Hähnel wrote:
Packages that are outside the L4Re source tree are, by default, already excluded from the Control file consistency check since the concept of build order doesn't make much sense for packages that are built in isolation. So that error should not happen there. What is the error you see? Did you set the L4DIR correctly (which is required for the package to find the L4Re buildsystem)?
So in this case the Control file should not be needed right?
Here is the Makefile:
PKGDIR ?= . L4DIR ?= /path/to/l4re-snapshot-25.03.0/src/l4 TARGET = myfirstprogram SRC_C = main.c include $(L4DIR)/mk/prog.mkbuild commands and error
# in snapshot root: make setup make # in /tmp/testpkg/ make O=PATH/TO/OBJ/L4 # error (same as before) path/to/src/l4/mk/binary.inc:396: *** /tmp/testpkg/Makefile: 'stdlibs compiler-rt' in REQUIRES_LIBS in Makefile but not in Control file requires. Stop. make: *** [/path/to/l4re-snapshot-25.03.0/src/l4/mk/binary.inc:195: /path/to/l4re-snapshot-25.03.0/obj/l4/x86/ext-pkg/tmp/testpkg/OBJ-x86_gen-std-l4f] Error 2
You are of course right. Sorry for not checking this more thoroughly. I missed that the change that excludes external packages from these checks only happened after that snapshot was created. Please apply the change from GitHub [0] to get rid of the pesky check. You can download it as patch through this URL [1]
Best regards,
- Marcus
[0] https://github.com/kernkonzept/mk/commit/6bde458254693a7216adac4c91f528ff607... [1] https://github.com/kernkonzept/mk/commit/6bde458254693a7216adac4c91f528ff607...
cheers wth
On Thu May 22, 2025 at 4:17 PM CEST, Marcus Hähnel wrote:
Please apply the change from GitHub [0] to get rid of the pesky check. You can download it as patch through this URL [1]
it works for me, thanks!
[0] https://github.com/kernkonzept/mk/commit/6bde458254693a7216adac4c91f528ff607... [1] https://github.com/kernkonzept/mk/commit/6bde458254693a7216adac4c91f528ff607...
cheers, wth
l4-hackers@os.inf.tu-dresden.de