Waf + gccdeps on Mingw64/MSYS2?
Sebastian Huber
sebastian.huber at embedded-brains.de
Tue Dec 3 13:10:21 UTC 2019
On 03/12/2019 07:03, Sebastian Huber wrote:
>
>
> On 03/12/2019 03:50, Chris Johns wrote:
>> On 2/12/19 5:27 pm, Sebastian Huber wrote:
>>> On 02/12/2019 01:24, Chris Johns wrote:
>>>> On 2/12/19 11:10 am, Chris Johns wrote:
>>>>> On 28/11/19 5:55 pm, Sebastian Huber wrote:
>>>> I updated MSYS2 to the latest and this error did not appear however
>>>> I am now
>>>> seeing ...
>>>>
>>>> [1867/4038] Processing testsuites/libtests/tar01/init.o:
>>>> testsuites/libtests/tar01/init.c
>>>> build/sparc/erc32/testsuites/libtests/tar01/tar01-tar.h
>>>> build/sparc/erc32/testsuites/libtests/tar01/tar01-tar-gz.h
>>>> build/sparc/erc32/testsuites/libtests/tar01/tar01-tar-xz.h ->
>>>> build/sparc/erc32/testsuites/libtests/tar01/init.o
>>>> In file included from
>>>> D:/opt/rtems/rtems.seb/testsuites/libtests/tar01/init.c:26:0:
>>>> testsuites/libtests/tar01/tar01-tar.h:7:12: warning: extra tokens at
>>>> end of
>>>> #ifndef directive
>>>> #ifndef
>>>> __D:_opt_rtems_rtems_seb_build_sparc_erc32_testsuites_libtests_tar01_tar01_tar_h
>>>>
>>>> ^
>>>> testsuites/libtests/tar01/tar01-tar.h:8:12: warning: ISO C99
>>>> requires whitespace
>>>> after the macro name
>>>> #define
>>>> __D:_opt_rtems_rtems_seb_build_sparc_erc32_testsuites_libtests_tar01_tar01_tar_h
>>>>
>>>> ^
>>>> In file included from
>>>> D:/opt/rtems/rtems.seb/testsuites/libtests/tar01/init.c:27:0:
>>>> testsuites/libtests/tar01/tar01-tar-gz.h:7:12: warning: extra tokens
>>>> at end of
>>>> #ifndef directive
>>>> #ifndef
>>>> __D:_opt_rtems_rtems_seb_build_sparc_erc32_testsuites_libtests_tar01_tar01_tar_gz_h
>>>>
>>>>
>>>> ^
>>>> D:/opt/rtems/rtems.seb/testsuites/libtests/tar01/init.c: In function
>>>> 'test_untar_unzip_tgz':
>>>> D:/opt/rtems/rtems.seb/testsuites/libtests/tar01/init.c:44:26: error:
>>>> 'tar01_tar_gz' undeclared (first use in this function); did you mean
>>>> 'tar01_tar_size'?
>>>> #define TARFILE_GZ_START tar01_tar_gz
>>>> ^
>>>> D:/opt/rtems/rtems.seb/testsuites/libtests/tar01/init.c:198:26:
>>>> note: in
>>>> expansion of macro 'TARFILE_GZ_START'
>>>> char *buffer = (char *)TARFILE_GZ_START;
>>>> ^~~~~~~~~~~~~~~~
>>>> D:/opt/rtems/rtems.seb/testsuites/libtests/tar01/init.c:44:26: note:
>>>> each
>>>> undeclared identifier is reported only once for each function it
>>>> appears in
>>>> #define TARFILE_GZ_START tar01_tar_gz
>>>> ^
>>>> D:/opt/rtems/rtems.seb/testsuites/libtests/tar01/init.c:198:26:
>>>> note: in
>>>> expansion of macro 'TARFILE_GZ_START'
>>>> char *buffer = (char *)TARFILE_GZ_START;
>>>> ^~~~~~~~~~~~~~~~
>>>> D:/opt/rtems/rtems.seb/testsuites/libtests/tar01/init.c:45:26: error:
>>>> 'tar01_tar_gz_size' undeclared (first use in this function); did you
>>>> mean
>>>> 'tar01_tar_size'?
>>>> #define TARFILE_GZ_SIZE tar01_tar_gz_size
>>>> ^
>>>> D:/opt/rtems/rtems.seb/testsuites/libtests/tar01/init.c:199:19:
>>>> note: in
>>>> expansion of macro 'TARFILE_GZ_SIZE'
>>>> size_t buflen = TARFILE_GZ_SIZE;
>>>> ^~~~~~~~~~~~~~~
>>>
>>> I think this revealed two issues.
>>>
>>> 1. The file name sanitation in bin2c was not really good. I fixed it
>>> like this:
>>>
>>> https://git.rtems.org/rtems-tools/commit/?id=83b8f1f2a5838a5d56e15c70d44348e3e393e3f7
>>>
>>
>> I cannot test this at the moment because I cannot build the sparc
>> tools after
>> the updates. Something about an unresolved external in string.h in gdb
>> and I
>> have not tracked it down.
>
> I do currently a MinGW64/MSYS2 installation from scratch. For the first
> tests I used an existing installation. I think it makes a difference if
> you build the rtems-tools with the MSYS2 GCC or the MinGW64 GCC. For
> example, I didn't observe the bin2c issue in my tests.
I was able to build the tools without GDB:
installing: sparc-rtems5-binutils-2.33.1-x86_64-w64-mingw32-1 ->
c:\test-msys64\home\rtems\5
installing: sparc-rtems5-gcc-7.5.0-newlib-d14714c69-x86_64-w64-mingw32-1
-> c:\test-msys64\home\rtems\5
installing: rtems-tools-83b8f1f2a5838a5d56e15c70d44348e3e393e3f7-1 ->
c:\test-msys64\home\rtems\5
installing: sis-2.20-x86_64-w64-mingw32-1 -> c:\test-msys64\home\rtems\5
cleaning: sparc-rtems5-binutils-2.33.1-x86_64-w64-mingw32-1
cleaning: sparc-rtems5-gcc-7.5.0-newlib-d14714c69-x86_64-w64-mingw32-1
cleaning: rtems-tools-83b8f1f2a5838a5d56e15c70d44348e3e393e3f7-1
cleaning: sis-2.20-x86_64-w64-mingw32-1
Build Sizes: usage: 7.813GB total: 1.792GB (sources: 124.484MB, patches:
19.412KB, installed 1.670GB)
installing: 5/rtems-sparc -> c:\test-msys64\home\rtems\5
clean staging: 5/rtems-sparc
Staging Size: 5.292MB
Build Set: Time 2:08:23.014800
However:
$ ./waf configure --prefix=$HOME/rtems/5
Setting top to : C:/test-msys64/home/src/rtems
Setting out to :
C:/test-msys64/home/src/rtems/build
Configure board support package (BSP) : sparc/leon3
Checking for program 'sparc-rtems5-gcc' :
C:/test-msys64/home/rtems/5/bin/sparc-rtems5-gcc.exe
Checking for program 'sparc-rtems5-g++' :
C:/test-msys64/home/rtems/5/bin/sparc-rtems5-g++.exe
Checking for program 'sparc-rtems5-ar' :
C:/test-msys64/home/rtems/5/bin/sparc-rtems5-ar.exe
Checking for program 'sparc-rtems5-ld' :
C:/test-msys64/home/rtems/5/bin/sparc-rtems5-ld.exe
Checking for program 'ar' :
C:/test-msys64/home/rtems/5/bin/sparc-rtems5-ar.exe
Checking for program 'g++, c++' :
C:/test-msys64/home/rtems/5/bin/sparc-rtems5-g++.exe
Checking for program 'ar' :
C:/test-msys64/home/rtems/5/bin/sparc-rtems5-ar.exe
Checking for program 'gas, gcc' :
C:/test-msys64/home/rtems/5/bin/sparc-rtems5-gcc.exe
Checking for program 'ar' :
C:/test-msys64/home/rtems/5/bin/sparc-rtems5-ar.exe
Checking for program 'gcc, cc' :
C:/test-msys64/home/rtems/5/bin/sparc-rtems5-gcc.exe
Checking for program 'ar' :
C:/test-msys64/home/rtems/5/bin/sparc-rtems5-ar.exe
Checking for program 'rtems-bin2c' : not found
Could not find the program ['rtems-bin2c']
(complete log in C:/test-msys64/home/src/rtems/build/config.log)
And:
$ ls -l $HOME/rtems/5/bin/*bin2c*
ls: cannot access '/c/test-msys64/home/rtems/5/bin/*bin2c*': No such
file or directory
And:
$ grep bin2c rsb-log-20191203-111304.txt
x -rw-rw-rw- 0 nickc nickc 1639 Sep 9 15:19
binutils-2.33.1/binutils/bin2c.c
x drwxrwxr-x 0 root root 0 Dec 2 06:44
rtems-tools-83b8f1f2a5838a5d56e15c70d44348e3e393e3f7/misc/bin2c/
x -rw-rw-r-- 0 root root 1683 Dec 2 06:44
rtems-tools-83b8f1f2a5838a5d56e15c70d44348e3e393e3f7/misc/bin2c/compat.c
x -rw-rw-r-- 0 root root 7463 Dec 2 06:44
rtems-tools-83b8f1f2a5838a5d56e15c70d44348e3e393e3f7/misc/bin2c/rtems-bin2c.c
[238/255] Compiling misc/bin2c/compat.c
[239/255] Compiling misc/bin2c/rtems-bin2c.c
[244/255] Linking build/misc/rtems-bin2c.exe
+ install
C:/test-msys64/home/src/rsb/rtems/build/tmp/rt81-197608/test-msys64/home/rtems/5/bin/rtems-bin2c.exe
(from build/misc/rtems-bin2c.exe)
It seems rtems-bin2c.exe is only installed in the RSB build tree?
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the devel
mailing list