From b5fb0ad89642888342f502d2599956417eddd222 Mon Sep 17 00:00:00 2001 From: Dmitry Semernin Date: Thu, 7 Jul 2022 00:52:47 +0300 Subject: [PATCH] added support of arm64 architecture for OSX --- BUNDLER_VERSION.txt | 2 +- RUBY_VERSIONS.txt | 2 +- VERSION.txt | 2 +- osx/Rakefile | 5 +- osx/build-ruby | 24 ++-- osx/internal/check_requirements | 5 +- osx/internal/cmake-3.23.2.patch | 20 +++ osx/internal/reset_environment.sh | 6 +- osx/setup-runtime | 173 ++++++++++++++------------ shared/gemfiles/20210107/Gemfile | 26 ---- shared/gemfiles/20210107/Gemfile.lock | 72 ----------- shared/gemfiles/20220706/Gemfile | 6 + 12 files changed, 146 insertions(+), 197 deletions(-) create mode 100644 osx/internal/cmake-3.23.2.patch delete mode 100644 shared/gemfiles/20210107/Gemfile delete mode 100644 shared/gemfiles/20210107/Gemfile.lock create mode 100644 shared/gemfiles/20220706/Gemfile diff --git a/BUNDLER_VERSION.txt b/BUNDLER_VERSION.txt index b9a05a6..81e9469 100644 --- a/BUNDLER_VERSION.txt +++ b/BUNDLER_VERSION.txt @@ -1 +1 @@ -1.17.3 +2.3.17 diff --git a/RUBY_VERSIONS.txt b/RUBY_VERSIONS.txt index b0f6bf0..ef538c2 100644 --- a/RUBY_VERSIONS.txt +++ b/RUBY_VERSIONS.txt @@ -1 +1 @@ -2.4.10 +3.1.2 diff --git a/VERSION.txt b/VERSION.txt index e728480..ebfebbb 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -20210206 +20220706 diff --git a/osx/Rakefile b/osx/Rakefile index 10b3c8a..757778f 100644 --- a/osx/Rakefile +++ b/osx/Rakefile @@ -64,8 +64,9 @@ end RUBY_VERSIONS.each do |ruby_version| - package = "traveling-ruby-#{VERSION}-#{ruby_version}-osx.tar.gz" - gem_dir = "traveling-ruby-gems-#{VERSION}-#{ruby_version}-osx" + arch = `uname -m`.chomp.strip + package = "traveling-ruby-#{VERSION}-#{ruby_version}-osx-#{arch}.tar.gz" + gem_dir = "traveling-ruby-gems-#{VERSION}-#{ruby_version}-osx-#{arch}" task :package => "package:#{ruby_version}" task :build => "build:#{ruby_version}" diff --git a/osx/build-ruby b/osx/build-ruby index d10d508..d0e2098 100755 --- a/osx/build-ruby +++ b/osx/build-ruby @@ -230,6 +230,11 @@ fi header "Preparing Ruby source code..." +# To many warnings, suppress them all (disable in case of troubleshooting) +export CPPFLAGS="-w" +export CXXFLAGS="-w" +export CFLAGS="-w" + export PATH="$RUNTIME_DIR/bin:$PATH" export LIBRARY_PATH="$RUNTIME_DIR/lib" export PKG_CONFIG_PATH="$RUNTIME_DIR/lib/pkgconfig:/usr/lib/pkgconfig" @@ -255,12 +260,13 @@ echo if $SETUP_SOURCE; then header "Configuring..." + # NOTE: the option --disable-install-doc is a conjunction of --disable-install-rdoc and --disable-install-capi + # NOTE: the options --disable-install-doc and --disable-install-rdoc have been removed + # to support the presence of document coders ./configure \ --prefix "$TMPBUILDROOT" \ - --disable-install-doc \ - --disable-install-rdoc \ - --disable-install-capi \ --with-out-ext=tk,sdbm,gdbm,dbm,dl,coverage \ + --disable-install-capi \ --with-openssl-dir="$RUNTIME_DIR" echo fi @@ -325,9 +331,9 @@ if [[ "$GEMFILE" != "" ]]; then # Install Bundler, either from cache or directly. if [[ -e "$RUNTIME_DIR/vendor/cache/bundler-$BUNDLER_VERSION.gem" ]]; then - run "$TMPBUILDROOT/bin/gem" install "$RUNTIME_DIR/vendor/cache/bundler-$BUNDLER_VERSION.gem" --no-rdoc --no-ri + run "$TMPBUILDROOT/bin/gem" install "$RUNTIME_DIR/vendor/cache/bundler-$BUNDLER_VERSION.gem" --no-document else - run "$TMPBUILDROOT/bin/gem" install bundler -v $BUNDLER_VERSION --no-rdoc --no-ri + run "$TMPBUILDROOT/bin/gem" install bundler -v $BUNDLER_VERSION --no-document run mkdir -p "$RUNTIME_DIR/vendor/cache" run cp "$TMPBUILDROOT"/lib/ruby/gems/$RUBY_COMPAT_VERSION/cache/bundler-$BUNDLER_VERSION.gem \ "$RUNTIME_DIR/vendor/cache/" @@ -344,10 +350,8 @@ if [[ "$GEMFILE" != "" ]]; then run cp "$GEMFILE.lock" ./ fi run bundle config --local force_ruby_platform true - # We set -j to 1 because of this bug: - # https://github.com/bundler/bundler/issues/3660 - # When it is solved, we can set -j to $CONCURRENCY. - run "$TMPBUILDROOT/bin/bundle" install --system --retry 3 --jobs 1 + run "$TMPBUILDROOT/bin/bundle" config set --local system true + run "$TMPBUILDROOT/bin/bundle" install --retry 3 --jobs $CONCURRENCY run "$TMPBUILDROOT/bin/bundle" package # Cache gems. @@ -372,7 +376,7 @@ run rm -f bin/testrb # Only Ruby 2.1 has it run rm -rf include run rm -rf share run rm -rf lib/{libruby-static.a,pkgconfig} -run rm -rf lib/ruby/$RUBY_COMPAT_VERSION/rdoc/generator/ +#run rm -rf lib/ruby/$RUBY_COMPAT_VERSION/rdoc/generator/ # don't remove the documentation generators run rm -f lib/ruby/gems/$RUBY_COMPAT_VERSION/cache/* run rm -f lib/ruby/gems/$RUBY_COMPAT_VERSION/extensions/$GEM_PLATFORM/$GEM_EXTENSION_API_VERSION/*/{gem_make.out,mkmf.log} run rm -rf lib/ruby/gems/$RUBY_COMPAT_VERSION/gems/*/{test,spec,*.md,*.rdoc} diff --git a/osx/internal/check_requirements b/osx/internal/check_requirements index 3fd7746..4c5909f 100755 --- a/osx/internal/check_requirements +++ b/osx/internal/check_requirements @@ -3,8 +3,9 @@ set -e XCODEPATH=$(xcode-select -p) -if [[ ! -e "$XCODEPATH/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk" ]]; then - echo "*** ERROR: the macOS 10.14 SDK is required. Please refer to" \ +# FIXME: determine the minimal version of SDK to use on ARM64 +if [[ ! -e "$XCODEPATH/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk" ]]; then + echo "*** ERROR: the macOS 12.1 SDK is required. Please refer to" \ "https://github.com/FooBarWidget/traveling-ruby/blob/main/osx/README.md" \ "for installation instructions." >&2 exit 1 diff --git a/osx/internal/cmake-3.23.2.patch b/osx/internal/cmake-3.23.2.patch new file mode 100644 index 0000000..5e743f1 --- /dev/null +++ b/osx/internal/cmake-3.23.2.patch @@ -0,0 +1,20 @@ +--- CMakeLists.txt.orig 2022-07-05 17:51:38.000000000 +0200 ++++ CMakeLists.txt 2022-07-05 17:51:57.000000000 +0200 +@@ -101,17 +101,6 @@ + endif() + endif() + endif() +-if(NOT CMake_TEST_EXTERNAL_CMAKE) +- # include special compile flags for some compilers +- include(CompileFlags.cmake) +- +- # check for available C++ features +- include(${CMake_SOURCE_DIR}/Source/Checks/cm_cxx_features.cmake) +- +- if(NOT CMake_HAVE_CXX_UNIQUE_PTR) +- message(FATAL_ERROR "The C++ compiler does not support C++11 (e.g. std::unique_ptr).") +- endif() +-endif() + + # Inform STL library header wrappers whether to use system versions. + configure_file(${CMake_SOURCE_DIR}/Utilities/std/cmSTL.hxx.in diff --git a/osx/internal/reset_environment.sh b/osx/internal/reset_environment.sh index e2fdde8..9a0d7cd 100644 --- a/osx/internal/reset_environment.sh +++ b/osx/internal/reset_environment.sh @@ -1,6 +1,8 @@ export PATH="$SELFDIR/internal/bin":/usr/bin:/bin:/usr/sbin:/sbin -export MACOSX_DEPLOYMENT_TARGET=10.14 -export MACOSX_COMPATIBLE_DEPLOYMENT_TARGETS="10.14 10.15 11.0 11.1 11.2 11.3 11.4 11.5" +# FIXME: minimal supported deployment target on ARM64 +export MACOSX_DEPLOYMENT_TARGET=12.1 +# FIXME: a full list of deployment targets on ARM64 +export MACOSX_COMPATIBLE_DEPLOYMENT_TARGETS="10.14 10.15 11.0 11.1 11.2 11.3 11.4 11.5 11.6 12.0 12.1" export CC="$SELFDIR/internal/bin/cc" export CXX="$SELFDIR/internal/bin/c++" unset DYLD_LIBRARY_PATH diff --git a/osx/setup-runtime b/osx/setup-runtime index 1a27221..447f373 100755 --- a/osx/setup-runtime +++ b/osx/setup-runtime @@ -9,7 +9,7 @@ source "$SELFDIR/../shared/library.sh" TEMPDIR= RUNTIME_DIR= -CONCURRENCY=4 +CONCURRENCY=`sysctl -n hw.ncpu` FORCE_CCACHE=false SKIP_CCACHE=false FORCE_CMAKE=false @@ -35,13 +35,13 @@ SKIP_LIBFFI=false FORCE_LIBYAML=false SKIP_LIBYAML=false FORCE_SQLITE3=false -SKIP_SQLITE3=false +SKIP_SQLITE3=true FORCE_LIBLZMA=false SKIP_LIBLZMA=false FORCE_MYSQL=false -SKIP_MYSQL=false +SKIP_MYSQL=true FORCE_POSTGRESQL=false -SKIP_POSTGRESQL=false +SKIP_POSTGRESQL=true FORCE_ICU=false SKIP_ICU=false FORCE_LIBSSH2=false @@ -245,28 +245,28 @@ RUNTIME_DIR="`cd \"$RUNTIME_DIR\" && pwd`" TOTAL_TOOLS=6 TOTAL_LIBS=14 -CCACHE_VERSION=3.7.12 -CMAKE_VERSION=3.9.6 -PKG_CONFIG_VERSION=0.28 -AUTOCONF_VERSION=2.69 -AUTOMAKE_VERSION=1.15 -LIBTOOL_VERSION=2.4.6 -OPENSSL_VERSION=1.1.1i -NCURSES_VERSION=5.9 -LIBEDIT_VERSION=20141030-3.1 -LIBEDIT_DIR_VERSION=20141029-3.1 +CCACHE_VERSION=4.6.1 +CMAKE_VERSION=3.23.2 +PKG_CONFIG_VERSION=0.29.2 +AUTOCONF_VERSION=2.71 +AUTOMAKE_VERSION=1.16.5 +LIBTOOL_VERSION=2.4.7 +OPENSSL_VERSION=1.1.1p +NCURSES_VERSION=6.1 # the newer 6.2 and 6.3 are not build on ARM64 +LIBEDIT_VERSION=20210910-3.1 +LIBEDIT_DIR_VERSION=20210910-3.1 GMP_VERSION=6.2.1 GMP_DIR_VERSION=6.2.1 -LIBFFI_VERSION=3.2.1 -LIBYAML_VERSION=0.1.5 +LIBFFI_VERSION=3.4.2 +LIBYAML_VERSION=0.2.5 SQLITE3_VERSION=3340000 -XZ_VERSION=5.0.8 +XZ_VERSION=5.2.5 MYSQL_LIB_VERSION=6.1.5 POSTGRESQL_VERSION=13.1 -ICU_RELEASE_VERSION=68-2 -ICU_FILE_VERSION=68_2 -LIBSSH2_VERSION=1.9.0 -LIBXML2_VERSION=2.9.10 +ICU_RELEASE_VERSION=71-1 +ICU_FILE_VERSION=71_1 +LIBSSH2_VERSION=1.10.0 +LIBXML2_VERSION=2.9.12 LIBXSLT_VERSION=1.1.34 export PATH="$RUNTIME_DIR/bin:$PATH" export LIBRARY_PATH="$RUNTIME_DIR/lib" @@ -274,7 +274,6 @@ export PKG_CONFIG_PATH="$RUNTIME_DIR/lib/pkgconfig:/usr/lib/pkgconfig" export RUNTIME_DIR export DEAD_STRIP=true - header "Initializing..." run mkdir -p "$RUNTIME_DIR" run mkdir -p "$RUNTIME_DIR/ccache" @@ -285,43 +284,54 @@ echo "Entering $RUNTIME_DIR" cd "$RUNTIME_DIR" echo -header "Installing tool 1/$TOTAL_TOOLS: ccache..." -if $SKIP_CCACHE; then +# To many warnings, suppress them all (disable in case of troubleshooting) +export CPPFLAGS="-w" +export CXXFLAGS="-w" +export CFLAGS="-w" + +header "Installing tool 1/$TOTAL_TOOLS: CMake..." +if $SKIP_CMAKE; then echo "Skipped." -elif [[ ! -e "$RUNTIME_DIR/bin/ccache" ]] || $FORCE_CCACHE; then - download_and_extract ccache-$CCACHE_VERSION.tar.gz \ - https://github.com/ccache/ccache/releases/download/v$CCACHE_VERSION/ccache-$CCACHE_VERSION.tar.gz - echo "Entering $RUNTIME_DIR/ccache-$CCACHE_VERSION" - pushd ccache-$CCACHE_VERSION >/dev/null +elif [[ ! -e "$RUNTIME_DIR/bin/cmake" ]] || $FORCE_CMAKE; then + download_and_extract cmake-$CMAKE_VERSION.tar.gz \ + https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION.tar.gz + echo "Entering $RUNTIME_DIR/cmake-$CMAKE_VERSION" + pushd cmake-$CMAKE_VERSION >/dev/null - run ./configure --prefix="$RUNTIME_DIR" + # FIXME: Only on ARM64? + echo "Removing some false positive checks in CMakeLists" + patch -u CMakeLists.txt -i $SELFDIR/internal/cmake-3.23.2.patch + + run ./configure --prefix="$RUNTIME_DIR" --no-qt-gui --parallel=$CONCURRENCY run make -j$CONCURRENCY run make install echo "Leaving source directory" popd >/dev/null - run rm -rf ccache-$CCACHE_VERSION + run rm -rf cmake-$CMAKE_VERSION else echo "Already installed." fi echo -header "Installing tool 2/$TOTAL_TOOLS: CMake..." -if $SKIP_CMAKE; then +header "Installing tool 2/$TOTAL_TOOLS: ccache..." +if $SKIP_CCACHE; then echo "Skipped." -elif [[ ! -e "$RUNTIME_DIR/bin/cmake" ]] || $FORCE_CMAKE; then - download_and_extract cmake-$CMAKE_VERSION.tar.gz \ - https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION.tar.gz - echo "Entering $RUNTIME_DIR/cmake-$CMAKE_VERSION" - pushd cmake-$CMAKE_VERSION >/dev/null +elif [[ ! -e "$RUNTIME_DIR/bin/ccache" ]] || $FORCE_CCACHE; then + download_and_extract ccache-$CCACHE_VERSION.tar.gz \ + https://github.com/ccache/ccache/releases/download/v$CCACHE_VERSION/ccache-$CCACHE_VERSION.tar.gz + echo "Entering $RUNTIME_DIR/ccache-$CCACHE_VERSION" + pushd ccache-$CCACHE_VERSION >/dev/null - run ./configure --prefix="$RUNTIME_DIR" --no-qt-gui --parallel=$CONCURRENCY + mkdir build + cd build + run cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON -DCMAKE_INSTALL_PREFIX="$RUNTIME_DIR" .. run make -j$CONCURRENCY run make install echo "Leaving source directory" popd >/dev/null - run rm -rf cmake-$CMAKE_VERSION + run rm -rf ccache-$CCACHE_VERSION else echo "Already installed." fi @@ -332,7 +342,7 @@ if $SKIP_PKG_CONFIG; then echo "Skipped." elif [[ ! -e "$RUNTIME_DIR/bin/pkg-config" ]] || $FORCE_PKG_CONFIG; then download_and_extract pkg-config-$PKG_CONFIG_VERSION.tar.gz \ - http://pkgconfig.freedesktop.org/releases/pkg-config-$PKG_CONFIG_VERSION.tar.gz + https://pkgconfig.freedesktop.org/releases/pkg-config-$PKG_CONFIG_VERSION.tar.gz echo "Entering $RUNTIME_DIR/pkg-config-$PKG_CONFIG_VERSION" pushd pkg-config-$PKG_CONFIG_VERSION >/dev/null @@ -352,7 +362,7 @@ if $SKIP_AUTOCONF; then echo "Skipped." elif [[ ! -e "$RUNTIME_DIR/bin/autoconf" ]] || $FORCE_AUTOCONF; then download_and_extract autoconf-$AUTOCONF_VERSION.tar.gz \ - http://ftp.gnu.org/gnu/autoconf/autoconf-$AUTOCONF_VERSION.tar.gz + https://ftp.gnu.org/gnu/autoconf/autoconf-$AUTOCONF_VERSION.tar.gz echo "Entering $RUNTIME_DIR/autoconf-$AUTOCONF_VERSION" pushd autoconf-$AUTOCONF_VERSION >/dev/null @@ -372,7 +382,7 @@ if $SKIP_AUTOMAKE; then echo "Skipped." elif [[ ! -e "$RUNTIME_DIR/bin/automake" ]] || $FORCE_AUTOMAKE; then download_and_extract automake-$AUTOMAKE_VERSION.tar.gz \ - http://ftp.gnu.org/gnu/automake/automake-$AUTOMAKE_VERSION.tar.gz + https://ftp.gnu.org/gnu/automake/automake-$AUTOMAKE_VERSION.tar.gz echo "Entering $RUNTIME_DIR/automake-$AUTOMAKE_VERSION" pushd automake-$AUTOMAKE_VERSION >/dev/null @@ -392,7 +402,7 @@ if $SKIP_LIBTOOL; then echo "Skipped." elif [[ ! -e "$RUNTIME_DIR/bin/libtoolize" ]] || $FORCE_LIBTOOL; then download_and_extract libtool-$LIBTOOL_VERSION.tar.gz \ - http://ftp.gnu.org/gnu/libtool/libtool-$LIBTOOL_VERSION.tar.gz + https://ftp.gnu.org/gnu/libtool/libtool-$LIBTOOL_VERSION.tar.gz echo "Entering $RUNTIME_DIR/libtool-$LIBTOOL_VERSION" pushd libtool-$LIBTOOL_VERSION >/dev/null @@ -420,8 +430,9 @@ elif [[ ! -e "$RUNTIME_DIR/lib/openssl-ok" ]] || $FORCE_OPENSSL; then echo "Entering $RUNTIME_DIR/openssl-$OPENSSL_VERSION" pushd openssl-$OPENSSL_VERSION >/dev/null - run ./Configure darwin64-x86_64-cc --prefix="$RUNTIME_DIR" --openssldir="$RUNTIME_DIR/openssl" \ - threads zlib shared no-sse2 + run ./Configure darwin64-arm64-cc --prefix="$RUNTIME_DIR" --openssldir="$RUNTIME_DIR/openssl" threads zlib shared + + # FIXME: maybe -j more than 1 will work in 2022? # For some reason the -j1 is explicitly required. Otherwise, running `make -j2` # on the Makefile which invoked setup-runtime could somehow pass the -j2 to sub-makes. run make -j1 @@ -457,9 +468,9 @@ echo header "Compiling runtime libraries 2/$TOTAL_LIBS: ncurses..." if $SKIP_NCURSES; then echo "Skipped." -elif [[ ! -e "$RUNTIME_DIR/lib/libncurses.5.dylib" ]] || $FORCE_NCURSES; then +elif [[ ! -e "$RUNTIME_DIR/lib/libncurses.6.dylib" ]] || $FORCE_NCURSES; then run rm -f ncurses-$NCURSES_VERSION.tar.bz2 - run curl --fail -L -O http://ftp.gnu.org/pub/gnu/ncurses/ncurses-$NCURSES_VERSION.tar.gz + run curl --fail -L -O https://ftp.gnu.org/pub/gnu/ncurses/ncurses-$NCURSES_VERSION.tar.gz run tar xzf ncurses-$NCURSES_VERSION.tar.gz run rm ncurses-$NCURSES_VERSION.tar.gz echo "Entering $RUNTIME_DIR/ncurses-$NCURSES_VERSION" @@ -477,20 +488,20 @@ elif [[ ! -e "$RUNTIME_DIR/lib/libncurses.5.dylib" ]] || $FORCE_NCURSES; then run rm -f "$RUNTIME_DIR/lib"/{libpanel,libmenu}* run rm -f "$RUNTIME_DIR/lib"/{libncurses,libform}*.a - run strip -S "$RUNTIME_DIR/lib/libncurses.5.dylib" - run strip -S "$RUNTIME_DIR/lib/libform.5.dylib" + run strip -S "$RUNTIME_DIR/lib/libncurses.6.dylib" + run strip -S "$RUNTIME_DIR/lib/libform.6.dylib" run install_name_tool -id \ - "@rpath/libncurses.5.dylib" \ - "$RUNTIME_DIR/lib/libncurses.5.dylib" + "@rpath/libncurses.6.dylib" \ + "$RUNTIME_DIR/lib/libncurses.6.dylib" run install_name_tool -id \ - "@rpath/libform.5.dylib" \ - "$RUNTIME_DIR/lib/libform.5.dylib" + "@rpath/libform.6.dylib" \ + "$RUNTIME_DIR/lib/libform.6.dylib" run install_name_tool -change \ - "$RUNTIME_DIR/lib/libncurses.5.dylib" \ - "@rpath/libncurses.5.dylib" \ - "$RUNTIME_DIR/lib/libform.5.dylib" + "$RUNTIME_DIR/lib/libncurses.6.dylib" \ + "@rpath/libncurses.6.dylib" \ + "$RUNTIME_DIR/lib/libform.6.dylib" pushd "$RUNTIME_DIR/lib" >/dev/null - run ln -sf libncurses.5.dylib libtermcap.dylib + run ln -sf libncurses.6.dylib libtermcap.dylib popd >/dev/null else echo "Already installed." @@ -502,7 +513,7 @@ if $SKIP_LIBEDIT; then echo "Skipped." elif [[ ! -e "$RUNTIME_DIR/lib/libedit.0.dylib" ]] || $FORCE_LIBEDIT; then run rm -f libedit-$LIBEDIT_VERSION.tar.gz - run curl --fail -L -O http://thrysoee.dk/editline/libedit-$LIBEDIT_VERSION.tar.gz + run curl --fail -L -O https://thrysoee.dk/editline/libedit-$LIBEDIT_VERSION.tar.gz run tar xzf libedit-$LIBEDIT_VERSION.tar.gz run rm libedit-$LIBEDIT_VERSION.tar.gz echo "Entering $RUNTIME_DIR/libedit-$LIBEDIT_VERSION" @@ -555,9 +566,9 @@ echo header "Compiling runtime libraries 5/$TOTAL_LIBS: libffi..." if $SKIP_LIBFFI; then echo "Skipped." -elif [[ ! -e "$RUNTIME_DIR/lib/libffi.6.dylib" ]] || $FORCE_LIBFFI; then +elif [[ ! -e "$RUNTIME_DIR/lib/libffi.8.dylib" ]] || $FORCE_LIBFFI; then run rm -f libffi-$LIBFFI_VERSION.tar.bz2 - run curl --fail -L -O ftp://sourceware.org/pub/libffi/libffi-$LIBFFI_VERSION.tar.gz + run curl --fail -L -O https://github.com/libffi/libffi/releases/download/v$LIBFFI_VERSION/libffi-$LIBFFI_VERSION.tar.gz run tar xzf libffi-$LIBFFI_VERSION.tar.gz run rm libffi-$LIBFFI_VERSION.tar.gz echo "Entering $RUNTIME_DIR/libffi-$LIBFFI_VERSION" @@ -572,8 +583,8 @@ elif [[ ! -e "$RUNTIME_DIR/lib/libffi.6.dylib" ]] || $FORCE_LIBFFI; then popd >/dev/null run rm -rf libffi-$LIBFFI_VERSION - run install_name_tool -id "@rpath/libffi.6.dylib" \ - "$RUNTIME_DIR/lib/libffi.6.dylib" + run install_name_tool -id "@rpath/libffi.8.dylib" \ + "$RUNTIME_DIR/lib/libffi.8.dylib" else echo "Already installed." fi @@ -584,7 +595,7 @@ if $SKIP_LIBYAML; then echo "Skipped." elif [[ ! -e "$RUNTIME_DIR/lib/libyaml-0.2.dylib" ]] || $FORCE_LIBYAML; then download_and_extract yaml-$LIBYAML_VERSION.tar.gz \ - http://pyyaml.org/download/libyaml/yaml-$LIBYAML_VERSION.tar.gz + https://pyyaml.org/download/libyaml/yaml-$LIBYAML_VERSION.tar.gz echo "Entering $RUNTIME_DIR/libyaml-$LIBYAML_VERSION" pushd yaml-$LIBYAML_VERSION >/dev/null @@ -608,7 +619,7 @@ if $SKIP_SQLITE3; then echo "Skipped." elif [[ ! -e "$RUNTIME_DIR/lib/libsqlite3.a" ]] || $FORCE_SQLITE3; then download_and_extract sqlite-autoconf-$SQLITE3_VERSION.tar.gz \ - http://www.sqlite.org/2020/sqlite-autoconf-$SQLITE3_VERSION.tar.gz + https://www.sqlite.org/2020/sqlite-autoconf-$SQLITE3_VERSION.tar.gz echo "Entering $RUNTIME_DIR/sqlite-autoconf-$SQLITE3_VERSION" pushd sqlite-autoconf-$SQLITE3_VERSION >/dev/null @@ -629,7 +640,7 @@ if $SKIP_LIBLZMA; then echo "Skipped." elif [[ ! -e "$RUNTIME_DIR/lib/liblzma.5.dylib" ]] || $FORCE_LIBLZMA; then download_and_extract xz-$XZ_VERSION.tar.bz2 \ - http://tukaani.org/xz/xz-$XZ_VERSION.tar.bz2 + https://tukaani.org/xz/xz-$XZ_VERSION.tar.bz2 echo "Entering $RUNTIME_DIR/xz-$XZ_VERSION" pushd xz-$XZ_VERSION >/dev/null @@ -655,7 +666,7 @@ if $SKIP_MYSQL; then echo "Skipped." elif [[ ! -e "$RUNTIME_DIR/lib/libmysqlclient.a" ]] || $FORCE_MYSQL; then download_and_extract mysql-connector-c-$MYSQL_LIB_VERSION-src.tar.gz \ - http://dev.mysql.com/get/Downloads/Connector-C/mysql-connector-c-$MYSQL_LIB_VERSION-src.tar.gz + https://dev.mysql.com/get/Downloads/Connector-C/mysql-connector-c-$MYSQL_LIB_VERSION-src.tar.gz echo "Entering $RUNTIME_DIR/mysql-connector-c-$MYSQL_LIB_VERSION-src" pushd mysql-connector-c-$MYSQL_LIB_VERSION-src >/dev/null @@ -687,7 +698,7 @@ if $SKIP_POSTGRESQL; then echo "Skipped." elif [[ ! -e "$RUNTIME_DIR/lib/libpq.a" ]] || $FORCE_POSTGRESQL; then download_and_extract postgresql-$POSTGRESQL_VERSION.tar.bz2 \ - http://ftp.postgresql.org/pub/source/v13.1/postgresql-$POSTGRESQL_VERSION.tar.bz2 + https://ftp.postgresql.org/pub/source/v13.1/postgresql-$POSTGRESQL_VERSION.tar.bz2 echo "Entering $RUNTIME_DIR/postgresql-$POSTGRESQL_VERSION" pushd postgresql-$POSTGRESQL_VERSION >/dev/null @@ -734,8 +745,8 @@ elif [[ ! -e "$RUNTIME_DIR/lib/libicudata.a" ]] || $FORCE_ICU; then run ./configure --prefix="$RUNTIME_DIR" --disable-samples --disable-tests \ --enable-static --disable-shared --with-library-bits=64 \ - CFLAGS="-O2 -fPIC -fvisibility=hidden -DU_CHARSET_IS_UTF8=1 -DU_USING_ICU_NAMESPACE=0" \ - CXXFLAGS="-O2 -fPIC -fvisibility=hidden -DU_CHARSET_IS_UTF8=1 -DU_USING_ICU_NAMESPACE=0" + CFLAGS="-w -O2 -fPIC -fvisibility=hidden -DU_CHARSET_IS_UTF8=1 -DU_USING_ICU_NAMESPACE=0" \ + CXXFLAGS="-w -O2 -fPIC -fvisibility=hidden -DU_CHARSET_IS_UTF8=1 -DU_USING_ICU_NAMESPACE=0" run make -j$CONCURRENCY VERBOSE=1 run make install -j$CONCURRENCY @@ -752,14 +763,14 @@ if $SKIP_LIBSSH2; then echo "Skipped." elif [[ ! -e "$RUNTIME_DIR/lib/libssh2.a" ]] || $FORCE_LIBSSH2; then download_and_extract libssh2-$LIBSSH2_VERSION.tar.gz \ - http://www.libssh2.org/download/libssh2-$LIBSSH2_VERSION.tar.gz + https://www.libssh2.org/download/libssh2-$LIBSSH2_VERSION.tar.gz echo "Entering $RUNTIME_DIR/libssh2-$LIBSSH2_VERSION" pushd libssh2-$LIBSSH2_VERSION >/dev/null run ./configure --prefix="$RUNTIME_DIR" --enable-static --disable-shared \ - --with-openssl --with-libz --disable-examples-build --disable-debug \ - CFLAGS="-O2 -fPIC -fvisibility=hidden" \ - CXXFLAGS="-O2 -fPIC -fvisibility=hidden" + --with-crypto-openssl --with-libz --disable-examples-build --disable-debug \ + CFLAGS="-w -O2 -fPIC -fvisibility=hidden" \ + CXXFLAGS="-w -O2 -fPIC -fvisibility=hidden" run make -j$CONCURRENCY run make install-strip -j$CONCURRENCY @@ -775,16 +786,17 @@ header "Compiling runtime libraries 13/$TOTAL_LIBS: libxml2..." if $SKIP_LIBXML2; then echo "Skipped." elif [[ ! -e "$RUNTIME_DIR/lib/libxml2.a" ]] || $FORCE_LIBXML2; then + # FIXME: getting a "Certificate can't be trusted" error while using HTTPS protocol download_and_extract libxml2-$LIBXML2_VERSION.tar.gz \ - ftp://xmlsoft.org/libxml2/libxml2-$LIBXML2_VERSION.tar.gz + http://xmlsoft.org/download/libxml2-$LIBXML2_VERSION.tar.gz echo "Entering $RUNTIME_DIR/libxml2-$LIBXML2_VERSION" pushd libxml2-$LIBXML2_VERSION >/dev/null run ./configure --prefix="$RUNTIME_DIR" --disable-shared --enable-static \ --without-python --without-readline --without-debug \ --with-c14n --with-threads \ - CFLAGS="-O2 -fPIC -fvisibility=hidden" \ - CXXFLAGS="-O2 -fPIC -fvisibility=hidden" + CFLAGS="-w -O2 -fPIC -fvisibility=hidden" \ + CXXFLAGS="-w -O2 -fPIC -fvisibility=hidden" run make -j$CONCURRENCY run make install-strip -j$CONCURRENCY @@ -800,16 +812,17 @@ header "Compiling runtime libraries 14/$TOTAL_LIBS: libxslt..." if $SKIP_LIBXSLT; then echo "Skipped." elif [[ ! -e "$RUNTIME_DIR/lib/libxslt.a" ]] || $FORCE_LIBXSLT; then + # FIXME: getting a "Certificate can't be trusted" error while using HTTPS protocol download_and_extract libxslt-$LIBXSLT_VERSION.tar.gz \ - ftp://xmlsoft.org/libxml2/libxslt-$LIBXSLT_VERSION.tar.gz + http://xmlsoft.org/download/libxslt-$LIBXSLT_VERSION.tar.gz echo "Entering $RUNTIME_DIR/libxslt-$LIBXSLT_VERSION" pushd libxslt-$LIBXSLT_VERSION >/dev/null run ./configure --prefix="$RUNTIME_DIR" --disable-shared --enable-static \ --without-python --without-debug --without-debugger \ --without-profiler \ - CFLAGS="-O2 -fPIC -fvisibility=hidden" \ - CXXFLAGS="-O2 -fPIC -fvisibility=hidden" + CFLAGS="-w -O2 -fPIC -fvisibility=hidden" \ + CXXFLAGS="-w -O2 -fPIC -fvisibility=hidden" run make -j$CONCURRENCY run make install-strip -j$CONCURRENCY diff --git a/shared/gemfiles/20210107/Gemfile b/shared/gemfiles/20210107/Gemfile deleted file mode 100644 index de08a19..0000000 --- a/shared/gemfiles/20210107/Gemfile +++ /dev/null @@ -1,26 +0,0 @@ -source 'https://rubygems.org' - -gem 'bcrypt' -gem 'charlock_holmes', :platforms => :ruby -gem 'curses', :platforms => :ruby -gem 'escape_utils' -gem 'fast-stemmer' -gem 'ffi' -gem 'hitimes' -gem 'json' -gem 'kgio', :platforms => :ruby -gem 'mysql2', :platforms => :ruby -gem 'nokogiri' -gem 'nokogumbo', '~> 1.5.0' -gem 'pg' -gem 'posix-spawn', :platforms => :ruby -gem 'puma', :platforms => :ruby -gem 'raindrops', :platforms => :ruby -gem 'redcarpet' -gem 'RedCloth' -gem 'rugged', :platforms => :ruby -gem 'sqlite3' -gem 'thin' -gem 'unf_ext' -gem 'unicorn', :platforms => :ruby -gem 'yajl-ruby' diff --git a/shared/gemfiles/20210107/Gemfile.lock b/shared/gemfiles/20210107/Gemfile.lock deleted file mode 100644 index a0aac62..0000000 --- a/shared/gemfiles/20210107/Gemfile.lock +++ /dev/null @@ -1,72 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - RedCloth (4.3.2) - bcrypt (3.1.16) - charlock_holmes (0.7.7) - curses (1.4.0) - daemons (1.3.1) - escape_utils (1.2.1) - eventmachine (1.2.7) - fast-stemmer (1.0.2) - ffi (1.14.2) - hitimes (2.0.0) - json (2.5.1) - kgio (2.11.3) - mini_portile2 (2.4.0) - mysql2 (0.5.3) - nio4r (2.5.4) - nokogiri (1.10.10) - mini_portile2 (~> 2.4.0) - nokogumbo (1.5.0) - nokogiri - pg (1.2.3) - posix-spawn (0.3.15) - puma (5.1.1) - nio4r (~> 2.0) - rack (2.2.3) - raindrops (0.19.1) - redcarpet (3.5.1) - rugged (1.1.0) - sqlite3 (1.4.2) - thin (1.8.0) - daemons (~> 1.0, >= 1.0.9) - eventmachine (~> 1.0, >= 1.0.4) - rack (>= 1, < 3) - unf_ext (0.0.7.7) - unicorn (5.8.0) - kgio (~> 2.6) - raindrops (~> 0.7) - yajl-ruby (1.4.1) - -PLATFORMS - ruby - -DEPENDENCIES - RedCloth - bcrypt - charlock_holmes - curses - escape_utils - fast-stemmer - ffi - hitimes - json - kgio - mysql2 - nokogiri - nokogumbo (~> 1.5.0) - pg - posix-spawn - puma - raindrops - redcarpet - rugged - sqlite3 - thin - unf_ext - unicorn - yajl-ruby - -BUNDLED WITH - 1.17.3 diff --git a/shared/gemfiles/20220706/Gemfile b/shared/gemfiles/20220706/Gemfile new file mode 100644 index 0000000..15c6501 --- /dev/null +++ b/shared/gemfiles/20220706/Gemfile @@ -0,0 +1,6 @@ +source 'https://rubygems.org' + +gem 'json' +gem 'ffi' +gem 'yajl-ruby' +gem 'rexml'