tracy
tracy copied to clipboard
Issues Installing/Compiling on Mac
Hi,
Tracy seems awesome. However, I'm having trouble install/compiling on both an Intel Mac and an M1 Mac. Unfortunately, I don't have much experience with compilers and C++.
Attempt Installing from Source
Following the instructions in the documentation.
Some issues:
- I tried installing the required system libraries via homebrew. I got a few "Caveats" about 'zlib' and 'bzip2':
==> bzip2
zlib is keg-only, which means it was not symlinked into /opt/homebrew,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.
For compilers to find zlib you may need to set:
export LDFLAGS="-L/opt/homebrew/opt/zlib/lib"
export CPPFLAGS="-I/opt/homebrew/opt/zlib/include"
For pkg-config to find zlib you may need to set:
export PKG_CONFIG_PATH="/opt/homebrew/opt/zlib/lib/pkgconfig"
==> bzip2
bzip2 is keg-only, which means it was not symlinked into /opt/homebrew,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.
If you need to have bzip2 first in your PATH, run:
echo 'export PATH="/opt/homebrew/opt/bzip2/bin:$PATH"' >> ~/.zshrc
For compilers to find bzip2 you may need to set:
export LDFLAGS="-L/opt/homebrew/opt/bzip2/lib"
export CPPFLAGS="-I/opt/homebrew/opt/bzip2/include"
Do you have any recommendations about adding these compiler flags?
- When compiling (i.e.
make all
), I got the following error
~/code/tracy (main) » make all
if [ -r src/htslib/Makefile ]; then cd src/htslib && autoreconf -i && ./configure --disable-s3 --disable-gcs --disable-libcurl --disable-plugins && /Library/Developer/CommandLineTools/usr/bin/make && /Library/Developer/CommandLineTools/usr/bin/make lib-static && cd ../../ && touch .htslib; fi
/bin/sh: autoreconf: command not found
make: *** [.htslib] Error 127
As such, following Stack Exchange, I downloaded the automake
package which then provides the autoreconf
command. This should be included in the list of packages (in the documentation) to be installed via homebrew.
- After this, I got further in the compilation process but still failed. Here was the command that failed
g++ -std=c++14 -isystem /Users/adityaprasad/code/tracy/src/jlib/ -isystem /Users/adityaprasad/code/tracy/src/htslib/ -isystem /Users/adityaprasad/code/tracy/src/sdslLite//include -pedantic -W -Wall -O3 -fno-tree-vectorize -DNDEBUG src/tracy.cpp -o src/tracy -L/Users/adityaprasad/code/tracy/src/htslib/ -L/Users/adityaprasad/code/tracy/src/htslib//lib -L/Users/adityaprasad/code/tracy/src/sdslLite//lib -lboost_iostreams -lboost_filesystem -lboost_system -lboost_program_options -lboost_date_time -ldl -lpthread -lhts -lz -llzma -lbz2 -Wl,-rpath,/Users/adityaprasad/code/tracy/src/htslib/
In file included from src/tracy.cpp:13:
src/index.h:9:10: fatal error: 'boost/dynamic_bitset.hpp' file not found
#include <boost/dynamic_bitset.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [src/tracy] Error 1
I'm not sure what to do here. I have my own installation of boost. Do I have to link it to that somehow?
Attempt Installing via Conda
For the M1 Mac, this just fails to find the tracy package.
~ » conda install -c bioconda tracy
Collecting package metadata (current_repodata.json): done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- tracy
Current channels:
- https://conda.anaconda.org/bioconda/osx-arm64
- https://conda.anaconda.org/bioconda/noarch
- https://conda.anaconda.org/conda-forge/osx-arm64
- https://conda.anaconda.org/conda-forge/noarch
- https://repo.anaconda.com/pkgs/main/osx-arm64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/osx-arm64
- https://repo.anaconda.com/pkgs/r/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
For the Intel Mac, it starts out better but still fails. In a pre-existing environment, I get the following error
~ » conda install -c bioconda tracy
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: |
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Output in format: Requested package -> Available versions
Package libcxx conflicts for:
python=3.9 -> libffi[version='>=3.3,<3.4.0a0'] -> libcxx[version='>=4.0.1']
python=3.9 -> libcxx[version='>=10.0.0|>=12.0.0|>=14.0.6']
Package xz conflicts for:
python=3.9 -> xz[version='>=5.2.10,<6.0a0|>=5.4.2,<6.0a0|>=5.2.8,<6.0a0|>=5.2.6,<6.0a0|>=5.2.5,<6.0a0']
tracy -> htslib[version='>=1.17,<1.18.0a0'] -> xz[version='>=5.2.4,<5.3.0a0|>=5.2.5,<5.3.0a0|>=5.2.6,<5.3.0a0|>=5.2.6,<6.0a0']
Package zlib conflicts for:
python=3.9 -> sqlite[version='>=3.41.2,<4.0a0'] -> zlib[version='>=1.2.13,<2.0a0']
python=3.9 -> zlib[version='>=1.2.11,<1.3.0a0|>=1.2.12,<1.3.0a0|>=1.2.13,<1.3.0a0']
In a fresh environment, I get the following error
~ » conda install -c bioconda tracy
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: /
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError: