Skip to content

Commit

Permalink
Merge branch 'master' into patch-7
Browse files Browse the repository at this point in the history
  • Loading branch information
giordano committed Aug 29, 2022
2 parents 12b90b6 + 0fd0ef8 commit c050406
Show file tree
Hide file tree
Showing 15 changed files with 549 additions and 55 deletions.
14 changes: 7 additions & 7 deletions .ci/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ version = "0.5.5"

[[deps.BinaryBuilderBase]]
deps = ["CodecZlib", "Downloads", "InteractiveUtils", "JSON", "LibGit2", "LibGit2_jll", "Libdl", "Logging", "OrderedCollections", "OutputCollectors", "Pkg", "ProgressMeter", "Random", "SHA", "Scratch", "SimpleBufferStream", "TOML", "Tar", "UUIDs", "p7zip_jll", "pigz_jll"]
git-tree-sha1 = "9cfeb1a234eb867af0845e7f64eb5dda7c027182"
git-tree-sha1 = "512c31246c2731f0368eee458549b8a8bb3a777f"
repo-rev = "master"
repo-url = "https://github.com/JuliaPackaging/BinaryBuilderBase.jl.git"
uuid = "7f725544-6523-48cd-82d1-3fa08ff4056e"
Expand Down Expand Up @@ -115,9 +115,9 @@ version = "5.7.3"

[[deps.HTTP]]
deps = ["Base64", "CodecZlib", "Dates", "IniFile", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"]
git-tree-sha1 = "071bc27ca07f09c1692389e9034acb816c754402"
git-tree-sha1 = "59ba44e0aa49b87a8c7a8920ec76f8afe87ed502"
uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3"
version = "1.3.2"
version = "1.3.3"

[[deps.Hiccup]]
deps = ["MacroTools", "Test"]
Expand Down Expand Up @@ -268,9 +268,9 @@ version = "0.1.1"

[[deps.Parsers]]
deps = ["Dates"]
git-tree-sha1 = "0044b23da09b5608b4ecacb4e5e6c6332f833a7e"
git-tree-sha1 = "3d5bf43e3e8b412656404ed9466f1dcbf7c50269"
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version = "2.3.2"
version = "2.4.0"

[[deps.Pidfile]]
deps = ["FileWatching", "Test"]
Expand Down Expand Up @@ -416,9 +416,9 @@ version = "0.3.0"

[[deps.TranscodingStreams]]
deps = ["Random", "Test"]
git-tree-sha1 = "ed5d390c7addb70e90fd1eb783dcb9897922cbfa"
git-tree-sha1 = "8a75929dcd3c38611db2f8d08546decb514fcadf"
uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"
version = "0.9.8"
version = "0.9.9"

[[deps.URIs]]
git-tree-sha1 = "e59ecc5a41b000fa94423a578d29290c7266fc10"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,60 @@
--- a/clang/lib/Driver/ToolChains/Gnu.cpp
+++ b/clang/lib/Driver/ToolChains/Gnu.cpp
@@ -2077,6 +2077,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
@@ -2077,7 +2077,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
static const char *const AArch64LibDirs[] = {"/lib64", "/lib"};
static const char *const AArch64Triples[] = {
"aarch64-none-linux-gnu", "aarch64-linux-gnu", "aarch64-redhat-linux",
+ "aarch64-linux-musl",
"aarch64-suse-linux", "aarch64-linux-android"};
- "aarch64-suse-linux", "aarch64-linux-android"};
+ "aarch64-suse-linux", "aarch64-linux-android", "aarch64-linux-musl",
+ };
static const char *const AArch64beLibDirs[] = {"/lib"};
static const char *const AArch64beTriples[] = {"aarch64_be-none-linux-gnu",
@@ -2105,6 +2106,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
"aarch64_be-linux-gnu"};
@@ -2089,6 +2090,10 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
"armv7hl-redhat-linux-gnueabi",
"armv6hl-suse-linux-gnueabi",
"armv7hl-suse-linux-gnueabi"};
+ static const char *const ARMHFMuslTriples[] = {
+ "arm-linux-musleabihf", "armv7l-linux-musleabihf",
+ "armv6l-linux-musleabihf",
+ };
static const char *const ARMebLibDirs[] = {"/lib"};
static const char *const ARMebTriples[] = {"armeb-linux-gnueabi",
"armeb-linux-androideabi"};
@@ -2105,7 +2110,9 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
"x86_64-redhat-linux", "x86_64-suse-linux",
"x86_64-manbo-linux-gnu", "x86_64-linux-gnu",
"x86_64-slackware-linux", "x86_64-unknown-linux",
- "x86_64-amazon-linux", "x86_64-linux-android"};
+ "x86_64-amazon-linux", "x86_64-linux-android",
+ "x86_64-linux-musl",
"x86_64-amazon-linux", "x86_64-linux-android"};
+ };
static const char *const X32Triples[] = {"x86_64-linux-gnux32",
"x86_64-pc-linux-gnux32"};
@@ -2115,6 +2117,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
"i686-pc-linux-gnu", "i386-redhat-linux6E",
static const char *const X32LibDirs[] = {"/libx32", "/lib"};
@@ -2116,6 +2123,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
"i686-redhat-linux", "i386-redhat-linux",
"i586-suse-linux", "i686-montavista-linux",
+ "i686-linux-musl",
"i686-linux-android", "i686-gnu",
+ "i686-linux-musl",
};

