Closed noncodo closed 2 years ago
I tried specifying gnu compilers (gcc-11/g++-11) for hts and f5c compilation, similar end result.
$ gcc --version
Apple clang version 13.1.6 (clang-1316.0.21.2.3)
Target: arm64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
$ g++ --version
Apple clang version 13.1.6 (clang-1316.0.21.2.3)
Target: arm64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
$ld -v
@(#)PROGRAM:ld PROJECT:ld64-762
BUILD 12:49:08 Mar 30 2022
configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em
LTO support using: LLVM version 13.1.6, (clang-1316.0.21.2.3) (static support for 28, runtime is 28)
TAPI support using: Apple TAPI version 13.1.6 (tapi-1316.0.7.3)
Here are the logs:
Seems to be a bizarre problem. Logs seem fine. Could you tarball the whole f5c directory with the object files (including htslib dir) so that I can check the binaries?
Could you perhaps try:
export CC=/opt/homebrew/bin/gcc-11 CXX=/opt/homebrew/bin/g++-11 #so that htslib is built with gcc, not clang
./scripts/install-hts.sh
autoreconf --install
./configure LDFLAGS=-L/opt/homebrew/lib/ CPPFLAGS=-I/opt/homebrew/include/
make CC=/opt/homebrew/bin/gcc-11 CXX=/opt/homebrew/bin/g++-11 # so that f5c is built with g++, not clang++
Could you please try this binary build of f5c for M1?
Also the slow5tools binaries with zstd for M1 here: slow5tools-m1.tar.gz
The binary works (hurray!), but using the custom compiler paths doesn't
Here is the entire folder FYI: f5c_M1max_build.tgz
Could you please provide access to the shared file above?
Thanks. This is an interesting situation. It looks like that missing symbol _sam_hdr_destroy
is coming from a different version of htslib header file, which was possibly installed using homebrew. That symbol is not present in the version of htslib that the ./scripts/install-hts.sh fetches. To check if this is the issue, could you please rebuild f5c with the homebrew installed htslib using method 3 at https://hasindu2008.github.io/f5c/docs/building.
rm -rf f5c
git clone https://github.com/hasindu2008/f5c/ && cd f5c
autoreconf --install
./configure LDFLAGS=-L/opt/homebrew/lib/ CPPFLAGS=-I/opt/homebrew/include/ --enable-systemhts
make
No need to use /opt/homebrew/bin/g++-11, you can simply try the fake gcc/g++ on Mac that defaults to clang. If this works, I will reorder the flags in autoconf such that local paths take precedence over /opt/homebrew/include/.
Beautiful! works like a charm :-) Many thanks
Trying to compile f5c, getting the following error during compilation:
I'm compiling on Apple M1 Max silicon, OS Monterey 12.3.1, using these commands:
I also tried with
make GCC=/opt/homebrew/bin/gcc-11 CXX=/opt/homebrew/bin/g++-11
which gave the same results