On 5/14/19 11:12 PM, Helmut Grohne wrote:
superkb fails to cross build from source, because the upstream build
system hard codes build architecture build tools (gcc and pkg-config).
The attached patch makes these tools substitutable,

Hi, Helmut,

Thank you for the patch! I applied it upstream.

but it doesn't make
superkb cross buildable due to its use of help2man. This is harder to
solve and not fixed here. Please consider applying the attached patch
anyway and close this bug when doing so even though superkb will
continue to fail cross building.

I also implemented a help2man fix upstream. It's done in two commits:

First, in commit b364c89897 [1] I moved the help text outside of main.c into a separate header file.

Then, in commit 6ba0933bd0 [2] I added a help stub: a Bash script that when takes the -h option it just processes the help message from the separate message file and outputs the help message. This stub is called from help2man instead of the application binary.

However, I clean the Bash script in a later commit (b5a418cc40 [3]) to use cpp -E instead of sed to parse the .h file. This is better because cpp is the proper parser for an .h file. Please confirm that this use of cpp does not break cross-compilation.

Because this technique is architecture independent it should work for
cross-compilation without having to build twice.

The three patches are upstream. Because I have not applied those to the Debian package I will keep the report open.

Thank you,
Octavio.

[1] Moved the help text outside of main.c
https://gitlab.com/alvarezp2000/superkb/commit/b364c8989773d68fb116fe2a8a5fd0c27b71bc18

[2] Add and use a help2man stub
https://gitlab.com/alvarezp2000/superkb/commit/6ba0933bd06d9ac5640aac42109f98ec1c2774fd

[3] help2man/superkb: way cleaner method to use main-help-message.h
https://gitlab.com/alvarezp2000/superkb/commit/b5a418cc4020b4ba276944b178235a9fb2373d8a

Reply via email to