GNU bug report logs -
#57116
cling: missing some system header files
Previous Next
To reply to this bug, email your comments to 57116 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#57116
; Package
guix
.
(Wed, 10 Aug 2022 12:31:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Gang Liang <randomizedthinking <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Wed, 10 Aug 2022 12:31:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I had a fresh installation of cling from guix, and got the following
error. Seems some system headers are missing.
Tried it on two machines, and both had the same problem.
****************** CLING ******************
* Type C++ code and press enter to run it *
* Type .q to exit *
*******************************************
[cling]$ #include <iostream>
In file included from input_line_3:1:
In file included from
/gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/include/c++/iostream:39:
In file included from
/gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/include/c++/ostream:38:
In file included from
/gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/include/c++/ios:42:
In file included from
/gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/include/c++/bits/ios_base.h:41:
In file included from
/gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/include/c++/bits/locale_classes.h:40:
In file included from
/gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/include/c++/string:55:
In file included from
/gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/include/c++/bits/basic_string.h:6545:
In file included from
/gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/include/c++/ext/string_conversions.h:44:
In file included from
/gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/include/c++/cerrno:42:
In file included from
/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/include/errno.h:28:
/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/include/bits/errno.h:26:11:
fatal error: 'linux/errno.h' file not found
# include <linux/errno.h>
^~~~~~~~~~~~~~~
Information forwarded
to
bug-guix <at> gnu.org
:
bug#57116
; Package
guix
.
(Thu, 11 Aug 2022 06:18:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 57116 <at> debbugs.gnu.org (full text, mbox):
Am Dienstag, dem 09.08.2022 um 15:32 -0700 schrieb Gang Liang:
> I had a fresh installation of cling from guix, and got the following
> error. Seems some system headers are missing.
You probably need gcc-toolchain installed alongside cling.
HTH
Information forwarded
to
bug-guix <at> gnu.org
:
bug#57116
; Package
guix
.
(Sat, 03 Sep 2022 04:26:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 57116 <at> debbugs.gnu.org (full text, mbox):
Hello,
Liliana Marie Prikler <liliana.prikler <at> ist.tugraz.at> writes:
> Am Dienstag, dem 09.08.2022 um 15:32 -0700 schrieb Gang Liang:
>> I had a fresh installation of cling from guix, and got the following
>> error. Seems some system headers are missing.
> You probably need gcc-toolchain installed alongside cling.
Indeed:
$ guix shell --pure cling -- cling '#include <iostream>'
In file included from input_line_3:1:
In file included from /gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/include/c++/iostream:39:
In file included from /gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/include/c++/ostream:38:
In file included from /gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/include/c++/ios:42:
In file included from /gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/include/c++/bits/ios_base.h:41:
In file included from /gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/include/c++/bits/locale_classes.h:40:
In file included from /gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/include/c++/string:55:
In file included from /gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/include/c++/bits/basic_string.h:6545:
In file included from /gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/include/c++/ext/string_conversions.h:44:
In file included from /gnu/store/069aq2v993kpc41yabp5b6vm4wb9jkhg-gcc-10.3.0/include/c++/cerrno:42:
In file included from /gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/include/errno.h:28:
/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/include/bits/errno.h:26:11: fatal error: 'linux/errno.h' file not found
# include <linux/errno.h>
^~~~~~~~~~~~~~~
But:
$ guix shell --pure cling gcc-toolchain -- cling '#include <iostream>'
runs fine.
I tried this:
--8<---------------cut here---------------start------------->8---
modified gnu/packages/llvm.scm
@@ -79,6 +79,12 @@ (define-module (gnu packages llvm)
#:export (make-lld-wrapper
system->llvm-target))
+;;; Lazily resolve to avoid top-level cycles between modules.
+(define gcc-toolchain*
+ (delay (module-ref (resolve-interface '(gnu packages commencement))
+ 'gcc-toolchain)))
+
+
(define* (system->llvm-target #:optional
(system (or (and=> (%current-target-system)
gnu-triplet->nix-system)
@@ -2215,11 +2221,25 @@ (define-public cling
(add-after 'install 'delete-static-libraries
;; This reduces the size from 17 MiB to 5.4 MiB.
(lambda _
- (for-each delete-file (find-files #$output "\\.a$")))))))
+ (for-each delete-file (find-files #$output "\\.a$"))))
+ (add-after 'install 'wrap-cling
+ ;; Wrap the 'cling' command so that it can locate the GCC
+ ;; toolchain provided headers. Use 'suffix so as to allow users
+ ;; to override which headers are used.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (define gcc-toolchain #$(this-package-input "gcc-toolchain"))
+ (wrap-program (search-input-file outputs "bin/cling")
+ `("C_INCLUDE_PATH" suffix
+ (,(string-append gcc-toolchain "/include")))
+ `("CPLUS_INCLUDE_PATH" suffix
+ (,(string-append gcc-toolchain "/include/c++")
+ ,(string-append gcc-toolchain "/include")))
+ `("LIBRARY_PATH" suffix
+ (,(string-append gcc-toolchain "/lib")))))))))
(native-inputs
(list python python-lit))
(inputs
- (list clang-cling llvm-cling))
+ (list clang-cling (force gcc-toolchain*) llvm-cling))
(home-page "https://root.cern/cling/")
(synopsis "Interactive C++ interpreter")
(description "Cling is an interactive C++17 standard compliant
--8<---------------cut here---------------end--------------->8---
but it gave:
--8<---------------cut here---------------start------------->8---
/gnu/store/lpwfmh4v2w2qbpdmmva0si32c9havn95-llvm-cling-9.0.1/lib/libLLVM-9.so(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x1a)[0x7f76e20ea81a]
/gnu/store/lpwfmh4v2w2qbpdmmva0si32c9havn95-llvm-cling-9.0.1/lib/libLLVM-9.so(_ZN4llvm3sys17RunSignalHandlersEv+0x34)[0x7f76e20e8894]
/gnu/store/lpwfmh4v2w2qbpdmmva0si32c9havn95-llvm-cling-9.0.1/lib/libLLVM-9.so(+0x7129c2)[0x7f76e20e89c2]
/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/libpthread.so.0(+0x11d80)[0x7f76e6c3fd80]
/gnu/store/094bbaq6glba86h1d4cj16xhdi6fk2jl-gcc-10.3.0-lib/lib/libstdc++.so.6(_ZTVN10__cxxabiv120__si_class_type_infoE+0x10)[0x7f76e19c0c78]
Stack dump:
0. Program arguments: /gnu/store/x48h88ckmkk5vh9g36d2cnmhw23x9ql5-profile/bin/cling #include <iostream>
--8<---------------cut here---------------end--------------->8---
I'm not sure why.
Should we close it as 'notabug', or persist with the attempt to wrap the
cling binary with the include paths required to ease its setup?
Thanks,
Maxim
Information forwarded
to
bug-guix <at> gnu.org
:
bug#57116
; Package
guix
.
(Sat, 03 Sep 2022 09:49:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 57116 <at> debbugs.gnu.org (full text, mbox):
Hi,
On Sat, 03 Sep 2022 at 00:25, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> wrote:
> Should we close it as 'notabug', or persist with the attempt to wrap the
> cling binary with the include paths required to ease its setup?
From my understanding about what cling is, we have a similar issue with
some others packages. Bigloo does not work out of the box [1]:
--8<---------------cut here---------------start------------->8---
$ guix shell -C bigloo libunistring gcc-toolchain libgc pcre \
-- bigloo /tmp/myfile.scm
--8<---------------cut here---------------end--------------->8---
Idem for ghc (Haskell) which requires gcc-toolchain. And I proposed [2]
to have <X>-toolchain for a ready-to-use X compiling toolsuite where
could be cling, ghc, bigloo, etc.
For instance, Debian has haskell-platform which includes all a regular
user needs for a regular Haskell development setup. And we already
provide gcc-toolchain or clang-toolchain, or even gfortan-toolcahin,
gdc-toolchain, piet-toolchain, etc. Therefore, we could also have
the package cling-toolchain propagating all the required packages that
we currently have to manually specify i.e. gcc-toolchain.
WDYT?
1: https://yhetil.org/guix/878rp3bs1a.fsf <at> gmail.com
2: https://yhetil.org/guix/CAJ3okZ0i0DjQMzgJ9WwzDC2tKc8WeTZxqW46KH+vq9zKbgBzhQ <at> mail.gmail.com
Cheers,
simon
Information forwarded
to
bug-guix <at> gnu.org
:
bug#57116
; Package
guix
.
(Sat, 03 Sep 2022 18:13:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 57116 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 03-09-2022 11:43, zimoun wrote:
> Hi,
>
> On Sat, 03 Sep 2022 at 00:25, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> wrote:
>
>> Should we close it as 'notabug', or persist with the attempt to wrap the
>> cling binary with the include paths required to ease its setup?
> From my understanding about what cling is, we have a similar issue with
> some others packages. Bigloo does not work out of the box [1]:
>
> --8<---------------cut here---------------start------------->8---
> $ guix shell -C bigloo libunistring gcc-toolchain libgc pcre \
> -- bigloo /tmp/myfile.scm
> --8<---------------cut here---------------end--------------->8---
>
> Idem for ghc (Haskell) which requires gcc-toolchain. And I proposed [2]
> to have <X>-toolchain for a ready-to-use X compiling toolsuite where
> could be cling, ghc, bigloo, etc.
>
> For instance, Debian has haskell-platform which includes all a regular
> user needs for a regular Haskell development setup. And we already
> provide gcc-toolchain or clang-toolchain, or even gfortan-toolcahin,
> gdc-toolchain, piet-toolchain, etc. Therefore, we could also have
> the package cling-toolchain propagating all the required packages that
> we currently have to manually specify i.e. gcc-toolchain.
>
> WDYT?
>
>
> 1: https://yhetil.org/guix/878rp3bs1a.fsf <at> gmail.com
> 2: https://yhetil.org/guix/CAJ3okZ0i0DjQMzgJ9WwzDC2tKc8WeTZxqW46KH+vq9zKbgBzhQ <at> mail.gmail.com
I do not see any problems with a X-toolchain (with X=cling,ghc,bigloo,
...) and they appear to be convenient.
I'd say, go for it.
Greetings,
Maxime.
[OpenPGP_0x49E3EE22191725EE.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#57116
; Package
guix
.
(Tue, 06 Sep 2022 11:49:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 57116 <at> debbugs.gnu.org (full text, mbox):
Hi,
Maxime Devos <maximedevos <at> telenet.be> writes:
> On 03-09-2022 11:43, zimoun wrote:
>> Hi,
>>
>> On Sat, 03 Sep 2022 at 00:25, Maxim Cournoyer <maxim.cournoyer <at> gmail.com> wrote:
>>
>>> Should we close it as 'notabug', or persist with the attempt to wrap the
>>> cling binary with the include paths required to ease its setup?
>> From my understanding about what cling is, we have a similar issue with
>> some others packages. Bigloo does not work out of the box [1]:
>>
>> --8<---------------cut here---------------start------------->8---
>> $ guix shell -C bigloo libunistring gcc-toolchain libgc pcre \
>> -- bigloo /tmp/myfile.scm
>> --8<---------------cut here---------------end--------------->8---
>>
>> Idem for ghc (Haskell) which requires gcc-toolchain. And I proposed [2]
>> to have <X>-toolchain for a ready-to-use X compiling toolsuite where
>> could be cling, ghc, bigloo, etc.
>>
>> For instance, Debian has haskell-platform which includes all a regular
>> user needs for a regular Haskell development setup. And we already
>> provide gcc-toolchain or clang-toolchain, or even gfortan-toolcahin,
>> gdc-toolchain, piet-toolchain, etc. Therefore, we could also have
>> the package cling-toolchain propagating all the required packages that
>> we currently have to manually specify i.e. gcc-toolchain.
>>
>> WDYT?
>>
>>
>> 1: https://yhetil.org/guix/878rp3bs1a.fsf <at> gmail.com
>> 2: https://yhetil.org/guix/CAJ3okZ0i0DjQMzgJ9WwzDC2tKc8WeTZxqW46KH+vq9zKbgBzhQ <at> mail.gmail.com
>
> I do not see any problems with a X-toolchain (with X=cling,ghc,bigloo,
> ...) and they appear to be convenient.
>
> I'd say, go for it.
In the case of cling, I'm not sure if that'd be adapted to the use case
(you don't really use cling as a toolchain, but as a REPL to try things
interactively), but otherwise I don't see any cons to being able to do
that.
Thanks,
Maxim
This bug report was last modified 2 years and 289 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.