Hi,
Here is the situation I observed:
First, I compile application A, which failed because I introduced some incorrect C statements in the source code.
Then, I compile application B, which succeeded.
Finally, I compile A again (without clean), the building system surprisingly generated A's binary! According to the verbose output, there is no compiling phase but only linking phase this time. If I run this fake binary, it's B's content.
Any idea what is going on?
Chen
Hi,
could you please provide more context (names of applications you build, command line executed, verbose build output)? I fear we cannot help with that little information.
Regards
. (examples) |-- helloworld | `-- src | `-- app | |-- main.cc | `-- target.mk `-- thread-migration `-- src `-- app |-- 32 | `-- target.mk |-- 64 | `-- target.mk `-- main.cc
1. a) add a wrong statement "error();" into main.cc of thread-migration. b) cd $GENODE_BUILD; c) update REPOSITORIES to include the path of thread-migration d) make: //failed as expected
Program app/32/thread-migration COMPILE ../main.o /usr/local/genode-gcc-4.4.5/bin/genode-x86-g++ -fPIC -fPIC -DL4SYS_USE_UTCB_WRAP=1 -DOMNIOS_VER=1 -D__FreeBSD__=8 -fno-builtin-sin -fno-builtin-cos -fno-builtin-sinf -fno-builtin-cosf -ffunction-sections -fno-strict-aliasing -nostdinc -g -march=i686 -O2 -MMD -MP -MT '../main.o ../main.d' -Wall -DOMNIOS_VER=1 -I. -I/usr/local/genode-gcc-4.4.5/bin/../lib/gcc/i686-pc-linux-gnu/4.4.5/../../../../include/c++/4.4.5 -I/usr/local/genode-gcc-4.4.5/bin/../lib/gcc/i686-pc-linux-gnu/4.4.5/../../../../include/c++/4.4.5/i686-pc-linux-gnu -I/usr/local/genode-gcc-4.4.5/bin/../lib/gcc/i686-pc-linux-gnu/4.4.5/../../../../include/c++/4.4.5/backward -I/home/tianc/git/omnios/genode/base/src/core/include -I/home/tianc/git/omnios/genode/base/../base-foc/src/core/include -I/home/tianc/git/omnios/genode/base/../omnios/include -I/home/tianc/git/omnios/build/genode-build-omnios/include/x86/l4f -I/home/tianc/git/omnios/build/genode-build-omnios/include/l4f -I/home/tianc/git/omnios/build/genode-build-omnios/include/x86 -I/home/tianc/git/omnios/build/genode-build-omnios/include/ -I/home/tianc/git/omnios/genode/base/include/x86 -I/home/tianc/git/omnios/genode/base/include/x86_32 -I/home/tianc/git/omnios/genode/base/include/32bit -I/home/tianc/git/omnios/genode/libc/include/libc -I/home/tianc/git/omnios/genode/libc/include/libc-i386 -I/home/tianc/git/omnios/genode/base-foc/include -I/home/tianc/git/omnios/genode/base/include -I/home/tianc/git/omnios/genode/os/include -I/home/tianc/git/omnios/genode/demo/include -I/home/tianc/git/omnios/genode-omnios/include -I/home/tianc/git/omnios/genode/libc/include -I/usr/local/genode-gcc-4.4.5/bin/../lib/gcc/i686-pc-linux-gnu/4.4.5/include -c /home/tianc/git/omnios/genode-omnios/examples/thread-migration/src/app/32/../main.cc -o ../main.o /home/tianc/git/omnios/genode-omnios/examples/thread-migration/src/app/32/../main.cc:13: error: ISO C++ forbids declaration of ‘error’ with no type make[3]: *** [../main.o] Error 1 make[2]: *** [thread-migration.prg] Error 2 make[1]: *** [gen_deps_and_build_targets] Error 2 make[1]: Leaving directory `/home/tianc/git/omnios/build/genode-build-omnios' make: *** [thread-migration] Error 2
2. a) remove the path of thread-migration from REPOSITORIES b) update REPOSITORIES to include the path of helloworld c) make: //success as expected
Program app/helloworld COMPILE main.o /usr/local/genode-gcc-4.4.5/bin/genode-x86-g++ -fPIC -DL4SYS_USE_UTCB_WRAP=1 -DOMNIOS_VER=1 -ffunction-sections -fno-strict-aliasing -nostdinc -g -march=i686 -O2 -MMD -MP -MT 'main.o main.d' -Wall -DOMNIOS_VER=1 -I. -I/home/tianc/git/omnios/build/genode-build-omnios/include/x86/l4f -I/home/tianc/git/omnios/build/genode-build-omnios/include/l4f -I/home/tianc/git/omnios/build/genode-build-omnios/include/x86 -I/home/tianc/git/omnios/build/genode-build-omnios/include/ -I/home/tianc/git/omnios/genode/base/include/x86 -I/home/tianc/git/omnios/genode/base/include/x86_32 -I/home/tianc/git/omnios/genode/base/include/32bit -I/home/tianc/git/omnios/genode/demo/include/mini_c -I/home/tianc/git/omnios/genode/base-foc/include -I/home/tianc/git/omnios/genode/base/include -I/home/tianc/git/omnios/genode/os/include -I/home/tianc/git/omnios/genode/demo/include -I/home/tianc/git/omnios/genode-omnios/include -I/home/tianc/git/omnios/genode/libc/include -I/usr/local/genode-gcc-4.4.5/bin/../lib/gcc/i686-pc-linux-gnu/4.4.5/include -c /home/tianc/git/omnios/genode-omnios/examples/helloworld/src/app/main.cc -o main.o LINK helloworld libs=/home/tianc/git/omnios/build/genode-build-omnios/var/libcache; /usr/local/genode-gcc-4.4.5/bin/genode-x86-g++ -Wl,-gc-sections -nostdlib -Wl,-nostdlib -Wl,-Ttext=0x01000000 -Wl,-T -Wl,/home/tianc/git/omnios/genode/base/src/platform/genode.ld -Wl,--whole-archive -Wl,--start-group main.o $libs/allocator_avl/allocator_avl.lib.a $libs/avl_tree/avl_tree.lib.a $libs/cap_alloc/cap_alloc.lib.a $libs/console/console.lib.a $libs/cxx/cxx.lib.a $libs/env/env.lib.a $libs/heap/heap.lib.a $libs/ipc/ipc.lib.a $libs/lock/lock.lib.a $libs/log_console/log_console.lib.a $libs/mini_c/mini_c.lib.a $libs/platform/platform.lib.a $libs/slab/slab.lib.a $libs/startup/startup.lib.a $libs/syscalls/syscalls.lib.a -Wl,--end-group -Wl,--no-whole-archive /usr/local/genode-gcc-4.4.5/bin/../lib/gcc/i686-pc-linux-gnu/4.4.5/libgcc.a -o helloworld ln -sf `pwd`/helloworld /home/tianc/git/omnios/build/genode-build-omnios/bin/helloworld make --no-print-directory -C bootstrap -f /home/tianc/git/omnios/genode/base/mk/prg.mk \ REP_DIR=/home/tianc/git/omnios/genode/base-foc \ PRG_REL_DIR=bootstrap \ BUILD_BASE_DIR=/home/tianc/git/omnios/build/genode-build-omnios \ DEPS="l4re_support.lib platform.lib platform.lib " \ SHELL=/bin/bash \ INSTALL_DIR="/home/tianc/git/omnios/build/genode-build-omnios/bin"
3. a) remove the path of helloworld from REPOSITORIES b) update REPOSITORIES to include the path of thread-migration c) make: //success, which is incorrect.
Program app/32/thread-migration LINK thread-migration libs=/home/tianc/git/omnios/build/genode-build-omnios/var/libcache; /usr/local/genode-gcc-4.4.5/bin/genode-x86-g++ -Wl,-gc-sections -nostdlib -Wl,-nostdlib -Wl,-Ttext=0x01000000 -Wl,-T/home/tianc/git/omnios/genode/os/src/platform/x86/genode_dyn.ld -Wl,--dynamic-linker=ld.lib.so -Wl,--whole-archive -Wl,--start-group ../main.o $libs/cap_alloc/cap_alloc.lib.a $libs/console/console.lib.a $libs/cxx/cxx.lib.a $libs/log_console/log_console.lib.a $libs/platform/platform.lib.a $libs/startup/startup.lib.a $libs/syscalls/syscalls.lib.a $libs/libc/libc.lib.so $libs/ld/ld.lib.so -Wl,--end-group -Wl,--no-whole-archive /usr/local/genode-gcc-4.4.5/bin/../lib/gcc/i686-pc-linux-gnu/4.4.5/../../../libstdc++.a /usr/local/genode-gcc-4.4.5/bin/../lib/gcc/i686-pc-linux-gnu/4.4.5/libgcc.a -o thread-migration ln -sf `pwd`/thread-migration /home/tianc/git/omnios/build/genode-build-omnios/bin/thread-migration make --no-print-directory -C bootstrap -f /home/tianc/git/omnios/genode/base/mk/prg.mk \ REP_DIR=/home/tianc/git/omnios/genode/base-foc \ PRG_REL_DIR=bootstrap \ BUILD_BASE_DIR=/home/tianc/git/omnios/build/genode-build-omnios \ DEPS="l4re_support.lib platform.lib platform.lib " \ SHELL=/bin/bash \ INSTALL_DIR="/home/tianc/git/omnios/build/genode-build-omnios/bin"
Hope the above information is enough for you to reproduce the bug.
Chen
-----Original Message----- From: Christian Helmuth [mailto:christian.helmuth@...1...] Sent: Saturday, June 04, 2011 2:05 PM To: genode-main@lists.sourceforge.net Subject: Re: Problem in Genode building system?
Hi,
could you please provide more context (names of applications you build, command line executed, verbose build output)? I fear we cannot help with that little information.
Regards
Hi Chen,
I did not completely reproduce your problem but from the information you provided I think the problem is the layout of your repository directories. The Genode build system kind of overlays all repos into one virtual tree. So, targets under <repo>/src/<target> end up in the root build directory as <target> (see further below...)
On Mon, Jun 06, 2011 at 10:14:42AM -0700, Chen Tian wrote:
. (examples) |-- helloworld | `-- src | `-- app | |-- main.cc | `-- target.mk `-- thread-migration `-- src `-- app |-- 32 | `-- target.mk |-- 64 | `-- target.mk `-- main.cc
This means app from helloworld overlays with app from thread-migration. Therefore, a successful compile of app/main.cc from helloworld produces app/main.o in the build tree, which is also linked if app/32 from thread-migration is built.
I suggest to put the targets in your repos into target-name-specific subdirectories that do not overlay/clash.
Greets
Hello, Chen
I think the problem is that you use the *same* build directory for both targets. When you look at the LINK command in case 2 and 3 you see that they both are the same regarding the dependent objects. Although you are building two different targets, the MAKE rule of the LINK command looks for a dependent object >main.o< at the given place. In case 1 there is none since the compilation failed. After case 2 a dependent object >main.o< exists from the compilation of >helloworld/src/app/main.cc<. After case 3 MAKE sees that the dependent object >main.o< exists which it shall build by the COMPILE rule, therefore it just invokes the LINK rule to build the target >thread-migration< which does not yet exist. You have run in a typical deficiency of MAKE. The rule checker only considers targets and dependents after there names and timestamps. It does not track from where dependent objects originated, therefore it does not recognize that >main.o< stems from the wrong source in case 3. Youre example is one of several reasons for which I do not understand that people keep staying with MAKE, although other build tools exist (for instance SCONS) which do not produce this kind of failures.
Regards Frank
-----Original Message----- From: Chen Tian [mailto:chen.tian@...60...] Sent: Monday, June 06, 2011 7:15 PM To: 'Genode OS Framework Mailing List' Subject: RE: Problem in Genode building system?
. (examples) |-- helloworld | `-- src | `-- app | |-- main.cc | `-- target.mk `-- thread-migration `-- src `-- app |-- 32 | `-- target.mk |-- 64 | `-- target.mk `-- main.cc
- a) add a wrong statement "error();" into main.cc of thread-migration. b) cd $GENODE_BUILD; c) update REPOSITORIES to include the path of thread-migration d) make: //failed as expected
Program app/32/thread-migration COMPILE ../main.o /usr/local/genode-gcc-4.4.5/bin/genode-x86-g++ -fPIC -fPIC - DL4SYS_USE_UTCB_WRAP=1 -DOMNIOS_VER=1 -D__FreeBSD__=8 -fno-builtin-sin -fno- builtin-cos -fno-builtin-sinf -fno-builtin-cosf -ffunction-sections -fno- strict-aliasing -nostdinc -g -march=i686 -O2 -MMD -MP -MT '../main.o ../main.d' -Wall -DOMNIOS_VER=1 -I. -I/usr/local/genode-gcc- 4.4.5/bin/../lib/gcc/i686-pc-linux-gnu/4.4.5/../../../../include/c++/4.4.5 - I/usr/local/genode-gcc-4.4.5/bin/../lib/gcc/i686-pc-linux- gnu/4.4.5/../../../../include/c++/4.4.5/i686-pc-linux-gnu -I/usr/local/genode- gcc-4.4.5/bin/../lib/gcc/i686-pc-linux- gnu/4.4.5/../../../../include/c++/4.4.5/backward - I/home/tianc/git/omnios/genode/base/src/core/include - I/home/tianc/git/omnios/genode/base/../base-foc/src/core/include - I/home/tianc/git/omnios/genode/base/../omnios/include - I/home/tianc/git/omnios/build/genode-build-omnios/include/x86/l4f - I/home/tianc/git/omnios/build/genode-build-omnios/include/l4f - I/home/tianc/git/omnios/build/genode-build-omnios/include/x86 - I/home/tianc/git/omnios/build/genode-build-omnios/include/ - I/home/tianc/git/omnios/genode/base/include/x86 - I/home/tianc/git/omnios/genode/base/include/x86_32 - I/home/tianc/git/omnios/genode/base/include/32bit - I/home/tianc/git/omnios/genode/libc/include/libc - I/home/tianc/git/omnios/genode/libc/include/libc-i386 - I/home/tianc/git/omnios/genode/base-foc/include - I/home/tianc/git/omnios/genode/base/include - I/home/tianc/git/omnios/genode/os/include - I/home/tianc/git/omnios/genode/demo/include -I/home/tianc/git/omnios/genode- omnios/include -I/home/tianc/git/omnios/genode/libc/include - I/usr/local/genode-gcc-4.4.5/bin/../lib/gcc/i686-pc-linux-gnu/4.4.5/include -c /home/tianc/git/omnios/genode-omnios/examples/thread- migration/src/app/32/../main.cc -o ../main.o /home/tianc/git/omnios/genode-omnios/examples/thread- migration/src/app/32/../main.cc:13: error: ISO C++ forbids declaration of ‘error’ with no type make[3]: *** [../main.o] Error 1 make[2]: *** [thread-migration.prg] Error 2 make[1]: *** [gen_deps_and_build_targets] Error 2 make[1]: Leaving directory `/home/tianc/git/omnios/build/genode-build-omnios' make: *** [thread-migration] Error 2
- a) remove the path of thread-migration from REPOSITORIES b) update REPOSITORIES to include the path of helloworld c) make: //success as expected
Program app/helloworld COMPILE main.o /usr/local/genode-gcc-4.4.5/bin/genode-x86-g++ -fPIC -DL4SYS_USE_UTCB_WRAP=1 -DOMNIOS_VER=1 -ffunction-sections -fno-strict-aliasing -nostdinc -g - march=i686 -O2 -MMD -MP -MT 'main.o main.d' -Wall -DOMNIOS_VER=1 -I. - I/home/tianc/git/omnios/build/genode-build-omnios/include/x86/l4f - I/home/tianc/git/omnios/build/genode-build-omnios/include/l4f - I/home/tianc/git/omnios/build/genode-build-omnios/include/x86 - I/home/tianc/git/omnios/build/genode-build-omnios/include/ - I/home/tianc/git/omnios/genode/base/include/x86 - I/home/tianc/git/omnios/genode/base/include/x86_32 - I/home/tianc/git/omnios/genode/base/include/32bit - I/home/tianc/git/omnios/genode/demo/include/mini_c - I/home/tianc/git/omnios/genode/base-foc/include - I/home/tianc/git/omnios/genode/base/include - I/home/tianc/git/omnios/genode/os/include - I/home/tianc/git/omnios/genode/demo/include -I/home/tianc/git/omnios/genode- omnios/include -I/home/tianc/git/omnios/genode/libc/include - I/usr/local/genode-gcc-4.4.5/bin/../lib/gcc/i686-pc-linux-gnu/4.4.5/include -c /home/tianc/git/omnios/genode-omnios/examples/helloworld/src/app/main.cc -o main.o LINK helloworld libs=/home/tianc/git/omnios/build/genode-build-omnios/var/libcache; /usr/local/genode-gcc-4.4.5/bin/genode-x86-g++ -Wl,-gc-sections -nostdlib - Wl,-nostdlib -Wl,-Ttext=0x01000000 -Wl,-T - Wl,/home/tianc/git/omnios/genode/base/src/platform/genode.ld -Wl,--whole- archive -Wl,--start-group main.o $libs/allocator_avl/allocator_avl.lib.a $libs/avl_tree/avl_tree.lib.a $libs/cap_alloc/cap_alloc.lib.a $libs/console/console.lib.a $libs/cxx/cxx.lib.a $libs/env/env.lib.a $libs/heap/heap.lib.a $libs/ipc/ipc.lib.a $libs/lock/lock.lib.a $libs/log_console/log_console.lib.a $libs/mini_c/mini_c.lib.a $libs/platform/platform.lib.a $libs/slab/slab.lib.a $libs/startup/startup.lib.a $libs/syscalls/syscalls.lib.a -Wl,--end-group - Wl,--no-whole-archive /usr/local/genode-gcc-4.4.5/bin/../lib/gcc/i686-pc- linux-gnu/4.4.5/libgcc.a -o helloworld ln -sf `pwd`/helloworld /home/tianc/git/omnios/build/genode-build- omnios/bin/helloworld make --no-print-directory -C bootstrap -f /home/tianc/git/omnios/genode/base/mk/prg.mk \ REP_DIR=/home/tianc/git/omnios/genode/base-foc \ PRG_REL_DIR=bootstrap \ BUILD_BASE_DIR=/home/tianc/git/omnios/build/genode-build-omnios \ DEPS="l4re_support.lib platform.lib platform.lib " \ SHELL=/bin/bash \ INSTALL_DIR="/home/tianc/git/omnios/build/genode-build-omnios/bin"
- a) remove the path of helloworld from REPOSITORIES b) update REPOSITORIES to include the path of thread-migration c) make: //success, which is incorrect.
Program app/32/thread-migration LINK thread-migration libs=/home/tianc/git/omnios/build/genode-build-omnios/var/libcache; /usr/local/genode-gcc-4.4.5/bin/genode-x86-g++ -Wl,-gc-sections -nostdlib - Wl,-nostdlib -Wl,-Ttext=0x01000000 -Wl,- T/home/tianc/git/omnios/genode/os/src/platform/x86/genode_dyn.ld -Wl,-- dynamic-linker=ld.lib.so -Wl,--whole-archive -Wl,--start-group ../main.o $libs/cap_alloc/cap_alloc.lib.a $libs/console/console.lib.a $libs/cxx/cxx.lib.a $libs/log_console/log_console.lib.a $libs/platform/platform.lib.a $libs/startup/startup.lib.a $libs/syscalls/syscalls.lib.a $libs/libc/libc.lib.so $libs/ld/ld.lib.so -Wl,-- end-group -Wl,--no-whole-archive /usr/local/genode-gcc- 4.4.5/bin/../lib/gcc/i686-pc-linux-gnu/4.4.5/../../../libstdc++.a /usr/local/genode-gcc-4.4.5/bin/../lib/gcc/i686-pc-linux-gnu/4.4.5/libgcc.a -o thread-migration ln -sf `pwd`/thread-migration /home/tianc/git/omnios/build/genode-build- omnios/bin/thread-migration make --no-print-directory -C bootstrap -f /home/tianc/git/omnios/genode/base/mk/prg.mk \ REP_DIR=/home/tianc/git/omnios/genode/base-foc \ PRG_REL_DIR=bootstrap \ BUILD_BASE_DIR=/home/tianc/git/omnios/build/genode-build-omnios \ DEPS="l4re_support.lib platform.lib platform.lib " \ SHELL=/bin/bash \ INSTALL_DIR="/home/tianc/git/omnios/build/genode-build-omnios/bin"
Hope the above information is enough for you to reproduce the bug.
Chen
Hi Frank,
cool to see a life sign of you!
Youre example is one of several reasons for which I do not understand that people keep staying with MAKE, although other build tools exist (for instance SCONS) which do not produce this kind of failures.
the choice of basing our build system on make rather than SCons was actually an informed decision. At an early stage of the project, our build system was ported to SCons by Ludwig Hähne. You can read about his findings here:
http://www.genode-labs.com/publications/scons-vs-make-2008.pdf
In short, his thesis motivated us to reconsider the build system's architecture (based on recursive make) we used back then in favor of our current two-stage build concept. But we stayed with using make as underlying dependency-resolution mechanism.
Cheers Norman
Hi Frank,
Thanks for the explanation. I understand the problem very well now. I took it for granted that the building system would figure out everything for me. :)
Best, Chen
-----Original Message----- From: Frank Kaiser [mailto:frank.kaiser@...24...] Sent: Tue 6/7/2011 4:37 AM To: Genode OS Framework Mailing List Subject: RE: Problem in Genode building system?
Hello, Chen
I think the problem is that you use the *same* build directory for both targets. When you look at the LINK command in case 2 and 3 you see that they both are the same regarding the dependent objects. Although you are building two different targets, the MAKE rule of the LINK command looks for a dependent object >main.o< at the given place. In case 1 there is none since the compilation failed. After case 2 a dependent object >main.o< exists from the compilation of >helloworld/src/app/main.cc<. After case 3 MAKE sees that the dependent object >main.o< exists which it shall build by the COMPILE rule, therefore it just invokes the LINK rule to build the target >thread-migration< which does not yet exist. You have run in a typical deficiency of MAKE. The rule checker only considers targets and dependents after there names and timestamps. It does not track from where dependent objects originated, therefore it does not recognize that >main.o< stems from the wrong source in case 3. Youre example is one of several reasons for which I do not understand that people keep staying with MAKE, although other build tools exist (for instance SCONS) which do not produce this kind of failures.
Regards Frank
-----Original Message----- From: Chen Tian [mailto:chen.tian@...60...] Sent: Monday, June 06, 2011 7:15 PM To: 'Genode OS Framework Mailing List' Subject: RE: Problem in Genode building system?
. (examples) |-- helloworld | `-- src | `-- app | |-- main.cc | `-- target.mk `-- thread-migration `-- src `-- app |-- 32 | `-- target.mk |-- 64 | `-- target.mk `-- main.cc
- a) add a wrong statement "error();" into main.cc of thread-migration. b) cd $GENODE_BUILD; c) update REPOSITORIES to include the path of thread-migration d) make: //failed as expected
Program app/32/thread-migration COMPILE ../main.o /usr/local/genode-gcc-4.4.5/bin/genode-x86-g++ -fPIC -fPIC - DL4SYS_USE_UTCB_WRAP=1 -DOMNIOS_VER=1 -D__FreeBSD__=8 -fno-builtin-sin -fno- builtin-cos -fno-builtin-sinf -fno-builtin-cosf -ffunction-sections -fno- strict-aliasing -nostdinc -g -march=i686 -O2 -MMD -MP -MT '../main.o ../main.d' -Wall -DOMNIOS_VER=1 -I. -I/usr/local/genode-gcc- 4.4.5/bin/../lib/gcc/i686-pc-linux-gnu/4.4.5/../../../../include/c++/4.4.5 - I/usr/local/genode-gcc-4.4.5/bin/../lib/gcc/i686-pc-linux- gnu/4.4.5/../../../../include/c++/4.4.5/i686-pc-linux-gnu -I/usr/local/genode- gcc-4.4.5/bin/../lib/gcc/i686-pc-linux- gnu/4.4.5/../../../../include/c++/4.4.5/backward - I/home/tianc/git/omnios/genode/base/src/core/include - I/home/tianc/git/omnios/genode/base/../base-foc/src/core/include - I/home/tianc/git/omnios/genode/base/../omnios/include - I/home/tianc/git/omnios/build/genode-build-omnios/include/x86/l4f - I/home/tianc/git/omnios/build/genode-build-omnios/include/l4f - I/home/tianc/git/omnios/build/genode-build-omnios/include/x86 - I/home/tianc/git/omnios/build/genode-build-omnios/include/ - I/home/tianc/git/omnios/genode/base/include/x86 - I/home/tianc/git/omnios/genode/base/include/x86_32 - I/home/tianc/git/omnios/genode/base/include/32bit - I/home/tianc/git/omnios/genode/libc/include/libc - I/home/tianc/git/omnios/genode/libc/include/libc-i386 - I/home/tianc/git/omnios/genode/base-foc/include - I/home/tianc/git/omnios/genode/base/include - I/home/tianc/git/omnios/genode/os/include - I/home/tianc/git/omnios/genode/demo/include -I/home/tianc/git/omnios/genode- omnios/include -I/home/tianc/git/omnios/genode/libc/include - I/usr/local/genode-gcc-4.4.5/bin/../lib/gcc/i686-pc-linux-gnu/4.4.5/include -c /home/tianc/git/omnios/genode-omnios/examples/thread- migration/src/app/32/../main.cc -o ../main.o /home/tianc/git/omnios/genode-omnios/examples/thread- migration/src/app/32/../main.cc:13: error: ISO C++ forbids declaration of 'error' with no type make[3]: *** [../main.o] Error 1 make[2]: *** [thread-migration.prg] Error 2 make[1]: *** [gen_deps_and_build_targets] Error 2 make[1]: Leaving directory `/home/tianc/git/omnios/build/genode-build-omnios' make: *** [thread-migration] Error 2
- a) remove the path of thread-migration from REPOSITORIES b) update REPOSITORIES to include the path of helloworld c) make: //success as expected
Program app/helloworld COMPILE main.o /usr/local/genode-gcc-4.4.5/bin/genode-x86-g++ -fPIC -DL4SYS_USE_UTCB_WRAP=1 -DOMNIOS_VER=1 -ffunction-sections -fno-strict-aliasing -nostdinc -g - march=i686 -O2 -MMD -MP -MT 'main.o main.d' -Wall -DOMNIOS_VER=1 -I. - I/home/tianc/git/omnios/build/genode-build-omnios/include/x86/l4f - I/home/tianc/git/omnios/build/genode-build-omnios/include/l4f - I/home/tianc/git/omnios/build/genode-build-omnios/include/x86 - I/home/tianc/git/omnios/build/genode-build-omnios/include/ - I/home/tianc/git/omnios/genode/base/include/x86 - I/home/tianc/git/omnios/genode/base/include/x86_32 - I/home/tianc/git/omnios/genode/base/include/32bit - I/home/tianc/git/omnios/genode/demo/include/mini_c - I/home/tianc/git/omnios/genode/base-foc/include - I/home/tianc/git/omnios/genode/base/include - I/home/tianc/git/omnios/genode/os/include - I/home/tianc/git/omnios/genode/demo/include -I/home/tianc/git/omnios/genode- omnios/include -I/home/tianc/git/omnios/genode/libc/include - I/usr/local/genode-gcc-4.4.5/bin/../lib/gcc/i686-pc-linux-gnu/4.4.5/include -c /home/tianc/git/omnios/genode-omnios/examples/helloworld/src/app/main.cc -o main.o LINK helloworld libs=/home/tianc/git/omnios/build/genode-build-omnios/var/libcache; /usr/local/genode-gcc-4.4.5/bin/genode-x86-g++ -Wl,-gc-sections -nostdlib - Wl,-nostdlib -Wl,-Ttext=0x01000000 -Wl,-T - Wl,/home/tianc/git/omnios/genode/base/src/platform/genode.ld -Wl,--whole- archive -Wl,--start-group main.o $libs/allocator_avl/allocator_avl.lib.a $libs/avl_tree/avl_tree.lib.a $libs/cap_alloc/cap_alloc.lib.a $libs/console/console.lib.a $libs/cxx/cxx.lib.a $libs/env/env.lib.a $libs/heap/heap.lib.a $libs/ipc/ipc.lib.a $libs/lock/lock.lib.a $libs/log_console/log_console.lib.a $libs/mini_c/mini_c.lib.a $libs/platform/platform.lib.a $libs/slab/slab.lib.a $libs/startup/startup.lib.a $libs/syscalls/syscalls.lib.a -Wl,--end-group - Wl,--no-whole-archive /usr/local/genode-gcc-4.4.5/bin/../lib/gcc/i686-pc- linux-gnu/4.4.5/libgcc.a -o helloworld ln -sf `pwd`/helloworld /home/tianc/git/omnios/build/genode-build- omnios/bin/helloworld make --no-print-directory -C bootstrap -f /home/tianc/git/omnios/genode/base/mk/prg.mk \ REP_DIR=/home/tianc/git/omnios/genode/base-foc \ PRG_REL_DIR=bootstrap \ BUILD_BASE_DIR=/home/tianc/git/omnios/build/genode-build-omnios \ DEPS="l4re_support.lib platform.lib platform.lib " \ SHELL=/bin/bash \ INSTALL_DIR="/home/tianc/git/omnios/build/genode-build-omnios/bin"
- a) remove the path of helloworld from REPOSITORIES b) update REPOSITORIES to include the path of thread-migration c) make: //success, which is incorrect.
Program app/32/thread-migration LINK thread-migration libs=/home/tianc/git/omnios/build/genode-build-omnios/var/libcache; /usr/local/genode-gcc-4.4.5/bin/genode-x86-g++ -Wl,-gc-sections -nostdlib - Wl,-nostdlib -Wl,-Ttext=0x01000000 -Wl,- T/home/tianc/git/omnios/genode/os/src/platform/x86/genode_dyn.ld -Wl,-- dynamic-linker=ld.lib.so -Wl,--whole-archive -Wl,--start-group ../main.o $libs/cap_alloc/cap_alloc.lib.a $libs/console/console.lib.a $libs/cxx/cxx.lib.a $libs/log_console/log_console.lib.a $libs/platform/platform.lib.a $libs/startup/startup.lib.a $libs/syscalls/syscalls.lib.a $libs/libc/libc.lib.so $libs/ld/ld.lib.so -Wl,-- end-group -Wl,--no-whole-archive /usr/local/genode-gcc- 4.4.5/bin/../lib/gcc/i686-pc-linux-gnu/4.4.5/../../../libstdc++.a /usr/local/genode-gcc-4.4.5/bin/../lib/gcc/i686-pc-linux-gnu/4.4.5/libgcc.a -o thread-migration ln -sf `pwd`/thread-migration /home/tianc/git/omnios/build/genode-build- omnios/bin/thread-migration make --no-print-directory -C bootstrap -f /home/tianc/git/omnios/genode/base/mk/prg.mk \ REP_DIR=/home/tianc/git/omnios/genode/base-foc \ PRG_REL_DIR=bootstrap \ BUILD_BASE_DIR=/home/tianc/git/omnios/build/genode-build-omnios \ DEPS="l4re_support.lib platform.lib platform.lib " \ SHELL=/bin/bash \ INSTALL_DIR="/home/tianc/git/omnios/build/genode-build-omnios/bin"
Hope the above information is enough for you to reproduce the bug.
Chen
------------------------------------------------------------------------------ EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev _______________________________________________ Genode-main mailing list Genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Hello, Norman
I didn't intend to specifically blame Genode for using MAKE. It is still widely used by the Open Souce community within big project (the Linux kernel, Android, ...). People have invested a lot of time in the build systems, and are therefore somewhat lazy to switch to another one despite existing drawbacks. And its popularity does not drive people looking for alternatives MAKE is by no means a set-and-forget system. Its complexity has grown over the years, and there is a lot of magic in it to solve certain tasks. All this makes it difficult to comprehend what it can and cannot do. Maintenance of a big MAKE system can be a nightmare when you have to refactore a big project, where the original creators did spend much time about thinking how it may evolve.
Frank
-----Original Message----- From: Norman Feske [mailto:norman.feske@...1...] Sent: Tuesday, June 07, 2011 4:39 PM To: genode-main@lists.sourceforge.net Subject: Re: Problem in Genode building system?
Hi Frank,
cool to see a life sign of you!
Youre example is one of several reasons for which I do not understand that people keep staying with MAKE, although other build tools exist (for instance SCONS) which do not produce this kind of failures.
the choice of basing our build system on make rather than SCons was actually an informed decision. At an early stage of the project, our build system was ported to SCons by Ludwig Hähne. You can read about his findings here:
http://www.genode-labs.com/publications/scons-vs-make-2008.pdf
In short, his thesis motivated us to reconsider the build system's architecture (based on recursive make) we used back then in favor of our current two-stage build concept. But we stayed with using make as underlying dependency-resolution mechanism.
Cheers Norman