Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

g++ version #37

Open
snafees opened this issue Oct 10, 2024 · 9 comments
Open

g++ version #37

snafees opened this issue Oct 10, 2024 · 9 comments

Comments

@snafees
Copy link

snafees commented Oct 10, 2024

Hello! I'm trying to compile from source for macbook pro M3 max (arm arch) and it's been difficult trying to get dependencies to work.
I have the latest gcc version, https://gcc.gnu.org/gcc-14/

Here's the error when running the makefile:
mkdir -p bin g++-14 -o bin/satc src/satc/satc.o src/common/kmc_api/kmc_file.o src/common/kmc_api/mmer.o src/common/kmc_api/kmer_api.o src/common/illumina_adapters_static.o libs/zstd/lib/libzstd.a \ libs/zstd/lib/libzstd.a \ -lm -std=c++17 -lpthread ld: library not found for -lSystem collect2: error: ld returned 1 exit status make: *** [bin/satc] Error

Some more info:
clang -v:
Apple clang version 14.0.3 (clang-1403.0.22.14.1) Target: arm64-apple-darwin23.1.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin

@marekkokot
Copy link
Contributor

Hi!

Currently, SPLASH does not compile on mac, but very soon (i hope day or so) we should publish new version that should work on mac.

Still lets investigate
I assume you first cloned repo:

git clone https://github.com/refresh-bio/splash
cd splash

Then modified Makefile here:

CC = g++-11

to set g++-14

Is that right?

If you modified Makefile in any way let me know, also if your command line was anything beyond

make -j

let me know.

What is the output of

g++-14 -v

because sometimes MAC os uses Clang anyway

@snafees
Copy link
Author

snafees commented Oct 11, 2024

Hi, thanks so much for responding! I'm excited for the mac version, let me know if I can help with testing.

Yes, here's my makefile from my fork https://github.com/snafees/SPLASH/blob/master/Makefile I may have some issues here as well, was just trying to debug given the various different errors I was getting.

The above error I posted was just after make but then in previous runs, I had also run: make clean && make AR=ar CC=g++-14 which gave me a similar error ending with ld: symbol(s) not found for architecture arm64 collect2: error: ld returned 1 exit status make: *** [bin/satc] Error 1

And here's the output for g++-14 -v:

Using built-in specs. COLLECT_GCC=g++-14 COLLECT_LTO_WRAPPER=/opt/homebrew/Cellar/gcc/14.2.0/bin/../libexec/gcc/aarch64-apple-darwin23/14/lto-wrapper Target: aarch64-apple-darwin23 Configured with: ../configure --prefix=/opt/homebrew/opt/gcc --libdir=/opt/homebrew/opt/gcc/lib/gcc/current --disable-nls --enable-checking=release --with-gcc-major-version-only --enable-languages=c,c++,objc,obj-c++,fortran,m2 --program-suffix=-14 --with-gmp=/opt/homebrew/opt/gmp --with-mpfr=/opt/homebrew/opt/mpfr --with-mpc=/opt/homebrew/opt/libmpc --with-isl=/opt/homebrew/opt/isl --with-zstd=/opt/homebrew/opt/zstd --with-pkgversion='Homebrew GCC 14.2.0' --with-bugurl=https://github.com/Homebrew/homebrew-core/issues --with-system-zlib --build=aarch64-apple-darwin23 --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.2.0 (Homebrew GCC 14.2.0)

Thank you!

@snafees
Copy link
Author

snafees commented Oct 11, 2024

I've also shared with you, via email, a gdoc with the various errors and different things I tried, in case that helps!

@marekkokot
Copy link
Contributor

Hi, thanks!

For now, I would like to let you know that the release will not be there today. It should be at the beginning of next week, hopefully on Monday. I will let you know, and it would be wonderful if you could test it on your machine. The code is almost ready, and it worked on our M1 MAC, so I hope it will also work on M3.

@snafees
Copy link
Author

snafees commented Oct 14, 2024

Okay, no worries! thank you so much, and yes sounds great 👍

@marekkokot
Copy link
Contributor

Hi!

I just published a new release: https://github.com/refresh-bio/SPLASH/releases/tag/v2.11.0

You may just download the precompiled version for MAC OS arm: https://github.com/refresh-bio/SPLASH/releases/download/v2.11.0/splash-2.11.0.mac.arm64.tar.gz

Let me know if it works.
If you could also check if you are able now to compile it would be really helpful, since I tested compilation only on MAC os with M1.

@snafees
Copy link
Author

snafees commented Oct 15, 2024

Congrats on the new release! okay yes, will do!

@snafees
Copy link
Author

snafees commented Oct 16, 2024

I get the following error:

Error: cannot find splash version number for ../dsv_manip.

I'm also attaching a screenshot of what I see when running it as there's a pop-up with a warning:

Screenshot 2024-10-16 at 12 48 52 PM

@marekkokot
Copy link
Contributor

Hi, thank you!

Hmm, it seems to be something to configure on mac os.
There are a couple of binaries that Splash uses. dsv_manip is the first of them that is checked, but there are also others. I guess you need to allow all of them to run. Could you try to use this solution: https://discussions.apple.com/thread/250425993?sortBy=rank
especially this:

xattr -d com.apple.quarantine /path/to/file

For all the binary files in the downloaded release?

I also uploaded docker that should work on arm based mac, would be great if you could try it: https://github.com/refresh-bio/SPLASH/pkgs/container/splash/290381428?tag=2.11.0

Thanks again for the feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants