Giter VIP home page Giter VIP logo

Comments (3)

jakirkham avatar jakirkham commented on July 20, 2024 1

Conda-forge compilers have their own sysroot, which means they look for headers and libraries in a particular location. Usually we create CDTs for this purpose. Potentially one could work around this (in an admittedly somewhat hacky way) by symlinking headers and libraries into the compiler's sysroot.

Perhaps others have better suggestions

from ctng-compilers-feedstock.

isuruf avatar isuruf commented on July 20, 2024 1

You can add a flag to gcc to change the sysroot to /. Please see gcc docs on this.

from ctng-compilers-feedstock.

jakirkham avatar jakirkham commented on July 20, 2024

Thanks Isuru :)

For example...

$ gcc -xc -E -v --sysroot=/ - 
Reading specs from /datasets/jkirkham/miniconda/envs/rapids2108dev/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/specs
COLLECT_GCC=gcc
Target: x86_64-conda-linux-gnu
Configured with: /home/conda/feedstock_root/build_artifacts/ctng-compilers_1618239181388/work/.build/x86_64-conda-linux-gnu/src/gcc/configure --build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu --target=x86_64-conda-linux-gnu --prefix=/home/conda/feedstock_root/build_artifacts/ctng-compilers_1618239181388/work/gcc_built --with-sysroot=/home/conda/feedstock_root/build_artifacts/ctng-compilers_1618239181388/work/gcc_built/x86_64-conda-linux-gnu/sysroot --enable-languages=c,c++,fortran,objc,obj-c++ --with-pkgversion='crosstool-NG 1.24.0.133_b0863d8_dirty' --enable-__cxa_atexit --disable-libmudflap --enable-libgomp --disable-libssp --enable-libquadmath --enable-libquadmath-support --enable-libsanitizer --enable-libmpx --with-gmp=/home/conda/feedstock_root/build_artifacts/ctng-compilers_1618239181388/work/.build/x86_64-conda-linux-gnu/buildtools --with-mpfr=/home/conda/feedstock_root/build_artifacts/ctng-compilers_1618239181388/work/.build/x86_64-conda-linux-gnu/buildtools --with-mpc=/home/conda/feedstock_root/build_artifacts/ctng-compilers_1618239181388/work/.build/x86_64-conda-linux-gnu/buildtools --with-isl=/home/conda/feedstock_root/build_artifacts/ctng-compilers_1618239181388/work/.build/x86_64-conda-linux-gnu/buildtools --enable-lto --enable-threads=posix --enable-target-optspace --enable-plugin --enable-gold --disable-nls --disable-multilib --with-local-prefix=/home/conda/feedstock_root/build_artifacts/ctng-compilers_1618239181388/work/gcc_built/x86_64-conda-linux-gnu/sysroot --enable-long-long --enable-default-pie
Thread model: posix
gcc version 9.3.0 (crosstool-NG 1.24.0.133_b0863d8_dirty) 
COLLECT_GCC_OPTIONS='-E' '-v' '-mtune=generic' '-march=x86-64'
 /datasets/jkirkham/miniconda/envs/rapids2108dev/bin/../libexec/gcc/x86_64-conda-linux-gnu/9.3.0/cc1 -E -quiet -v -iprefix /datasets/jkirkham/miniconda/envs/rapids2108dev/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/ -isysroot / - -mtune=generic -march=x86-64
ignoring duplicate directory "/datasets/jkirkham/miniconda/envs/rapids2108dev/bin/../lib/gcc/../../lib/gcc/x86_64-conda-linux-gnu/9.3.0/include"
ignoring nonexistent directory "/home/conda/feedstock_root/build_artifacts/ctng-compilers_1618239181388/work/gcc_built/x86_64-conda-linux-gnu/sysroot/include"
ignoring duplicate directory "/datasets/jkirkham/miniconda/envs/rapids2108dev/bin/../lib/gcc/../../lib/gcc/x86_64-conda-linux-gnu/9.3.0/include-fixed"
ignoring duplicate directory "/datasets/jkirkham/miniconda/envs/rapids2108dev/bin/../lib/gcc/../../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /datasets/jkirkham/miniconda/envs/rapids2108dev/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/include
 /datasets/jkirkham/miniconda/envs/rapids2108dev/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/include-fixed
 /datasets/jkirkham/miniconda/envs/rapids2108dev/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/include
 /usr/include
End of search list.

Note: /usr/include shows up at the end

from ctng-compilers-feedstock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.