tang icon indicating copy to clipboard operation
tang copied to clipboard

added cross compile setup

Open n80fr1n60 opened this issue 11 months ago • 2 comments

This setup should enable proper cross compilation

  • tested with arm-linux-gnueabihf and "libhttp_parser"

n80fr1n60 avatar Feb 24 '25 11:02 n80fr1n60

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 59.27%. Comparing base (83de399) to head (48e9a4f). Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #153      +/-   ##
==========================================
+ Coverage   58.44%   59.27%   +0.83%     
==========================================
  Files           4        4              
  Lines         580      582       +2     
  Branches      147      148       +1     
==========================================
+ Hits          339      345       +6     
+ Misses        140      137       -3     
+ Partials      101      100       -1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Feb 24 '25 12:02 codecov[bot]

get_external_property() has meson >= 0.54.0 as requirement focal has 0.53.2 installed @sergio-correia is that a hard requirement or is it possible to update it ? eg with :

  • sudo apt remove -y meson
  • sudo pip3 install --upgrade meson

n80fr1n60 avatar Feb 24 '25 14:02 n80fr1n60

get_external_property() has meson >= 0.54.0 as requirement focal has 0.53.2 installed @sergio-correia is that a hard requirement or is it possible to update it ? eg with :

* sudo apt remove -y meson

* sudo pip3 install --upgrade meson

Hello. I find no problem in upgrading meson version ... WDYT @sergio-correia ?

sarroutbi avatar Feb 28 '25 11:02 sarroutbi

get_external_property() has meson >= 0.54.0 as requirement focal has 0.53.2 installed @sergio-correia is that a hard requirement or is it possible to update it ? eg with :

* sudo apt remove -y meson

* sudo pip3 install --upgrade meson

I think this would be okay, but can you do this just for focal? So that we keep using the meson provided by the distribution for the remaining ones.

sergio-correia avatar Feb 28 '25 13:02 sergio-correia

@sarroutbi @sergio-correia jfi, for the cross build, i just noticed i did not yet conditionally exclude the test subdir like i did here: https://github.com/latchset/clevis/pull/511/commits/a06d62f27af3ff5ebfd18611ceebb6727da855cc

I will update the code and push it

n80fr1n60 avatar Feb 28 '25 14:02 n80fr1n60

@sarroutbi @sergio-correia excluded tests from cross build

n80fr1n60 avatar Mar 03 '25 13:03 n80fr1n60

@sarroutbi @sergio-correia excluded tests from cross build

Now you need to update meson in focal, right?

sergio-correia avatar Mar 03 '25 13:03 sergio-correia

@sarroutbi @sergio-correia excluded tests from cross build

Now you need to update meson in focal, right?

yes - then the automated test should work

As a side note:

  • If we want to have a test, and see if cross compilation works, i can try to set it up - just need to agree which triplet to use ( Crosstool-NG ), and for tests either QEMU or dockercross for running tests ?

n80fr1n60 avatar Mar 03 '25 13:03 n80fr1n60

@sarroutbi @sergio-correia excluded tests from cross build

Now you need to update meson in focal, right?

yes - then the automated test should work

As a side note:

* If we want to have a test, and see if cross compilation works, i can try to set it up -  just need to agree which triplet to use ( Crosstool-NG ), and for tests either QEMU or dockercross for running tests ?

@sarroutbi @sergio-correia any updates here ?

n80fr1n60 avatar Mar 06 '25 09:03 n80fr1n60

@sarroutbi @sergio-correia excluded tests from cross build

Now you need to update meson in focal, right?

yes - then the automated test should work As a side note:

* If we want to have a test, and see if cross compilation works, i can try to set it up -  just need to agree which triplet to use ( Crosstool-NG ), and for tests either QEMU or dockercross for running tests ?

@sarroutbi @sergio-correia any updates here ?

Did you update meson version in focal?

sarroutbi avatar Mar 06 '25 12:03 sarroutbi

focal

@sarroutbi updated workflow build.yaml

btw: yamllint sees .github/workflows/build.yml 4:1 warning truthy value should be one of [false, true] (truthy)

n80fr1n60 avatar Mar 06 '25 13:03 n80fr1n60

focal

@sarroutbi updated workflow build.yaml

btw: yamllint sees .github/workflows/build.yml 4:1 warning truthy value should be one of [false, true] (truthy)

This is normally reported by not using "on" and using it without quotes in here: https://github.com/latchset/tang/blob/master/.github/workflows/build.yml#L4

If you change it (on->"on"), yamllint should not complain

sarroutbi avatar Mar 06 '25 13:03 sarroutbi

@sarroutbi updated workflow build.yaml

btw: yamllint sees .github/workflows/build.yml 4:1 warning truthy value should be one of [false, true] (truthy)

I would probably do these changes in that install-dependencies shell script, as it seems simpler.

sergio-correia avatar Mar 06 '25 14:03 sergio-correia

@sarroutbi updated workflow build.yaml btw: yamllint sees .github/workflows/build.yml 4:1 warning truthy value should be one of [false, true] (truthy)

I would probably do these changes in that install-dependencies shell script, as it seems simpler.

@sarroutbi moved it to the install-dependencies and added ubuntu:focal handling

@sarroutbi updated workflow build.yaml btw: yamllint sees .github/workflows/build.yml 4:1 warning truthy value should be one of [false, true] (truthy)

I would probably do these changes in that install-dependencies shell script, as it seems simpler.

@sarroutbi moved it to install-dependecies shell script

n80fr1n60 avatar Mar 06 '25 15:03 n80fr1n60

as a side note: @sarroutbi @sergio-correia do not know if you already saw it, there is is another PR from my side for clevis --> https://github.com/latchset/clevis/pull/511

Along the way, I have created a markdown document while doing the cross compilation (it covers the whole dependency chain from tangd, aka libjose, luksmeta, device mapper etc ...)
I can share it, should we add this cross-compile-readme here or can we add a link from here to my repo ?

n80fr1n60 avatar Mar 06 '25 16:03 n80fr1n60

as a side note: @sarroutbi @sergio-correia do not know if you already saw it, there is is another PR from my side for clevis --> latchset/clevis#511

Along the way, I have created a markdown document while doing the cross compilation - I can share it, should we add this cross-compile-readme here or can we add a link from here to my repo ?

I think it would be better to add the document to the repo, so that we can update it as required.

sergio-correia avatar Mar 06 '25 16:03 sergio-correia

as a side note: @sarroutbi @sergio-correia do not know if you already saw it, there is is another PR from my side for clevis --> latchset/clevis#511 Along the way, I have created a markdown document while doing the cross compilation - I can share it, should we add this cross-compile-readme here or can we add a link from here to my repo ?

I think it would be better to add the document to the repo, so that we can update it as required.

Ok i will do a new branch, rework formatting and then do a new PR.

For cross build issues, I am happy to help/support

Thanks for the support :-)

n80fr1n60 avatar Mar 06 '25 16:03 n80fr1n60

as a side note: @sarroutbi @sergio-correia do not know if you already saw it, there is is another PR from my side for clevis --> latchset/clevis#511 Along the way, I have created a markdown document while doing the cross compilation - I can share it, should we add this cross-compile-readme here or can we add a link from here to my repo ?

I think it would be better to add the document to the repo, so that we can update it as required.

Ok i will do a new branch, rework formatting and then do a new PR.

For cross build issues, I am happy to help/support

Thanks for the support :-)

Thanks for this work!

sergio-correia avatar Mar 06 '25 16:03 sergio-correia