Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing build and updating osxtools #41

Merged
merged 1 commit into from
Jan 17, 2020
Merged

Conversation

artynet
Copy link
Contributor

@artynet artynet commented Jan 17, 2020

please consider my PR for updating your system. It works on Debian Buster as well...

  • Fixes build with Debian Stretch
  • osxtools are updated to release g542acc2

* osxtools are updated to release g542acc2
artynet referenced this pull request Jan 17, 2020
@lafin lafin merged commit 5298819 into multiarch:master Jan 17, 2020
@lafin
Copy link
Contributor

lafin commented Jan 17, 2020

@artynet 👍

@artynet
Copy link
Contributor Author

artynet commented Jan 17, 2020

Thank you @lafin for accepting my PR ! you can switch to Buster anytime you want...the Dockerfile is fully compatible ;)

@lafin lafin mentioned this pull request Jan 17, 2020
@inolen
Copy link

inolen commented Jan 17, 2020

HI @lafin,

Has this PR actually been tested? Diffing it with my own patch from #40 (comment) and it seems to be missing some fairly critical steps:

  1. ln -s /usr /usr/x86_64-linux-gnu/x86_64-linux-gnu is absolutely required after updating to Stretch.

  2. IIRC, checking that $bin exists in those loops is critical in the event that /usr/bin/$triple-* doesn't expand or else the build will fail.

  3. The crossbuild script itself overwrites LD_LIBRARY_PATH https://github.com/artynet/multiarch-crossbuild/blob/10190a99cad28b24bfa8a90f7e8ee7adedcbb384/assets/crossbuild#L43, I don't believe setting it in the Dockerfile will work. Edit: Ignore this, the script also backs up LD_LIBRARY_PATH into LD_LIBRARY_PATH_ORIGIN shortly beforehand which is appended. I'd argue however that adding all of the additional crossbuild-specific LD_LIBRARY_PATH paths in the same location is a better choice.

I've tested the patch from #40 (comment) on x86_64-apple-darwin, x86_64-w64-mingw32 and default x86_64-linux-gnu and I'm fairly sure from eyeballing this patch that it won't successfully build / compile for these.

@artynet
Copy link
Contributor Author

artynet commented Feb 18, 2020

hello @inolen, does this work for you ?

 diff --git a/assets/crossbuild b/assets/crossbuild
 index 098b762..8e1ee2d 100755
 --- a/assets/crossbuild
 +++ b/assets/crossbuild
 @@ -40,7 +40,7 @@ if [ -z ${LD_LIBRARY_PATH_ORIGIN+x} ]; then export LD_LIBRARY_PATH_ORIGIN=${LD_L
  if [ -n "${CROSS_TRIPLE}" ]; then
      export CROSS_ROOT="/usr/${CROSS_TRIPLE}"
      export PATH="${CROSS_ROOT}/bin:${PATH_ORIGIN}"
 -    export LD_LIBRARY_PATH="/usr/x86_64-linux-gnu/${CROSS_TRIPLE}/lib:${LD_LIBRARY_PATH_ORIGIN}"
 +    export LD_LIBRARY_PATH="/usr/x86_64-linux-gnu/${CROSS_TRIPLE}/lib:/usr/osxcross/lib:${LD_LIBRARY_PATH_ORIGIN}"
  fi
  
  # try to exec direct binary instead on relying on the $PATH

concerning the LD_LIBRARY_PATH ? if you look at the travis build, the hello-world examples are successfully built and the link issue is fixed starting from line 100 of the Dockerfile itself :

https://github.com/multiarch/crossbuild/blob/master/Dockerfile#L100

please take a look at it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants