MIPS build requires native expat lib (Was: [rtems-source-builder PATCH] rtems: Add back gsed that was remove by mistake)

Frank Kühndel frank.kuehndel at embedded-brains.de
Thu Apr 20 16:53:45 UTC 2023


Hi Chris,

I compared the successful Debian-11 MIPS build with the failing 
AlmaLinux MIPS build.

The Debian 11 container has a native "expat.h" and "libexpat.a" 
installed (and the source-builder uses 
"rtems-source-builder/rtems/build/tmp/sb-1000/tools/rtems-mipstx39-gdb/opt/rtems/6/include/gmp.h"):

~~~~
   minna at e7a01fbe81fa:~/src$ find /usr -name expat.h
   /usr/include/expat.h
   minna at e7a01fbe81fa:~/src$ find /usr -name libexpat.\*
   /usr/lib/x86_64-linux-gnu/libexpat.so
   /usr/lib/x86_64-linux-gnu/libexpat.a
~~~~

With other words, the build on Debian is only successful because it uses 
the native "expat" from the OS. On Almalinux it is not installed so it 
fails. (The "expat" on Debian must be pulled in by some dependency from 
other needed packages.)

The "6/rtems-mips.bset" build "gmp" and "gdb" twice but "expat" only 
once. In "tools/rtems-default-tools.bset" "gmp", "expat" and "gdb" are 
build the first time:

~~~~
%{with_rtems_dtc}
%{with_rtems_expat}
%{with_rtems_gmp}
%{with_rtems_gsed}
%{with_rtems_texinfo}
%{with_rtems_gdb}
%{with_rtems_binutils}
%{with_rtems_gcc}
%{with_rtems_tools}
~~~~

According to the log, after executing "tools/rtems-tools-6.cfg" there is 
a clean-up and all the above tools are cleaned away, including "gmp", 
"expat" and "gdb", for example "expat":

~~~~
cleaning: expat-2.4.8-x86_64-linux-gnu-1
[...]
cleanup: 
/home/minna/src/rtems-source-builder/rtems/build/tmp/expat-2.4.8-x86_64-linux-gnu-1-1000
removing: 
/home/minna/src/rtems-source-builder/rtems/build/tmp/expat-2.4.8-x86_64-linux-gnu-1-1000
cleanup: 
/home/minna/src/rtems-source-builder/rtems/build/expat-2.4.8-x86_64-linux-gnu-1
removing: 
/home/minna/src/rtems-source-builder/rtems/build/expat-2.4.8-x86_64-linux-gnu-1
cleanup: 
/home/minna/src/rtems-source-builder/rtems/build/tmp/sb-1000/tools/rtems-default-tools
removing: 
/home/minna/src/rtems-source-builder/rtems/build/tmp/sb-1000/tools/rtems-default-tools
~~~~

This is why it cannot be found later on and it is not in the remaining 
files. Afterwards "tools/rtems-mipstx39-gdb.bset" build "gmp" and "gdb" 
again but not "expat":

~~~~
devel/gmp-6.2.1
tools/rtems-gdb-13.1
~~~~

