GNU bug report logs - #32131
ghc fails to compile packages when installed into profile

Previous Next

Package: guix;

Reported by: Anonymous <mcrfan96 <at> cock.li>

Date: Thu, 12 Jul 2018 05:28:02 UTC

Severity: normal

Done: Simon Tournier <zimon.toutoune <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 32131 in the body.
You can then email your comments to 32131 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#32131; Package guix. (Thu, 12 Jul 2018 05:28:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Anonymous <mcrfan96 <at> cock.li>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 12 Jul 2018 05:28:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Anonymous <mcrfan96 <at> cock.li>
To: bug-guix <at> gnu.org
Subject: ghc fails to compile packages when installed into profile
Date: Wed, 11 Jul 2018 22:12:54 -0700
This bug can be reproduced by doing

    guix package -i ghc
    echo 'main=return()' > test.hs
    ghc test.hs

The expected output is that the program will be compiled, but instead we 
get the error message

    gcc: error trying to exec 'as': execvp: No such file or directory
    `gcc' failed in phase `C Compiler'. (Exit code: 1)

The error is caused, of course, by as not being found in the path. 
Interestingly, though, the error occurs in gcc, which fails to find as. 
The general path for compiling things with gcc is to use gcc-toolchain, 
which brings as and others into the profile, but as ghc calls gcc 
directly (with no gcc-toolchain), ghc fails to actually compile anything.





Information forwarded to bug-guix <at> gnu.org:
bug#32131; Package guix. (Thu, 12 Jul 2018 16:00:02 GMT) Full text and rfc822 format available.

Message #8 received at 32131 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Anonymous <mcrfan96 <at> cock.li>
Cc: 32131 <at> debbugs.gnu.org
Subject: Re: bug#32131: ghc fails to compile packages when installed into
 profile
Date: Thu, 12 Jul 2018 17:58:55 +0200
Hello,

Anonymous <mcrfan96 <at> cock.li> skribis:

> This bug can be reproduced by doing
>
>     guix package -i ghc
>     echo 'main=return()' > test.hs
>     ghc test.hs
>
> The expected output is that the program will be compiled, but instead
> we get the error message
>
>     gcc: error trying to exec 'as': execvp: No such file or directory
>     `gcc' failed in phase `C Compiler'. (Exit code: 1)
>
> The error is caused, of course, by as not being found in the
> path. Interestingly, though, the error occurs in gcc, which fails to
> find as. The general path for compiling things with gcc is to use
> gcc-toolchain, which brings as and others into the profile, but as ghc
> calls gcc directly (with no gcc-toolchain), ghc fails to actually
> compile anything.

Indeed.  Does running:

  guix package -i glibc binutils ld-wrapper

help?

Regardless I agree that it should just work.

Thanks for reporting the issue,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#32131; Package guix. (Thu, 12 Jul 2018 16:29:02 GMT) Full text and rfc822 format available.

Message #11 received at 32131 <at> debbugs.gnu.org (full text, mbox):

From: "Hogenson, Raymond E (334H-Affiliate)" <mcrfan96 <at> cock.li>
To: Ludovic Court=C3=A8s <ludo <at> gnu.org>
Cc: 32131 <at> debbugs.gnu.org
Subject: Re: bug#32131: ghc fails to compile packages when installed into
 profile
Date: Thu, 12 Jul 2018 09:20:08 -0700
On 7/12/18, 8:59 AM, "Ludovic Court=C3=A8s" <ludo <at> gnu.org> wrote:
> Hello,
>
> Anonymous <mcrfan96 <at> cock.li> skribis:
>
> [...]
>
> Indeed.  Does running:
>
>   guix package -i glibc binutils ld-wrapper
>
> help?

Actually, it does not. Doing that, I get the error

    ld: cannot find crt1.o: No such file or directory
    ld: cannot find crti.o: No such file or directory
    collect2: error: ld returned 1 exit status
    `gcc' failed in phase `Linker'. (Exit code: 1)

However, if I also set

    LIBRARY_PATH=<path to glibc>/lib

then compilation proceeds just fine. It seems like just bringing glibc
into the profile does not correctly set LIBRARY_PATH.






Reply sent to Simon Tournier <zimon.toutoune <at> gmail.com>:
You have taken responsibility. (Fri, 22 Sep 2023 16:46:02 GMT) Full text and rfc822 format available.

Notification sent to Anonymous <mcrfan96 <at> cock.li>:
bug acknowledged by developer. (Fri, 22 Sep 2023 16:46:02 GMT) Full text and rfc822 format available.

Message #16 received at 32131-done <at> debbugs.gnu.org (full text, mbox):

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: Anonymous <mcrfan96 <at> cock.li>
Cc: 32131-done <at> debbugs.gnu.org
Subject: Re: bug#32131: ghc fails to compile packages when installed into
 profile
Date: Fri, 22 Sep 2023 18:13:33 +0200
Hi,

This old bug #32131,

    https://issues.guix.gnu.org/issue/32131

is not a bug.  It is because gcc-toolchain is missing.

On Wed, 11 Jul 2018 at 22:12, Anonymous <mcrfan96 <at> cock.li> wrote:
> This bug can be reproduced by doing
>
>     guix package -i ghc
>     echo 'main=return()' > test.hs
>     ghc test.hs
>
> The expected output is that the program will be compiled, but instead we get
> the error message

--8<---------------cut here---------------start------------->8---
$ echo 'main=return()' > test.hs

$ guix shell -C ghc gcc-toolchain -- ghc test.hs
[1 of 1] Compiling Main             ( test.hs, test.o )
Linking test ...

$ ./test
--8<---------------cut here---------------end--------------->8---

Closing.  Let me know if I am missing something.

Cheers,
simon




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 21 Oct 2023 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 188 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.