[RSB] port graphic libraries into rsb
Chris Johns
chrisj at rtems.org
Mon Jul 20 10:28:48 UTC 2015
On 20/07/2015 7:34 pm, Pavel Pisa wrote:
> Hello Chris and Qiao Yang,
>
> On Monday 20 of July 2015 01:12:33 Chris Johns wrote:
>> On 20/07/2015 6:55 am, QIAO YANG wrote:
>>> I've ported the graphic libraries into rsb so that we can build them
>>> much easier. All Build passed, tested on arm with raspberrypi and i386
>>> with pc386.
>>
>> Fantastic and thank you.
>
> I have reproduced build for i386. Thanks for instructions.
> I return to the Microwindows suggestions in a separate message.
>
> I would like to speak about source builder related questions first
>
>>> the libraries can be built with the command like:
>>>
>>> ../source-builder/sb-set-builder \
>>> --log=graphic-build-log.txt \
>>> --prefix=$HOME/development/rtems-386/bsps/4.11 \
>>> --with-rtems-bsp=pc386 \
>>> --host=i386-rtems4.11 \
>>> 4.11/graphics/freetype2.bset \
>>> 4.11/graphics/libjpeg.bset \
>>> 4.11/graphics/libpng.bset \
>>> 4.11/graphics/libtiff.bset \
>>> 4.11/graphics/t1lib.bset \
>>> 4.11/graphics/microwindows.bset \
>>> 4.11/graphics/nxlib.bset
>>>
>>> Patches that I used is available on my github fork of rtems-tools.
>>> Waiting for more tests and reviews.
>>
>> I am closing in on finishing ticket https://devel.rtems.org/ticket/2374
>> and I will test this after it has been resolved.
>
> I use system wide prefix for my RTEMS install. When I specified that
>
> --prefix=/opt/rtems4.11
>
> When I specified that to sb-set-builder then it silently skips install
> steps. This leads not only to problem that I have not received resulting
> binaries (even not found them in temporary RSB trees) but even build of
> later packages dependant on previous ones failed.
Please see:
https://devel.rtems.org/ticket/2374
https://lists.rtems.org/pipermail/users/2015-July/029233.html
I suggest you update and see if the changes I have recently pushed help.
>
> I resolved that by use of RSB option
>
> --pkg-tar-files
>
> tar files has been generated and I could extract content to the right
> directory and continue build with followup with sucesfull Microwindows
> package build. I have been able to use that (after tar extraction)
> to build and run my graphic application in QEMU then.
>
> But I have failed into other trap with RSB first. I am used never
> run commands with current directory in the git. So I have setup
> build directory for the test and tried to run next script
>
> -----------------------------------------------------------------
> #!/bin/sh
>
> SB_DIR="../../git/rtems-source-builder-yangqiao"
>
> SB_DIR="$(cd -L "$SB_DIR" ; pwd -L )"
>
> mkdir -p yangqiao-graphics
>
> cd yangqiao-graphics
>
> # --prefix=$HOME/development/rtems-386/bsps/4.11 \
>
> "$SB_DIR/source-builder/sb-set-builder" \
> --log=graphic-build-log.txt \
> --prefix=/opt/rtems4.11 \
> --with-rtems-bsp=pc686 \
> --host=i386-rtems4.11 \
> --configdir "$SB_DIR/rtems/config" \
> --pkg-tar-files \
> "$SB_DIR/rtems/config/4.11/graphics/freetype2.bset" \
> "$SB_DIR/rtems/config/4.11/graphics/libjpeg.bset" \
> "$SB_DIR/rtems/config/4.11/graphics/libpng.bset" \
> "$SB_DIR/rtems/config/4.11/graphics/libtiff.bset" \
> "$SB_DIR/rtems/config/4.11/graphics/t1lib.bset" \
> "$SB_DIR/rtems/config/4.11/graphics/microwindows.bset" \
> "$SB_DIR/rtems/config/4.11/graphics/nxlib.bset"
Just a small note. You should be able to make a build set file that is a
list of these build sets and use just use that. This a key feature,
being able to build up sets of packages to build in a controlled order.
> -----------------------------------------------------------------
>
> I tried to modify parameters different ways but it seems that
> invocation outside of "git/rtems-source-builder/rtems" is not
> supported. I.e. if --configdir is set then relative subdirectory
> components pointing to *.cfg files are stripped.
I suspect this is a bug. It should be supported.
> It can be good
> idea on one hand if it is expected to put then all *.cfg files
> to local/build specific/ directory but means finding and copying
> of all dependences *.cfg.
Let me take a look and get back to you.
> I expect, that viceversa setup, i.e. CWD in "git/rtems-source-builder/rtems"
> and option --topdir would work but I have not tested that.
The original intent is to allow configurations outside of the RSB tree
and to have them supported.
> I am not sure if described behavior is bug or feature and would like
> to hear what is expected use.
Bug.
>
> The last question is on the border of RSB build and graphic packages
> specific area.
>
> Because libraries build is specific than I expect that all build
> results should be installed in BSP directory, i.e.
> /opt/rtems4.11/i386-rtems4.11/pc686/{lib,bin,lib/include} in my case.
> It seems that JPEG library is configured right. But there are significant
> leakages from freetype, libpng, t1lib and libtiff to
> "/opt/rtems4.11/bin" and "/opt/rtems4.11/share" directories.
> t1lib even installs to /share/t1lib directly.
>
> It would be great if it is possible to limit these leaks.
> I expect that most can be prevented by right prefix path related
> options during packages configuration. I would be probably reasonable
> to disable build of test code and utilities by config options
> if possible. They are of zero value as host RTEMS tools "/opt/rtems4.11/bin"
> when compiled for target and even on target there are usable libraries
> only because RTEMS does not load applications at runtime.
The way this is done in the NetSNMP packag is by setting each path:
https://git.rtems.org/rtems-source-builder/tree/source-builder/config/net-snmp-5-1.cfg#n50
and these paths are set up here:
https://git.rtems.org/rtems-source-builder/tree/rtems/config/rtems-bsp.cfg#n75
>
> None of above is critical but it would worth to clean up for better
> experience.
>
Thanks for the feedback.
A final note, I have cleaned up the RTEMS specific parameters for
building 3rd party packages. You can now use:
--rtems-tools=<path> Path to the installed RTEMS tools.
--rtems-bsp=arch/bsp For example sparc/sis
These replace the --with-rtems-tools and --with-rtems-bsp as well as the
--target setting. You can still use what you are currently using if you
wish.
The --rtems-tools option is internally expanded to --with-rtems-tools.
The --rtems-bsp is split into the arch and BSP and --target is set to
--target=arch-rtems4.11 where 4.11 is the default version. The BSP is
expanded into --with-rtems-bsp=BSP.
I have done this so the options better match the options used to build
the RTEMS waf packages such as examples-v2 and so reduce the number
variants of these types of options.
Chris
More information about the devel
mailing list