RTEMS examples build failed
Sebastian Huber
sebastian.huber at embedded-brains.de
Wed Apr 22 05:20:14 UTC 2020
On 21/04/2020 19:18, Gedare Bloom wrote:
> On Tue, Apr 21, 2020 at 8:42 AM Vijay Kumar Banerjee <vijay at rtems.org> wrote:
>>
>>
>> On Tue, Apr 21, 2020 at 7:10 AM Chris Johns <chrisj at rtems.org> wrote:
>>> On 21/4/20 7:03 am, Vijay Kumar Banerjee wrote:
>>>> On Mon, Apr 20, 2020 at 11:33 PM Sebastian Huber
>>>> <sebastian.huber at embedded-brains.de
>>>> <mailto:sebastian.huber at embedded-brains.de>> wrote:
>>>> We don't have to reinvent the wheel. We could copy the wscript of the
>>>> new build system to the examples and add a couple of specification
>>>> items. Building test programs is really not that much different to
>>>> building applications.
>>>>
>>>> Just to make sure I understood correctly: Do you suggest that we replace
>>>> the rtems_waf in examples with the wscript similar to the new build system?
>> Hi,
>>> Please do not do this. I am reluctant to again head down the path of
>>> exposing the internals of the rtems.git build system to users via
>>> examples. It says to our users they need to use this approach to
>>> building RTEMS applications and that is not the case. It also removes
>>> the need for us to make sure we correctly handle exporting the needed
>>> build data for a BSP. I like the current separation.
>>>
>> Understood.
>>> I prefer the examples are just that, an example of code to use and how
>>> to build an application with different build systems. I welcome support
>>> for other build systems being added to our examples. It just needs
>>> someone to maintain whatever is added.
>>>
>>> The rtems_waf approach is based on the currently exported data and when
>>> a new build system is agreed on and merged it will be updated.
>>>
>> I tried for some time to figure out some way to fix the dependency check errors
>> but couldn't find any other solution. I also tried building the whole source from
>> the build directory by adding this something like this:
>> ```
>> rule = 'cp ${SRC} ${TGT}'
>> bld (rule = rule, source = 'init.c', target = 'fat-root-init.c')
>> ```
>> This again works nicely with the build but gets stuck in the post run checks by
>> gccdeps that seems to search for the headers only in the source directory.
>>
>> Do you have some suggestions to try out? Patching the gccdeps works but
>> it seems like we don't want to do that (?)
>>
> This was quite challenging for me to figure out how to make work the
> first time. I had to wade through the waf book to figure out how to
> make the generated header file visible. You might need to do some
> digging as well to see how it might be possible.
>
> I think the next best solution is to have gccdeps search the build
> tree for the generated header file.
>
> The worst solution is to touch an empty header file in the source tree.
The build tree for the tar01 test program in the new build system looks
like this:
build/x86_64/amd64/testsuites/libtests/tar01/init.d
build/x86_64/amd64/testsuites/libtests/tar01/init.o
build/x86_64/amd64/testsuites/libtests/tar01/tar01.tar
build/x86_64/amd64/testsuites/libtests/tar01/tar01-tar.c
build/x86_64/amd64/testsuites/libtests/tar01/tar01-tar.d
build/x86_64/amd64/testsuites/libtests/tar01/tar01.tar.gz
build/x86_64/amd64/testsuites/libtests/tar01/tar01-tar-gz.c
build/x86_64/amd64/testsuites/libtests/tar01/tar01-tar-gz.d
build/x86_64/amd64/testsuites/libtests/tar01/tar01-tar-gz.h
build/x86_64/amd64/testsuites/libtests/tar01/tar01-tar-gz.o
build/x86_64/amd64/testsuites/libtests/tar01/tar01-tar.h
build/x86_64/amd64/testsuites/libtests/tar01/tar01-tar.o
build/x86_64/amd64/testsuites/libtests/tar01/tar01.tar.xz
build/x86_64/amd64/testsuites/libtests/tar01/tar01-tar-xz.c
build/x86_64/amd64/testsuites/libtests/tar01/tar01-tar-xz.d
build/x86_64/amd64/testsuites/libtests/tar01/tar01-tar-xz.h
build/x86_64/amd64/testsuites/libtests/tar01/tar01-tar-xz.o
build/x86_64/amd64/testsuites/libtests/tar01/test_cat.d
build/x86_64/amd64/testsuites/libtests/tar01/test_cat.o
If I rebuild it then I get this:
/ramdisk/git-rtems-5 (build) > rm
build/x86_64/amd64/testsuites/libtests/tar01 -r
/ramdisk/git-rtems-5 (build) > ./waf
Waf: Entering directory `/ramdisk/git-rtems-5/build'
Waf: Leaving directory `/ramdisk/git-rtems-5/build'
'build' finished successfully (0.147s)
Waf: Entering directory `/ramdisk/git-rtems-5/build/x86_64/amd64'
[1289/3970] Processing testsuites/libtests/tar01/tar01.tar:
testsuites/libtests/tar01/home/test_file
testsuites/libtests/tar01/home/abc/def/test_script
testsuites/libtests/tar01/symlink ->
build/x86_64/amd64/testsuites/libtests/tar01/tar01.tar
[1739/3970] Compiling testsuites/psxtests/psxfile01/test_cat.c
[3961/3970] Compiling build/x86_64/amd64/testsuites/libtests/tar01/tar01.tar
[3962/3970] Compiling build/x86_64/amd64/testsuites/libtests/tar01/tar01.tar
[3963/3970] Processing
build/x86_64/amd64/testsuites/libtests/tar01/tar01.tar
[3964/3970] Processing
build/x86_64/amd64/testsuites/libtests/tar01/tar01.tar.gz
[3965/3970] Compiling
build/x86_64/amd64/testsuites/libtests/tar01/tar01-tar.c
[3966/3970] Compiling
build/x86_64/amd64/testsuites/libtests/tar01/tar01-tar-gz.c
[3967/3970] Processing
build/x86_64/amd64/testsuites/libtests/tar01/tar01.tar.xz
[3968/3970] Compiling
build/x86_64/amd64/testsuites/libtests/tar01/tar01-tar-xz.c
[3969/3970] Processing testsuites/libtests/tar01/init.o:
testsuites/libtests/tar01/init.c
build/x86_64/amd64/testsuites/libtests/tar01/tar01-tar.h
build/x86_64/amd64/testsuites/libtests/tar01/tar01-tar-gz.h
build/x86_64/amd64/testsuites/libtests/tar01/tar01-tar-xz.h ->
build/x86_64/amd64/testsuites/libtests/tar01/init.o
[3970/3970] Processing link:
build/x86_64/amd64/testsuites/libtests/tar01/tar01-tar.o
build/x86_64/amd64/testsuites/libtests/tar01/tar01-tar-gz.o
build/x86_64/amd64/testsuites/libtests/tar01/tar01-tar-xz.o
build/x86_64/amd64/testsuites/libtests/tar01/init.o
build/x86_64/amd64/testsuites/libtests/tar01/test_cat.o ->
build/x86_64/amd64/testsuites/libtests/tar01.exe
Waf: Leaving directory `/ramdisk/git-rtems-5/build/x86_64/amd64'
'build_x86_64/amd64' finished successfully (2.785s)
After an edit:
/ramdisk/git-rtems-5 (build) > vi testsuites/libtests/tar01/home/test_file
/ramdisk/git-rtems-5 (build) > ./waf
Waf: Entering directory `/ramdisk/git-rtems-5/build'
Waf: Leaving directory `/ramdisk/git-rtems-5/build'
'build' finished successfully (0.147s)
Waf: Entering directory `/ramdisk/git-rtems-5/build/x86_64/amd64'
[1289/3970] Processing testsuites/libtests/tar01/tar01.tar:
testsuites/libtests/tar01/home/test_file
testsuites/libtests/tar01/home/abc/def/test_script
testsuites/libtests/tar01/symlink ->
build/x86_64/amd64/testsuites/libtests/tar01/tar01.tar
[1307/3970] Processing testsuites/libtests/tar02/tar02.tar:
testsuites/libtests/tar01/home/test_file
testsuites/libtests/tar01/symlink ->
build/x86_64/amd64/testsuites/libtests/tar02/tar02.tar
[3957/3970] Compiling build/x86_64/amd64/testsuites/libtests/tar01/tar01.tar
[3958/3970] Compiling build/x86_64/amd64/testsuites/libtests/tar01/tar01.tar
[3959/3970] Processing
build/x86_64/amd64/testsuites/libtests/tar01/tar01.tar
[3960/3970] Processing
build/x86_64/amd64/testsuites/libtests/tar02/tar02.tar
[3961/3970] Processing
build/x86_64/amd64/testsuites/libtests/tar01/tar01.tar.gz
[3962/3970] Compiling
build/x86_64/amd64/testsuites/libtests/tar01/tar01-tar.c
[3963/3970] Compiling
build/x86_64/amd64/testsuites/libtests/tar02/tar02-tar.c
[3965/3970] Processing
build/x86_64/amd64/testsuites/libtests/tar01/tar01.tar.xz
[3966/3970] Compiling
build/x86_64/amd64/testsuites/libtests/tar01/tar01-tar-gz.c
[3967/3970] Compiling
build/x86_64/amd64/testsuites/libtests/tar01/tar01-tar-xz.c
[3969/3970] Processing link:
build/x86_64/amd64/testsuites/libtests/tar01/tar01-tar.o
build/x86_64/amd64/testsuites/libtests/tar01/tar01-tar-gz.o
build/x86_64/amd64/testsuites/libtests/tar01/tar01-tar-xz.o
build/x86_64/amd64/testsuites/libtests/tar01/init.o
build/x86_64/amd64/testsuites/libtests/tar01/test_cat.o ->
build/x86_64/amd64/testsuites/libtests/tar01.exe
[3970/3970] Processing link:
build/x86_64/amd64/testsuites/libtests/tar02/tar02-tar.o
build/x86_64/amd64/testsuites/libtests/tar02/init.o
build/x86_64/amd64/testsuites/libtests/tar02/test_cat.o ->
build/x86_64/amd64/testsuites/libtests/tar02.exe
Waf: Leaving directory `/ramdisk/git-rtems-5/build/x86_64/amd64'
'build_x86_64/amd64' finished successfully (2.652s)
More information about the devel
mailing list