seqan / seqan3

The modern C++ library for sequence analysis. Contains version 3 of the library and API docs.
https://www.seqan.de
Other
411 stars 82 forks source link

Problem with installation on mac os x #3286

Open mkazanov opened 2 months ago

mkazanov commented 2 months ago

Platform

Question

I have installed seqan3 by cloning repository, then runing cmake .. from build directory. Then I run cmake install and all headers have been copied to /usr/local/include/seqan3 directory. I've also added /usr/local/include/seqan3/** to the Header Search Paths of my Xcode project.

Then I have added two #include lines to simple hello world program in Xcode:

#include <seqan3/core/debug_stream.hpp>
#include <seqan3/io/sequence_file/all.hpp>

When I tried to build, it failed with a bunch of issues (below) in chunk_view.hpp file, etc.

Screenshot 2024-09-06 at 9 34 59 PM
eseiler commented 2 months ago

Hey there,

Sorry for not getting back to you sooner.

Can you tell me what version of Clang/Xcode you are using? For Clang, you can usually run clang --version in the terminal.

From the looks of it, the version used is older than llvm-clang-17, which is the minimum version we support. Note that Apple Clang (the one XCode is shipped with) usually has a different version number that translates to some llvm-clang version.

mkazanov commented 2 months ago

Hey there,

Sorry for not getting back to you sooner.

Can you tell me what version of Clang/Xcode you are using? For Clang, you can usually run clang --version in the terminal.

From the looks of it, the version used is older than llvm-clang-17, which is the minimum version we support. Note that Apple Clang (the one XCode is shipped with) usually has a different version number that translates to some llvm-clang version.

% clang --version
Homebrew clang version 18.1.8
Target: arm64-apple-darwin23.1.0
Thread model: posix
InstalledDir: /opt/homebrew/opt/llvm/bin
eseiler commented 2 months ago
% clang --version
Homebrew clang version 18.1.8
Target: arm64-apple-darwin23.1.0
Thread model: posix
InstalledDir: /opt/homebrew/opt/llvm/bin

This version should work. As for M1 (arm64) support, I'm currently updating our CI to use macos-14 runners, which use M1 processors.

But Homebrew's clang is probably not the one XCode uses. XCode is shipped with some llvm/clang version, and this one is used by default.

Can you find out the XCode version?

For using Homebrew's clang in XCode I found this: https://forums.developer.apple.com/forums/thread/737718 I'll also try this on my old MacBook, in case the steps are not exhaustive.

mkazanov commented 2 months ago

Can you find out the XCode version?

XCode version 15.2

eseiler commented 2 months ago

According to https://en.wikipedia.org/wiki/Xcode#Xcode_15.0_-_(since_visionOS_support)_2, XCode 16.0 would be the first version that ships with llvm 17.

In prior versions, XCode must be convinced to use Homebrew's llvm-clang.

I haven't managed to achieve that yet on my mac. But I never used XCode, and I apparently configured something such that XCode won't even work with Hello World.