From 5f43f3efe1c43dc6ee9653da407bfe6ee684b003 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Tue, 17 Nov 2020 23:28:14 +0000 Subject: [PATCH] Add 'fake' JLLs for all binary dependencies JLLs provide the binary interaction interface that both packages and the Pkg resolver require in order to properly version and interact with the binary dependencies shipped with Julia. This PR changes all binary dependencies to carry along a JLL package that dlopen()'s the binary that ships along with Julia. These JLL packages are not the true JLL packages that are generated by BinaryBuilder, but are instead "fake" JLLs that simply `dlopen(filename)` and rely upon the default dlopen path to find the appropriate libraries, which affords the opportunity for system libraries and bundled-with-julia libraries alike to both be represented through the JLL interface. --- .gitignore | 1 + Make.inc | 40 +-- Makefile | 88 ++----- base/Makefile | 1 + base/binaryplatforms.jl | 60 +++-- base/sysimg.jl | 18 ++ contrib/normalize_triplet.py | 4 +- contrib/refresh_checksums.mk | 19 +- deps/Makefile | 7 +- deps/Versions.make | 152 ++++++++---- deps/blas.mk | 4 - deps/csl.mk | 78 ++++++ deps/curl.mk | 4 - deps/dsfmt.mk | 2 - deps/gmp.mk | 11 +- deps/libgit2.mk | 2 - deps/libgit2.version | 4 +- deps/libssh2.mk | 4 +- deps/libuv.mk | 3 +- deps/llvm.mk | 10 +- deps/mbedtls.mk | 3 - deps/mpfr.mk | 4 +- deps/nghttp2.mk | 4 +- deps/objconv.mk | 2 - deps/openlibm.mk | 4 +- deps/p7zip.mk | 3 +- deps/patches/pcre2-cet-flags.patch | 229 ++++++++++++++++++ deps/pcre.mk | 9 +- deps/suitesparse.mk | 4 +- deps/tools/bb-install.mk | 53 ++-- deps/unwind.mk | 6 - deps/zlib.mk | 2 - src/Makefile | 5 +- stdlib/.gitignore | 3 + .../CompilerSupportLibraries_jll/Project.toml | 10 + .../src/CompilerSupportLibraries_jll.jl | 58 +++++ .../test/runtests.jl | 10 + stdlib/GMP_jll/Project.toml | 10 + stdlib/GMP_jll/src/GMP_jll.jl | 37 +++ stdlib/GMP_jll/test/runtests.jl | 8 + stdlib/LibCURL_jll/Artifacts.toml | 113 --------- stdlib/LibCURL_jll/Project.toml | 6 +- stdlib/LibGit2_jll/Project.toml | 12 + stdlib/LibGit2_jll/src/LibGit2_jll.jl | 32 +++ stdlib/LibGit2_jll/test/runtests.jl | 11 + stdlib/LibOSXUnwind_jll/Project.toml | 10 + .../LibOSXUnwind_jll/src/LibOSXUnwind_jll.jl | 28 +++ stdlib/LibOSXUnwind_jll/test/runtests.jl | 9 + stdlib/LibSSH2_jll/Project.toml | 11 + stdlib/LibSSH2_jll/src/LibSSH2_jll.jl | 32 +++ stdlib/LibSSH2_jll/test/runtests.jl | 8 + stdlib/LibUV_jll/Project.toml | 10 + stdlib/LibUV_jll/src/LibUV_jll.jl | 31 +++ stdlib/LibUV_jll/test/runtests.jl | 8 + stdlib/LibUnwind_jll/Project.toml | 11 + stdlib/LibUnwind_jll/src/LibUnwind_jll.jl | 28 +++ stdlib/LibUnwind_jll/test/runtests.jl | 9 + stdlib/MPFR_jll/Project.toml | 11 + stdlib/MPFR_jll/src/MPFR_jll.jl | 31 +++ stdlib/MPFR_jll/test/runtests.jl | 8 + stdlib/Makefile | 24 +- stdlib/MbedTLS_jll/Project.toml | 10 + stdlib/MbedTLS_jll/src/MbedTLS_jll.jl | 45 ++++ stdlib/MbedTLS_jll/test/runtests.jl | 10 + stdlib/MozillaCACerts_jll/Artifacts.toml | 6 - stdlib/OpenBLAS_jll/Project.toml | 11 + stdlib/OpenBLAS_jll/src/OpenBLAS_jll.jl | 36 +++ stdlib/OpenBLAS_jll/test/runtests.jl | 8 + stdlib/OpenLibm_jll/Project.toml | 10 + stdlib/OpenLibm_jll/src/OpenLibm_jll.jl | 30 +++ stdlib/OpenLibm_jll/test/runtests.jl | 7 + stdlib/PCRE2_jll/Project.toml | 10 + stdlib/PCRE2_jll/src/PCRE2_jll.jl | 30 +++ stdlib/PCRE2_jll/test/runtests.jl | 10 + stdlib/SuiteSparse_jll/Project.toml | 11 + stdlib/SuiteSparse_jll/src/SuiteSparse_jll.jl | 115 +++++++++ stdlib/SuiteSparse_jll/test/runtests.jl | 7 + stdlib/Zlib_jll/Project.toml | 9 + stdlib/Zlib_jll/src/Zlib_jll.jl | 30 +++ stdlib/Zlib_jll/test/runtests.jl | 7 + stdlib/dSFMT_jll/Project.toml | 10 + stdlib/dSFMT_jll/src/dSFMT_jll.jl | 31 +++ stdlib/dSFMT_jll/test/runtests.jl | 8 + stdlib/libLLVM_jll/Project.toml | 10 + stdlib/libLLVM_jll/src/libLLVM_jll.jl | 31 +++ stdlib/libLLVM_jll/test/runtests.jl | 7 + stdlib/nghttp2_jll/Project.toml | 10 + stdlib/nghttp2_jll/src/nghttp2_jll.jl | 30 +++ stdlib/nghttp2_jll/test/runtests.jl | 15 ++ stdlib/p7zip_jll/Project.toml | 10 + stdlib/p7zip_jll/src/p7zip_jll.jl | 40 +++ stdlib/p7zip_jll/test/runtests.jl | 7 + test/precompile.jl | 19 +- 93 files changed, 1662 insertions(+), 387 deletions(-) create mode 100644 deps/csl.mk create mode 100644 deps/patches/pcre2-cet-flags.patch create mode 100644 stdlib/CompilerSupportLibraries_jll/Project.toml create mode 100644 stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl create mode 100644 stdlib/CompilerSupportLibraries_jll/test/runtests.jl create mode 100644 stdlib/GMP_jll/Project.toml create mode 100644 stdlib/GMP_jll/src/GMP_jll.jl create mode 100644 stdlib/GMP_jll/test/runtests.jl delete mode 100644 stdlib/LibCURL_jll/Artifacts.toml create mode 100644 stdlib/LibGit2_jll/Project.toml create mode 100644 stdlib/LibGit2_jll/src/LibGit2_jll.jl create mode 100644 stdlib/LibGit2_jll/test/runtests.jl create mode 100644 stdlib/LibOSXUnwind_jll/Project.toml create mode 100644 stdlib/LibOSXUnwind_jll/src/LibOSXUnwind_jll.jl create mode 100644 stdlib/LibOSXUnwind_jll/test/runtests.jl create mode 100644 stdlib/LibSSH2_jll/Project.toml create mode 100644 stdlib/LibSSH2_jll/src/LibSSH2_jll.jl create mode 100644 stdlib/LibSSH2_jll/test/runtests.jl create mode 100644 stdlib/LibUV_jll/Project.toml create mode 100644 stdlib/LibUV_jll/src/LibUV_jll.jl create mode 100644 stdlib/LibUV_jll/test/runtests.jl create mode 100644 stdlib/LibUnwind_jll/Project.toml create mode 100644 stdlib/LibUnwind_jll/src/LibUnwind_jll.jl create mode 100644 stdlib/LibUnwind_jll/test/runtests.jl create mode 100644 stdlib/MPFR_jll/Project.toml create mode 100644 stdlib/MPFR_jll/src/MPFR_jll.jl create mode 100644 stdlib/MPFR_jll/test/runtests.jl create mode 100644 stdlib/MbedTLS_jll/Project.toml create mode 100644 stdlib/MbedTLS_jll/src/MbedTLS_jll.jl create mode 100644 stdlib/MbedTLS_jll/test/runtests.jl delete mode 100644 stdlib/MozillaCACerts_jll/Artifacts.toml create mode 100644 stdlib/OpenBLAS_jll/Project.toml create mode 100644 stdlib/OpenBLAS_jll/src/OpenBLAS_jll.jl create mode 100644 stdlib/OpenBLAS_jll/test/runtests.jl create mode 100644 stdlib/OpenLibm_jll/Project.toml create mode 100644 stdlib/OpenLibm_jll/src/OpenLibm_jll.jl create mode 100644 stdlib/OpenLibm_jll/test/runtests.jl create mode 100644 stdlib/PCRE2_jll/Project.toml create mode 100644 stdlib/PCRE2_jll/src/PCRE2_jll.jl create mode 100644 stdlib/PCRE2_jll/test/runtests.jl create mode 100644 stdlib/SuiteSparse_jll/Project.toml create mode 100644 stdlib/SuiteSparse_jll/src/SuiteSparse_jll.jl create mode 100644 stdlib/SuiteSparse_jll/test/runtests.jl create mode 100644 stdlib/Zlib_jll/Project.toml create mode 100644 stdlib/Zlib_jll/src/Zlib_jll.jl create mode 100644 stdlib/Zlib_jll/test/runtests.jl create mode 100644 stdlib/dSFMT_jll/Project.toml create mode 100644 stdlib/dSFMT_jll/src/dSFMT_jll.jl create mode 100644 stdlib/dSFMT_jll/test/runtests.jl create mode 100644 stdlib/libLLVM_jll/Project.toml create mode 100644 stdlib/libLLVM_jll/src/libLLVM_jll.jl create mode 100644 stdlib/libLLVM_jll/test/runtests.jl create mode 100644 stdlib/nghttp2_jll/Project.toml create mode 100644 stdlib/nghttp2_jll/src/nghttp2_jll.jl create mode 100644 stdlib/nghttp2_jll/test/runtests.jl create mode 100644 stdlib/p7zip_jll/Project.toml create mode 100644 stdlib/p7zip_jll/src/p7zip_jll.jl create mode 100644 stdlib/p7zip_jll/test/runtests.jl diff --git a/.gitignore b/.gitignore index 2da56ff47739e3..2c5ee63bc3ee97 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ /perf* .DS_Store .idea/* +.vscode/* diff --git a/Make.inc b/Make.inc index 87c4cc0733b1ce..80ee08a3fae1d7 100644 --- a/Make.inc +++ b/Make.inc @@ -32,6 +32,7 @@ OPENBLAS_USE_THREAD:=1 # Flags for using libraries available on the system instead of building them. # Please read the notes around usage of SYSTEM flags in README.md # Issues resulting from use of SYSTEM versions will generally not be accepted. +USE_SYSTEM_CSL:=0 USE_SYSTEM_LLVM:=0 USE_SYSTEM_LIBUNWIND:=0 DISABLE_LIBUNWIND:=0 @@ -93,6 +94,15 @@ WITH_GC_DEBUG_ENV := 0 # Prevent picking up $ARCH from the environment variables ARCH:= + +# Literal values that are hard to use in Makefiles otherwise: +define newline # a literal \n + + +endef +COMMA:=, +SPACE:=$(eval) $(eval) + # We need python for things like BB triplet recognition and relative path computation. # We don't really care about version, generally, so just find something that works: PYTHON := "$(shell which python 2>/dev/null || which python3 2>/dev/null || which python2 2>/dev/null || echo "{python|python3|python2} not found")" @@ -999,19 +1009,25 @@ ifeq ($(USE_SYSTEM_LLVM), 1) JCPPFLAGS+=-DSYSTEM_LLVM endif # SYSTEM_LLVM +# Windows builds need a little help finding the LLVM libraries for llvm-config +LLVM_CONFIG_PATH_FIX := +ifeq ($(OS),WINNT) +LLVM_CONFIG_PATH_FIX := PATH="$(PATH):$(build_bindir)" +endif + ifeq ($(BUILD_OS),$(OS)) LLVM_CONFIG_HOST := $(LLVM_CONFIG) else LLVM_CONFIG_HOST := $(basename $(LLVM_CONFIG))-host$(BUILD_EXE) ifeq (exists, $(shell [ -f '$(LLVM_CONFIG_HOST)' ] && echo exists )) -ifeq ($(shell $(LLVM_CONFIG_HOST) --version),3.3) +ifeq ($(shell $(LLVM_CONFIG_PATH_FIX) $(LLVM_CONFIG_HOST) --version),3.3) # llvm-config-host <= 3.3 is broken, use llvm-config instead (in an emulator) # use delayed expansion (= not :=) because spawn isn't defined until later -LLVM_CONFIG_HOST = $(call spawn,$(LLVM_CONFIG)) +LLVM_CONFIG_HOST = $(LLVM_CONFIG_PATH_FIX) $(call spawn,$(LLVM_CONFIG)) endif else # llvm-config-host does not exist (cmake build) -LLVM_CONFIG_HOST = $(call spawn,$(LLVM_CONFIG)) +LLVM_CONFIG_HOST = $(LLVM_CONFIG_PATH_FIX) $(call spawn,$(LLVM_CONFIG)) endif endif @@ -1129,8 +1145,14 @@ endif USE_BINARYBUILDER ?= 0 endif +# Auto-detect triplet once, create different versions that we use as defaults below for each BB install target +BB_TRIPLET_LIBGFORTRAN_CXXABI := $(shell $(call invoke_python,$(JULIAHOME)/contrib/normalize_triplet.py) $(or $(XC_HOST),$(XC_HOST),$(BUILD_MACHINE)) "$(shell $(FC) --version | head -1)" "$(or $(shell echo '\#include ' | $(CXX) $(CXXFLAGS) -x c++ -dM -E - | grep _GLIBCXX_USE_CXX11_ABI | awk '{ print $$3 }' ),1)") +BB_TRIPLET_LIBGFORTRAN := $(subst $(SPACE),-,$(filter-out cxx%,$(subst -,$(SPACE),$(BB_TRIPLET_LIBGFORTRAN_CXXABI)))) +BB_TRIPLET_CXXABI := $(subst $(SPACE),-,$(filter-out libgfortran%,$(subst -,$(SPACE),$(BB_TRIPLET_LIBGFORTRAN_CXXABI)))) +BB_TRIPLET := $(subst $(SPACE),-,$(filter-out cxx%,$(filter-out libgfortran%,$(subst -,$(SPACE),$(BB_TRIPLET_LIBGFORTRAN_CXXABI))))) + # This is the set of projects that BinaryBuilder dependencies are hooked up for. -BB_PROJECTS := OPENBLAS LLVM SUITESPARSE OPENLIBM GMP MBEDTLS LIBSSH2 NGHTTP2 MPFR CURL LIBGIT2 PCRE LIBUV LIBUNWIND DSFMT OBJCONV ZLIB P7ZIP +BB_PROJECTS := OPENBLAS LLVM SUITESPARSE OPENLIBM GMP MBEDTLS LIBSSH2 NGHTTP2 MPFR CURL LIBGIT2 PCRE LIBUV LIBUNWIND DSFMT OBJCONV ZLIB P7ZIP CSL define SET_BB_DEFAULT # First, check to see if BB is disabled on a global setting ifeq ($$(USE_BINARYBUILDER),0) @@ -1576,18 +1598,8 @@ PRINT_FLISP = echo '$(subst ','\'',$(1))'; $(1) PRINT_JULIA = echo '$(subst ','\'',$(1))'; $(1) endif - -define newline # a literal \n - - -endef - # Makefile debugging trick: # call print-VARIABLE to see the runtime value of any variable # (hardened against any special characters appearing in the output) print-%: @echo '$*=$(subst ','\'',$(subst $(newline),\n,$($*)))' - -# Literal values that are hard to use in Makefiles otherwise: -COMMA:=, -SPACE:=$(eval) $(eval) diff --git a/Makefile b/Makefile index f3100ea74ddd89..61445be460b42e 100644 --- a/Makefile +++ b/Makefile @@ -59,7 +59,8 @@ endif julia-deps: | $(DIRS) $(build_datarootdir)/julia/base $(build_datarootdir)/julia/test @$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/deps -julia-stdlib: | $(DIRS) +# `julia-stdlib` depends on `julia-deps` so that the fake JLL stdlibs can copy in their Artifacts.toml files. +julia-stdlib: | $(DIRS) julia-deps @$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/stdlib julia-base: julia-deps $(build_sysconfdir)/julia/startup.jl $(build_man1dir)/julia.1 $(build_datarootdir)/julia/julia-config.jl @@ -163,17 +164,18 @@ endif JL_PRIVATE_LIBS-0 := libccalltest libllvmcalltest ifeq ($(USE_GPL_LIBS), 1) JL_PRIVATE_LIBS-0 += libsuitesparse_wrapper -JL_PRIVATE_LIBS-$(USE_SYSTEM_SUITESPARSE) += libamd libcamd libccolamd libcholmod libcolamd libumfpack libspqr libsuitesparseconfig +JL_PRIVATE_LIBS-$(USE_SYSTEM_SUITESPARSE) += libamd libbtf libcamd libccolamd libcholmod libcolamd libklu libldl librbio libspqr libsuitesparseconfig libumfpack endif JL_PRIVATE_LIBS-$(USE_SYSTEM_PCRE) += libpcre2-8 JL_PRIVATE_LIBS-$(USE_SYSTEM_DSFMT) += libdSFMT -JL_PRIVATE_LIBS-$(USE_SYSTEM_GMP) += libgmp +JL_PRIVATE_LIBS-$(USE_SYSTEM_GMP) += libgmp libgmpxx JL_PRIVATE_LIBS-$(USE_SYSTEM_MPFR) += libmpfr JL_PRIVATE_LIBS-$(USE_SYSTEM_LIBSSH2) += libssh2 JL_PRIVATE_LIBS-$(USE_SYSTEM_NGHTTP2) += libnghttp2 JL_PRIVATE_LIBS-$(USE_SYSTEM_MBEDTLS) += libmbedtls libmbedcrypto libmbedx509 JL_PRIVATE_LIBS-$(USE_SYSTEM_CURL) += libcurl JL_PRIVATE_LIBS-$(USE_SYSTEM_LIBGIT2) += libgit2 +JL_PRIVATE_LIBS-$(USE_SYSTEM_LIBUV) += libuv ifeq ($(OS),WINNT) JL_PRIVATE_LIBS-$(USE_SYSTEM_ZLIB) += zlib else @@ -197,91 +199,29 @@ ifneq ($(LIBLAPACKNAME),$(LIBBLASNAME)) JL_PRIVATE_LIBS-$(USE_SYSTEM_LAPACK) += $(LIBLAPACKNAME) endif +JL_PRIVATE_LIBS-$(USE_SYSTEM_CSL) += libgfortran libquadmath libstdc++ libgcc_s libgomp libssp libatomic ifeq ($(OS),Darwin) -ifeq ($(USE_SYSTEM_BLAS),1) -ifeq ($(USE_SYSTEM_LAPACK),0) -JL_PRIVATE_LIBS-0 += libgfortblas +JL_PRIVATE_LIBS-$(USE_SYSTEM_CSL) += libc++ endif -endif -endif - -# On FreeBSD, /lib/libgcc_s.so.1 is incompatible with Fortran; to use Fortran on FreeBSD, -# we need to link to the libgcc_s that ships with the same GCC version used by libgfortran. -# To work around this, we copy the GCC libraries we need, namely libgfortran, libgcc_s, -# and libquadmath, into our build library directory, $(build_libdir). We also add them to -# JL_PRIVATE_LIBS-0 so that they know where they need to live at install time. -ifeq ($(OS),FreeBSD) -define std_so -julia-deps: | $$(build_libdir)/$(1).so -$$(build_libdir)/$(1).so: | $$(build_libdir) - $$(INSTALL_M) $$(GCCPATH)/$(1).so* $$(build_libdir) -JL_PRIVATE_LIBS-0 += $(1) -endef - -$(eval $(call std_so,libgfortran)) -$(eval $(call std_so,libgcc_s)) -$(eval $(call std_so,libquadmath)) -endif # FreeBSD - ifeq ($(OS),WINNT) -# find the standard .dll folders -ifeq ($(XC_HOST),) -STD_LIB_PATH ?= $(PATH) +JL_PRIVATE_LIBS-$(USE_SYSTEM_CSL) += libwinpthread else -STD_LIB_PATH := $(shell LANG=C $(CC) -print-search-dirs | grep '^programs: =' | sed -e "s/^programs: =//") -STD_LIB_PATH += :$(shell LANG=C $(CC) -print-search-dirs | grep '^libraries: =' | sed -e "s/^libraries: =//") -ifneq (,$(findstring CYGWIN,$(BUILD_OS))) # the cygwin-mingw32 compiler lies about it search directory paths -STD_LIB_PATH := $(shell echo '$(STD_LIB_PATH)' | sed -e "s!/lib/!/bin/!g") -endif +JL_PRIVATE_LIBS-$(USE_SYSTEM_CSL) += libpthread endif -pathsearch = $(firstword $(wildcard $(addsuffix /$(1),$(subst :, ,$(2))))) - -define std_dll -julia-deps-libs: | $$(build_bindir)/lib$(1).dll $$(build_depsbindir)/lib$(1).dll -$$(build_bindir)/lib$(1).dll: | $$(build_bindir) - cp $$(or $$(call pathsearch,lib$(1).dll,$$(STD_LIB_PATH)),$$(error can't find lib$1.dll)) $$(build_bindir) -$$(build_depsbindir)/lib$(1).dll: | $$(build_depsbindir) - cp $$(or $$(call pathsearch,lib$(1).dll,$$(STD_LIB_PATH)),$$(error can't find lib$1.dll)) $$(build_depsbindir) -JL_TARGETS += $(1) -endef -julia-deps: julia-deps-libs - -# Given a list of space-separated libraries, return the first library name that is -# correctly found through `pathsearch`. -define select_std_dll -$(firstword $(foreach name,$(1),$(if $(call pathsearch,lib$(name).dll,$(STD_LIB_PATH)),$(name),))) -endef -$(eval $(call std_dll,$(call select_std_dll,gfortran-3 gfortran-4 gfortran-5))) -$(eval $(call std_dll,quadmath-0)) -$(eval $(call std_dll,stdc++-6)) -ifeq ($(ARCH),i686) -$(eval $(call std_dll,gcc_s_sjlj-1)) -else -$(eval $(call std_dll,gcc_s_seh-1)) +ifeq ($(OS),Darwin) +ifeq ($(USE_SYSTEM_BLAS),1) +ifeq ($(USE_SYSTEM_LAPACK),0) +JL_PRIVATE_LIBS-0 += libgfortblas +endif endif -$(eval $(call std_dll,ssp-0)) -$(eval $(call std_dll,winpthread-1)) -$(eval $(call std_dll,atomic-1)) endif - define stringreplace $(build_depsbindir)/stringreplace $$(strings -t x - $1 | grep $2 | awk '{print $$1;}') $3 255 "$(call cygpath_w,$1)" endef -# Run fixup-libgfortran on all platforms but Windows and FreeBSD. On FreeBSD we -# pull in the GCC libraries earlier and use them for the build to make sure we -# don't inadvertently link to /lib/libgcc_s.so.1, which is incompatible with -# libgfortran, and on Windows we copy them in earlier as well. -ifeq (,$(findstring $(OS),FreeBSD WINNT)) -julia-base: $(build_libdir)/libgfortran*.$(SHLIB_EXT)* -$(build_libdir)/libgfortran*.$(SHLIB_EXT)*: | $(build_libdir) julia-deps - -$(CUSTOM_LD_LIBRARY_PATH) PATH="$(PATH):$(build_depsbindir)" PATCHELF="$(PATCHELF)" FC="$(FC)" $(JULIAHOME)/contrib/fixup-libgfortran.sh --verbose $(build_libdir) -JL_PRIVATE_LIBS-0 += libgfortran libgcc_s libquadmath -endif - install: $(build_depsbindir)/stringreplace $(BUILDROOT)/doc/_build/html/en/index.html ifeq ($(BUNDLE_DEBUG_LIBS),1) diff --git a/base/Makefile b/base/Makefile index efcf835de728a0..3b9426c5e04bf8 100644 --- a/base/Makefile +++ b/base/Makefile @@ -91,6 +91,7 @@ ifeq ($(DARWIN_FRAMEWORK), 1) else @echo "const DARWIN_FRAMEWORK = false" >> $@ endif + @echo "const BUILD_TRIPLET = \"$(BB_TRIPLET_LIBGFORTRAN_CXXABI)\"" >> $@ @# This to ensure that we always rebuild this file, but only when it is modified do we touch build_h.jl, @# ensuring we rebuild the system image as infrequently as possible diff --git a/base/binaryplatforms.jl b/base/binaryplatforms.jl index 791a8fd0702c78..493cf446c906ce 100644 --- a/base/binaryplatforms.jl +++ b/base/binaryplatforms.jl @@ -232,15 +232,15 @@ function validate_tags(tags::Dict) throw_version_number("libgfortran_version") end - # Validate `libstdcxx_version` is a parsable `VersionNumber` - if "libstdcxx_version" in keys(tags) && tryparse(VersionNumber, tags["libstdcxx_version"]) === nothing - throw_version_number("libstdcxx_version") - end - # Validate `cxxstring_abi` is one of the two valid options: if "cxxstring_abi" in keys(tags) && tags["cxxstring_abi"] ∉ ("cxx03", "cxx11") throw_invalid_key("cxxstring_abi") end + + # Validate `libstdcxx_version` is a parsable `VersionNumber` + if "libstdcxx_version" in keys(tags) && tryparse(VersionNumber, tags["libstdcxx_version"]) === nothing + throw_version_number("libstdcxx_version") + end end function set_compare_strategy!(p::Platform, key::String, f::Function) @@ -508,12 +508,12 @@ function triplet(p::AbstractPlatform) if libgfortran_version(p) !== nothing str = string(str, "-libgfortran", libgfortran_version(p).major) end - if libstdcxx_version(p) !== nothing - str = string(str, "-libstdcxx", libstdcxx_version(p).patch) - end if cxxstring_abi(p) !== nothing str = string(str, "-", cxxstring_abi(p)) end + if libstdcxx_version(p) !== nothing + str = string(str, "-libstdcxx", libstdcxx_version(p).patch) + end # Tack on all extra tags for (tag, val) in tags(p) @@ -637,15 +637,15 @@ const libgfortran_version_mapping = Dict( "libgfortran4" => "(-libgfortran4)|(-gcc7)", "libgfortran5" => "(-libgfortran5)|(-gcc8)", ) -const libstdcxx_version_mapping = Dict{String,String}( - "libstdcxx_nothing" => "", - "libstdcxx" => "-libstdcxx\\d+", -) const cxxstring_abi_mapping = Dict( "cxxstring_nothing" => "", "cxx03" => "-cxx03", "cxx11" => "-cxx11", ) +const libstdcxx_version_mapping = Dict{String,String}( + "libstdcxx_nothing" => "", + "libstdcxx" => "-libstdcxx\\d+", +) """ parse(::Type{Platform}, triplet::AbstractString) @@ -667,8 +667,8 @@ function Base.parse(::Type{Platform}, triplet::AbstractString; validate_strict:: c(call_abi_mapping), # Next, optional things, like libgfortran/libstdcxx/cxxstring abi c(libgfortran_version_mapping), - c(libstdcxx_version_mapping), c(cxxstring_abi_mapping), + c(libstdcxx_version_mapping), # Finally, the catch-all for extended tags "(?(?:-[^-]+\\+[^-]+)*)?", "\$", @@ -736,8 +736,8 @@ function Base.parse(::Type{Platform}, triplet::AbstractString; validate_strict:: libc, call_abi, libgfortran_version, - libstdcxx_version, cxxstring_abi, + libstdcxx_version, os_version, tags..., ) @@ -929,25 +929,33 @@ detect compiler ABI values such as `libgfortran_version`, `libstdcxx_version` an we have much of that built. """ function host_triplet() - str = Sys.MACHINE - libgfortran_version = detect_libgfortran_version() - if libgfortran_version !== nothing - str = string(str, "-libgfortran", libgfortran_version.major) + str = Base.BUILD_TRIPLET + + if !occursin("-libgfortran", str) + libgfortran_version = detect_libgfortran_version() + if libgfortran_version !== nothing + str = string(str, "-libgfortran", libgfortran_version.major) + end end - libstdcxx_version = detect_libstdcxx_version() - if libstdcxx_version !== nothing - str = string(str, "-libstdcxx", libstdcxx_version.patch) + if !occursin("-cxx", str) + cxxstring_abi = detect_cxxstring_abi() + if cxxstring_abi !== nothing + str = string(str, "-", cxxstring_abi) + end end - cxxstring_abi = detect_cxxstring_abi() - if cxxstring_abi !== nothing - str = string(str, "-", cxxstring_abi) + if !occursin("-libstdcxx", str) + libstdcxx_version = detect_libstdcxx_version() + if libstdcxx_version !== nothing + str = string(str, "-libstdcxx", libstdcxx_version.patch) + end end # Add on julia_version extended tag - str = string(str, "-julia_version+", VersionNumber(VERSION.major, VERSION.minor, VERSION.patch)) - + if !occursin("-julia_version+", str) + str = string(str, "-julia_version+", VersionNumber(VERSION.major, VERSION.minor, VERSION.patch)) + end return str end diff --git a/base/sysimg.jl b/base/sysimg.jl index f15e402787cb88..a375ceec0fd2fb 100644 --- a/base/sysimg.jl +++ b/base/sysimg.jl @@ -38,13 +38,26 @@ let :Unicode, # 1-depth packages + :CompilerSupportLibraries_jll, :DelimitedFiles, + :GMP_jll, :LibCURL_jll, + :LibOSXUnwind_jll, + :LibUV_jll, + :LibUnwind_jll, :LinearAlgebra, :Markdown, + :MbedTLS_jll, + :OpenLibm_jll, + :PCRE2_jll, :Printf, :Random, :Tar, + :Zlib_jll, + :dSFMT_jll, + :libLLVM_jll, + :nghttp2_jll, + :p7zip_jll, # 2-depth packages :Dates, @@ -53,16 +66,21 @@ let :InteractiveUtils, :LibCURL, :LibGit2, + :LibSSH2_jll, + :MPFR_jll, + :OpenBLAS_jll, :Profile, :SparseArrays, :UUIDs, # 3-depth packages :Downloads, + :LibGit2_jll, :REPL, :SharedArrays, :Statistics, :SuiteSparse, + :SuiteSparse_jll, :TOML, :Test, diff --git a/contrib/normalize_triplet.py b/contrib/normalize_triplet.py index 19dd74e3e28032..88849e9e6f91fa 100755 --- a/contrib/normalize_triplet.py +++ b/contrib/normalize_triplet.py @@ -93,9 +93,9 @@ def p(x): # These contain characters that can't be easily represented as # capture group names, unfortunately: os_remapping = { - 'darwin': 'apple-darwin14', + 'darwin': 'apple-darwin', 'windows': 'w64-mingw32', - 'freebsd': 'unknown-freebsd11.1', + 'freebsd': 'unknown-freebsd', } x = r(x) if x: diff --git a/contrib/refresh_checksums.mk b/contrib/refresh_checksums.mk index 9cd31a260494ec..e90e07f4cc998e 100644 --- a/contrib/refresh_checksums.mk +++ b/contrib/refresh_checksums.mk @@ -20,7 +20,7 @@ NON_CLANG_TRIPLETS=$(filter-out %-darwin %-freebsd,$(TRIPLETS)) # These are the projects currently using BinaryBuilder; both GCC-expanded and non-GCC-expanded: BB_PROJECTS=mbedtls libssh2 nghttp2 mpfr curl libgit2 pcre libuv unwind dsfmt objconv p7zip zlib suitesparse openlibm -BB_GCC_EXPANDED_PROJECTS=openblas +BB_GCC_EXPANDED_PROJECTS=openblas csl BB_CXX_EXPANDED_PROJECTS=gmp llvm # These are non-BB source-only deps NON_BB_PROJECTS=patchelf mozillacert lapack @@ -33,20 +33,21 @@ endef # If $(2) == `src`, this will generate a `USE_BINARYBUILDER_FOO=0` make flag # It will also generate a `FOO_BB_TRIPLET=$(2)` make flag. define make_flags -USE_BINARYBUILDER_$(call upper,$(1))=$(if $(filter src,$(2)),0,1) $(call upper,$(1))_BB_TRIPLET=$(if $(filter src,$(2)),,$(2)) DEPS_GIT=0 +USE_BINARYBUILDER=$(if $(filter src,$(2)),0,1) $(call upper,$(1))_BB_TRIPLET=$(if $(filter src,$(2)),,$(2)) BINARYBUILDER_LLVM_ASSERTS=$(if $(filter assert,$(3)),1,0) DEPS_GIT=0 endef # checksum_bb_dep takes in (name, triplet), and generates a `checksum-$(1)-$(2)` target. # note that `"src"` is a special triplet value. +# if $(3) is "assert", we set BINARYBUILDER_LLVM_ASSERTS=1 define checksum_dep -checksum-$(1)-$(2): - @-$(MAKE) -C "$(JULIAHOME)/deps" $(call make_flags,$(1),$(2)) checksum-$(1) +checksum-$(1)-$(2)-$(3): + @-$(MAKE) -C "$(JULIAHOME)/deps" $(call make_flags,$(1),$(2),$(3)) checksum-$(1) # Add this guy to his project target (e.g. `make -f contrib/refresh_checksums.mk openblas`) -$(1): checksum-$(1)-$(2) +$(1): checksum-$(1)-$(2)-$(3) # Add this guy to the `all` default target -all: checksum-$(1)-$(2) +all: checksum-$(1)-$(2)-$(3) endef # Generate targets for source hashes for all our projects @@ -60,6 +61,10 @@ $(foreach project,$(BB_GCC_EXPANDED_PROJECTS),$(foreach triplet,$(TRIPLETS),$(fo $(foreach project,$(BB_CXX_EXPANDED_PROJECTS),$(foreach triplet,$(NON_CLANG_TRIPLETS),$(foreach cxxstring_abi,cxx11 cxx03,$(eval $(call checksum_dep,$(project),$(triplet)-$(cxxstring_abi)))))) $(foreach project,$(BB_CXX_EXPANDED_PROJECTS),$(foreach triplet,$(CLANG_TRIPLETS),$(eval $(call checksum_dep,$(project),$(triplet))))) +# Special libLLVM_asserts_jll targets +$(foreach triplet,$(NON_CLANG_TRIPLETS),$(foreach cxxstring_abi,cxx11 cxx03,$(eval $(call checksum_dep,llvm,$(triplet)-$(cxxstring_abi),assert)))) +$(foreach triplet,$(CLANG_TRIPLETS),$(eval $(call checksum_dep,llvm,$(triplet),assert))) + # External stdlibs checksum-stdlibs: @-$(MAKE) -C "$(JULIAHOME)/stdlib" checksumall @@ -72,7 +77,7 @@ all: checksum-doc-unicodedata # Special LLVM source hashes for optional targets checksum-llvm-special-src: - @-$(MAKE) -C "${JULIAHOME}/deps" USE_BINARYBUILDER_LLVM=0 DEPS_GIT=0 BUILD_LLDB=1 BUILD_LLVM_CLANG=1 BUILD_CUSTOM_LIBCXX=1 checksum-llvm + @-$(MAKE) -C "$(JULIAHOME)/deps" USE_BINARYBUILDER_LLVM=0 DEPS_GIT=0 BUILD_LLDB=1 BUILD_LLVM_CLANG=1 BUILD_CUSTOM_LIBCXX=1 USECLANG=1 checksum-llvm all: checksum-llvm-special-src # This file is completely phony diff --git a/deps/Makefile b/deps/Makefile index fe7ea7f1ab2120..3d3f79513135b3 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -39,6 +39,10 @@ unexport CONFIG_SITE DEP_LIBS := +ifeq ($(USE_SYSTEM_CSL), 0) +DEP_LIBS += csl +endif + ifeq ($(USE_GPL_LIBS), 1) DEP_LIBS += suitesparse-wrapper endif @@ -180,7 +184,7 @@ install: $(addprefix install-, $(DEP_LIBS)) cleanall: $(addprefix clean-, $(DEP_LIBS)) distcleanall: $(addprefix distclean-, $(DEP_LIBS)) rm -rf $(build_prefix) -getall: get-llvm get-libuv get-pcre get-openlibm get-dsfmt get-openblas get-lapack get-suitesparse get-unwind get-gmp get-mpfr get-patchelf get-utf8proc get-objconv get-mbedtls get-libssh2 get-nghttp2 get-curl get-libgit2 get-libwhich get-zlib get-p7zip +getall: get-llvm get-libuv get-pcre get-openlibm get-dsfmt get-openblas get-lapack get-suitesparse get-unwind get-gmp get-mpfr get-patchelf get-utf8proc get-objconv get-mbedtls get-libssh2 get-nghttp2 get-curl get-libgit2 get-libwhich get-zlib get-p7zip get-csl # If we're building for MacOS, no matter what, `getall` should include `osxunwind` ifeq ($(OS),Darwin) @@ -192,6 +196,7 @@ ifeq ($(USE_BINARYBUILDER_OSXUNWIND),0) getall: get-osxunwind endif +include $(SRCDIR)/csl.mk include $(SRCDIR)/llvm.mk include $(SRCDIR)/libuv.mk include $(SRCDIR)/pcre.mk diff --git a/deps/Versions.make b/deps/Versions.make index 616dae1c55bfe6..078e1cad1d5a8a 100644 --- a/deps/Versions.make +++ b/deps/Versions.make @@ -1,44 +1,114 @@ -LLVM_VER = 11.0.0 -LLVM_BB_REL = 5 -PCRE_VER = 10.31 -PCRE_BB_REL = 0 -DSFMT_VER = 2.2.3 -DSFMT_BB_REL = 0 -OPENBLAS_VER = 0.3.10 -OPENBLAS_BB_REL = 0 -LAPACK_VER = 3.9.0 -SUITESPARSE_VER = 5.4.0 -SUITESPARSE_BB_REL = 6 -OPENLIBM_VER = 0.7.1 -OPENLIBM_BB_REL = 0 -UNWIND_VER = 1.3.1 -UNWIND_BB_REL = 4 -OSXUNWIND_VER = 0.0.6 -OSXUNWIND_BB_REL = 0 -GMP_VER = 6.2.0 -GMP_BB_REL = 1 -MPFR_VER = 4.1.0 -MPFR_BB_REL = 1 -PATCHELF_VER = 0.9 -MBEDTLS_VER = 2.16.8 -MBEDTLS_BB_REL = 0 -LIBSSH2_VER = 1.9.0 -LIBSSH2_BB_REL = 1 -# Note: keep stdlib/LibCURL_jll/Artifacts.toml in-sync -CURL_VER = 7.71.1 -CURL_BB_REL = 0 -NGHTTP2_VER = 1.40.0 -NGHTTP2_BB_REL = 2 -LIBGIT2_VER = 1.0.1 -LIBGIT2_BB_REL = 0 -LIBUV_VER = 2.0.0 -LIBUV_BB_REL = 10 -OBJCONV_VER = 2.49.0 -OBJCONV_BB_REL = 0 -ZLIB_VER = 1.2.11 -ZLIB_BB_REL = 10 -P7ZIP_VER = 16.2.0 -P7ZIP_BB_REL = 1 +## Dependencies and where to find them, listed in alphabetical order + +# To define a new dependency, you need to know the following pieces of information: +# +# * The Makefile variable stem; for LibCURL this is just "CURL". +# * The JLL name; for GMP this is "GMP", while for LLVM it could be "LLVM_full" or "LLVM_full_assert" +# * The upstream source version; for dSFMT this is currently "2.2.3" +# +# Everything else will be auto-generated. In particular, the version listed here +# represents the upstream source version; the JLL binary version that gets downloaded is +# controlled by the `Project.toml` files in `stdlib/XXX_jll/`. + +# Compiler Support Libraries +CSL_JLL_NAME := CompilerSupportLibraries + +# Clang (paired with LLVM, only here as a JLL download) +CLANG_JLL_NAME := Clang +CLANG_JLL_VER := 11.0.0+1 + +# DSFMT +DSFMT_VER := 2.2.3 +DSFMT_JLL_NAME := dSFMT + +# GMP +GMP_VER := 6.2.0 +GMP_JLL_NAME := GMP + +# LibCURL +CURL_VER := 7.73.0 +CURL_JLL_NAME := LibCURL + +# LAPACK, source-only +LAPACK_VER := 3.9.0 + +# LibGit2 +LIBGIT2_VER := 1.1.0 +LIBGIT2_JLL_NAME := LibGit2 + +# LibSSH2 +LIBSSH2_VER := 1.9.0 +LIBSSH2_JLL_NAME := LibSSH2 + +# LibUV +LIBUV_VER := 2 +LIBUV_JLL_NAME := LibUV + +# LLVM +LLVM_VER := 11.0.0 +LLVM_JLL_NAME := libLLVM +# We provide a way to subversively swap out which LLVM JLL we pull artifacts from +ifeq ($(BINARYBUILDER_LLVM_ASSERTS), 1) +LLVM_JLL_VER := 11.0.0+0 +LLVM_JLL_DOWNLOAD_NAME := libLLVM_assert +endif + +# LLVM_tools (downloads LLVM_jll to get things like `lit` and `opt`) +LLVM_TOOLS_JLL_NAME := LLVM +LLVM_TOOLS_JLL_VER = 11.0.0+1 + +# MbedTLS +MBEDTLS_VER := 2.24.0 +MBEDTLS_JLL_NAME := MbedTLS + +# MPFR +MPFR_VER := 4.1.0 +MPFR_JLL_NAME := MPFR + +# nghttp2 +NGHTTP2_VER := 1.41.0 +NGHTTP2_JLL_NAME := nghttp2 + +# Objconv (we don't ship this, so no need for a fake JLL; therefore we specify the JLL_VER here) +OBJCONV_VER := 2.49.1 +OBJCONV_JLL_NAME := Objconv +OBJCONV_JLL_VER := 2.49.1+0 + +# OpenBLAS +OPENBLAS_VER := 0.3.10 +OPENBLAS_JLL_NAME := OpenBLAS + +# OpenLibm +OPENLIBM_VER := 0.7.2 +OPENLIBM_JLL_NAME := OpenLibm + +# OSXUnwind (we statically link this, so no need for a fake JLL; therefore we specify the JLL_VER here) +OSXUNWIND_VER := 0.0.6 +OSXUNWIND_JLL_NAME := LibOSXUnwind +OSXUNWIND_JLL_VER := 0.0.6+1 + +# Patchelf (we don't ship this or even use a JLL, we just always build it) +PATCHELF_VER := 0.9 + +# p7zip +P7ZIP_VER := 16.2.0 +P7ZIP_JLL_NAME := p7zip + +# PCRE +PCRE_VER := 10.35 +PCRE_JLL_NAME := PCRE2 + +# SuiteSparse +SUITESPARSE_VER := 5.4.0 +SUITESPARSE_JLL_NAME := SuiteSparse + +# unwind +UNWIND_VER := 1.3.2 +UNWIND_JLL_NAME := LibUnwind + +# zlib +ZLIB_VER := 1.2.11 +ZLIB_JLL_NAME := Zlib # Specify the version of the Mozilla CA Certificate Store to obtain. # The versions of cacert.pem are identified by the date (YYYY-MM-DD) of their changes. diff --git a/deps/blas.mk b/deps/blas.mk index 8cc472ae7e376f..c6ccb6ec6a5f77 100644 --- a/deps/blas.mk +++ b/deps/blas.mk @@ -210,10 +210,6 @@ check-lapack: $(BUILDDIR)/lapack-$(LAPACK_VER)/build-checked else # USE_BINARYBUILDER_OPENBLAS - -OPENBLAS_BB_URL_BASE := https://github.com/JuliaBinaryWrappers/OpenBLAS_jll.jl/releases/download/OpenBLAS-v$(OPENBLAS_VER)+$(OPENBLAS_BB_REL) -OPENBLAS_BB_NAME := OpenBLAS.v$(OPENBLAS_VER) - $(eval $(call bb-install,openblas,OPENBLAS,true)) get-lapack: get-openblas extract-lapack: extract-openblas diff --git a/deps/csl.mk b/deps/csl.mk new file mode 100644 index 00000000000000..f2ed0c3b1f3e20 --- /dev/null +++ b/deps/csl.mk @@ -0,0 +1,78 @@ +ifeq ($(USE_BINARYBUILDER_CSL),0) + +# Interrogate the fortran compiler (which is always GCC based) on where it is keeping its libraries +STD_LIB_PATH := $(shell LANG=C $(FC) -print-search-dirs | grep '^programs: =' | sed -e "s/^programs: =//") +STD_LIB_PATH += :$(shell LANG=C $(FC) -print-search-dirs | grep '^libraries: =' | sed -e "s/^libraries: =//") +ifneq (,$(findstring CYGWIN,$(BUILD_OS))) # the cygwin-mingw32 compiler lies about it search directory paths +STD_LIB_PATH := $(shell echo '$(STD_LIB_PATH)' | sed -e "s!/lib/!/bin/!g") +endif + +# Given a colon-separated list of paths in $(2), find the location of the library given in $(1) +define pathsearch +$(firstword $(wildcard $(addsuffix /$(1),$(subst :, ,$(2))))) +endef + +define copy_csl +install-csl: | $$(build_shlibdir) $$(build_shlibdir)/$(1) +$$(build_shlibdir)/$(1): | $$(build_shlibdir) + -@SRC_LIB=$$(call pathsearch,$(1),$$(STD_LIB_PATH)); \ + [ -n "$$$${SRC_LIB}" ] && cp $$$${SRC_LIB} $$(build_shlibdir) +endef + +ifeq ($(OS),WINNT) +define gen_libname +$$(if $(2),lib$(1)-$(2).$(SHLIB_EXT),lib$(1).$(SHLIB_EXT)) +endef +else ifeq ($(OS),Darwin) +define gen_libname +$$(if $(2),lib$(1).$(2).$(SHLIB_EXT),lib$(1).$(SHLIB_EXT)) +endef +else +define gen_libname +$$(if $(2),lib$(1).$(SHLIB_EXT).$(2),lib$(1).$(SHLIB_EXT)) +endef +endif + +# libgfortran has multiple names; we're just going to copy any version we can find +# Since we're only looking in the location given by `$(FC)` this should only succeed for one. +$(eval $(call copy_csl,$(call gen_libname,gfortran,3))) +$(eval $(call copy_csl,$(call gen_libname,gfortran,4))) +$(eval $(call copy_csl,$(call gen_libname,gfortran,5))) + +# These are all libraries that we should always have +$(eval $(call copy_csl,$(call gen_libname,quadmath,0))) +$(eval $(call copy_csl,$(call gen_libname,stdc++,6))) +$(eval $(call copy_csl,$(call gen_libname,ssp,0))) +$(eval $(call copy_csl,$(call gen_libname,atomic,1))) + +ifeq ($(OS),WINNT) +# Windwos has special gcc_s names +ifeq ($(ARCH),i686) +$(eval $(call copy_csl,$(call gen_libname,gcc_s_sjlj,1))) +else +$(eval $(call copy_csl,$(call gen_libname,gcc_s_seh,1))) +endif +else +$(eval $(call copy_csl,$(call gen_libname,gcc_s,1))) +endif +# winpthread is only Windows, pthread is only others +ifeq ($(OS),WINNT) +$(eval $(call copy_csl,$(call gen_libname,winpthread,1))) +else +$(eval $(call copy_csl,$(call gen_libname,pthread,0))) +endif + +clean-csl: + -rm -f $(build_shlibdir)/libgfortran*$(SHLIB_EXT)* + -rm -f $(build_shlibdir)/libquadmath*$(SHLIB_EXT)* + -rm -f $(build_shlibdir)/libstdc++*$(SHLIB_EXT)* + -rm -f $(build_shlibdir)/libc++*$(SHLIB_EXT)* + -rm -f $(build_shlibdir)/libgcc_s*$(SHLIB_EXT)* + -rm -f $(build_shlibdir)/libssp*$(SHLIB_EXT)* + -rm -f $(build_shlibdir)/libpthread*$(SHLIB_EXT)* + -rm -f $(build_shlibdir)/libwinpthread*$(SHLIB_EXT)* + -rm -f $(build_shlibdir)/libatomic*$(SHLIB_EXT)* + +else +$(eval $(call bb-install,csl,CSL,true)) +endif diff --git a/deps/curl.mk b/deps/curl.mk index 5ea2d6691fa01c..b6b7ec37da4d3a 100644 --- a/deps/curl.mk +++ b/deps/curl.mk @@ -72,9 +72,5 @@ fastcheck-curl: #none check-curl: $(BUILDDIR)/curl-$(CURL_VER)/build-checked else # USE_BINARYBUILDER_CURL - -CURL_BB_URL_BASE := https://github.com/JuliaBinaryWrappers/LibCURL_jll.jl/releases/download/LibCURL-v$(CURL_VER)+$(CURL_BB_REL) -CURL_BB_NAME := LibCURL.v$(CURL_VER) - $(eval $(call bb-install,curl,CURL,false)) endif diff --git a/deps/dsfmt.mk b/deps/dsfmt.mk index 639b6aec799e43..84b6bdebbe91ff 100644 --- a/deps/dsfmt.mk +++ b/deps/dsfmt.mk @@ -68,8 +68,6 @@ check-dsfmt: $(BUILDDIR)/dsfmt-$(DSFMT_VER)/build-checked else -DSFMT_BB_URL_BASE := https://github.com/JuliaPackaging/Yggdrasil/releases/download/dSFMT-v$(DSFMT_VER)-$(DSFMT_BB_REL) -DSFMT_BB_NAME := dSFMT.v$(DSFMT_VER) $(eval $(call bb-install,dsfmt,DSFMT,false)) endif # USE_BINARYBUILDER_DSFMT diff --git a/deps/gmp.mk b/deps/gmp.mk index ac83700c652464..7c358927d57250 100644 --- a/deps/gmp.mk +++ b/deps/gmp.mk @@ -31,7 +31,7 @@ $(SRCCACHE)/gmp-$(GMP_VER)/build-patched: $(SRCCACHE)/gmp-$(GMP_VER)/source-extr $(BUILDDIR)/gmp-$(GMP_VER)/build-configured: $(SRCCACHE)/gmp-$(GMP_VER)/source-extracted mkdir -p $(dir $@) cd $(dir $@) && \ - $(dir $<)/configure $(CONFIGURE_COMMON) F77= --enable-shared --disable-static $(GMP_CONFIGURE_OPTS) + $(dir $<)/configure $(CONFIGURE_COMMON) F77= --enable-cxx --enable-shared --disable-static $(GMP_CONFIGURE_OPTS) echo 1 > $@ $(BUILDDIR)/gmp-$(GMP_VER)/build-compiled: $(BUILDDIR)/gmp-$(GMP_VER)/build-configured @@ -46,10 +46,12 @@ endif define GMP_INSTALL mkdir -p $2/$(build_shlibdir) $2/$(build_includedir) + # Ensure that Windows gets the non-versioned dll names too ifeq ($(BUILD_OS),WINNT) - -mv $1/.libs/gmp.dll $1/.libs/libgmp.dll + -cp $1/.libs/libgmp-*.dll $1/.libs/libgmp.dll + -cp $1/.libs/libgmpxx-*.dll $1/.libs/libgmpxx.dll endif - $(INSTALL_M) $1/.libs/libgmp.*$(SHLIB_EXT)* $2/$(build_shlibdir) + $(INSTALL_M) $1/.libs/libgmp*$(SHLIB_EXT)* $2/$(build_shlibdir) $(INSTALL_F) $1/gmp.h $2/$(build_includedir) endef $(eval $(call staged-install, \ @@ -75,8 +77,5 @@ check-gmp: $(BUILDDIR)/gmp-$(GMP_VER)/build-checked else # USE_BINARYBUILDER_GMP -GMP_BB_URL_BASE := https://github.com/JuliaBinaryWrappers/GMP_jll.jl/releases/download/GMP-v$(GMP_VER)+$(GMP_BB_REL) -GMP_BB_NAME := GMP.v$(GMP_VER) - $(eval $(call bb-install,gmp,GMP,false,true)) endif diff --git a/deps/libgit2.mk b/deps/libgit2.mk index dc04d7ae160624..301e73b454c5e6 100644 --- a/deps/libgit2.mk +++ b/deps/libgit2.mk @@ -95,8 +95,6 @@ $(build_prefix)/manifest/libgit2: $(build_datarootdir)/julia/cert.pem # use libg else # USE_BINARYBUILDER_LIBGIT2 -LIBGIT2_BB_URL_BASE := https://github.com/JuliaBinaryWrappers/LibGit2_jll.jl/releases/download/LibGit2-v$(LIBGIT2_VER)+$(LIBGIT2_BB_REL) -LIBGIT2_BB_NAME := LibGit2.v$(LIBGIT2_VER) $(eval $(call bb-install,libgit2,LIBGIT2,false)) # BB tarball doesn't create a manifest, so directly depend the `install` target diff --git a/deps/libgit2.version b/deps/libgit2.version index a2ab705d4567eb..7c7c34a4909e0c 100644 --- a/deps/libgit2.version +++ b/deps/libgit2.version @@ -1,2 +1,2 @@ -LIBGIT2_BRANCH=v1.0.1 -LIBGIT2_SHA1=0ced29612dacb67eefe0c562a5c1d3aab21cce96 +LIBGIT2_BRANCH=v1.1.0 +LIBGIT2_SHA1=7f4fa178629d559c037a1f72f79f79af9c1ef8ce diff --git a/deps/libssh2.mk b/deps/libssh2.mk index 9bd3c502f6825b..53e66593047709 100644 --- a/deps/libssh2.mk +++ b/deps/libssh2.mk @@ -63,8 +63,6 @@ check-libssh2: $(BUILDDIR)/$(LIBSSH2_SRC_DIR)/build-checked else # USE_BINARYBUILDER_LIBSSH2 -LIBSSH2_BB_URL_BASE := https://github.com/JuliaBinaryWrappers/LibSSH2_jll.jl/releases/download/LibSSH2-v$(LIBSSH2_VER)+$(LIBSSH2_BB_REL) -LIBSSH2_BB_NAME := LibSSH2.v$(LIBSSH2_VER) - $(eval $(call bb-install,libssh2,LIBSSH2,false)) + endif diff --git a/deps/libuv.mk b/deps/libuv.mk index 29b4bea7e3bfc9..ff749fef386516 100644 --- a/deps/libuv.mk +++ b/deps/libuv.mk @@ -63,8 +63,7 @@ fastcheck-libuv: #none check-libuv: $(LIBUV_BUILDDIR)/build-checked else # USE_BINARYBUILDER_LIBUV -LIBUV_BB_URL_BASE := https://github.com/JuliaBinaryWrappers/LibUV_jll.jl/releases/download/LibUV-v$(LIBUV_VER)+$(LIBUV_BB_REL) -LIBUV_BB_NAME := LibUV.v$(LIBUV_VER) $(eval $(call bb-install,libuv,LIBUV,false)) + endif diff --git a/deps/llvm.mk b/deps/llvm.mk index 22d9677b0d7be7..0137b848e46dfe 100644 --- a/deps/llvm.mk +++ b/deps/llvm.mk @@ -617,15 +617,9 @@ update-llvm: git pull --ff-only) endif else # USE_BINARYBUILDER_LLVM -ifneq ($(BINARYBUILDER_LLVM_ASSERTS), 1) -LLVM_BB_REPO_NAME := LLVM_full -else -LLVM_BB_REPO_NAME := LLVM_full_assert -LLVM_BB_NAME := LLVM.asserts.v$(LLVM_VER) -endif -LLVM_BB_NAME := $(LLVM_BB_REPO_NAME).v$(LLVM_VER) -LLVM_BB_URL_BASE := https://github.com/JuliaBinaryWrappers/$(LLVM_BB_REPO_NAME)_jll.jl/releases/download/$(LLVM_BB_REPO_NAME)-v$(LLVM_VER)+$(LLVM_BB_REL) $(eval $(call bb-install,llvm,LLVM,false,true)) +$(eval $(call bb-install,clang,CLANG,false,true)) +$(eval $(call bb-install,llvm-tools,LLVM_TOOLS,false,true)) endif # USE_BINARYBUILDER_LLVM diff --git a/deps/mbedtls.mk b/deps/mbedtls.mk index 119873b5789a80..03c44047867834 100644 --- a/deps/mbedtls.mk +++ b/deps/mbedtls.mk @@ -91,9 +91,6 @@ check-mbedtls: $(BUILDDIR)/$(MBEDTLS_SRC)/build-checked else # USE_BINARYBUILDER_MBEDTLS -MBEDTLS_BB_URL_BASE := https://github.com/JuliaBinaryWrappers/MbedTLS_jll.jl/releases/download/MbedTLS-v$(MBEDTLS_VER)+$(MBEDTLS_BB_REL) -MBEDTLS_BB_NAME := MbedTLS.v$(MBEDTLS_VER) - $(eval $(call bb-install,mbedtls,MBEDTLS,false)) endif diff --git a/deps/mpfr.mk b/deps/mpfr.mk index 9ad9fa756625b5..709128b2b5f8cd 100644 --- a/deps/mpfr.mk +++ b/deps/mpfr.mk @@ -77,8 +77,6 @@ check-mpfr: $(BUILDDIR)/mpfr-$(MPFR_VER)/build-checked else # USE_BINARYBUILDER_MPFR -MPFR_BB_URL_BASE := https://github.com/JuliaBinaryWrappers/MPFR_jll.jl/releases/download/MPFR-v$(MPFR_VER)+$(MPFR_BB_REL) -MPFR_BB_NAME := MPFR.v$(MPFR_VER) - $(eval $(call bb-install,mpfr,MPFR,false)) + endif diff --git a/deps/nghttp2.mk b/deps/nghttp2.mk index 04d3097b588cfc..2b8a18728b7124 100644 --- a/deps/nghttp2.mk +++ b/deps/nghttp2.mk @@ -53,8 +53,6 @@ check-nghttp2: $(BUILDDIR)/nghttp2-$(NGHTTP2_VER)/build-checked else -NGHTTP2_BB_URL_BASE := https://github.com/JuliaBinaryWrappers/nghttp2_jll.jl/releases/download/nghttp2-v$(NGHTTP2_VER)+$(NGHTTP2_BB_REL) -NGHTTP2_BB_NAME := nghttp2.v$(NGHTTP2_VER) - $(eval $(call bb-install,nghttp2,NGHTTP2,false)) + endif diff --git a/deps/objconv.mk b/deps/objconv.mk index 355cf39cc16941..88439d3043fe5b 100644 --- a/deps/objconv.mk +++ b/deps/objconv.mk @@ -36,8 +36,6 @@ check-objconv: compile-objconv else -OBJCONV_BB_URL_BASE := https://github.com/JuliaPackaging/Yggdrasil/releases/download/Objconv-v$(OBJCONV_VER)-$(OBJCONV_BB_REL) -OBJCONV_BB_NAME := Objconv.v$(OBJCONV_VER) $(eval $(call bb-install,objconv,OBJCONV,false)) endif diff --git a/deps/openlibm.mk b/deps/openlibm.mk index 6328aa7dffdda7..6e63571b07cc34 100644 --- a/deps/openlibm.mk +++ b/deps/openlibm.mk @@ -29,8 +29,6 @@ check-openlibm: compile-openlibm else # USE_BINARYBUILDER_OPENLIBM -OPENLIBM_BB_URL_BASE := https://github.com/JuliaBinaryWrappers/OpenLibm_jll.jl/releases/download/OpenLibm-v$(OPENLIBM_VER)+$(OPENLIBM_BB_REL) -OPENLIBM_BB_NAME := OpenLibm.v$(OPENLIBM_VER) - $(eval $(call bb-install,openlibm,OPENLIBM,false)) + endif diff --git a/deps/p7zip.mk b/deps/p7zip.mk index 8c6dea16230833..ced419396b2ff2 100644 --- a/deps/p7zip.mk +++ b/deps/p7zip.mk @@ -61,8 +61,7 @@ check-p7zip: compile-p7zip else # USE_BINARYBUILDER_P7ZIP -P7ZIP_BB_URL_BASE := https://github.com/JuliaBinaryWrappers/p7zip_jll.jl/releases/download/p7zip-v$(P7ZIP_VER)+$(P7ZIP_BB_REL) -P7ZIP_BB_NAME := p7zip.v$(P7ZIP_VER) + $(eval $(call bb-install,p7zip,P7ZIP,false)) endif diff --git a/deps/patches/pcre2-cet-flags.patch b/deps/patches/pcre2-cet-flags.patch new file mode 100644 index 00000000000000..e7ed07495ac682 --- /dev/null +++ b/deps/patches/pcre2-cet-flags.patch @@ -0,0 +1,229 @@ +commit 6823a639a4a2d3e2b4a44bab6da78e1659431063 +Author: Elliot Saba +Date: Tue Nov 17 19:29:06 2020 +0000 + + Backport SVN revisions r1256 and r1257 to fix compilations errors + + Without this patch, compilation errors such as `"-mshstk is needed to compile with -fcf-protection"` + occur on newer Ubuntu distros. This is a backport of upstreams patch, along with a partial-update + of `configure` so that users do not have to run `aclocal` on their machines when building from source. + + X-ref: https://bugs.exim.org/show_bug.cgi?id=2578 + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 86b8896..a368523 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -92,6 +92,7 @@ + # library versioning. + # 2020-04-25 Carlo added function check for mkostemp used in ProtExecAllocator + # 2020-04-28 PH added function check for memfd_create based on Carlo's patch ++# 2020-05-25 PH added a check for Intel CET + + PROJECT(PCRE2 C) + +@@ -146,6 +147,23 @@ CHECK_C_SOURCE_COMPILES( + ) + set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS}) + ++# Check whether Intel CET is enabled, and if so, adjust compiler flags. This ++# code was written by PH, trying to imitate the logic from the autotools ++# configuration. ++ ++CHECK_C_SOURCE_COMPILES( ++ "#ifndef __CET__ ++ #error CET is not enabled ++ #endif ++ int main() { return 0; }" ++ INTEL_CET_ENABLED ++) ++ ++IF (INTEL_CET_ENABLED) ++ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mshstk") ++ENDIF(INTEL_CET_ENABLED) ++ ++ + # User-configurable options + # + # Note: CMakeSetup displays these in alphabetical order, regardless of +diff --git a/ChangeLog b/ChangeLog +index 310eb60..f238cce 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,6 +1,15 @@ + Change Log for PCRE2 + -------------------- + ++Version 10.36-RC1 25-May-2020 ++----------------------------- ++ ++1. Add CET_CFLAGS so that when Intel CET is enabled, pass -mshstk to ++compiler. This fixes https://bugs.exim.org/show_bug.cgi?id=2578. Patch for ++Makefile.am and configure.ac by H.J. Lu. Equivalent patch for CMakeLists.txt ++invented by PH. ++ ++ + Version 10.35 09-May-2020 + --------------------------- + +diff --git a/Makefile.am b/Makefile.am +index bb888f2..6a771a5 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -391,6 +391,7 @@ nodist_libpcre2_8_la_SOURCES = \ + libpcre2_8_la_CFLAGS = \ + -DPCRE2_CODE_UNIT_WIDTH=8 \ + $(VISIBILITY_CFLAGS) \ ++ $(CET_CFLAGS) \ + $(AM_CFLAGS) + libpcre2_8_la_LIBADD = + endif # WITH_PCRE2_8 +@@ -404,6 +405,7 @@ nodist_libpcre2_16_la_SOURCES = \ + libpcre2_16_la_CFLAGS = \ + -DPCRE2_CODE_UNIT_WIDTH=16 \ + $(VISIBILITY_CFLAGS) \ ++ $(CET_CFLAGS) \ + $(AM_CFLAGS) + libpcre2_16_la_LIBADD = + endif # WITH_PCRE2_16 +@@ -417,6 +419,7 @@ nodist_libpcre2_32_la_SOURCES = \ + libpcre2_32_la_CFLAGS = \ + -DPCRE2_CODE_UNIT_WIDTH=32 \ + $(VISIBILITY_CFLAGS) \ ++ $(CET_CFLAGS) \ + $(AM_CFLAGS) + libpcre2_32_la_LIBADD = + endif # WITH_PCRE2_32 +diff --git a/Makefile.in b/Makefile.in +index 2873912..0ce7004 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -806,6 +806,7 @@ AUTOMAKE = @AUTOMAKE@ + AWK = @AWK@ + CC = @CC@ + CCDEPMODE = @CCDEPMODE@ ++CET_CFLAGS = @CET_CFLAGS@ + CFLAGS = @CFLAGS@ + CPP = @CPP@ + CPPFLAGS = @CPPFLAGS@ +@@ -1310,8 +1311,9 @@ COMMON_SOURCES = \ + @WITH_PCRE2_8_TRUE@ $(NODIST_SOURCES) + + @WITH_PCRE2_8_TRUE@libpcre2_8_la_CFLAGS = -DPCRE2_CODE_UNIT_WIDTH=8 \ +-@WITH_PCRE2_8_TRUE@ $(VISIBILITY_CFLAGS) $(AM_CFLAGS) \ +-@WITH_PCRE2_8_TRUE@ $(am__append_5) $(am__append_8) ++@WITH_PCRE2_8_TRUE@ $(VISIBILITY_CFLAGS) $(CET_CFLAGS) \ ++@WITH_PCRE2_8_TRUE@ $(AM_CFLAGS) $(am__append_5) \ ++@WITH_PCRE2_8_TRUE@ $(am__append_8) + @WITH_PCRE2_8_TRUE@libpcre2_8_la_LIBADD = + @WITH_PCRE2_16_TRUE@libpcre2_16_la_SOURCES = \ + @WITH_PCRE2_16_TRUE@ $(COMMON_SOURCES) +@@ -1321,8 +1323,9 @@ COMMON_SOURCES = \ + + @WITH_PCRE2_16_TRUE@libpcre2_16_la_CFLAGS = \ + @WITH_PCRE2_16_TRUE@ -DPCRE2_CODE_UNIT_WIDTH=16 \ +-@WITH_PCRE2_16_TRUE@ $(VISIBILITY_CFLAGS) $(AM_CFLAGS) \ +-@WITH_PCRE2_16_TRUE@ $(am__append_6) $(am__append_9) ++@WITH_PCRE2_16_TRUE@ $(VISIBILITY_CFLAGS) $(CET_CFLAGS) \ ++@WITH_PCRE2_16_TRUE@ $(AM_CFLAGS) $(am__append_6) \ ++@WITH_PCRE2_16_TRUE@ $(am__append_9) + @WITH_PCRE2_16_TRUE@libpcre2_16_la_LIBADD = + @WITH_PCRE2_32_TRUE@libpcre2_32_la_SOURCES = \ + @WITH_PCRE2_32_TRUE@ $(COMMON_SOURCES) +@@ -1332,8 +1335,9 @@ COMMON_SOURCES = \ + + @WITH_PCRE2_32_TRUE@libpcre2_32_la_CFLAGS = \ + @WITH_PCRE2_32_TRUE@ -DPCRE2_CODE_UNIT_WIDTH=32 \ +-@WITH_PCRE2_32_TRUE@ $(VISIBILITY_CFLAGS) $(AM_CFLAGS) \ +-@WITH_PCRE2_32_TRUE@ $(am__append_7) $(am__append_10) ++@WITH_PCRE2_32_TRUE@ $(VISIBILITY_CFLAGS) $(CET_CFLAGS) \ ++@WITH_PCRE2_32_TRUE@ $(AM_CFLAGS) $(am__append_7) \ ++@WITH_PCRE2_32_TRUE@ $(am__append_10) + @WITH_PCRE2_32_TRUE@libpcre2_32_la_LIBADD = + @WITH_PCRE2_8_TRUE@libpcre2_8_la_LDFLAGS = $(EXTRA_LIBPCRE2_8_LDFLAGS) + @WITH_PCRE2_16_TRUE@libpcre2_16_la_LDFLAGS = $(EXTRA_LIBPCRE2_16_LDFLAGS) +diff --git a/configure b/configure +index 615f638..322a3a4 100755 +--- a/configure ++++ b/configure +@@ -633,6 +633,7 @@ ac_subst_vars='am__EXEEXT_FALSE + am__EXEEXT_TRUE + LTLIBOBJS + LIBOBJS ++CET_CFLAGS + WITH_GCOV_FALSE + WITH_GCOV_TRUE + GCOV_LIBS +@@ -15493,6 +15494,46 @@ else + fi + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Intel CET is enabled" >&5 ++$as_echo_n "checking whether Intel CET is enabled... " >&6; } ++ac_ext=c ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ++ac_compiler_gnu=$ac_cv_c_compiler_gnu ++ ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++#ifndef __CET__ ++# error CET is not enabled ++#endif ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ pcre2_cc_cv_intel_cet_enabled=yes ++else ++ pcre2_cc_cv_intel_cet_enabled=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pcre2_cc_cv_intel_cet_enabled" >&5 ++$as_echo "$pcre2_cc_cv_intel_cet_enabled" >&6; } ++if test "$pcre2_cc_cv_intel_cet_enabled" = yes; then ++ CET_CFLAGS="-mshstk" ++ ++fi ++ac_ext=c ++ac_cpp='$CPP $CPPFLAGS' ++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ++ac_compiler_gnu=$ac_cv_c_compiler_gnu ++ ++ + # Produce these files, in addition to config.h. + ac_config_files="$ac_config_files Makefile libpcre2-8.pc libpcre2-16.pc libpcre2-32.pc libpcre2-posix.pc pcre2-config src/pcre2.h" + +diff --git a/configure.ac b/configure.ac +index 180d3dc..61b93ba 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1006,6 +1006,21 @@ fi # enable_coverage + + AM_CONDITIONAL([WITH_GCOV],[test "x$enable_coverage" = "xyes"]) + ++AC_MSG_CHECKING([whether Intel CET is enabled]) ++AC_LANG_PUSH([C]) ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, ++ [[#ifndef __CET__ ++# error CET is not enabled ++#endif]])], ++ [pcre2_cc_cv_intel_cet_enabled=yes], ++ [pcre2_cc_cv_intel_cet_enabled=no]) ++AC_MSG_RESULT([$pcre2_cc_cv_intel_cet_enabled]) ++if test "$pcre2_cc_cv_intel_cet_enabled" = yes; then ++ CET_CFLAGS="-mshstk" ++ AC_SUBST([CET_CFLAGS]) ++fi ++AC_LANG_POP([C]) ++ + # Produce these files, in addition to config.h. + AC_CONFIG_FILES( + Makefile diff --git a/deps/pcre.mk b/deps/pcre.mk index 0090634f516d67..70b9e9f96ff02a 100644 --- a/deps/pcre.mk +++ b/deps/pcre.mk @@ -12,7 +12,12 @@ $(SRCCACHE)/pcre2-$(PCRE_VER)/source-extracted: $(SRCCACHE)/pcre2-$(PCRE_VER).ta $(JLCHECKSUM) $< cd $(dir $<) && $(TAR) jxf $(notdir $<) cp $(SRCDIR)/patches/config.sub $(SRCCACHE)/pcre2-$(PCRE_VER)/config.sub - touch -c $(SRCCACHE)/pcre2-$(PCRE_VER)/configure # old target + cd $(SRCCACHE)/pcre2-$(PCRE_VER) && patch -p1 -f < $(SRCDIR)/patches/pcre2-cet-flags.patch + # Fix some old targets modified by the patching + touch -c $(SRCCACHE)/pcre2-$(PCRE_VER)/Makefile.am + touch -c $(SRCCACHE)/pcre2-$(PCRE_VER)/Makefile.in + touch -c $(SRCCACHE)/pcre2-$(PCRE_VER)/aclocal.m4 + touch -c $(SRCCACHE)/pcre2-$(PCRE_VER)/configure echo $1 > $@ checksum-pcre2: $(SRCCACHE)/pcre2-$(PCRE_VER).tar.bz2 @@ -58,8 +63,6 @@ fastcheck-pcre: check-pcre check-pcre: $(BUILDDIR)/pcre2-$(PCRE_VER)/build-checked else # USE_BINARYBUILDER_PCRE -PCRE_BB_URL_BASE := https://github.com/JuliaPackaging/Yggdrasil/releases/download/PCRE2-v$(PCRE_VER)-$(PCRE_BB_REL) -PCRE_BB_NAME := PCRE2.v$(PCRE_VER).0 $(eval $(call bb-install,pcre,PCRE,false)) diff --git a/deps/suitesparse.mk b/deps/suitesparse.mk index 38d695f9548d1b..f4515f6b0a8848 100644 --- a/deps/suitesparse.mk +++ b/deps/suitesparse.mk @@ -141,10 +141,8 @@ install-suitesparse-wrapper: $(build_shlibdir)/libsuitesparse_wrapper.$(SHLIB_EX else # USE_BINARYBUILDER_SUITESPARSE -SUITESPARSE_BB_URL_BASE := https://github.com/JuliaBinaryWrappers/SuiteSparse_jll.jl/releases/download/SuiteSparse-v$(SUITESPARSE_VER)+$(SUITESPARSE_BB_REL) -SUITESPARSE_BB_NAME := SuiteSparse.v$(SUITESPARSE_VER) - $(eval $(call bb-install,suitesparse,SUITESPARSE,false)) + get-suitesparse-wrapper: get-suitesparse extract-suitesparse-wrapper: extract-suitesparse configure-suitesparse-wrapper: configure-suitesparse diff --git a/deps/tools/bb-install.mk b/deps/tools/bb-install.mk index db9aa98bf02db0..448f4799e6efc2 100644 --- a/deps/tools/bb-install.mk +++ b/deps/tools/bb-install.mk @@ -4,42 +4,37 @@ # 3 gfortran, \ # signifies a GCC ABI (e.g. libgfortran version) dependency # 4 cxx11) # signifies a cxx11 ABI dependency -# Hardcode Darwin AArch64 triplet for now, since we're using an unstable toolchain that -# we don't expect the user to have -ifeq ($(OS)$(ARCH),Darwinaarch64) - -BB_TRIPLET_LIBGFORTRAN_CXXABI := aarch64-apple-darwin-libgfortran5 - -else - -# Auto-detect triplet once, create different versions that we use as defaults below for each BB install target -BB_TRIPLET_LIBGFORTRAN_CXXABI := $(shell $(call invoke_python,$(JULIAHOME)/contrib/normalize_triplet.py) $(or $(XC_HOST),$(XC_HOST),$(BUILD_MACHINE)) "$(shell $(FC) --version | head -1)" "$(or $(shell echo '\#include ' | $(CXX) $(CXXFLAGS) -x c++ -dM -E - | grep _GLIBCXX_USE_CXX11_ABI | awk '{ print $$3 }' ),1)") - -endif - -BB_TRIPLET_LIBGFORTRAN := $(subst $(SPACE),-,$(filter-out cxx%,$(subst -,$(SPACE),$(BB_TRIPLET_LIBGFORTRAN_CXXABI)))) -BB_TRIPLET_CXXABI := $(subst $(SPACE),-,$(filter-out libgfortran%,$(subst -,$(SPACE),$(BB_TRIPLET_LIBGFORTRAN_CXXABI)))) -BB_TRIPLET := $(subst $(SPACE),-,$(filter-out cxx%,$(filter-out libgfortran%,$(subst -,$(SPACE),$(BB_TRIPLET_LIBGFORTRAN_CXXABI))))) - define bb-install TRIPLET_VAR := BB_TRIPLET ifeq ($(3),true) TRIPLET_VAR := $$(TRIPLET_VAR)_LIBGFORTRAN endif ifeq ($(4),true) +# Darwin and FreeBSD use `clang` instead of `gcc`, so they don't have a cxx11 string ABI break +ifeq (,$(filter $(OS),Darwin FreeBSD)) TRIPLET_VAR := $$(TRIPLET_VAR)_CXXABI endif -$(2)_BB_TRIPLET := $$($$(TRIPLET_VAR)) -$(2)_BB_URL := $$($(2)_BB_URL_BASE)/$$($(2)_BB_NAME).$$($(2)_BB_TRIPLET).tar.gz -$(2)_BB_BASENAME := $$($(2)_BB_NAME)-$$($(2)_BB_REL).$$($(2)_BB_TRIPLET).tar.gz +endif + +# Look for JLL version within Project.toml in stdlib/ +$(2)_STDLIB_PATH := $(JULIAHOME)/stdlib/$$($(2)_JLL_NAME)_jll -$$(BUILDDIR)/$$($(2)_BB_NAME): - mkdir -p $$@ +# If the file doesn't exist (e.g. we're downloading a JLL release for something +# that we don't actually ship) silently continue despite the Project.toml file missing. +$(2)_JLL_VER ?= $$(shell [ -f $$($(2)_STDLIB_PATH)/Project.toml ] && grep "^version" $$($(2)_STDLIB_PATH)/Project.toml | sed -E 's/version[[:space:]]*=[[:space:]]*"?([^"]+)"?/\1/') + +# Allow things to override which JLL we pull from, e.g. libLLVM_jll vs. libLLVM_assert_jll +$(2)_JLL_DOWNLOAD_NAME ?= $$($(2)_JLL_NAME) + +$(2)_BB_TRIPLET := $$($$(TRIPLET_VAR)) +$(2)_JLL_VER_NOPLUS := $$(firstword $$(subst +,$(SPACE),$$($(2)_JLL_VER))) +$(2)_JLL_BASENAME := $$($(2)_JLL_DOWNLOAD_NAME).v$$($(2)_JLL_VER).$$($(2)_BB_TRIPLET).tar.gz +$(2)_BB_URL := https://github.com/JuliaBinaryWrappers/$$($(2)_JLL_DOWNLOAD_NAME)_jll.jl/releases/download/$$($(2)_JLL_DOWNLOAD_NAME)-v$$($(2)_JLL_VER)/$$($(2)_JLL_DOWNLOAD_NAME).v$$($(2)_JLL_VER_NOPLUS).$$($(2)_BB_TRIPLET).tar.gz -$$(SRCCACHE)/$$($(2)_BB_BASENAME): | $$(SRCCACHE) +$$(SRCCACHE)/$$($(2)_JLL_BASENAME): | $$(SRCCACHE) $$(JLDOWNLOAD) $$@ $$($(2)_BB_URL) -stage-$(strip $1): $$(SRCCACHE)/$$($(2)_BB_BASENAME) +stage-$(strip $1): $$(SRCCACHE)/$$($(2)_JLL_BASENAME) install-$(strip $1): $$(build_prefix)/manifest/$(strip $1) reinstall-$(strip $1): @@ -47,9 +42,9 @@ reinstall-$(strip $1): +$$(MAKE) stage-$(strip $1) +$$(MAKE) install-$(strip $1) -UNINSTALL_$(strip $1) := $$($(2)_BB_BASENAME:.tar.gz=) bb-uninstaller +UNINSTALL_$(strip $1) := $$($(2)_JLL_BASENAME:.tar.gz=) bb-uninstaller -$$(build_prefix)/manifest/$(strip $1): $$(SRCCACHE)/$$($(2)_BB_BASENAME) | $(build_prefix)/manifest +$$(build_prefix)/manifest/$(strip $1): $$(SRCCACHE)/$$($(2)_JLL_BASENAME) | $(build_prefix)/manifest -+[ ! -e $$@ ] || $$(MAKE) uninstall-$(strip $1) $$(JLCHECKSUM) $$< mkdir -p $$(build_prefix) @@ -57,15 +52,15 @@ $$(build_prefix)/manifest/$(strip $1): $$(SRCCACHE)/$$($(2)_BB_BASENAME) | $(bui echo '$$(UNINSTALL_$(strip $1))' > $$@ # Special "checksum-foo" target to speed up `contrib/refresh_checksums.sh` -checksum-$(1): $$(SRCCACHE)/$$($(2)_BB_BASENAME) +checksum-$(1): $$(SRCCACHE)/$$($(2)_JLL_BASENAME) $$(JLCHECKSUM) $$< clean-bb-download-$(1): - rm -f $$(SRCCACHE)/$$($(2)_BB_BASENAME) + rm -f $$(SRCCACHE)/$$($(2)_JLL_BASENAME) clean-$(1): distclean-$(1): clean-bb-download-$(1) -get-$(1): $$(SRCCACHE)/$$($(2)_BB_BASENAME) +get-$(1): $$(SRCCACHE)/$$($(2)_JLL_BASENAME) extract-$(1): configure-$(1): compile-$(1): get-$(1) diff --git a/deps/unwind.mk b/deps/unwind.mk index f584559335f179..351f9b3df745fe 100644 --- a/deps/unwind.mk +++ b/deps/unwind.mk @@ -110,14 +110,8 @@ install-osxunwind: $(build_prefix)/manifest/osxunwind else # USE_BINARYBUILDER_LIBUNWIND -UNWIND_BB_URL_BASE := https://github.com/JuliaPackaging/Yggdrasil/releases/download/LibUnwind-v$(UNWIND_VER)+$(UNWIND_BB_REL) -UNWIND_BB_NAME := LibUnwind.v$(UNWIND_VER) - $(eval $(call bb-install,unwind,UNWIND,false)) -OSXUNWIND_BB_URL_BASE := https://github.com/JuliaBinaryWrappers/LibOSXUnwind_jll.jl/releases/download/LibOSXUnwind-v$(OSXUNWIND_VER)+$(OSXUNWIND_BB_REL) -OSXUNWIND_BB_NAME := LibOSXUnwind.v$(OSXUNWIND_VER) - $(eval $(call bb-install,osxunwind,OSXUNWIND,false)) endif diff --git a/deps/zlib.mk b/deps/zlib.mk index 009d3a8f69ec7a..abc626fd2f79f1 100644 --- a/deps/zlib.mk +++ b/deps/zlib.mk @@ -31,8 +31,6 @@ check-zlib: compile-zlib else # USE_BINARYBUILDER_ZLIB -ZLIB_BB_URL_BASE := https://github.com/JuliaBinaryWrappers/Zlib_jll.jl/releases/download/Zlib-v$(ZLIB_VER)+$(ZLIB_BB_REL) -ZLIB_BB_NAME := Zlib.v$(ZLIB_VER) $(eval $(call bb-install,zlib,ZLIB,false)) endif # USE_BINARYBUILDER_ZLIB diff --git a/src/Makefile b/src/Makefile index 00d7d3fc0de8bd..dab649c352923e 100644 --- a/src/Makefile +++ b/src/Makefile @@ -352,7 +352,10 @@ $(build_shlibdir)/libGCCheckerPlugin.$(SHLIB_EXT): $(SRCDIR)/clangsa/GCChecker.c # Note that for a default install, you will need to have run the following # before attempting this static analysis, so that all necessary headers # and dependencies are properly installed: -# make -c deps install-llvm install-libuv install-utf8proc install-unwind +# make -C src install-analysis-deps +install-analysis-deps: + $(MAKE) -C $(JULIAHOME)/deps install-llvm install-clang install-llvm-tools install-libuv install-utf8proc install-unwind + analyzegc-deps-check: $(BUILDDIR)/julia_version.h $(BUILDDIR)/julia_flisp.boot.inc ifeq ($(USE_BINARYBUILDER_LLVM),0) ifneq ($(BUILD_LLVM_CLANG),1) diff --git a/stdlib/.gitignore b/stdlib/.gitignore index 90433f5d6846a6..adc73bd0854e02 100644 --- a/stdlib/.gitignore +++ b/stdlib/.gitignore @@ -13,3 +13,6 @@ /Tar /NetworkOptions-* /NetworkOptions +======= + +/*_jll/Artifacts.toml diff --git a/stdlib/CompilerSupportLibraries_jll/Project.toml b/stdlib/CompilerSupportLibraries_jll/Project.toml new file mode 100644 index 00000000000000..39ed2724a039ac --- /dev/null +++ b/stdlib/CompilerSupportLibraries_jll/Project.toml @@ -0,0 +1,10 @@ +name = "CompilerSupportLibraries_jll" +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" +version = "0.3.6+0" + +[deps] +Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[compat] +julia = "1.6" diff --git a/stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl b/stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl new file mode 100644 index 00000000000000..61d40387827d2c --- /dev/null +++ b/stdlib/CompilerSupportLibraries_jll/src/CompilerSupportLibraries_jll.jl @@ -0,0 +1,58 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +## dummy stub for https://github.com/JuliaBinaryWrappers/CompilerSupportLibraries_jll.jl + +module CompilerSupportLibraries_jll + +using Libdl, Base.BinaryPlatforms + +const PATH_list = String[] +const LIBPATH_list = String[] + +export libgfortran, libstdcxx, libgomp + +# These get calculated in __init__() +libgfortran_handle = C_NULL +libgfortran_path = "" +libstdcxx_handle = C_NULL +libstdcxx_path = "" +libgomp_handle = C_NULL +libgomp_path = "" + +if Sys.iswindows() + if arch(HostPlatform()) == "x86_64" + const libgcc_s = "libgcc_s_seh-1.dll" + else + const libgcc_s = "libgcc_s_sjlj-1.dll" + end + const libgfortran = string("libgfortran-", libgfortran_version(HostPlatform()).major, ".dll") + const libstdcxx = "libstdc++-6.dll" + const libgomp = "libgomp-1.dll" +elseif Sys.isapple() + if arch(HostPlatform()) == "aarch64" + const libgcc_s = "@rpath/libgcc_s.2.dylib" + else + const libgcc_s = "@rpath/libgcc_s.1.dylib" + end + const libgfortran = string("@rpath/", "libgfortran.", libgfortran_version(HostPlatform()).major, ".dylib") + const libstdcxx = "@rpath/libstdc++.6.dylib" + const libgomp = "@rpath/libgomp.1.dylib" +else + const libgcc_s = "libgcc_s.so.1" + const libgfortran = string("libgfortran.so.", libgfortran_version(HostPlatform()).major) + const libstdcxx = "libstdc++.so.6" + const libgomp = "libgomp.so.1" +end + +function __init__() + global libgcc_s_handle = dlopen(libgcc_s) + global libgcc_s_path = dlpath(libgcc_s_handle) + global libgfortran_handle = dlopen(libgfortran) + global libgfortran_path = dlpath(libgfortran_handle) + global libstdcxx_handle = dlopen(libstdcxx) + global libstdcxx_path = dlpath(libstdcxx_handle) + global libgomp_handle = dlopen(libgomp) + global libgomp_path = dlpath(libgomp_handle) +end + +end # module CompilerSupportLibraries_jll diff --git a/stdlib/CompilerSupportLibraries_jll/test/runtests.jl b/stdlib/CompilerSupportLibraries_jll/test/runtests.jl new file mode 100644 index 00000000000000..85cf132c3a5bd5 --- /dev/null +++ b/stdlib/CompilerSupportLibraries_jll/test/runtests.jl @@ -0,0 +1,10 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +using Test, CompilerSupportLibraries_jll + +@testset "CompilerSupportLibraries_jll" begin + @test isfile(CompilerSupportLibraries_jll.libgcc_s_path) + @test isfile(CompilerSupportLibraries_jll.libgfortran_path) + @test isfile(CompilerSupportLibraries_jll.libstdcxx_path) + @test isfile(CompilerSupportLibraries_jll.libgomp_path) +end diff --git a/stdlib/GMP_jll/Project.toml b/stdlib/GMP_jll/Project.toml new file mode 100644 index 00000000000000..b220e3570b75ff --- /dev/null +++ b/stdlib/GMP_jll/Project.toml @@ -0,0 +1,10 @@ +name = "GMP_jll" +uuid = "781609d7-10c4-51f6-84f2-b8444358ff6d" +version = "6.2.0+5" + +[deps] +Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[compat] +julia = "1.6" diff --git a/stdlib/GMP_jll/src/GMP_jll.jl b/stdlib/GMP_jll/src/GMP_jll.jl new file mode 100644 index 00000000000000..bf9694e81768de --- /dev/null +++ b/stdlib/GMP_jll/src/GMP_jll.jl @@ -0,0 +1,37 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +## dummy stub for https://github.com/JuliaBinaryWrappers/GMP_jll.jl +module GMP_jll + +using Libdl + +const PATH_list = String[] +const LIBPATH_list = String[] + +export libgmp, libgmpxx + +# These get calculated in __init__() +libgmp_handle = C_NULL +libgmp_path = "" +libgmpxx_handle = C_NULL +libgmpxx_path = "" + +if Sys.iswindows() + const libgmp = "libgmp-10.dll" + const libgmpxx = "libgmpxx-4.dll" +elseif Sys.isapple() + const libgmp = "@rpath/libgmp.10.dylib" + const libgmpxx = "@rpath/libgmpxx.4.dylib" +else + const libgmp = "libgmp.so.10" + const libgmpxx = "libgmpxx.so.4" +end + +function __init__() + global libgmp_handle = dlopen(libgmp) + global libgmp_path = dlpath(libgmp_handle) + global libgmpxx_handle = dlopen(libgmpxx) + global libgmpxx_path = dlpath(libgmpxx_handle) +end + +end # module GMP_jll diff --git a/stdlib/GMP_jll/test/runtests.jl b/stdlib/GMP_jll/test/runtests.jl new file mode 100644 index 00000000000000..87b073444eda69 --- /dev/null +++ b/stdlib/GMP_jll/test/runtests.jl @@ -0,0 +1,8 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +using Test, Libdl, GMP_jll + +@testset "GMP_jll" begin + vn = VersionNumber(unsafe_string(unsafe_load(cglobal((:__gmp_version, libgmp), Ptr{Cchar})))) + @test vn == v"6.2.0" +end diff --git a/stdlib/LibCURL_jll/Artifacts.toml b/stdlib/LibCURL_jll/Artifacts.toml deleted file mode 100644 index 5327f43f3d6581..00000000000000 --- a/stdlib/LibCURL_jll/Artifacts.toml +++ /dev/null @@ -1,113 +0,0 @@ -[[LibCURL]] -arch = "aarch64" -git-tree-sha1 = "0064bd998f4055cd199f9a716a4c3ce8857c1384" -libc = "glibc" -os = "linux" - - [[LibCURL.download]] - sha256 = "b7cfd612b7c7f1e9b6046f8532ddc6bcd249fe0cca5b90eedf344ecb08a4abd0" - url = "https://github.com/JuliaBinaryWrappers/LibCURL_jll.jl/releases/download/LibCURL-v7.71.1+0/LibCURL.v7.71.1.aarch64-linux-gnu.tar.gz" -[[LibCURL]] -arch = "aarch64" -git-tree-sha1 = "4da22cad991ca60c2c1ca59c85ad72b8d3a55337" -libc = "musl" -os = "linux" - - [[LibCURL.download]] - sha256 = "ddbfd6a41046b8dc9a89da333074e8803b69db16eccf5039ab16828ffaa827f9" - url = "https://github.com/JuliaBinaryWrappers/LibCURL_jll.jl/releases/download/LibCURL-v7.71.1+0/LibCURL.v7.71.1.aarch64-linux-musl.tar.gz" -[[LibCURL]] -arch = "armv7l" -git-tree-sha1 = "ae5a673ef50fa3716ae9230bd7a4e800f69798e0" -libc = "glibc" -os = "linux" - - [[LibCURL.download]] - sha256 = "8717af3a3e9e03c30bb5a1173a6d454f1f30fca9902083faf9e445992d52cb4b" - url = "https://github.com/JuliaBinaryWrappers/LibCURL_jll.jl/releases/download/LibCURL-v7.71.1+0/LibCURL.v7.71.1.armv7l-linux-gnueabihf.tar.gz" -[[LibCURL]] -arch = "armv7l" -git-tree-sha1 = "2959d2fe1f7e614252f2b7b3148e8b986073423a" -libc = "musl" -os = "linux" - - [[LibCURL.download]] - sha256 = "870f03ce1822cb3783d5585d4bc881eafca75f399fa245d1ca8f4144a1879591" - url = "https://github.com/JuliaBinaryWrappers/LibCURL_jll.jl/releases/download/LibCURL-v7.71.1+0/LibCURL.v7.71.1.armv7l-linux-musleabihf.tar.gz" -[[LibCURL]] -arch = "i686" -git-tree-sha1 = "46f77005e428d793b4f8b62f65b11553d37ab336" -libc = "glibc" -os = "linux" - - [[LibCURL.download]] - sha256 = "801504c8dd73aa11e1ebad032ecb86609cbafa6d006793a8c1f2d92c21b46716" - url = "https://github.com/JuliaBinaryWrappers/LibCURL_jll.jl/releases/download/LibCURL-v7.71.1+0/LibCURL.v7.71.1.i686-linux-gnu.tar.gz" -[[LibCURL]] -arch = "i686" -git-tree-sha1 = "b3f712ed1a8776ee6b211e9fba04cd5ba009bb89" -libc = "musl" -os = "linux" - - [[LibCURL.download]] - sha256 = "4737272eaf45b33a90a92d3c36ab39766cb09a80d10844936f7aa7fac161d08d" - url = "https://github.com/JuliaBinaryWrappers/LibCURL_jll.jl/releases/download/LibCURL-v7.71.1+0/LibCURL.v7.71.1.i686-linux-musl.tar.gz" -[[LibCURL]] -arch = "i686" -git-tree-sha1 = "c98a3ed03ec134f226e6c060c4ecaddb4ddffd78" -os = "windows" - - [[LibCURL.download]] - sha256 = "a4de21f91395dcfb01afaef8bd2852fb2bcbb37c173c9429ccf100f0cd2066df" - url = "https://github.com/JuliaBinaryWrappers/LibCURL_jll.jl/releases/download/LibCURL-v7.71.1+0/LibCURL.v7.71.1.i686-w64-mingw32.tar.gz" -[[LibCURL]] -arch = "powerpc64le" -git-tree-sha1 = "f35072b02827fee7aa898490a4abd128084fc30e" -libc = "glibc" -os = "linux" - - [[LibCURL.download]] - sha256 = "851773743a8f220f146c4f66b2acc92d9b2e6a00b2b7742247dcace8b816d9a4" - url = "https://github.com/JuliaBinaryWrappers/LibCURL_jll.jl/releases/download/LibCURL-v7.71.1+0/LibCURL.v7.71.1.powerpc64le-linux-gnu.tar.gz" -[[LibCURL]] -arch = "x86_64" -git-tree-sha1 = "2b59c79c5b82d73855b3b825b5711d42e85114d3" -os = "macos" - - [[LibCURL.download]] - sha256 = "2baccce2852705d89ecf3a8de0dd73a4b51d9a88fd4b8fd6bda3709d08a41fce" - url = "https://github.com/JuliaBinaryWrappers/LibCURL_jll.jl/releases/download/LibCURL-v7.71.1+0/LibCURL.v7.71.1.x86_64-apple-darwin14.tar.gz" -[[LibCURL]] -arch = "x86_64" -git-tree-sha1 = "2f1155c51d79440c61a695481f3cfb3e9b4e3f04" -libc = "glibc" -os = "linux" - - [[LibCURL.download]] - sha256 = "4604e972a28b32803f08b3886b78cb0bef847b12c7ca854946feeafebb88f453" - url = "https://github.com/JuliaBinaryWrappers/LibCURL_jll.jl/releases/download/LibCURL-v7.71.1+0/LibCURL.v7.71.1.x86_64-linux-gnu.tar.gz" -[[LibCURL]] -arch = "x86_64" -git-tree-sha1 = "f58f485420509e1b2f8cb30224305da1adb17c55" -libc = "musl" -os = "linux" - - [[LibCURL.download]] - sha256 = "37e07e08d09548d4a7b0e928b0d1ead8d0df1cb05e403b6fd65fd349c7e33c73" - url = "https://github.com/JuliaBinaryWrappers/LibCURL_jll.jl/releases/download/LibCURL-v7.71.1+0/LibCURL.v7.71.1.x86_64-linux-musl.tar.gz" -[[LibCURL]] -arch = "x86_64" -git-tree-sha1 = "fba220544378b09602d5d6b81ff0af6630b8f5b1" -os = "freebsd" - - [[LibCURL.download]] - sha256 = "610c3879279fc2ae0ee9e57092ca771cf19993835c536cfe8e64baceccbe0a98" - url = "https://github.com/JuliaBinaryWrappers/LibCURL_jll.jl/releases/download/LibCURL-v7.71.1+0/LibCURL.v7.71.1.x86_64-unknown-freebsd11.1.tar.gz" -[[LibCURL]] -arch = "x86_64" -git-tree-sha1 = "93a125a1f028ecc90665616e44072e4da65aea23" -os = "windows" - - [[LibCURL.download]] - sha256 = "615f42ee7955ada11dc2f9c7e07e83252551852e6f2d22531143c9e7826f4e21" - url = "https://github.com/JuliaBinaryWrappers/LibCURL_jll.jl/releases/download/LibCURL-v7.71.1+0/LibCURL.v7.71.1.x86_64-w64-mingw32.tar.gz" diff --git a/stdlib/LibCURL_jll/Project.toml b/stdlib/LibCURL_jll/Project.toml index 43604382837f3c..b6e267ee7c5700 100644 --- a/stdlib/LibCURL_jll/Project.toml +++ b/stdlib/LibCURL_jll/Project.toml @@ -1,12 +1,16 @@ name = "LibCURL_jll" uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "7.71.1" +version = "7.73.0+3" [deps] Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" [extras] Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] test = ["Test"] + +[compat] +julia = "1.6" diff --git a/stdlib/LibGit2_jll/Project.toml b/stdlib/LibGit2_jll/Project.toml new file mode 100644 index 00000000000000..3cd833bea938cc --- /dev/null +++ b/stdlib/LibGit2_jll/Project.toml @@ -0,0 +1,12 @@ +name = "LibGit2_jll" +uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" +version = "1.1.0+0" + +[deps] +MbedTLS_jll = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" +LibSSH2_jll = "29816b5a-b9ab-546f-933c-edad1886dfa8" +Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[compat] +julia = "1.6" diff --git a/stdlib/LibGit2_jll/src/LibGit2_jll.jl b/stdlib/LibGit2_jll/src/LibGit2_jll.jl new file mode 100644 index 00000000000000..23ba66931030f6 --- /dev/null +++ b/stdlib/LibGit2_jll/src/LibGit2_jll.jl @@ -0,0 +1,32 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +## dummy stub for https://github.com/JuliaBinaryWrappers/LibGit2_jll.jl + +module LibGit2_jll + +using Libdl +using MbedTLS_jll, LibSSH2_jll + +const PATH_list = String[] +const LIBPATH_list = String[] + +export libgit2 + +# These get calculated in __init__() +libgit2_handle = C_NULL +libgit2_path = "" + +if Sys.iswindows() + const libgit2 = "libgit2.dll" +elseif Sys.isapple() + const libgit2 = "libgit2.1.1.dylib" +else + const libgit2 = "libgit2.so.1.1" +end + +function __init__() + global libgit2_handle = dlopen(libgit2) + global libgit2_path = dlpath(libgit2_handle) +end + +end # module LibGit2_jll diff --git a/stdlib/LibGit2_jll/test/runtests.jl b/stdlib/LibGit2_jll/test/runtests.jl new file mode 100644 index 00000000000000..9baea29d44be5e --- /dev/null +++ b/stdlib/LibGit2_jll/test/runtests.jl @@ -0,0 +1,11 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +using Test, Libdl, LibGit2_jll + +@testset "LibGit2_jll" begin + major = Ref{Cint}(0) + minor = Ref{Cint}(0) + patch = Ref{Cint}(0) + @test ccall((:git_libgit2_version, libgit2), Cint, (Ref{Cint}, Ref{Cint}, Ref{Cint}), major, minor, patch) == 0 + @test VersionNumber(major[], minor[], patch[]) == v"1.1.0" +end diff --git a/stdlib/LibOSXUnwind_jll/Project.toml b/stdlib/LibOSXUnwind_jll/Project.toml new file mode 100644 index 00000000000000..653f4b7dd6890b --- /dev/null +++ b/stdlib/LibOSXUnwind_jll/Project.toml @@ -0,0 +1,10 @@ +name = "LibOSXUnwind_jll" +uuid = "a83860b7-747b-57cf-bf1f-3e79990d037f" +version = "0.0.6+1" + +[deps] +Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[compat] +julia = "1.6" diff --git a/stdlib/LibOSXUnwind_jll/src/LibOSXUnwind_jll.jl b/stdlib/LibOSXUnwind_jll/src/LibOSXUnwind_jll.jl new file mode 100644 index 00000000000000..845bc8d500e351 --- /dev/null +++ b/stdlib/LibOSXUnwind_jll/src/LibOSXUnwind_jll.jl @@ -0,0 +1,28 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +## dummy stub for https://github.com/JuliaBinaryWrappers/LibOSXUnwind_jll.jl + +module LibOSXUnwind_jll + +using Libdl + +const PATH_list = String[] +const LIBPATH_list = String[] + +export libosxunwind + +# These get calculated in __init__() +libosxunwind_handle = C_NULL +libosxunwind_path = "" + +const libosxunwind = "@rpath/libosxunwind.dylib" + +function __init__() + # We only do something on MacOS + @static if Sys.isapple() + global libosxunwind_handle = dlopen(libosxunwind) + global libosxunwind_path = dlpath(libosxunwind_handle) + end +end + +end # module LibOSXUnwind_jll diff --git a/stdlib/LibOSXUnwind_jll/test/runtests.jl b/stdlib/LibOSXUnwind_jll/test/runtests.jl new file mode 100644 index 00000000000000..b67b827b0d3cf2 --- /dev/null +++ b/stdlib/LibOSXUnwind_jll/test/runtests.jl @@ -0,0 +1,9 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +using Test, Libdl, LibOSXUnwind_jll + +@testset "LibOSXUnwind_jll" begin + @static if Sys.isapple() + @test dlsym(LibOSXUnwind_jll.libosxunwind_handle, :_Unwind_Backtrace; throw_error=false) !== nothing + end +end diff --git a/stdlib/LibSSH2_jll/Project.toml b/stdlib/LibSSH2_jll/Project.toml new file mode 100644 index 00000000000000..2944425be813e2 --- /dev/null +++ b/stdlib/LibSSH2_jll/Project.toml @@ -0,0 +1,11 @@ +name = "LibSSH2_jll" +uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" +version = "1.9.1+0" + +[deps] +MbedTLS_jll = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" +Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[compat] +julia = "1.6" diff --git a/stdlib/LibSSH2_jll/src/LibSSH2_jll.jl b/stdlib/LibSSH2_jll/src/LibSSH2_jll.jl new file mode 100644 index 00000000000000..bfc0383ad27ff0 --- /dev/null +++ b/stdlib/LibSSH2_jll/src/LibSSH2_jll.jl @@ -0,0 +1,32 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +## dummy stub for https://github.com/JuliaBinaryWrappers/LibSSH2_jll.jl + +module LibSSH2_jll + +using Libdl +using MbedTLS_jll + +const PATH_list = String[] +const LIBPATH_list = String[] + +export libssh2 + +# These get calculated in __init__() +libssh2_handle = C_NULL +libssh2_path = "" + +if Sys.iswindows() + const libssh2 = "libssh2.dll" +elseif Sys.isapple() + const libssh2 = "libssh2.1.dylib" +else + const libssh2 = "libssh2.so.1" +end + +function __init__() + global libssh2_handle = dlopen(libssh2) + global libssh2_path = dlpath(libssh2_handle) +end + +end # module LibSSH2_jll diff --git a/stdlib/LibSSH2_jll/test/runtests.jl b/stdlib/LibSSH2_jll/test/runtests.jl new file mode 100644 index 00000000000000..58cfd9ac024cc4 --- /dev/null +++ b/stdlib/LibSSH2_jll/test/runtests.jl @@ -0,0 +1,8 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +using Test, Libdl, LibSSH2_jll + +@testset "LibSSH2_jll" begin + # We use a `startswith()` here because when built from source, this returns "1.9.0_DEV" + vn = startswith(unsafe_string(ccall((:libssh2_version, libssh2), Cstring, (Cint,), 0)), "1.9.0") +end diff --git a/stdlib/LibUV_jll/Project.toml b/stdlib/LibUV_jll/Project.toml new file mode 100644 index 00000000000000..d6b0478dad03fb --- /dev/null +++ b/stdlib/LibUV_jll/Project.toml @@ -0,0 +1,10 @@ +name = "LibUV_jll" +uuid = "183b4373-6708-53ba-ad28-60e28bb38547" +version = "2.0.1+0" + +[deps] +Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[compat] +julia = "1.6" diff --git a/stdlib/LibUV_jll/src/LibUV_jll.jl b/stdlib/LibUV_jll/src/LibUV_jll.jl new file mode 100644 index 00000000000000..f8dca6d3c9f3fe --- /dev/null +++ b/stdlib/LibUV_jll/src/LibUV_jll.jl @@ -0,0 +1,31 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +## dummy stub for https://github.com/JuliaBinaryWrappers/LibUV_jll.jl + +module LibUV_jll + +using Libdl + +const PATH_list = String[] +const LIBPATH_list = String[] + +export libuv + +# These get calculated in __init__() +libuv_handle = C_NULL +libuv_path = "" + +if Sys.iswindows() + const libuv = "libuv-2.dll" +elseif Sys.isapple() + const libuv = "libuv.2.dylib" +else + const libuv = "libuv.so.2" +end + +function __init__() + global libuv_handle = dlopen(libuv) + global libuv_path = dlpath(libuv_handle) +end + +end # module LibUV_jll diff --git a/stdlib/LibUV_jll/test/runtests.jl b/stdlib/LibUV_jll/test/runtests.jl new file mode 100644 index 00000000000000..26c50b92c0c2dc --- /dev/null +++ b/stdlib/LibUV_jll/test/runtests.jl @@ -0,0 +1,8 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +using Test, Libdl, LibUV_jll + +@testset "LibUV_jll" begin + vn = VersionNumber(unsafe_string(ccall((:uv_version_string, libuv), Cstring, ()))) + @test vn == v"2.0.0-dev" +end diff --git a/stdlib/LibUnwind_jll/Project.toml b/stdlib/LibUnwind_jll/Project.toml new file mode 100644 index 00000000000000..cc4c48915f361e --- /dev/null +++ b/stdlib/LibUnwind_jll/Project.toml @@ -0,0 +1,11 @@ +name = "LibUnwind_jll" +uuid = "745a5e78-f969-53e9-954f-d19f2f74f4e3" +version = "1.3.2+0" + +[deps] +Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[compat] +JLLWrappers = "1.1.0" +julia = "1.6" diff --git a/stdlib/LibUnwind_jll/src/LibUnwind_jll.jl b/stdlib/LibUnwind_jll/src/LibUnwind_jll.jl new file mode 100644 index 00000000000000..0e6e2bb29860d9 --- /dev/null +++ b/stdlib/LibUnwind_jll/src/LibUnwind_jll.jl @@ -0,0 +1,28 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +## dummy stub for https://github.com/JuliaBinaryWrappers/LibUnwind_jll.jl + +module LibUnwind_jll + +using Libdl + +const PATH_list = String[] +const LIBPATH_list = String[] + +export libunwind + +# These get calculated in __init__() +libunwind_handle = C_NULL +libunwind_path = "" + +const libunwind = "libunwind.so.8" + +function __init__() + # We only do something on Linux/FreeBSD + @static if Sys.islinux() || Sys.isfreebsd() + global libunwind_handle = dlopen(libunwind) + global libunwind_path = dlpath(libunwind_handle) + end +end + +end # module LibUnwind_jll diff --git a/stdlib/LibUnwind_jll/test/runtests.jl b/stdlib/LibUnwind_jll/test/runtests.jl new file mode 100644 index 00000000000000..1cb33dd6729e3a --- /dev/null +++ b/stdlib/LibUnwind_jll/test/runtests.jl @@ -0,0 +1,9 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +using Test, Libdl, LibUnwind_jll + +@testset "LibUnwind_jll" begin + if !Sys.isapple() && !Sys.iswindows() + @test dlsym(LibUnwind_jll.libunwind_handle, :unw_backtrace; throw_error=false) !== nothing + end +end diff --git a/stdlib/MPFR_jll/Project.toml b/stdlib/MPFR_jll/Project.toml new file mode 100644 index 00000000000000..1f6ef4dbeaccc0 --- /dev/null +++ b/stdlib/MPFR_jll/Project.toml @@ -0,0 +1,11 @@ +name = "MPFR_jll" +uuid = "3a97d323-0669-5f0c-9066-3539efd106a3" +version = "4.1.1+0" + +[deps] +GMP_jll = "781609d7-10c4-51f6-84f2-b8444358ff6d" +Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[compat] +julia = "1.6" diff --git a/stdlib/MPFR_jll/src/MPFR_jll.jl b/stdlib/MPFR_jll/src/MPFR_jll.jl new file mode 100644 index 00000000000000..93a35fd692e52e --- /dev/null +++ b/stdlib/MPFR_jll/src/MPFR_jll.jl @@ -0,0 +1,31 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +## dummy stub for https://github.com/JuliaBinaryWrappers/MPFR_jll.jl +module MPFR_jll +using GMP_jll + +using Libdl + +const PATH_list = String[] +const LIBPATH_list = String[] + +export libmpfr + +# These get calculated in __init__() +libmpfr_handle = C_NULL +libmpfr_path = "" + +if Sys.iswindows() + const libmpfr = "libmpfr-6.dll" +elseif Sys.isapple() + const libmpfr = "@rpath/libmpfr.6.dylib" +else + const libmpfr = "libmpfr.so.6" +end + +function __init__() + global libmpfr_handle = dlopen(libmpfr) + global libmpfr_path = dlpath(libmpfr_handle) +end + +end # module MPFR_jll diff --git a/stdlib/MPFR_jll/test/runtests.jl b/stdlib/MPFR_jll/test/runtests.jl new file mode 100644 index 00000000000000..68bb6d3ec40e42 --- /dev/null +++ b/stdlib/MPFR_jll/test/runtests.jl @@ -0,0 +1,8 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +using Test, Libdl, MPFR_jll + +@testset "MPFR_jll" begin + vn = VersionNumber(unsafe_string(ccall((:mpfr_get_version,libmpfr), Cstring, ()))) + @test vn == v"4.1.0" +end diff --git a/stdlib/Makefile b/stdlib/Makefile index 810c365347881b..bc7dc12219bdc0 100644 --- a/stdlib/Makefile +++ b/stdlib/Makefile @@ -6,6 +6,7 @@ SRCCACHE := $(abspath $(SRCDIR)/srccache) BUILDDIR := . include $(JULIAHOME)/Make.inc +include $(JULIAHOME)/deps/Versions.make include $(JULIAHOME)/deps/tools/common.mk include $(JULIAHOME)/deps/tools/stdlib-external.mk @@ -14,11 +15,30 @@ VERSDIR := v$(shell cut -d. -f1-2 < $(JULIAHOME)/VERSION) $(build_datarootdir)/julia/stdlib/$(VERSDIR): mkdir -p $@ +JLLS = DSFMT GMP CURL LIBGIT2 LLVM LIBSSH2 LIBUV MBEDTLS MPFR NGHTTP2 \ + OPENBLAS OPENLIBM P7ZIP PCRE SUITESPARSE ZLIB OSXUNWIND CSL \ + UNWIND + +# Initialize this with JLLs that aren't in deps/Versions.make +JLL_NAMES := MozillaCACerts_jll + +# Define rule to download `StdlibArtifacts.toml` files for each JLL we bundle. +define download-artifacts-toml +JLL_NAMES += $$($(1)_JLL_NAME)_jll +$(1)_STDLIB_PATH := $$(JULIAHOME)/stdlib/$$($(1)_JLL_NAME)_jll +$(1)_JLL_VER ?= $$(shell [ -f $$($(1)_STDLIB_PATH)/Project.toml ] && grep "^version" $$($(1)_STDLIB_PATH)/Project.toml | sed -E 's/version[[:space:]]*=[[:space:]]*"?([^"]+)"?/\1/') + +$$($(1)_STDLIB_PATH)/StdlibArtifacts.toml: + $(JLDOWNLOAD) $$@ https://github.com/JuliaBinaryWrappers/$$($(1)_JLL_NAME)_jll.jl/raw/$$($(1)_JLL_NAME)-$$($(1)_JLL_VER)/Artifacts.toml +get-$$($(1)_JLL_NAME)_jll: $$($(1)_STDLIB_PATH)/StdlibArtifacts.toml +endef +$(foreach jll,$(JLLS),$(eval $(call download-artifacts-toml,$(jll)))) + STDLIBS = Artifacts Base64 CRC32c Dates DelimitedFiles Distributed FileWatching \ Future InteractiveUtils Libdl LibGit2 LinearAlgebra Logging \ Markdown Mmap Printf Profile Random REPL Serialization SHA \ SharedArrays Sockets SparseArrays SuiteSparse Test TOML Unicode UUIDs \ - MozillaCACerts_jll LibCURL_jll + $(JLL_NAMES) STDLIBS_EXT = Pkg Statistics LibCURL Downloads ArgTools Tar NetworkOptions PKG_GIT_URL := git://github.com/JuliaLang/Pkg.jl.git @@ -43,7 +63,7 @@ $(foreach module, $(STDLIBS), $(eval $(call symlink_target,$$(JULIAHOME)/stdlib/ STDLIBS_LINK_TARGETS := $(addprefix $(build_datarootdir)/julia/stdlib/$(VERSDIR)/,$(STDLIBS)) -getall get: $(addprefix get-, $(STDLIBS_EXT)) +getall get: $(addprefix get-, $(STDLIBS_EXT) $(JLLS)) install: $(addprefix install-, $(STDLIBS_EXT)) $(STDLIBS_LINK_TARGETS) clean: $(addprefix clean-, $(STDLIBS_EXT)) $(CLEAN_TARGETS) distclean: $(addprefix distclean-, $(STDLIBS_EXT)) clean diff --git a/stdlib/MbedTLS_jll/Project.toml b/stdlib/MbedTLS_jll/Project.toml new file mode 100644 index 00000000000000..67a81e88bdd351 --- /dev/null +++ b/stdlib/MbedTLS_jll/Project.toml @@ -0,0 +1,10 @@ +name = "MbedTLS_jll" +uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" +version = "2.24.0+1" + +[deps] +Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[compat] +julia = "1.6" diff --git a/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl b/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl new file mode 100644 index 00000000000000..00ab837a29534e --- /dev/null +++ b/stdlib/MbedTLS_jll/src/MbedTLS_jll.jl @@ -0,0 +1,45 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +## dummy stub for https://github.com/JuliaBinaryWrappers/MbedTLS_jll.jl + +module MbedTLS_jll + +using Libdl + +const PATH_list = String[] +const LIBPATH_list = String[] + +export libmbedcrypto, libmbedtls, libmbedx509 + +# These get calculated in __init__() +libmbedcrypto_handle = C_NULL +libmbedcrypto_path = "" +libmbedtls_handle = C_NULL +libmbedtls_path = "" +libmbedx509_handle = C_NULL +libmbedx509_path = "" + +if Sys.iswindows() + const libmbedcrypto = "libmbedcrypto.dll" + const libmbedtls = "libmbedtls.dll" + const libmbedx509 = "libmbedx509.dll" +elseif Sys.isapple() + const libmbedcrypto = "libmbedcrypto.5.dylib" + const libmbedtls = "libmbedtls.13.dylib" + const libmbedx509 = "libmbedx509.1.dylib" +else + const libmbedcrypto = "libmbedcrypto.so.5" + const libmbedtls = "libmbedtls.so.13" + const libmbedx509 = "libmbedx509.so.1" +end + +function __init__() + global libmbedcrypto_handle = dlopen(libmbedcrypto) + global libmbedcrypto_path = dlpath(libmbedcrypto_handle) + global libmbedtls_handle = dlopen(libmbedtls) + global libmbedtls_path = dlpath(libmbedtls_handle) + global libmbedx509_handle = dlopen(libmbedx509) + global libmbedx509_path = dlpath(libmbedx509_handle) +end + +end # module MbedTLS_jll diff --git a/stdlib/MbedTLS_jll/test/runtests.jl b/stdlib/MbedTLS_jll/test/runtests.jl new file mode 100644 index 00000000000000..18d777902b5b02 --- /dev/null +++ b/stdlib/MbedTLS_jll/test/runtests.jl @@ -0,0 +1,10 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +using Test, Libdl, MbedTLS_jll + +@testset "MbedTLS_jll" begin + vstr = zeros(UInt8, 32) + ccall((:mbedtls_version_get_string, libmbedcrypto), Cvoid, (Ref{UInt8},), vstr) + vn = VersionNumber(unsafe_string(pointer(vstr))) + @test vn == v"2.24.0" +end diff --git a/stdlib/MozillaCACerts_jll/Artifacts.toml b/stdlib/MozillaCACerts_jll/Artifacts.toml deleted file mode 100644 index ea4d600eff07e6..00000000000000 --- a/stdlib/MozillaCACerts_jll/Artifacts.toml +++ /dev/null @@ -1,6 +0,0 @@ -[MozillaCACerts] -git-tree-sha1 = "bb24cbe35cf50be29d24135e8236a069533cca3a" - - [[MozillaCACerts.download]] - sha256 = "3397e85496d9c25c8e79536a8baed72c523843afef3ddbb6074a74b030b368e8" - url = "https://github.com/JuliaBinaryWrappers/MozillaCACerts_jll.jl/releases/download/MozillaCACerts-v2020.7.22+0/MozillaCACerts.v2020.7.22.any.tar.gz" diff --git a/stdlib/OpenBLAS_jll/Project.toml b/stdlib/OpenBLAS_jll/Project.toml new file mode 100644 index 00000000000000..481eb3f6080cc3 --- /dev/null +++ b/stdlib/OpenBLAS_jll/Project.toml @@ -0,0 +1,11 @@ +name = "OpenBLAS_jll" +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" +version = "0.3.10+2" + +[deps] +CompilerSupportLibraries_jll = "e66e0078-7015-5450-92f7-15fbd957f2ae" +Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[compat] +julia = "1.6" diff --git a/stdlib/OpenBLAS_jll/src/OpenBLAS_jll.jl b/stdlib/OpenBLAS_jll/src/OpenBLAS_jll.jl new file mode 100644 index 00000000000000..503b840ae83fdb --- /dev/null +++ b/stdlib/OpenBLAS_jll/src/OpenBLAS_jll.jl @@ -0,0 +1,36 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +## dummy stub for https://github.com/JuliaBinaryWrappers/OpenBLAS_jll.jl +module OpenBLAS_jll + +using Libdl, CompilerSupportLibraries_jll, Base.BinaryPlatforms + +const PATH_list = String[] +const LIBPATH_list = String[] + +export libopenblas + +# These get calculated in __init__() +libopenblas_handle = C_NULL +libopenblas_path = "" + +if arch(HostPlatform()) in ("x86_64", "ppc64le") + const libsuffix = "64_" +else + const libsuffix = "" +end + +if Sys.iswindows() + const libopenblas = "libopenblas$(libsuffix).dll" +elseif Sys.isapple() + const libopenblas = "@rpath/libopenblas$(libsuffix).dylib" +else + const libopenblas = "libopenblas$(libsuffix).so" +end + +function __init__() + global libopenblas_handle = dlopen(libopenblas) + global libopenblas_path = dlpath(libopenblas_handle) +end + +end # module OpenBLAS_jll diff --git a/stdlib/OpenBLAS_jll/test/runtests.jl b/stdlib/OpenBLAS_jll/test/runtests.jl new file mode 100644 index 00000000000000..c97c4ef0054a57 --- /dev/null +++ b/stdlib/OpenBLAS_jll/test/runtests.jl @@ -0,0 +1,8 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +using Test, Libdl, OpenBLAS_jll + +@testset "OpenBLAS_jll" begin + @test dlsym(OpenBLAS_jll.libopenblas_handle, :openblas_set_num_threads; throw_error=false) !== nothing || + dlsym(OpenBLAS_jll.libopenblas_handle, :openblas_set_num_threads64_; throw_error=false) !== nothing +end diff --git a/stdlib/OpenLibm_jll/Project.toml b/stdlib/OpenLibm_jll/Project.toml new file mode 100644 index 00000000000000..ad982c0c9becc8 --- /dev/null +++ b/stdlib/OpenLibm_jll/Project.toml @@ -0,0 +1,10 @@ +name = "OpenLibm_jll" +uuid = "05823500-19ac-5b8b-9628-191a04bc5112" +version = "0.7.2+0" + +[deps] +Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[compat] +julia = "1.0" diff --git a/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl b/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl new file mode 100644 index 00000000000000..efa2bba338a97b --- /dev/null +++ b/stdlib/OpenLibm_jll/src/OpenLibm_jll.jl @@ -0,0 +1,30 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +## dummy stub for https://github.com/JuliaBinaryWrappers/OpenLibm_jll.jl +module OpenLibm_jll + +using Libdl + +const PATH_list = String[] +const LIBPATH_list = String[] + +export libopenlibm + +# These get calculated in __init__() +libopenlibm_handle = C_NULL +libopenlibm_path = "" + +if Sys.iswindows() + const libopenlibm = "libopenlibm.dll" +elseif Sys.isapple() + const libopenlibm = "@rpath/libopenlibm.3.dylib" +else + const libopenlibm = "libopenlibm.so.3" +end + +function __init__() + global libopenlibm_handle = dlopen(libopenlibm) + global libopenlibm_path = dlpath(libopenlibm_handle) +end + +end # module OpenLibm_jll diff --git a/stdlib/OpenLibm_jll/test/runtests.jl b/stdlib/OpenLibm_jll/test/runtests.jl new file mode 100644 index 00000000000000..83603a50a52927 --- /dev/null +++ b/stdlib/OpenLibm_jll/test/runtests.jl @@ -0,0 +1,7 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +using Test, Libdl, OpenLibm_jll + +@testset "OpenLibm_jll" begin + @test ccall((:isopenlibm, libopenlibm), Cint, ()) == 1 +end diff --git a/stdlib/PCRE2_jll/Project.toml b/stdlib/PCRE2_jll/Project.toml new file mode 100644 index 00000000000000..4b57093d649b4e --- /dev/null +++ b/stdlib/PCRE2_jll/Project.toml @@ -0,0 +1,10 @@ +name = "PCRE2_jll" +uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15" +version = "10.35.0+0" + +[deps] +Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[compat] +julia = "1.6" diff --git a/stdlib/PCRE2_jll/src/PCRE2_jll.jl b/stdlib/PCRE2_jll/src/PCRE2_jll.jl new file mode 100644 index 00000000000000..d6a52e233b7944 --- /dev/null +++ b/stdlib/PCRE2_jll/src/PCRE2_jll.jl @@ -0,0 +1,30 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +## dummy stub for https://github.com/JuliaBinaryWrappers/PCRE2_jll.jl +module PCRE2_jll + +using Libdl + +const PATH_list = String[] +const LIBPATH_list = String[] + +export libpcre2_8 + +# These get calculated in __init__() +libpcre2_8_handle = C_NULL +libpcre2_8_path = "" + +if Sys.iswindows() + const libpcre2_8 = "libpcre2-8-0.dll" +elseif Sys.isapple() + const libpcre2_8 = "@rpath/libpcre2-8.0.dylib" +else + const libpcre2_8 = "libpcre2-8.so.0" +end + +function __init__() + global libpcre2_8_handle = dlopen(libpcre2_8) + global libpcre2_8_path = dlpath(libpcre2_8_handle) +end + +end # module PCRE2_jll diff --git a/stdlib/PCRE2_jll/test/runtests.jl b/stdlib/PCRE2_jll/test/runtests.jl new file mode 100644 index 00000000000000..aa1d89f02cea5d --- /dev/null +++ b/stdlib/PCRE2_jll/test/runtests.jl @@ -0,0 +1,10 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +using Test, Libdl, PCRE2_jll + +@testset "PCRE2_jll" begin + vstr = zeros(UInt8, 32) + @test ccall((:pcre2_config_8, libpcre2_8), Cint, (UInt32, Ref{UInt8}), 11, vstr) > 0 + vn = VersionNumber(split(unsafe_string(pointer(vstr)), " ")[1]) + @test vn == v"10.35.0" +end diff --git a/stdlib/SuiteSparse_jll/Project.toml b/stdlib/SuiteSparse_jll/Project.toml new file mode 100644 index 00000000000000..1ecbd1e4686026 --- /dev/null +++ b/stdlib/SuiteSparse_jll/Project.toml @@ -0,0 +1,11 @@ +name = "SuiteSparse_jll" +uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" +version = "5.4.1+1" + +[deps] +OpenBLAS_jll = "4536629a-c528-5b80-bd46-f80d51c5b363" +Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[compat] +julia = "1.6" diff --git a/stdlib/SuiteSparse_jll/src/SuiteSparse_jll.jl b/stdlib/SuiteSparse_jll/src/SuiteSparse_jll.jl new file mode 100644 index 00000000000000..448d656ea01138 --- /dev/null +++ b/stdlib/SuiteSparse_jll/src/SuiteSparse_jll.jl @@ -0,0 +1,115 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +## dummy stub for https://github.com/JuliaBinaryWrappers/SuiteSparse_jll.jl +module SuiteSparse_jll + +using Libdl, OpenBLAS_jll + +const PATH_list = String[] +const LIBPATH_list = String[] + +export libamd, libbtf, libcamd, libccolamd, libcholmod, libcolamd, libklu, libldl, librio, libspqr, libsuitesparse_wrapper, libsuitesparseconfig, libumfpack + +# These get calculated in __init__() +# Man I can't wait until these are automatically handled by an in-Base JLLWrappers clone. +libamd_handle = C_NULL +libamd_path = "" +libbtf_handle = C_NULL +libbtf_path = "" +libcamd_handle = C_NULL +libcamd_path = "" +libccolamd_handle = C_NULL +libccolamd_path = "" +libcholmod_handle = C_NULL +libcholmod_path = "" +libcolamd_handle = C_NULL +libcolamd_path = "" +libklu_handle = C_NULL +libklu_path = "" +libldl_handle = C_NULL +libldl_path = "" +librbio_handle = C_NULL +librbio_path = "" +libspqr_handle = C_NULL +libspqr_path = "" +libsuitesparse_wrapper_handle = C_NULL +libsuitesparse_wrapper_path = "" +libsuitesparseconfig_handle = C_NULL +libsuitesparseconfig_path = "" +libumfpack_handle = C_NULL +libumfpack_path = "" + +if Sys.iswindows() + const libamd = "libamd.dll" + const libbtf = "libbtf.dll" + const libcamd = "libcamd.dll" + const libccolamd = "libccolamd.dll" + const libcholmod = "libcholmod.dll" + const libcolamd = "libcolamd.dll" + const libklu = "libklu.dll" + const libldl = "libldl.dll" + const librbio = "librbio.dll" + const libspqr = "libspqr.dll" + const libsuitesparse_wrapper = "libsuitesparse_wrapper.dll" + const libsuitesparseconfig = "libsuitesparseconfig.dll" + const libumfpack = "libumfpack.dll" +elseif Sys.isapple() + const libamd = "@rpath/libamd.2.dylib" + const libbtf = "@rpath/libbtf.1.dylib" + const libcamd = "@rpath/libcamd.2.dylib" + const libccolamd = "@rpath/libccolamd.2.dylib" + const libcholmod = "@rpath/libcholmod.3.dylib" + const libcolamd = "@rpath/libcolamd.2.dylib" + const libklu = "@rpath/libklu.1.dylib" + const libldl = "@rpath/libldl.2.dylib" + const librbio = "@rpath/librbio.2.dylib" + const libspqr = "@rpath/libspqr.2.dylib" + const libsuitesparse_wrapper = "@rpath/libsuitesparse_wrapper.dylib" + const libsuitesparseconfig = "@rpath/libsuitesparseconfig.5.dylib" + const libumfpack = "@rpath/libumfpack.5.dylib" +else + const libamd = "libamd.so.2" + const libbtf = "libbtf.so.1" + const libcamd = "libcamd.so.2" + const libccolamd = "libccolamd.so.2" + const libcholmod = "libcholmod.so.3" + const libcolamd = "libcolamd.so.2" + const libklu = "libklu.so.1" + const libldl = "libldl.so.2" + const librbio = "librbio.so.2" + const libspqr = "libspqr.so.2" + const libsuitesparse_wrapper = "libsuitesparse_wrapper.so" + const libsuitesparseconfig = "libsuitesparseconfig.so.5" + const libumfpack = "libumfpack.so.5" +end + +function __init__() + global libamd_handle = dlopen(libamd) + global libamd_path = dlpath(libamd_handle) + global libbtf_handle = dlopen(libbtf) + global libbtf_path = dlpath(libbtf_handle) + global libcamd_handle = dlopen(libcamd) + global libcamd_path = dlpath(libcamd_handle) + global libccolamd_handle = dlopen(libccolamd) + global libccolamd_path = dlpath(libccolamd_handle) + global libcholmod_handle = dlopen(libcholmod) + global libcholmod_path = dlpath(libcholmod_handle) + global libcolamd_handle = dlopen(libcolamd) + global libcolamd_path = dlpath(libcolamd_handle) + global libklu_handle = dlopen(libklu) + global libklu_path = dlpath(libklu_handle) + global libldl_handle = dlopen(libldl) + global libldl_path = dlpath(libldl_handle) + global librbio_handle = dlopen(librbio) + global librbio_path = dlpath(librbio_handle) + global libspqr_handle = dlopen(libspqr) + global libspqr_path = dlpath(libspqr_handle) + global libsuitesparse_wrapper_handle = dlopen(libsuitesparse_wrapper) + global libsuitesparse_wrapper_path = dlpath(libsuitesparse_wrapper_handle) + global libsuitesparseconfig_handle = dlopen(libsuitesparseconfig) + global libsuitesparseconfig_path = dlpath(libsuitesparseconfig_handle) + global libumfpack_handle = dlopen(libumfpack) + global libumfpack_path = dlpath(libumfpack_handle) +end + +end # module SuiteSparse_jll diff --git a/stdlib/SuiteSparse_jll/test/runtests.jl b/stdlib/SuiteSparse_jll/test/runtests.jl new file mode 100644 index 00000000000000..e4ad58c74d2851 --- /dev/null +++ b/stdlib/SuiteSparse_jll/test/runtests.jl @@ -0,0 +1,7 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +using Test, SuiteSparse_jll + +@testset "SuiteSparse_jll" begin + @test ccall((:SuiteSparse_version, libsuitesparseconfig), Cint, (Ptr{Cint},), C_NULL) == 5004 +end diff --git a/stdlib/Zlib_jll/Project.toml b/stdlib/Zlib_jll/Project.toml new file mode 100644 index 00000000000000..570c1aace7c316 --- /dev/null +++ b/stdlib/Zlib_jll/Project.toml @@ -0,0 +1,9 @@ +name = "Zlib_jll" +uuid = "83775a58-1f1d-513f-b197-d71354ab007a" +version = "1.2.12+0" + +[deps] +Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[compat] +julia = "1.6" diff --git a/stdlib/Zlib_jll/src/Zlib_jll.jl b/stdlib/Zlib_jll/src/Zlib_jll.jl new file mode 100644 index 00000000000000..c0644c4025e46f --- /dev/null +++ b/stdlib/Zlib_jll/src/Zlib_jll.jl @@ -0,0 +1,30 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +## dummy stub for https://github.com/JuliaBinaryWrappers/Zlib_jll.jl +module Zlib_jll + +using Libdl + +const PATH_list = String[] +const LIBPATH_list = String[] + +export libz + +# These get calculated in __init__() +libz_handle = C_NULL +libz_path = "" + +if Sys.iswindows() + const libz = "libz.dll" +elseif Sys.isapple() + const libz = "@rpath/libz.1.dylib" +else + const libz = "libz.so.1" +end + +function __init__() + global libz_handle = dlopen(libz) + global libz_path = dlpath(libz_handle) +end + +end # module Zlib_jll diff --git a/stdlib/Zlib_jll/test/runtests.jl b/stdlib/Zlib_jll/test/runtests.jl new file mode 100644 index 00000000000000..e6adc6b7c951f8 --- /dev/null +++ b/stdlib/Zlib_jll/test/runtests.jl @@ -0,0 +1,7 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +using Test, Zlib_jll + +@testset "Zlib_jll" begin + @test VersionNumber(unsafe_string(ccall((:zlibVersion, libz), Cstring, ()))) == v"1.2.11" +end diff --git a/stdlib/dSFMT_jll/Project.toml b/stdlib/dSFMT_jll/Project.toml new file mode 100644 index 00000000000000..506f02f8d51189 --- /dev/null +++ b/stdlib/dSFMT_jll/Project.toml @@ -0,0 +1,10 @@ +name = "dSFMT_jll" +uuid = "05ff407c-b0c1-5878-9df8-858cc2e60c36" +version = "2.2.4+0" + +[deps] +Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[compat] +julia = "1.6" diff --git a/stdlib/dSFMT_jll/src/dSFMT_jll.jl b/stdlib/dSFMT_jll/src/dSFMT_jll.jl new file mode 100644 index 00000000000000..4ad9d2d234a44c --- /dev/null +++ b/stdlib/dSFMT_jll/src/dSFMT_jll.jl @@ -0,0 +1,31 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +## dummy stub for https://github.com/JuliaBinaryWrappers/dSFMT_jll.jl + +module dSFMT_jll + +using Libdl + +const PATH_list = String[] +const LIBPATH_list = String[] + +export libdSFMT + +# These get calculated in __init__() +libdSFMT_handle = C_NULL +libdSFMT_path = "" + +if Sys.iswindows() + const libdSFMT = "libdSFMT.dll" +elseif Sys.isapple() + const libdSFMT = "@rpath/libdSFMT.dylib" +else + const libdSFMT = "libdSFMT.so" +end + +function __init__() + global libdSFMT_handle = dlopen(libdSFMT) + global libdSFMT_path = dlpath(libdSFMT_handle) +end + +end # module dSFMT_jll diff --git a/stdlib/dSFMT_jll/test/runtests.jl b/stdlib/dSFMT_jll/test/runtests.jl new file mode 100644 index 00000000000000..be311ec1a25250 --- /dev/null +++ b/stdlib/dSFMT_jll/test/runtests.jl @@ -0,0 +1,8 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +using Test, dSFMT_jll + +@testset "dSFMT_jll" begin + idstring = ccall((:dsfmt_get_idstring, libdSFMT), Ptr{UInt8}, ()) + @test startswith(unsafe_string(idstring), "dSFMT2-") +end diff --git a/stdlib/libLLVM_jll/Project.toml b/stdlib/libLLVM_jll/Project.toml new file mode 100644 index 00000000000000..67954761ec10a5 --- /dev/null +++ b/stdlib/libLLVM_jll/Project.toml @@ -0,0 +1,10 @@ +name = "libLLVM_jll" +uuid = "8f36deef-c2a5-5394-99ed-8e07531fb29a" +version = "11.0.0+1" + +[deps] +Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[compat] +julia = "1.6" diff --git a/stdlib/libLLVM_jll/src/libLLVM_jll.jl b/stdlib/libLLVM_jll/src/libLLVM_jll.jl new file mode 100644 index 00000000000000..0de6bb5991a3b5 --- /dev/null +++ b/stdlib/libLLVM_jll/src/libLLVM_jll.jl @@ -0,0 +1,31 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +## dummy stub for https://github.com/JuliaBinaryWrappers/libLLVM_jll.jl + +module libLLVM_jll + +using Libdl + +const PATH_list = String[] +const LIBPATH_list = String[] + +export libLLVM + +# These get calculated in __init__() +libLLVM_handle = C_NULL +libLLVM_path = "" + +if Sys.iswindows() + const libLLVM = "LLVM.dll" +elseif Sys.isapple() + const libLLVM = "libLLVM.dylib" +else + const libLLVM = "libLLVM-11jl.so" +end + +function __init__() + global libLLVM_handle = dlopen(libLLVM) + global libLLVM_path = dlpath(libLLVM_handle) +end + +end # module libLLVM_jll diff --git a/stdlib/libLLVM_jll/test/runtests.jl b/stdlib/libLLVM_jll/test/runtests.jl new file mode 100644 index 00000000000000..ea678108ae012a --- /dev/null +++ b/stdlib/libLLVM_jll/test/runtests.jl @@ -0,0 +1,7 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +using Test, Libdl, libLLVM_jll + +@testset "libLLVM_jll" begin + @test dlsym(libLLVM_jll.libLLVM_handle, :LLVMInitializeTarget; throw_error=false) !== nothing +end diff --git a/stdlib/nghttp2_jll/Project.toml b/stdlib/nghttp2_jll/Project.toml new file mode 100644 index 00000000000000..d259963f3b61f2 --- /dev/null +++ b/stdlib/nghttp2_jll/Project.toml @@ -0,0 +1,10 @@ +name = "nghttp2_jll" +uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" +version = "1.41.0+0" + +[deps] +Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[compat] +julia = "1.6" diff --git a/stdlib/nghttp2_jll/src/nghttp2_jll.jl b/stdlib/nghttp2_jll/src/nghttp2_jll.jl new file mode 100644 index 00000000000000..1d992305f3c42f --- /dev/null +++ b/stdlib/nghttp2_jll/src/nghttp2_jll.jl @@ -0,0 +1,30 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +## dummy stub for https://github.com/JuliaBinaryWrappers/nghttp2_jll.jl +module nghttp2_jll + +using Libdl + +const PATH_list = String[] +const LIBPATH_list = String[] + +export libnghttp2 + +# These get calculated in __init__() +libnghttp2_handle = C_NULL +libnghttp2_path = "" + +if Sys.iswindows() + const libnghttp2 = "libnghttp2-14.dll" +elseif Sys.isapple() + const libnghttp2 = "@rpath/libnghttp2.14.dylib" +else + const libnghttp2 = "libnghttp2.so.14" +end + +function __init__() + global libnghttp2_handle = dlopen(libnghttp2) + global libnghttp2_path = dlpath(libnghttp2_handle) +end + +end # module nghttp2_jll diff --git a/stdlib/nghttp2_jll/test/runtests.jl b/stdlib/nghttp2_jll/test/runtests.jl new file mode 100644 index 00000000000000..07e0a3b8c7730c --- /dev/null +++ b/stdlib/nghttp2_jll/test/runtests.jl @@ -0,0 +1,15 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +using Test, Libdl, nghttp2_jll + +struct nghttp2_info + age::Cint + version_num::Cint + version_str::Cstring + proto_str::Cstring +end + +@testset "nghttp2_jll" begin + info = unsafe_load(ccall((:nghttp2_version,libnghttp2), Ptr{nghttp2_info}, (Cint,), 0)) + @test VersionNumber(unsafe_string(info.version_str)) == v"1.41.0" +end diff --git a/stdlib/p7zip_jll/Project.toml b/stdlib/p7zip_jll/Project.toml new file mode 100644 index 00000000000000..69330b7e80539b --- /dev/null +++ b/stdlib/p7zip_jll/Project.toml @@ -0,0 +1,10 @@ +name = "p7zip_jll" +uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" +version = "16.2.1+0" + +[deps] +Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[compat] +julia = "1.6" diff --git a/stdlib/p7zip_jll/src/p7zip_jll.jl b/stdlib/p7zip_jll/src/p7zip_jll.jl new file mode 100644 index 00000000000000..e558948ddfa908 --- /dev/null +++ b/stdlib/p7zip_jll/src/p7zip_jll.jl @@ -0,0 +1,40 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +## dummy stub for https://github.com/JuliaBinaryWrappers/p7zip_jll.jl +module p7zip_jll + +const PATH_list = String[] +const LIBPATH_list = String[] + +export p7zip + +# This gets calculated in __init__() +p7zip_path = "" +if Sys.iswindows() + const p7zip_exe = "7z.exe" +else + const p7zip_exe = "7z" +end + +# These functions look a little strange, but they're mimicking the JLLWrappers signature +p7zip(f::Function; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true) = f(p7zip_path) +p7zip(; adjust_PATH::Bool = true, adjust_LIBPATH::Bool = true) = Cmd([p7zip_path]) + +function init_p7zip_path() + # Prefer our own bundled p7zip, but if we don't have one, pick it up off of the PATH + # If this is an in-tree build, `7z` will live in `bin`. Otherwise, it'll be in `libexec` + for bundled_p7zip_path in (joinpath(Sys.BINDIR, Base.LIBEXECDIR, p7zip_exe), + joinpath(Sys.BINDIR, p7zip_exe)) + if isfile(bundled_p7zip_path) + global p7zip_path = abspath(bundled_p7zip_path) + return + end + end + global p7zip_path = Sys.which(p7zip_exe) +end + +function __init__() + init_p7zip_path() +end + +end # module p7zip_jll diff --git a/stdlib/p7zip_jll/test/runtests.jl b/stdlib/p7zip_jll/test/runtests.jl new file mode 100644 index 00000000000000..4497e85b74d891 --- /dev/null +++ b/stdlib/p7zip_jll/test/runtests.jl @@ -0,0 +1,7 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +using Test, Libdl, p7zip_jll + +@testset "p7zip_jll" begin + @test isfile(p7zip_jll.p7zip_path) +end diff --git a/test/precompile.jl b/test/precompile.jl index 217bf2eae62794..7b784c61eae87c 100644 --- a/test/precompile.jl +++ b/test/precompile.jl @@ -290,13 +290,18 @@ try Dict(let m = Base.root_module(Base, s) Base.PkgId(m) => Base.module_build_id(m) end for s in - [:Artifacts, :Base64, :CRC32c, :Dates, :DelimitedFiles, :Distributed, :FileWatching, :Markdown, - :Future, :Libdl, :LinearAlgebra, :Logging, :Mmap, :Printf, - :Profile, :Random, :Serialization, :SharedArrays, :SparseArrays, :SuiteSparse, :Test, - :Unicode, :REPL, :InteractiveUtils, :Pkg, :LibGit2, :SHA, :UUIDs, :Sockets, - :Statistics, :TOML, :MozillaCACerts_jll, :LibCURL_jll, :LibCURL, :Downloads, - :ArgTools, :Tar, :NetworkOptions,]), - ) + [:ArgTools, :Artifacts, :Base64, :CRC32c, :CompilerSupportLibraries_jll, + :Dates, :DelimitedFiles, :Distributed, :Downloads, :FileWatching, :Future, + :GMP_jll, :InteractiveUtils, :LibCURL, :LibCURL_jll, :LibGit2, :LibGit2_jll, + :LibOSXUnwind_jll, :LibSSH2_jll, :LibUV_jll, :LibUnwind_jll, :Libdl, :LinearAlgebra, + :Logging, :MPFR_jll, :Markdown, :MbedTLS_jll, :Mmap, :MozillaCACerts_jll, + :NetworkOptions, :OpenBLAS_jll, :OpenLibm_jll, :PCRE2_jll, :Pkg, :Printf, + :Profile, :REPL, :Random, :SHA, :Serialization, :SharedArrays, :Sockets, + :SparseArrays, :Statistics, :SuiteSparse, :SuiteSparse_jll, :TOML, :Tar, + :Test, :UUIDs, :Unicode, :Zlib_jll, :dSFMT_jll, :libLLVM_jll, :nghttp2_jll, + :p7zip_jll] + ), + ) @test discard_module.(deps) == deps1 modules, (deps, requires), required_modules = Base.parse_cache_header(cachefile; srcfiles_only=true) @test map(x -> x.filename, deps) == [Foo_file]