unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* CPATH and GCC
@ 2019-01-28 23:43 brettg
  0 siblings, 0 replies; 2+ messages in thread
From: brettg @ 2019-01-28 23:43 UTC (permalink / raw)
  To: help-guix

Hi all.

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

brettg@guixsd ~/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

brettg@guixsd ~/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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: CPATH and GCC
@ 2019-01-29  5:04 brettg
  0 siblings, 0 replies; 2+ messages in thread
From: brettg @ 2019-01-29  5:04 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 2327 bytes --]

Ignore this. I realized my silly mistake.
Sent from my Sprint Phone.
------ Original message------From: brettg@posteo.netDate: Mon, Jan 28, 2019 5:45 PMTo: help-guix;Cc: Subject:CPATH and GCC
Hi all.

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

brettg@guixsd ~/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 
           ^~~~~~~~~~~~~
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

brettg@guixsd ~/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.


[-- Attachment #2: Type: text/html, Size: 2914 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-29  5:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-28 23:43 CPATH and GCC brettg
  -- strict thread matches above, loose matches on Subject: below --
2019-01-29  5:04 brettg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).