From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 13 21:28:28 2019 Received: (at 34850) by debbugs.gnu.org; 14 Mar 2019 01:28:28 +0000 Received: from localhost ([127.0.0.1]:42655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h4FAa-00019J-Bu for submit@debbugs.gnu.org; Wed, 13 Mar 2019 21:28:28 -0400 Received: from forward106p.mail.yandex.net ([77.88.28.109]:36665) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h4FAW-000190-EY for 34850@debbugs.gnu.org; Wed, 13 Mar 2019 21:28:26 -0400 Received: from mxback17j.mail.yandex.net (mxback17j.mail.yandex.net [IPv6:2a02:6b8:0:1619::93]) by forward106p.mail.yandex.net (Yandex) with ESMTP id 65CC91C806A7; Thu, 14 Mar 2019 04:28:16 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback17j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 9E1HAAGnhh-SGTCvL37; Thu, 14 Mar 2019 04:28:16 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1552526896; bh=m45wJhFkzdXCtJFk1RDYvlkJfwXYHckVbF2VQXEmNgI=; h=In-reply-to:Subject:Cc:To:From:Date:References:Message-ID; b=JaAw7AgVMZVz//+ycWjAUBCFB5bKvvpM16bNAxf4+eG8Z7GJG2Vl6iZrggGit3ZpC auZjW8FvlTtulYhYEu5d+LXlZ4iJYXze1NSpzFiGufSCtgc/xeNCQp8CyZyPRsyl3f dUudm5m8uRF7+7qnV00KzjUQELDn11O8Orw9HFyQ= Authentication-Results: mxback17j.mail.yandex.net; dkim=pass header.i=@yandex.com Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id W7fG9DVSVB-SEp4W8Jm; Thu, 14 Mar 2019 04:28:14 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) References: <87tvg64chq.fsf@nckx> User-agent: mu4e 1.0; emacs 26.1 From: mikadoZero To: Tobias Geerinckx-Rice Subject: Re: bug#34850: ghc compiling error In-reply-to: <87tvg64chq.fsf@nckx> Date: Wed, 13 Mar 2019 21:27:54 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 34850 Cc: 34850@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) 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 =3D 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 =E2=80=98as=E2=80=99 installed? Install the > =E2=80=98gcc-toolchain=E2=80=99 package that provides it and try again. > > Usually, this kind of error means that ghc needs to be patched to > invoke =E2=80=98as=E2=80=99 from an absolute file name instead of searchi= ng > $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.2= 8/include /errno.h:28:0: error:=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 0, from /gnu/store/8v1sn5ns7r5n02aip0b0ypyyzb2y1i1a-ghc-8= .4.3/lib/ ghc-8.4.3/include/rts/OSThreads.h:28,=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20 from /gnu/store/8v1sn5ns7r5n02aip0b0ypyyzb2y1i1a-ghc-8= .4.3/lib/ ghc-8.4.3/include/Rts.h:168,=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 from /tmp/ghc29485_0/ghc_4.c:1: /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/include/bits/errno.h= :26:26: e rror:=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20 fatal error: linux/errno.h: No such file or directory | 26 | # include | ^ 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=3Dmanifest.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?