static const char *const M68kLibDirs[] = {"/lib"};
@@ -2321,6 +2329,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
LibDirs.append(begin(ARMLibDirs), end(ARMLibDirs));
if (TargetTriple.getEnvironment() == llvm::Triple::GNUEABIHF) {
TripleAliases.append(begin(ARMHFTriples), end(ARMHFTriples));
+ } else if (TargetTriple.getEnvironment() == llvm::Triple::MuslEABIHF) {
+ TripleAliases.append(begin(ARMHFMuslTriples), end(ARMHFMuslTriples));
} else {
TripleAliases.append(begin(ARMTriples), end(ARMTriples));
}
@@ -2330,6 +2340,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
LibDirs.append(begin(ARMebLibDirs), end(ARMebLibDirs));
if (TargetTriple.getEnvironment() == llvm::Triple::GNUEABIHF) {
TripleAliases.append(begin(ARMebHFTriples), end(ARMebHFTriples));
+ } else if (TargetTriple.getEnvironment() == llvm::Triple::MuslEABIHF) {
+ TripleAliases.append(begin(ARMHFMuslTriples), end(ARMHFMuslTriples));
} else {
TripleAliases.append(begin(ARMebTriples), end(ARMebTriples));
}
1 change: 1 addition & 0 deletions 0_RootFS/llvm_common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ function llvm_script(;version = v"8.0.1", llvm_build_type = "Release", kwargs...
LLVM_BUILD_TYPE=$(llvm_build_type)
""" *
raw"""
apk update
apk add build-base python3 python3-dev linux-headers musl-dev zlib-dev
# We need the XML2, iconv, Zlib libraries in our LLVMBootstrap artifact,
Expand Down
7 changes: 7 additions & 0 deletions L/LibGit2/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ BUILD_FLAGS=(
"-DCMAKE_TOOLCHAIN_FILE="${CMAKE_TARGET_TOOLCHAIN}""
)
if [[ ${bb_full_target} == *-sanitize+memory* ]]; then
# Install msan runtime (for clang)
cp -rL ${libdir}/linux/* /opt/x86_64-linux-musl/lib/clang/*/lib/linux/
fi
# Special windows flags
if [[ ${target} == *-mingw* ]]; then
BUILD_FLAGS+=(-DWIN32=ON -DMINGW=ON -DBUILD_CLAR=OFF)
Expand All @@ -51,6 +56,7 @@ make install
# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = supported_platforms()
push!(platforms, Platform("x86_64", "linux"; sanitize="memory"))

# The products that we will ensure are always built
products = [
Expand All @@ -61,6 +67,7 @@ products = [
dependencies = [
Dependency("MbedTLS_jll"; compat="~2.28.0"),
Dependency("LibSSH2_jll"; compat="1.10.1"),
BuildDependency("LLVMCompilerRT_jll",platforms=[Platform("x86_64", "linux"; sanitize="memory")]),
]

# Build the tarballs, and possibly a `build.jl` as well.
Expand Down
7 changes: 7 additions & 0 deletions L/LibUnwind/LibUnwind@1.5.0/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ atomic_patch -p1 ${WORKSPACE}/srcdir/patches/libunwind-cfa-rsp.patch
atomic_patch -p1 ${WORKSPACE}/srcdir/patches/libunwind-dwarf-table.patch
atomic_patch -p1 ${WORKSPACE}/srcdir/patches/libunwind-non-empty-structs.patch
if [[ ${bb_full_target} == *-sanitize+memory* ]]; then
# Install msan runtime (for clang)
cp -rL ${libdir}/linux/* /opt/x86_64-linux-musl/lib/clang/*/lib/linux/
fi
export CFLAGS="-DPI -fPIC"
./configure \
--prefix=${prefix} \
Expand All @@ -48,6 +53,7 @@ ar -qc ${prefix}/lib/libunwind.a unpacked/**/*
# platforms are passed in on the command line. libunwind is only used
# on Linux or FreeBSD (e.g. ELF systems)
platforms = filter(p -> Sys.islinux(p) || Sys.isfreebsd(p), supported_platforms())
push!(platforms, Platform("x86_64", "linux"; sanitize="memory"))

# The products that we will ensure are always built
products = [
Expand All @@ -58,6 +64,7 @@ products = [
dependencies = [
BuildDependency("XZ_jll"),
Dependency("Zlib_jll"),
BuildDependency("LLVMCompilerRT_jll",platforms=[Platform("x86_64", "linux"; sanitize="memory")]),
]

# Build the tarballs.
Expand Down
30 changes: 10 additions & 20 deletions M/MMseqs2/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ version_commitprefix = "45111"
# - single-threaded (-DREQUIRE_OPENMP=0)

# TODO
# - built-in zstd, replace with Zstd_jll? (-DUSE_SYSTEM_ZSTD=1 cmake option)
# - aarch64 macos: single-threaded, openmp not used
# - compile with Zstd_jll instead of built-in zstd?
# set -DUSE_SYSTEM_ZSTD=1 cmake option
# error during cmake: expects libzstd.a
# - os-specific build script examples under util/build_{osx,windows}

# Build failures
Expand All @@ -27,14 +28,10 @@ version_commitprefix = "45111"
# - compile error afterwards
# error: ‘posix_memalign’ was not declared in this scope
# (and more following errors)
# - macos aarch64
# - g++-11 build fails (tries to compile for x86 simd)
# - compiles with clang, but openmp doesn't work
# - i686: compile error due to bitwidth issues, haven't investigated more
# - powerpc build fails with g++-7.x (tries to compile for x86 simd),
# works with g++-8.x and above


# Collection of sources required to complete build
sources = [
ArchiveSource("https://github.com/soedinglab/MMseqs2/archive/refs/tags/$(version.major)-$(version_commitprefix).tar.gz",
Expand All @@ -50,18 +47,6 @@ cd MMseqs2-*/
# patch CMakeLists.txt so it doesn't set -march unnecessarily on ARM
atomic_patch -p1 ../patches/arm-simd-march-cmakefile.patch
# macos x86_64: use gcc/g++ so we can use openmp
if [[ "${target}" == x86_64-apple-darwin* ]]; then
CMAKE_TARGET_TOOLCHAIN="${CMAKE_TARGET_TOOLCHAIN/%.cmake/_gcc.cmake}"
echo "[INFO] setting CMAKE_TARGET_TOOLCHAIN = ${CMAKE_TARGET_TOOLCHAIN}"
fi
# macos aarch64: disable openmp as it doesn't work with clang
EXTRA_CMAKE_FLAGS=
if [[ "${target}" == aarch64-apple-darwin* ]]; then
EXTRA_CMAKE_FLAGS="-DREQUIRE_OPENMP=0"
fi
# architecture extensions
ARCH_FLAGS=
if [[ "${target}" == x86_64-* || "${target}" == i686-* ]]; then
Expand All @@ -76,7 +61,7 @@ mkdir build
cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=$prefix -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} -DCMAKE_BUILD_TYPE=RELEASE \
-DNATIVE_ARCH=0 ${EXTRA_CMAKE_FLAGS} ${ARCH_FLAGS}
-DNATIVE_ARCH=0 ${ARCH_FLAGS}
make -j${nproc}
make install
Expand All @@ -96,9 +81,14 @@ products = [

# Dependencies that must be installed before this package can be built
dependencies = Dependency[
Dependency(PackageSpec(name="CompilerSupportLibraries_jll", uuid="e66e0078-7015-5450-92f7-15fbd957f2ae")),
Dependency(PackageSpec(name="Zlib_jll")),
Dependency(PackageSpec(name="Bzip2_jll")),
# For OpenMP we use libomp from `LLVMOpenMP_jll` where we use LLVM as compiler (BSD
# systems), and libgomp from `CompilerSupportLibraries_jll` everywhere else.
Dependency(PackageSpec(name="CompilerSupportLibraries_jll", uuid="e66e0078-7015-5450-92f7-15fbd957f2ae");
platforms=filter(!Sys.isbsd, platforms)),
Dependency(PackageSpec(name="LLVMOpenMP_jll", uuid="1d63c593-3942-5779-bab2-d838dc0a180e");
platforms=filter(Sys.isbsd, platforms)),
]

# Build the tarballs, and possibly a `build.jl` as well.
Expand Down
3 changes: 3 additions & 0 deletions R/R2R/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bundled/patches/fix-format-strings.patch -text diff
bundled/patches/fix-ptr-to-int-on-windows-64bit.patch -text diff
bundled/patches/isfinite.patch -text diff
59 changes: 59 additions & 0 deletions R/R2R/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Note that this script can accept some limited command-line arguments, run
# `julia build_tarballs.jl --help` to see a usage message.
using BinaryBuilder, Pkg

name = "R2R"
version = v"1.0.6"

# Collection of sources required to complete build
sources = [
ArchiveSource("https://sourceforge.net/projects/weinberg-r2r/files/R2R-1.0.6.tgz",
"1ba8f51db92866ebe1aeb3c056f17489bceefe2f67c5c0bbdfbddc0eee17743d"),
DirectorySource("./bundled")
]

# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/R2R-*/
atomic_patch -p1 ../patches/fix-ptr-to-int-on-windows-64bit.patch
atomic_patch -p1 ../patches/isfinite.patch
atomic_patch -p1 ../patches/fix-format-strings.patch
update_configure_scripts --reconf
export CXXFLAGS="-std=c++11"
./configure \
--prefix=${prefix} --build=${MACHTYPE} --host=${target} \
--enable-nlopt
make -j${nproc}
make install
# install manual
# mkdir "${prefix}/doc"
# cp R2R-manual.pdf "${prefix}/doc"
# install demos
# cp -r demo/ "${prefix}"
install_license r2r-gpl-text.txt
"""

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = supported_platforms()
platforms = expand_cxxstring_abis(platforms)

# The products that we will ensure are always built
products = [
ExecutableProduct("r2r", :r2r),
]

# Dependencies that must be installed before this package can be built
dependencies = [
Dependency(PackageSpec(name="NLopt_jll", uuid="079eb43e-fd8e-5478-9966-2cf3e3edb778")),
]

# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies;
julia_compat="1.6", preferred_gcc_version = v"7")
68 changes: 68 additions & 0 deletions R/R2R/bundled/patches/fix-format-strings.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
diff --git a/src/ParseOneStockholm.cpp b/src/ParseOneStockholm.cpp
index c2399e4..c4ab211 100755
--- a/src/ParseOneStockholm.cpp
+++ b/src/ParseOneStockholm.cpp
@@ -259,15 +259,15 @@ void DumpInfoFile(const OtherDrawingStuff& otherDrawingStuff,const DrawingParams

fprintf(f,"drawingName\t%s\n",otherDrawingStuff.name.c_str());

- fprintf(f,"posToAlignCol\t%u\n",otherDrawingStuff.currPosToOriginalPosMap.size());
+ fprintf(f,"posToAlignCol\t%lu\n",otherDrawingStuff.currPosToOriginalPosMap.size());
for (size_t pos=0; pos<otherDrawingStuff.currPosToOriginalPosMap.size(); pos++) {
- fprintf(f,"%u\t%d\n",pos,otherDrawingStuff.currPosToOriginalPosMap[pos]);
+ fprintf(f,"%zu\t%d\n",pos,otherDrawingStuff.currPosToOriginalPosMap[pos]);
}

- fprintf(f,"layout\t%u\n",posInfoVector.size());
+ fprintf(f,"layout\t%lu\n",posInfoVector.size());
for (size_t i=0; i<posInfoVector.size(); i++) {
const PosInfo& p=posInfoVector[i];
- fprintf(f,"%u\t%s\t%lg\t%lg\t%d\t%d",i,p.nuc.c_str(),p.pos.GetX(),p.pos.GetY(),p.flipLeftRight?1:0,p.partOfCircleThreePrime.isPartOfCircle?1:0);
+ fprintf(f,"%zu\t%s\t%lg\t%lg\t%d\t%d",i,p.nuc.c_str(),p.pos.GetX(),p.pos.GetY(),p.flipLeftRight?1:0,p.partOfCircleThreePrime.isPartOfCircle?1:0);
if (p.partOfCircleThreePrime.isPartOfCircle) {
fprintf(f,"\t0\t%lg\t%lg\t%d", // the first hard-coded '0' is for p.dir, which is undefined for circular
p.partOfCircleThreePrime.center.GetX(),p.partOfCircleThreePrime.center.GetY(),(!p.partOfCircleThreePrime.circleDoesNotIntersectNextPoint)?1:0);
@@ -3064,7 +3064,7 @@ void OneStockholm_try (IndividualStructList& structList,const OtherDrawingStuff&
if (doOneSeq) {
for (size_t i=0; i<posInfoVector.size(); i++) {
posInfoVector[i].cleavageCode=oneSeqCleavage[i];
- printf("posInfoVector[%d].cleavageCode=%c\n",i,oneSeqCleavage[i]);
+ printf("posInfoVector[%zu].cleavageCode=%c\n",i,oneSeqCleavage[i]);
if ((i+1)%10==0 && drawingParams.defaultOneseqLabeling && !disableOneSeqNumbering) {
if (!posInfoVector[i].nucTickLabel.empty()) {
posInfoVector[i].nucTickLabel += " , ";
@@ -3095,7 +3095,7 @@ void OneStockholm_try (IndividualStructList& structList,const OtherDrawingStuff&

if (n>1) {
doublyPaired=true;
- printf("ERROR: position %d (raw %d) belongs to two pairs in different SS_cons lines (%s)\n",
+ printf("ERROR: position %d (raw %zu) belongs to two pairs in different SS_cons lines (%s)\n",
FindTextColOfPos(otherDrawingStuff,(int)i),i,ssNames.c_str());
}
}
diff --git a/src/PositionBackbone_MultiStemCircularSolver.cpp b/src/PositionBackbone_MultiStemCircularSolver.cpp
index ccfa0a4..776ed08 100755
--- a/src/PositionBackbone_MultiStemCircularSolver.cpp
+++ b/src/PositionBackbone_MultiStemCircularSolver.cpp
@@ -300,7 +300,7 @@ void DumpNucPosAtEachIterMessageReceiver::PreEvaluateObjectiveFunc (const vector
}
for (size_t stem=0; stem<stemPosVector.size(); stem++) {
double frac=stemPosVector[stem].circleIntersectFraction.Eval(problemVars);
- fprintf(f,"frac-intersect\t%d\t%lg\n",stem,frac);
+ fprintf(f,"frac-intersect\t%zu\t%lg\n",stem,frac);
}
iter++;
}
diff --git a/src/RnaDrawer.cpp b/src/RnaDrawer.cpp
index 13f0654..14dec43 100755
--- a/src/RnaDrawer.cpp
+++ b/src/RnaDrawer.cpp
@@ -492,7 +492,7 @@ void RnaDrawer::CheckPathError (LineOrArcList& l,size_t i,int lineNum)
printf("WARNING: some points along the backbone could not be joined in aesthetically pleasing ways. This is probably the fault of this program, as it does not have all cases implemented. The problematic segments will be drawn as a simple straight line. Subsequent warning messages will say which positions are problematic. Note that it is possible to have a connector from position X to position X (again), if that position has a variable-length backbone, terminal loop or hairpin.\n");
warnedAboutBadConnectors=true;
}
- printf("WARNING: in %s I had problems with joining the backbone from text alignment column %d (raw %d) to column %d (raw %d). code %d. See note above. (cpp line #%d)\n",
+ printf("WARNING: in %s I had problems with joining the backbone from text alignment column %d (raw %zu) to column %d (raw %zu). code %d. See note above. (cpp line #%d)\n",
otherDrawingStuff.name.c_str(),
FindTextColOfPos(otherDrawingStuff,(int)i),i,
FindTextColOfPos(otherDrawingStuff,(int)(i+1)),i+1,
Loading

0 comments on commit c050406

Please sign in to comment.