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

osx-64 build failures with C++ #52553

Open
dslarm opened this issue Dec 3, 2024 · 1 comment
Open

osx-64 build failures with C++ #52553

dslarm opened this issue Dec 3, 2024 · 1 comment

Comments

@dslarm
Copy link
Contributor

dslarm commented Dec 3, 2024

Been struggling with a few recipes that work locally on os/x, but fail on the CI system. I haven't been able to work out why some osx-64 recipes are failing, and others not. I need help of a bioconda os/x guru!

Two PRs specifically I'm working with are failing - they are not finding standard C++ libraries like iostream or string! They work locally on Sonoma with a osx-64 conda environment on osx-arm64.

There have historically been a few of these exact errors on the developer.apple.com site - and they ask for things like reinstalls of Xcode, or doing some version change - but I can't do that kind of experiment here to resolve. Is something missing from the recipe or the OS image?

x86_64-apple-darwin13.4.0-clang++ -c -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -fPIE -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/bwa-mem2-2.2.1 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -g -O3 -fpermissive -msse -msse2 -msse3 -mssse3 -msse4.1  -g -O3 -fpermissive -msse -msse2 -msse3 -mssse3 -msse4.1  -D_FORTIFY_SOURCE=2 -isystem $PREFIX/include -mmacosx-version-min=10.13 -DENABLE_PREFETCH -DV17=1 -DMATE_SORT=0 -DSAIS=1  -DENABLE_PREFETCH -DV17=1 -DMATE_SORT=0 -DSAIS=1  -Isrc -Iext/safestringlib/include src/fastmap.cpp -o src/fastmap.o
...
15:11:50 BIOCONDA INFO (ERR) src/fastmap.cpp:31:10: fatal error: 'iostream' file not found
15:11:50 BIOCONDA INFO (ERR) #include <iostream>

Note - this is pinned to version 15 of the compiler - as v16 bans the use of 'register' keyword which is used in a few places, and v14 (the previous setting) fails due to missing typedefs (on my local system) and the missing header files above in the CI.

15:08:11 BIOCONDA INFO (OUT) cd $SRC_DIR/build/src/c++/lib/assembly && $BUILD_PREFIX/bin/x86_64-apple-darwin13.4.0-clang++ -D_GLIBCXX_USE_CXX11_ABI=0 -I$SRC_DIR/src/c++/lib -I$SRC_DIR/build/src/c++/lib/assembly -I$SRC_DIR/src/c++/lib/assembly -I$SRC_DIR/build/src/c++/lib -isystem $SRC_DIR/build/redist/htslib-1.9 -isystem $SRC_DIR/redist/ctpl-0.0.2 -isystem $BUILD_PREFIX/include -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/manta-1.6.0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -Wall -Wextra -Wshadow -Wunused -Wpointer-arith -Winit-self -pedantic -Wunused-parameter -Wundef -Wno-unknown-pragmas -Wdeprecated -Woverloaded-virtual -Wwrite-strings -Wdisabled-optimization -Wno-missing-braces -Wempty-body -Wredundant-decls -Wuninitialized -Wbool-conversion -Wcast-qual -Wextra-semi -Wheader-hygiene -Wimplicit-fallthrough -Wloop-analysis -Wmismatched-tags -Wmissing-prototypes -Wmissing-variable-declarations -Wnon-virtual-dtor -Wsizeof-array-argument -Wstring-conversion -Wunused-exception-parameter -Wunused-private-field -Woverloaded-shift-op-parentheses -Wheader-guard -Wlogical-not-parentheses -Wunreachable-code-return -Wkeyword-macro -Winconsistent-missing-override -std=c++0x -O3 -fomit-frame-pointer -isysroot /Applications/Xcode_15.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -mmacosx-version-min=10.13 -MD -MT src/c++/lib/assembly/CMakeFiles/manta_assembly.dir/AssembledContig.cpp.o -MF CMakeFiles/manta_assembly.dir/AssembledContig.cpp.o.d -o CMakeFiles/manta_assembly.dir/AssembledContig.cpp.o -c $SRC_DIR/src/c++/lib/assembly/AssembledContig.cpp
In file included from /opt/mambaforge/envs/bioconda/conda-bld/manta_1733238156124/work/src/c++/lib/assembly/AssembledContig.cpp:24:
15:08:09 BIOCONDA INFO (ERR) /opt/mambaforge/envs/bioconda/conda-bld/manta_1733238156124/work/src/c++/lib/assembly/AssembledContig.hpp:26:10: fatal error: 'iosfwd' file not found
@martin-g
Copy link
Contributor

Hi!
I am not OSX expert but I have debugged some similar errors in the past.
The problem usually is that the toolchain has been updated in the meantime. For example: a recipe is being built with compiler version X and everything is fine. Later, e.g. several months later, one tries to make a simple change in the recipe but it no longer builds because the compiler (or some build-related library) is now updated to X+1.

How to help yourself ?
Go to anaconda.org, find your package and download the last successful build for the respective platform, e.g. osx-64.
Decompress it locally and look in the info/ folder for clues what has been used to build it.

Useful files are:

  • recipe/meta.yaml
  • recipe/conda_build_config.yaml
  • info/about.json

Compare the versions of tools and libs from the last successful build against the ones in the failing build (in the CI logs) and then try to pin (i.e. downgrade) them.

For OSX you could also try with different values for MACOSX_DEPLOYMENT_TARGET and/or MACOSX_SDK_VERSION

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