Skip to content

Commit c107217

Browse files
committed
CompilerSupportLibraries_jll build 0.2.2+0
1 parent e3c529f commit c107217

File tree

6 files changed

+80
-39
lines changed

6 files changed

+80
-39
lines changed

Artifacts.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11
[[CompilerSupportLibraries]]
2-
arch = "i686"
3-
git-tree-sha1 = "ce5eab27297c3acd9e9edab7538395ffedefc28d"
4-
libc = "glibc"
5-
libgfortran_version = "3.0.0"
6-
os = "linux"
7-
8-
[[CompilerSupportLibraries.download]]
9-
sha256 = "e5e97459bab503f093d0d33e47e6ddfc83dd569574747f671b575305cb326091"
10-
url = "https://github.com/JuliaBinaryWrappers/CompilerSupportLibraries_jll.jl/releases/download/CompilerSupportLibraries-v0.2.0+1/CompilerSupportLibraries.v0.2.0.i686-linux-gnu-libgfortran3.tar.gz"
11-
[[CompilerSupportLibraries]]
122
arch = "aarch64"
133
git-tree-sha1 = "a87ab383a467a85525cf02bddaffb2c26aee4283"
144
libc = "glibc"
@@ -376,3 +366,13 @@ os = "linux"
376366
[[CompilerSupportLibraries.download]]
377367
sha256 = "7edd57ff5af8e4335cecfbc39395f49f835eb87549cc373f7af8f53b5e0e46aa"
378368
url = "https://github.com/JuliaBinaryWrappers/CompilerSupportLibraries_jll.jl/releases/download/CompilerSupportLibraries-v0.2.0+1/CompilerSupportLibraries.v0.2.0.arm-linux-gnueabihf-libgfortran3.tar.gz"
369+
[[CompilerSupportLibraries]]
370+
arch = "i686"
371+
git-tree-sha1 = "3a3ea0d1a8229a164fef9a558b6cff4197afb621"
372+
libc = "glibc"
373+
libgfortran_version = "3.0.0"
374+
os = "linux"
375+
376+
[[CompilerSupportLibraries.download]]
377+
sha256 = "ed4df2873b3d3916ae07e5118f8c8961d603399945a817e637a8473fc3652d41"
378+
url = "https://github.com/JuliaBinaryWrappers/CompilerSupportLibraries_jll.jl/releases/download/CompilerSupportLibraries-v0.2.2+0/CompilerSupportLibraries.v0.2.2.i686-linux-gnu-libgfortran3.tar.gz"

LICENSE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright 2020
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name = "CompilerSupportLibraries_jll"
22
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
3-
version = "0.2.0+1"
3+
version = "0.2.2+0"
44

55
[deps]
66
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
77
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
88

99
[compat]
10-
julia = "1.3"
10+
julia = "1.0"

README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,22 @@
22

