GNU bug report logs -
#34850
ghc compiling error
Previous Next
Reported by: mikadoZero <mikadozero <at> yandex.com>
Date: Wed, 13 Mar 2019 22:32:01 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 34850 in the body.
You can then email your comments to 34850 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#34850
; Package
guix
.
(Wed, 13 Mar 2019 22:32:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
mikadoZero <mikadozero <at> yandex.com>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Wed, 13 Mar 2019 22:32:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
`guix describe`
guix fd4c7a0
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: fd4c7a098a508c1de7a8513c0f3d88d5a0df12e7
I have ghc in my system configuration file. I have just done a pull and
reconfigure.
`which ghc`
/run/current-system/profile/bin/ghc
I created a one line hello world program:
```haskell
main = putStrLn "hello, world"
```
Then I tried to compile it with ghc. I get this error.
`ghc Main`
[1 of 1] Compiling Main ( Main.hs, Main.o )
gcc: error trying to exec 'as': execvp: No such file or directory
`gcc' failed in phase `Assembler'. (Exit code: 1)
I have tested compiling the same hello world program with the same ghc
command and it works fine on a none Guix System.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#34850
; Package
guix
.
(Wed, 13 Mar 2019 22:49:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 34850 <at> debbugs.gnu.org (full text, mbox):
mikadoZero,
mikadoZero wrote:
> `guix describe`
> guix fd4c7a0
> repository URL: https://git.savannah.gnu.org/git/guix.git
> branch: master
> commit: fd4c7a098a508c1de7a8513c0f3d88d5a0df12e7
>
> I have ghc in my system configuration file. I have just done a
> pull and
> reconfigure.
>
> `which ghc`
> /run/current-system/profile/bin/ghc
>
> I created a one line hello world program:
>
> ```haskell
> main = putStrLn "hello, world"
> ```
>
> Then I tried to compile it with ghc. I get this error.
>
> `ghc Main`
> [1 of 1] Compiling Main ( Main.hs, Main.o )
> gcc: error trying to exec 'as': execvp: No such file or
> directory
> `gcc' failed in phase `Assembler'. (Exit code: 1)
>
> I have tested compiling the same hello world program with the
> same ghc
> command and it works fine on a none Guix System.
Does the other system have ‘as’ installed? Install the
‘gcc-toolchain’ package that provides it and try again.
Usually, this kind of error means that ghc needs to be patched to
invoke ‘as’ from an absolute file name instead of searching $PATH.
There may have been good reasons not to do this (such as closure
size), or it might be an oversight.
Kind regards,
T G-R
Information forwarded
to
bug-guix <at> gnu.org
:
bug#34850
; Package
guix
.
(Thu, 14 Mar 2019 01:29:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 34850 <at> debbugs.gnu.org (full text, mbox):
Tobias Geerinckx-Rice writes:
> mikadoZero,
>
> mikadoZero wrote:
>> `guix describe`
>> guix fd4c7a0
>> repository URL: https://git.savannah.gnu.org/git/guix.git
>> branch: master
>> commit: fd4c7a098a508c1de7a8513c0f3d88d5a0df12e7
>>
>> I have ghc in my system configuration file. I have just done a pull
>> and
>> reconfigure.
>>
>> `which ghc`
>> /run/current-system/profile/bin/ghc
>>
>> I created a one line hello world program:
>>
>> ```haskell
>> main = putStrLn "hello, world"
>> ```
>>
>> Then I tried to compile it with ghc. I get this error.
>>
>> `ghc Main` [1 of 1] Compiling Main
>> ( Main.hs, Main.o )
>> gcc: error trying to exec 'as': execvp: No such file or directory
>> `gcc' failed in phase `Assembler'. (Exit code: 1)
>>
>> I have tested compiling the same hello world program with the same
>> ghc
>> command and it works fine on a none Guix System.
>
> Does the other system have ‘as’ installed? Install the
> ‘gcc-toolchain’ package that provides it and try again.
>
> Usually, this kind of error means that ghc needs to be patched to
> invoke ‘as’ from an absolute file name instead of searching
> $PATH. There may have been good reasons not to do this (such as
> closure size), or it might be an oversight.
>
> Kind regards,
>
> T G-R
Thank you for the suggestion to install `gcc-toolchain`. It addresses
that error. The next error I ran into was:
[1 of 1] Compiling Main ( Main.hs, Main.o )
Linking Main ...
In file included from /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include
/errno.h:28:0: error:
0,
from /gnu/store/8v1sn5ns7r5n02aip0b0ypyyzb2y1i1a-ghc-8.4.3/lib/
ghc-8.4.3/include/rts/OSThreads.h:28,
from /gnu/store/8v1sn5ns7r5n02aip0b0ypyyzb2y1i1a-ghc-8.4.3/lib/
ghc-8.4.3/include/Rts.h:168,
from /tmp/ghc29485_0/ghc_4.c:1:
/gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/bits/errno.h:26:26: e
rror:
fatal error: linux/errno.h: No such file or directory
|
26 | # include <linux/errno.h>
| ^
compilation terminated.
`gcc' failed in phase `C Compiler'. (Exit code: 1)
First I tried adding glibc to my system configuration and reconfiguration.
That did not work.
This is what got it to work.
* Create a user manifest that includes ghc, gcc-toolchain, glibc
* Run `guix package --manifest=manifest.scm`
* Add exports from package output to .zprofile
* `source .zprofile`
# Questions
I used package search to search for `as`. I could not find it. Thanks
to the tip from Tobias Geerinckx-Rice I know it is in `gcc-toolchain`.
But when I look at `gcc-toolchain` there is no mention of `as` the
program in the synopsis, description or dependencies. Is there a better
way to search for a program that is part of a larger package like this?
ghc, gcc-toolchain and glibc needed to be in a user manifest. When does
a package need to be in a user manifest for it to work?
gcc-toolchain and glibc in a user manifest where required as
dependencies for ghc. Should this be noted in the ghc package
description?
Information forwarded
to
bug-guix <at> gnu.org
:
bug#34850
; Package
guix
.
(Fri, 22 Sep 2023 16:46:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 34850 <at> debbugs.gnu.org (full text, mbox):
Hi,
It is about this old bug #34850 [1].
1: https://issues.guix.gnu.org/issue/34850
On Wed, 13 Mar 2019 at 21:27, mikadoZero <mikadozero <at> yandex.com> wrote:
>>> `guix describe`
>>> guix fd4c7a0
>>> repository URL: https://git.savannah.gnu.org/git/guix.git
>>> branch: master
>>> commit: fd4c7a098a508c1de7a8513c0f3d88d5a0df12e7
[...]
>>> ```haskell
>>> main = putStrLn "hello, world"
>>> ```
>>>
>>> Then I tried to compile it with ghc. I get this error.
>>>
>>> `ghc Main` [1 of 1] Compiling Main
>>> ( Main.hs, Main.o )
>>> gcc: error trying to exec 'as': execvp: No such file or directory
>>> `gcc' failed in phase `Assembler'. (Exit code: 1)
Using recent Guix, I get:
--8<---------------cut here---------------start------------->8---
$ guix describe
Generation 28 Sep 06 2023 14:54:50 (current)
guix 6113e05
repository URL: https://git.savannah.gnu.org/git/guix.git
commit: 6113e0529d61df7425f64e30a6bf77f7cfdfe5a5
$ echo 'main = putStrLn "hello, world"' > foo.hs
$ cat foo.hs
main = putStrLn "hello, world"
$ guix shell -C ghc gcc-toolchain -- ghc foo.hs
[1 of 1] Compiling Main ( foo.hs, foo.o )
Linking foo ...
$ ./foo
hello, world
--8<---------------cut here---------------end--------------->8---
Can we close this bug report? Do you still have that issue?
Cheers,
simon
Reply sent
to
Simon Tournier <zimon.toutoune <at> gmail.com>
:
You have taken responsibility.
(Fri, 22 Sep 2023 16:49:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
mikadoZero <mikadozero <at> yandex.com>
:
bug acknowledged by developer.
(Fri, 22 Sep 2023 16:49:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 34850-done <at> debbugs.gnu.org (full text, mbox):
Re,
On Fri, 22 Sep 2023 at 18:09, Simon Tournier <zimon.toutoune <at> gmail.com> wrote:
> Can we close this bug report?
I get back:
--8<---------------cut here---------------start------------->8---
Address not found
Your message wasn't delivered to mikadozero <at> yandex.com because the address couldn't be found or is unable to receive email.
The response from the remote server was:
--8<---------------cut here---------------end--------------->8---
Therefore, closing.
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:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 202 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.