This is the reason why this second "gdb" build finds "gmp" in 
"rtems-source-builder/rtems/build/tmp/sb-1000/tools/rtems-mipstx39-gdb/opt/rtems/6/include/gmp.h" 
but not "expat.h". Yet, a copy of the whole stuff from the earlier 
"tools/rtems-default-tools.bset" build is still in the 
"rtems-source-builder/rtems/build/tmp/sb-1000-staging" tree. (Yet, it 
looks like that at the end of the "tools/rtems-mipstx39-gdb.bset", the 
files from second "gmp" build would overwrite the ones from first build 
in the "sb-1000-staging" tree.

So I believe I am closer to the root of the problem now but I do not 
know what needs to be fixed.

Greetings,
fk


On 4/20/23 05:23, Chris Johns wrote:
> Subject:
> Re: [rtems-source-builder PATCH] rtems: Add back gsed that was remove by 
> mistake
> From:
> Chris Johns <chrisj at rtems.org>
> Date:
> 4/20/23, 05:23
> 
> To:
> Frank Kühndel <frank.kuehndel at embedded-brains.de>, devel at rtems.org
> 
> 
> On 19/4/2023 11:26 pm, Frank Kühndel wrote:
>> Hello Chris,
>>
>> thanks for the introduction to package build. On AlmaLinux the file
>> rtems-source-builder/rtems/build/mipstx39-rtems6-gdb-13.1-x86_64-linux-gnu-1/build/gdb/config.log (attached) contains this error:
>>
>> ~~~~
>> configure:21340: gcc -O2 -g -pipe
>> -I/home/minna/src/rtems-source-builder/rtems/build/tmp/sb-1000/tools/rtems-mipstx39-gdb/opt/rtems/6/include -o conftest -g -O2 -L/home/minna/src/rtems-source-builder/rtems/build/tmp/sb-1000/tools/rtems-mipstx39-gdb/opt/rtems/6/lib conftest.c -lm -ldl  -lexpat >&5
>> conftest.c:53:10: fatal error: expat.h: No such file or directory
>>   #include "expat.h"
>>            ^~~~~~~~~
>> compilation terminated.
>> ~~~~
>>
>> The include file and the library would be in
>>
>> rtems-source-builder/rtems/build/tmp/sb-1000-staging/include/expat.h
> Is the staging include path in the build flags for GDB?
> 
>> rtems-source-builder/rtems/build/tmp/sb-1000-staging/lib/libexpat.a
>> rtems-source-builder/rtems/build/tmp/sb-1000-staging/lib/libexpat.la
>>
>> The directories mentioned in the gcc-invokation contain only
>>
>>      84 -rw-r--r--   1  minna    users       84084 Apr 19 13:19
>> rtems-source-builder/rtems/build/tmp/sb-1000/tools/rtems-mipstx39-gdb/opt/rtems/6/include/gmp.h
>>
>> and
>>
>>     6952 -rw-r--r--   1  minna    users     7115648 Apr 19 13:19
>> rtems-source-builder/rtems/build/tmp/sb-1000/tools/rtems-mipstx39-gdb/opt/rtems/6/lib/libgmp.a
>>        4 -rwxr-xr-x   1  minna    users         968 Apr 19 13:19
>> rtems-source-builder/rtems/build/tmp/sb-1000/tools/rtems-mipstx39-gdb/opt/rtems/6/lib/libgmp.la
>>        4 drwxr-xr-x   2  minna    users        4096 Apr 19 13:19
>> rtems-source-builder/rtems/build/tmp/sb-1000/tools/rtems-mipstx39-gdb/opt/rtems/6/lib/pkgconfig
>>        4 -rw-r--r--   1  minna    users         257 Apr 19 13:19
>> rtems-source-builder/rtems/build/tmp/sb-1000/tools/rtems-mipstx39-gdb/opt/rtems/6/lib/pkgconfig/gmp.pc
>>
>> Just for the records:
>>
>> PARAM_ARCH="mips"
>> PARAM_RTEMS_VERSION="6"
>> PARAM_RSB_GIT_COMMIT="origin/master"
>> GIT_HEAD="ae00c59541f21d8c459a33774efade80085c9b4a"
>> CONT_OS_VERSION_ID="8.7"
>> CONT_OS_ID="almalinux"
>>
>> Let me know if you need more information. If you have a patch, I will be happy
>> to feed our CI with it.
> I do not know why this is happening so I am not sure how to fix it.
> 
> Chris
> 

-- 
embedded brains GmbH & Co. KG
Herr Frank KÜHNDEL
Dornierstr. 4
82178 Puchheim
Germany
email: frank.kuehndel at embedded-brains.de
phone:  +49-89-18 94 741 - 23
mobile: +49-176-15 22 06 - 11

Registergericht: Amtsgericht München
Registernummer: HRA 117265
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/


More information about the devel mailing list