33
This is an autogenerated package constructed using [`BinaryBuilder.jl`](https://github.com/JuliaPackaging/BinaryBuilder.jl).
44

5-
## Usage
5+
## Products
66

7-
The code bindings within this package are autogenerated from the `Products` defined within the `build_tarballs.jl` file that generated this package. For example purposes, we will assume that the following products were defined:
7+
The code bindings within this package are autogenerated from the following `Products` defined within the `build_tarballs.jl` file that generated this package:
8+
9+
```julia
10+
products = [
11+
LibraryProduct(["libstdc++"], :libstdcxx),
12+
LibraryProduct(["libgfortran"], :libgfortran),
13+
LibraryProduct(["libgomp"], :libgomp),
14+
LibraryProduct(["libgcc_s", "libgcc_s_sjlj", "libgcc_s_seh"], :libgcc_s)
15+
]
16+
```
17+
18+
## Usage example
19+
20+
For example purposes, we will assume that the following products were defined in the imaginary package `Example_jll`:
821

922
```julia
1023
products = [
@@ -14,10 +27,10 @@ products = [
1427
]
1528
```
1629

17-
With such products defined, this package will contain `data_txt`, `libdataproc` and `mungify_exe` symbols exported. For `FileProduct` variables, the exported value is a string pointing to the location of the file on-disk. For `LibraryProduct` variables, it is a string corresponding to the `SONAME` of the desired library (it will have already been `dlopen()`'ed, so typical `ccall()` usage applies), and for `ExecutableProduct` variables, the exported value is a function that can be called to set appropriate environment variables. Example:
30+
With such products defined, `Example_jll` would contain `data_txt`, `libdataproc` and `mungify_exe` symbols exported. For `FileProduct` variables, the exported value is a string pointing to the location of the file on-disk. For `LibraryProduct` variables, it is a string corresponding to the `SONAME` of the desired library (it will have already been `dlopen()`'ed, so typical `ccall()` usage applies), and for `ExecutableProduct` variables, the exported value is a function that can be called to set appropriate environment variables. Example:
1831

1932
```julia
20-
using CompilerSupportLibraries_jll
33+
using Example_jll
2134

2235
# For file products, you can access its file location directly:
2336
data_lines = open(data_txt, "r") do io

src/CompilerSupportLibraries_jll.jl

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
11
module CompilerSupportLibraries_jll
2+
3+
if VERSION < v"1.3.0-rc4"
4+
# We lie a bit in the registry that JLL packages are usable on Julia 1.0-1.2.
5+
# This is to allow packages that might want to support Julia 1.0 to get the
6+
# benefits of a JLL package on 1.3 (requiring them to declare a dependence on
7+
# this JLL package in their Project.toml) but engage in heroic hacks to do
8+
# something other than actually use a JLL package on 1.0-1.2. By allowing
9+
# this package to be installed (but not loaded) on 1.0-1.2, we enable users
10+
# to avoid splitting their package versions into pre-1.3 and post-1.3 branches
11+
# if they are willing to engage in the kinds of hoop-jumping they might need
12+
# to in order to install binaries in a JLL-compatible way on 1.0-1.2. One
13+
# example of this hoop-jumping being to express a dependency on this JLL
14+
# package, then import it wtihin a `VERSION >= v"1.3"` conditional, and use
15+
# the deprecated `build.jl` mechanism to download the binaries through e.g.
16+
# `BinaryProvider.jl`. This should work well for the simplest packages, and
17+
# require greater and greater heroics for more and more complex packages.
18+
error("Unable to import CompilerSupportLibraries_jll on Julia versions older than 1.3!")
19+
end
20+
221
using Pkg, Pkg.BinaryPlatforms, Pkg.Artifacts, Libdl
322
import Base: UUID
423

@@ -11,7 +30,7 @@ const LIBPATH_list = String[]
1130
artifacts_toml = joinpath(@__DIR__, "..", "Artifacts.toml")
1231

1332
# Extract all platforms
14-
artifacts = Pkg.Artifacts.load_artifacts_toml(artifacts_toml; pkg_uuid=UUID("e66e0078-7015-5450-92f7-15fbd957f2ae"))
33+
artifacts = Pkg.Artifacts.load_artifacts_toml(artifacts_toml; pkg_uuid=UUID("2a0299ec-ce93-5294-a8a9-ec9401735631"))
1534
platforms = [Pkg.Artifacts.unpack_platform(e, "CompilerSupportLibraries", artifacts_toml) for e in artifacts["CompilerSupportLibraries"]]
1635

1736
# Filter platforms based on what wrappers we've generated on-disk

src/wrappers/i686-linux-gnu-libgfortran3.jl

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Autogenerated wrapper script for CompilerSupportLibraries_jll for i686-linux-gnu-libgfortran3
2-
export libstdcxx, libgomp, libgfortran, libgcc_s
2+
export libstdcxx, libgfortran, libgomp, libgcc_s
33

44
## Global variables
55
PATH = ""
@@ -20,32 +20,32 @@ libstdcxx_handle = C_NULL
2020
const libstdcxx = "libstdc++.so.6"
2121

2222

23-
# Relative path to `libgomp`
24-
const libgomp_splitpath = ["lib", "libgomp.so"]
23+
# Relative path to `libgfortran`
24+
const libgfortran_splitpath = ["lib", "libgfortran.so"]
2525

2626
# This will be filled out by __init__() for all products, as it must be done at runtime
27-
libgomp_path = ""
27+
libgfortran_path = ""
2828

29-
# libgomp-specific global declaration
29+
# libgfortran-specific global declaration
3030
# This will be filled out by __init__()
31-
libgomp_handle = C_NULL
31+
libgfortran_handle = C_NULL
3232

3333
# This must be `const` so that we can use it with `ccall()`
34-
const libgomp = "libgomp.so.1"
34+
const libgfortran = "libgfortran.so.3"
3535

3636

37-
# Relative path to `libgfortran`
38-
const libgfortran_splitpath = ["lib", "libgfortran.so"]
37+
# Relative path to `libgomp`
38+
const libgomp_splitpath = ["lib", "libgomp.so"]
3939

4040
# This will be filled out by __init__() for all products, as it must be done at runtime
41-
libgfortran_path = ""
41+
libgomp_path = ""
4242

43-
# libgfortran-specific global declaration
43+
# libgomp-specific global declaration
4444
# This will be filled out by __init__()
45-
libgfortran_handle = C_NULL
45+
libgomp_handle = C_NULL
4646

4747
# This must be `const` so that we can use it with `ccall()`
48-
const libgfortran = "libgfortran.so.3"
48+
const libgomp = "libgomp.so.1"
4949

5050

5151
# Relative path to `libgcc_s`
@@ -66,32 +66,34 @@ const libgcc_s = "libgcc_s.so.1"
6666
Open all libraries
6767
"""
6868
function __init__()
69-
global prefix = abspath(joinpath(@__DIR__, ".."))
69+
global artifact_dir = abspath(artifact"CompilerSupportLibraries")
7070

7171
# Initialize PATH and LIBPATH environment variable listings
7272
global PATH_list, LIBPATH_list
73-
global libstdcxx_path = abspath(joinpath(artifact"CompilerSupportLibraries", libstdcxx_splitpath...))
73+
# We first need to add to LIBPATH_list the libraries provided by Julia
74+
append!(LIBPATH_list, [joinpath(Sys.BINDIR, Base.LIBDIR, "julia"), joinpath(Sys.BINDIR, Base.LIBDIR)])
75+
global libstdcxx_path = normpath(joinpath(artifact_dir, libstdcxx_splitpath...))
7476

7577
# Manually `dlopen()` this right now so that future invocations
7678
# of `ccall` with its `SONAME` will find this path immediately.
7779
global libstdcxx_handle = dlopen(libstdcxx_path)
7880
push!(LIBPATH_list, dirname(libstdcxx_path))
7981

80-
global libgomp_path = abspath(joinpath(artifact"CompilerSupportLibraries", libgomp_splitpath...))
82+
global libgfortran_path = normpath(joinpath(artifact_dir, libgfortran_splitpath...))
8183

8284
# Manually `dlopen()` this right now so that future invocations
8385
# of `ccall` with its `SONAME` will find this path immediately.
84-
global libgomp_handle = dlopen(libgomp_path)
85-
push!(LIBPATH_list, dirname(libgomp_path))
86+
global libgfortran_handle = dlopen(libgfortran_path)
87+
push!(LIBPATH_list, dirname(libgfortran_path))
8688

87-
global libgfortran_path = abspath(joinpath(artifact"CompilerSupportLibraries", libgfortran_splitpath...))
89+
global libgomp_path = normpath(joinpath(artifact_dir, libgomp_splitpath...))
8890

8991
# Manually `dlopen()` this right now so that future invocations
9092
# of `ccall` with its `SONAME` will find this path immediately.
91-
global libgfortran_handle = dlopen(libgfortran_path)
92-
push!(LIBPATH_list, dirname(libgfortran_path))
93+
global libgomp_handle = dlopen(libgomp_path)
94+
push!(LIBPATH_list, dirname(libgomp_path))
9395

94-
global libgcc_s_path = abspath(joinpath(artifact"CompilerSupportLibraries", libgcc_s_splitpath...))
96+
global libgcc_s_path = normpath(joinpath(artifact_dir, libgcc_s_splitpath...))
9597

9698
# Manually `dlopen()` this right now so that future invocations
9799
# of `ccall` with its `SONAME` will find this path immediately.

0 commit comments

Comments
 (0)