all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#32131: ghc fails to compile packages when installed into profile
@ 2018-07-12  5:12 Anonymous
  2018-07-12 15:58 ` Ludovic Courtès
  2023-09-22 16:13 ` Simon Tournier
  0 siblings, 2 replies; 4+ messages in thread
From: Anonymous @ 2018-07-12  5:12 UTC (permalink / raw)
  To: 32131

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.

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

* bug#32131: ghc fails to compile packages when installed into profile
  2018-07-12  5:12 bug#32131: ghc fails to compile packages when installed into profile Anonymous
@ 2018-07-12 15:58 ` Ludovic Courtès
  2018-07-12 16:20   ` Hogenson, Raymond E (334H-Affiliate)
  2023-09-22 16:13 ` Simon Tournier
  1 sibling, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2018-07-12 15:58 UTC (permalink / raw)
  To: Anonymous; +Cc: 32131

Hello,

Anonymous <mcrfan96@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’.

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

* bug#32131: ghc fails to compile packages when installed into profile
  2018-07-12 15:58 ` Ludovic Courtès
@ 2018-07-12 16:20   ` Hogenson, Raymond E (334H-Affiliate)
  0 siblings, 0 replies; 4+ messages in thread
From: Hogenson, Raymond E (334H-Affiliate) @ 2018-07-12 16:20 UTC (permalink / raw)
  To: Ludovic Court=C3=A8s; +Cc: 32131

On 7/12/18, 8:59 AM, "Ludovic Court=C3=A8s" <ludo@gnu.org> wrote:
> Hello,
>
> Anonymous <mcrfan96@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.

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

* bug#32131: ghc fails to compile packages when installed into profile
  2018-07-12  5:12 bug#32131: ghc fails to compile packages when installed into profile Anonymous
  2018-07-12 15:58 ` Ludovic Courtès
@ 2023-09-22 16:13 ` Simon Tournier
  1 sibling, 0 replies; 4+ messages in thread
From: Simon Tournier @ 2023-09-22 16:13 UTC (permalink / raw)
  To: Anonymous; +Cc: 32131-done

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@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




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

end of thread, other threads:[~2023-09-22 16:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-12  5:12 bug#32131: ghc fails to compile packages when installed into profile Anonymous
2018-07-12 15:58 ` Ludovic Courtès
2018-07-12 16:20   ` Hogenson, Raymond E (334H-Affiliate)
2023-09-22 16:13 ` Simon Tournier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.