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

[build] Add symlink_system_library calls for CSL #40217

Merged
merged 2 commits into from
Apr 6, 2021
Merged

Conversation

staticfloat
Copy link
Member

@staticfloat staticfloat commented Mar 26, 2021

We handle USE_SYSTEM_CSL=1 the same as USE_BINARYBUILDER_CSL=0, so
we should always install the libraries locally. Arguably we could
symlink instead of copying, but the benefit of isolation where the
user can then run make binary-dist is still evident.

Fixes #40201

@staticfloat staticfloat added the backport 1.6 Change should be backported to release-1.6 label Mar 26, 2021
@staticfloat
Copy link
Member Author

Fixes #40201

Copy link
Contributor

@yuyichao yuyichao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System libraries must not be copied and must be symlinked instead.
If you want to support creating a portable build out of system library, that should be handled with a different option.

@vtjnash
Copy link
Member

vtjnash commented Mar 26, 2021

Previously, we've been handling these cases in base/Makefile. Perhaps not really the most consistent place to handle it, since many of those are actually present for stdlib _jll packages, but we should at least keep the handling consistent and together, where ever that may be.

@staticfloat staticfloat changed the title [build] Always install csl in deps/Makefile [build] Add symlink_system_library calls for CSL Mar 26, 2021
@staticfloat
Copy link
Member Author

Alright, new implementation that is a little bit more work (mostly because we can't find libgcc_s without adding the SOVERSION to the end, which required re-architecting some Makefile functions) but what I have now gives us three separate configurations:

  1. USE_BINARYBUILDER_CSL=1: behavior unchanged, downloads and bundles the CSL from Yggdrasil. This is the default.

  2. USE_BINARYBUILDER_CSL=0: Copies the libraries from the current compiler suite into usr/lib, as this is the closest we can get to a "from source" build without actually building GCC and friends.

  3. USE_SYSTEM_CSL=1: Symlinks the libraries into usr/lib/julia using the same logic as the rest of the USE_SYSTEM_* flags.

I think this should satisfy all use cases. :)

@yuyichao
Copy link
Contributor

The revised behavior SGTM.

We differentiate between a `USE_BINARYBUILDER_CSL=0` configuration
(where we copy the CSL libraries into the Julia build tree) versus a
`USE_SYSTEM_CSL=1` configuration (where we symlink them in a manner
similar to other system libararies)
Without this, we fail to install things like `libgcc_s.so.1` when
installed into the private libdir by `symlink_system_libraries`.
@KristofferC KristofferC mentioned this pull request Apr 4, 2021
33 tasks
@staticfloat staticfloat merged commit 336cdf8 into master Apr 6, 2021
@staticfloat staticfloat deleted the sf/use_system_csl branch April 6, 2021 21:10
@ronisbr
Copy link
Member

ronisbr commented Apr 9, 2021

I am not sure if this is related, but using this patch in 1.6 and building Julia with USE_SYSTEM_CSL=1, the system tries to build the documentation even if it is already present from the tarball I downloaded:

[ 2343s] /home/abuild/rpmbuild/BUILD/julia-1.6.0/deps/tools/jldownload "/home/abuild/rpmbuild/BUILD/julia-1.6.0/deps/srccache/UnicodeData-13.0.0.txt" http://www.unicode.org/Public/13.0.0/ucd/UnicodeData.txt
[ 2343s] Could not find working curl, wget, or fetch.
[ 2343s] You need to install one of these to download dependencies.
[ 2343s] make[2]: *** [Makefile:30: /home/abuild/rpmbuild/BUILD/julia-1.6.0/deps/srccache/UnicodeData-13.0.0.txt] Error 1
[ 2343s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/julia-1.6.0/doc'
[ 2343s] make[1]: *** [Makefile:95: docs] Error 2
[ 2343s] make[1]: Leaving directory '/home/abuild/rpmbuild/BUILD/julia-1.6.0'
[ 2343s] make: *** [Makefile:47: /home/abuild/rpmbuild/BUILD/julia-1.6.0/doc/_build/html/en/index.html] Error 2
[ 2343s] error: Bad exit status from /var/tmp/rpm-tmp.R86M1y (%install)

The build works fine without this patch and USE_SYSTEM_CSL=0.

Note: I cannot build in the server farm Julia 1.6.0 with USE_SYSTEM_CSL=1 and without this patch. That's why I did not test.

KristofferC pushed a commit that referenced this pull request Apr 11, 2021
* [build] Add `symlink_system_library` calls for CSL

We differentiate between a `USE_BINARYBUILDER_CSL=0` configuration
(where we copy the CSL libraries into the Julia build tree) versus a
`USE_SYSTEM_CSL=1` configuration (where we symlink them in a manner
similar to other system libararies)

* Expand `JL_PRIVATE_LIBS-1` for versioned library names as well

Without this, we fail to install things like `libgcc_s.so.1` when
installed into the private libdir by `symlink_system_libraries`.

(cherry picked from commit 336cdf8)
@KristofferC KristofferC removed the backport 1.6 Change should be backported to release-1.6 label May 4, 2021
@KristofferC KristofferC mentioned this pull request May 4, 2021
45 tasks
ElOceanografo pushed a commit to ElOceanografo/julia that referenced this pull request May 4, 2021
* [build] Add `symlink_system_library` calls for CSL

We differentiate between a `USE_BINARYBUILDER_CSL=0` configuration
(where we copy the CSL libraries into the Julia build tree) versus a
`USE_SYSTEM_CSL=1` configuration (where we symlink them in a manner
similar to other system libararies)

* Expand `JL_PRIVATE_LIBS-1` for versioned library names as well

Without this, we fail to install things like `libgcc_s.so.1` when
installed into the private libdir by `symlink_system_libraries`.
antoine-levitt pushed a commit to antoine-levitt/julia that referenced this pull request May 9, 2021
* [build] Add `symlink_system_library` calls for CSL

We differentiate between a `USE_BINARYBUILDER_CSL=0` configuration
(where we copy the CSL libraries into the Julia build tree) versus a
`USE_SYSTEM_CSL=1` configuration (where we symlink them in a manner
similar to other system libararies)

* Expand `JL_PRIVATE_LIBS-1` for versioned library names as well

Without this, we fail to install things like `libgcc_s.so.1` when
installed into the private libdir by `symlink_system_libraries`.
johanmon pushed a commit to johanmon/julia that referenced this pull request Jul 5, 2021
* [build] Add `symlink_system_library` calls for CSL

We differentiate between a `USE_BINARYBUILDER_CSL=0` configuration
(where we copy the CSL libraries into the Julia build tree) versus a
`USE_SYSTEM_CSL=1` configuration (where we symlink them in a manner
similar to other system libararies)

* Expand `JL_PRIVATE_LIBS-1` for versioned library names as well

Without this, we fail to install things like `libgcc_s.so.1` when
installed into the private libdir by `symlink_system_libraries`.
staticfloat added a commit that referenced this pull request Dec 23, 2022
* [build] Add `symlink_system_library` calls for CSL

We differentiate between a `USE_BINARYBUILDER_CSL=0` configuration
(where we copy the CSL libraries into the Julia build tree) versus a
`USE_SYSTEM_CSL=1` configuration (where we symlink them in a manner
similar to other system libararies)

* Expand `JL_PRIVATE_LIBS-1` for versioned library names as well

Without this, we fail to install things like `libgcc_s.so.1` when
installed into the private libdir by `symlink_system_libraries`.

(cherry picked from commit 336cdf8)
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.

Build fails with USE_SYSTEM_CSL=1
5 participants