help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CPATH and GCC


From: brettg
Subject: CPATH and GCC
Date: Tue, 29 Jan 2019 00:43:09 +0100
User-agent: Posteo Webmail

Hi all.

I am trying to use GSL in my C project on GuixSD.

address@hidden ~/cproj$ guix package --search-paths
export PATH="/home/brettg/.guix-profile/bin"
export GIT_EXEC_PATH="/home/brettg/.guix-profile/libexec/git-core"
export XDG_DATA_DIRS="/home/brettg/.guix-profile/share"
export GIO_EXTRA_MODULES="/home/brettg/.guix-profile/lib/gio/modules"
export CPATH="/home/brettg/.guix-profile/include"
export LIBRARY_PATH="/home/brettg/.guix-profile/lib"
export INFOPATH="/home/brettg/.guix-profile/share/info"
export PYTHONPATH="/home/brettg/.guix-profile/lib/python3.7/site-packages"

According to the GCC documentation, the compiler should automatically use the CPATH to search for GSL, but it does not seem to respect this.

test.c:2:10: fatal error: gsl_blash.h: No such file or directory
 #include <gsl_blash.h>
          ^~~~~~~~~~~~~
compilation terminated.

I am not using an isolated environment or anything, so the CPATH variable is set, and I can return it. It also is correctly listed in cpp -v

address@hidden ~/cproj$ cpp -v
Using built-in specs.
COLLECT_GCC=cpp
Target: x86_64-unknown-linux-gnu
Configured with:
Thread model: posix
gcc version 8.2.0 (GCC)
COLLECT_GCC_OPTIONS='-E' '-v' '-mtune=generic' '-march=x86-64'
/gnu/store/px8nkcmr1bp76mhfm2lbzz2h3n9wfbz5-gcc-8.2.0/libexec/gcc/x86_64-unknown-linux-gnu/8.2.0/cc1 -E -quiet -v - -mtune=generic -march=x86-64
ignoring nonexistent directory "/no-gcc-local-prefix/include"
ignoring nonexistent directory "/gnu/store/l9l8ssnl2yfi7v9szkkadd0s8d3fxw0z-gcc-8.2.0-lib/lib/gcc/x86_64-unknown-linux-gnu/8.2.0/../../../../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /home/brettg/.guix-profile/include
/gnu/store/l9l8ssnl2yfi7v9szkkadd0s8d3fxw0z-gcc-8.2.0-lib/lib/gcc/x86_64-unknown-linux-gnu/8.2.0/include /gnu/store/l9l8ssnl2yfi7v9szkkadd0s8d3fxw0z-gcc-8.2.0-lib/lib/gcc/x86_64-unknown-linux-gnu/8.2.0/include-fixed
 /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include
End of search list.


Alright. That is all! Thanks in advance.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]