Subject: bug#35691: [bug-guix] remote configure failure due to bad pathnames for crt*.o

From: Ludovic Courtès <[email-masked]>
Date: Thu, 16 May 2019 11:52:36 +0200

Hi Nelson,

"Nelson H. F. Beebe" <[email-masked]> skribis:

> Even after that major update, and reboot, I still find that, from a
> remote ssh connection, configure fails to find a C compiler, because
> of the faulty construction of the path to crt1.o.

I cannot reproduce the problem.  With ‘guix environment’, as show below,
I build an isolated environment that contains nothing but
‘gcc-toolchain’ and Bash:

--8<---------------cut here---------------start------------->8---
$ guix environment --ad-hoc -C gcc-toolchain
[env]$ echo 'int main() { }' > t.c
[env]$ gcc t.c
[env]$ ./a.out
--8<---------------cut here---------------end--------------->8---

As you can see, I can compile and link in that environment.

This environment defines PATH, CPATH, and LIBRARY_PATH appropriately:

--8<---------------cut here---------------start------------->8---
$ guix environment --ad-hoc -C gcc-toolchain grep coreutils
[env]$ env | grep PATH
CPATH=/gnu/store/26ng85mn5rs22cw654bvh62wh0yjx89h-profile/include
LIBRARY_PATH=/gnu/store/26ng85mn5rs22cw654bvh62wh0yjx89h-profile/lib
PATH=/gnu/store/26ng85mn5rs22cw654bvh62wh0yjx89h-profile/bin:/gnu/store/26ng85mn5rs22cw654bvh62wh0yjx89h-profile/sbin
--8<---------------cut here---------------end--------------->8---

Can you check the value of CPATH and LIBRARY_PATH in your user shell?

What does ‘guix package --search-paths’ return?

(See also the bits about search paths and ~/.guix-profile/etc/profile at
<https://gnu.org/software/guix/manual/en/html_node/Invoking-guix-package.html>.)

HTH,
Ludo’.