Skip to content

Commit

Permalink
Fix build failure on macOS 12 and 13 (#468)
Browse files Browse the repository at this point in the history
* Replace nested .a files with wildcards

* Add GCC on macOS-latest to azure-pipelines.yml

* Fix gtest uninitialized warning

* Fix gtest macOS warning

* Fix library paths
  • Loading branch information
parham-k authored May 16, 2023
1 parent f88beae commit d512770
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Assembly/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ libassembly_a_SOURCES = \
SplitAlgorithm.h \
TrimAlgorithm.h

libassembly_a_LIBADD = $(top_builddir)/Common/libcommon.a
libassembly_a_LIBADD = $(wildcard $(top_builddir)/Common/*.o)
2 changes: 1 addition & 1 deletion DataBase/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
noinst_LIBRARIES = libdb.a
libdb_a_SOURCES = DB.cc DB.h Options.h
libdb_a_CPPFLAGS = -I$(top_srcdir)
libdb_a_LIBADD = $(top_builddir)/Common/libcommon.a
libdb_a_LIBADD = $(wildcard $(top_builddir)/Common/*.o)

if HAVE_SQLITE3
bin_PROGRAMS = abyss-db-csv
Expand Down
4 changes: 2 additions & 2 deletions RResolver/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ libralgorithmsshort_a_SOURCES = \
RUtils.cpp RUtils.h

libralgorithmsshort_a_LIBADD = \
$(top_builddir)/DataLayer/libdatalayer.a \
$(top_builddir)/Common/libcommon.a
$(wildcard $(top_builddir)/DataLayer/*.o) \
$(wildcard $(top_builddir)/Common/*.o)

33 changes: 31 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
jobs:
- job: mac_gcc
- job: mac11_gcc
pool:
vmImage: macOS-11
steps:
Expand All @@ -23,6 +23,35 @@ jobs:
make -j12 distcheck
displayName: Compiling ABySS with gcc-12
- job: mac_latest_gcc
pool:
vmImage: macOS-latest
steps:
- script: |
rm -f /usr/local/bin/2to3 # brew is having issues with installing Python
brew update
brew install automake boost openmpi google-sparsehash make pandoc ghc gcc@12 llvm
displayName: Install common
- script: |
wget https://github.com/bcgsc/btllib/releases/download/v1.5.1/btllib-1.5.1.tar.gz
export CC=gcc-12
export CXX=g++-12
tar xzf btllib-1.5.1.tar.gz
cd btllib-1.5.1
./compile
displayName: Install btllib
- script: |
./autogen.sh
export CXXFLAGS="$CXXFLAGS -fuse-ld=lld"
echo $CXXFLAGS
export CFLAGS="$CFLAGS -fuse-ld=lld"
export OBJCFLAGS="$OBJCFLAGS -fuse-ld=lld"
export OBJCXXFLAGS="$OBJCXXFLAGS -fuse-ld=lld"
export DISTCHECK_CONFIGURE_FLAGS="CC=gcc-12 CXX=g++-12 --with-boost=/usr/local/opt/boost --with-sparsehash=/usr/local/opt/google-sparsehash --with-mpi=/usr/local/opt/openmpi --with-btllib=/Users/runner/work/1/s/btllib-1.5.1/install"
./configure CC=gcc-12 CXX=g++-12 --with-boost=/usr/local/opt/boost --with-sparsehash=/usr/local/opt/google-sparsehash --with-mpi=/usr/local/opt/openmpi --with-btllib=/Users/runner/work/1/s/btllib-1.5.1/install
make -j12 distcheck
displayName: Compiling ABySS with gcc-12
- job:
displayName: mac_latest-compilers-clang
pool:
Expand Down Expand Up @@ -303,4 +332,4 @@ jobs:
./configure
make -j12 distcheck AM_CXXFLAGS=-Wall CXXFLAGS='-pthread'
displayName: Compiling ABySS with gcc
4 changes: 2 additions & 2 deletions vendor/gtest-1.7.0/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ EXTRA_DIST = \
include/gtest/internal/gtest-type-util.h

libgtest_a_CPPFLAGS = -I$(top_srcdir) -isystem $(top_srcdir)/vendor/gtest-1.7.0/include
libgtest_a_CXXFLAGS = $(AM_CXXFLAGS) -Wno-missing-field-initializers -Wno-error=unused-result
libgtest_a_CXXFLAGS = $(AM_CXXFLAGS) -Wno-missing-field-initializers -Wno-uninitialized -Wno-error=unused-result
libgtest_a_SOURCES = src/gtest-all.cc

libgtest_main_a_CPPFLAGS = -I$(top_srcdir) -isystem $(top_srcdir)/vendor/gtest-1.7.0/include
libgtest_main_a_CXXFLAGS = $(AM_CXXFLAGS) -Wno-missing-field-initializers -Wno-error=unused-result
libgtest_main_a_CXXFLAGS = $(AM_CXXFLAGS) -Wno-missing-field-initializers -Wno-uninitialized -Wno-error=unused-result
libgtest_main_a_SOURCES = src/gtest_main.cc src/gtest-all.cc

0 comments on commit d512770

Please sign in to comment.