Received: (at 36973) by debbugs.gnu.org; 8 Aug 2019 09:43:25 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 08 05:43:25 2019 Received: from localhost ([127.0.0.1]:39917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1hvexB-0001MY-Bu for submit <at> debbugs.gnu.org; Thu, 08 Aug 2019 05:43:25 -0400 Received: from flashner.co.il ([178.62.234.194]:51602) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <efraim@HIDDEN>) id 1hvex9-0001ML-A7 for 36973 <at> debbugs.gnu.org; Thu, 08 Aug 2019 05:43:23 -0400 Received: from localhost (unknown [31.210.177.218]) by flashner.co.il (Postfix) with ESMTPSA id 250674020B for <36973 <at> debbugs.gnu.org>; Thu, 8 Aug 2019 09:43:17 +0000 (UTC) Date: Thu, 8 Aug 2019 12:43:15 +0300 From: Efraim Flashner <efraim@HIDDEN> To: 36973 <at> debbugs.gnu.org Subject: Re: bug#36973: NativeCall doesn't work with rakudo ? Message-ID: <20190808094315.GC5507@E2140> References: <20190807153311.GA8932@HIDDEN> <20190808093151.GB5507@E2140> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="TybLhxa8M7aNoW+V" Content-Disposition: inline In-Reply-To: <20190808093151.GB5507@E2140> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 User-Agent: Mutt/1.12.1 (2019-06-15) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 36973 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --TybLhxa8M7aNoW+V Content-Type: multipart/mixed; boundary="UPT3ojh+0CqEDtpF" Content-Disposition: inline --UPT3ojh+0CqEDtpF Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable forgot the two attachments --=20 Efraim Flashner <efraim@HIDDEN> =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --UPT3ojh+0CqEDtpF Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="sdl.p6" use SDL2::Raw; die "couldn't initialize SDL2: { SDL_GetError }" if SDL_Init(VIDEO) != 0; my $window = SDL_CreateWindow( "Hello, world!", SDL_WINDOWPOS_CENTERED_MASK, SDL_WINDOWPOS_CENTERED_MASK, 800, 600, OPENGL ); my $render = SDL_CreateRenderer($window, -1, ACCELERATED +| PRESENTVSYNC); my $event = SDL_Event.new; main: loop { SDL_SetRenderDrawColor($render, 0, 0, 0, 0); SDL_RenderClear($render); while SDL_PollEvent($event) { if $event.type == QUIT { last main; } } SDL_SetRenderDrawColor($render, 255, 255, 255, 255); SDL_RenderFillRect($render, SDL_Rect.new( 2 * min(now * 300 % 800, -now * 300 % 800), 2 * min(now * 470 % 600, -now * 470 % 600), sin(3 * now) * 50 + 80, cos(4 * now) * 50 + 60)); SDL_RenderPresent($render); } SDL_Quit; --UPT3ojh+0CqEDtpF Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="perl6-sdl2-raw.scm" (define-module (perl6-sdl2-raw) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix git-download) #:use-module (guix build-system rakudo) #:use-module (gnu packages perl6)) (define-public perl6-sdl2-raw (package (name "perl6-sdl2-raw") (version "0.3") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/timo/SDL2_Raw-p6.git") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "1h9g76bdps5aw14s6yxgnjfys9269vxiiq8728nrv8ccfynz64j3")))) (build-system rakudo-build-system) (home-page "https://github.com/timo/SDL2_Raw-p6") (synopsis "Sugar-free NativeCall binding for libSDL2") (description "Sugar-free NativeCall binding for libSDL2") (license license:artistic2.0))) perl6-sdl2-raw --UPT3ojh+0CqEDtpF-- --TybLhxa8M7aNoW+V Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl1L7qgACgkQQarn3Mo9 g1GRzhAAjjsI8r4xv7hpLhyzXKJTNcQGRxjg+qrWr7X/9uREpqeA2wHx25LIEpGf p7U/5F30d1HKXlnIL50UDkZDXRqKD3Er+KSOslHKDEaBx5CmLBS7enf3ZaQqLk5V ylyOxi8UCyvBAaiA0cyPxNA/c+vs25J/3A6OiGqkmsTc1oDD7BSj9FDgjRMygJPf ohzFWg7HoUTuLZ7GiHpuJjgz49JRztbmW02CKXMsZJU+Pn4VeHexLrmie/OhVZgq CdXHK3VTalDPD2TqzpPW/sQCXuMcq2I1ETpcwYXjK3Fbonav0oJdjpNYWqiGS9D8 zSduigo1H4FY9E8XKEGFdAsFEXDyNyguQqrCQlPMxcc+N43wBDmKRNk90rA/3WHA KOSE407EvUu9b+8FeUuSYGW2ouZnHKbL3aNbRnl4DaD4ZIiCID6n3JwQKrVmkjLV toHOcXA5u+y7tiLasLLPSdVWWd+bbpa0EPaFi5SzpMxqIknI10NkQuIr9/CHAT1r aTC/yf/JYnFpssC197+wuuvbyP2War+dLGsPLgosvVYyuLN//RaFSmzdS/yWE+1P s0kdUMtwdhh3vGXE8caB9p505ccYciDG+xZW2kFWcRcOp0aAprZ+ihWHlPpToBhe w4bSp8VTyvuSi1UKaj8YcELJSRmio0PeT5xj6r+tDU2jSAUZzI8= =LNEQ -----END PGP SIGNATURE----- --TybLhxa8M7aNoW+V--
bug-guix@HIDDEN
:bug#36973
; Package guix
.
Full text available.Received: (at submit) by debbugs.gnu.org; 8 Aug 2019 09:32:03 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 08 05:32:03 2019 Received: from localhost ([127.0.0.1]:39904 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1hvemA-00016M-IQ for submit <at> debbugs.gnu.org; Thu, 08 Aug 2019 05:32:03 -0400 Received: from lists.gnu.org ([209.51.188.17]:60325) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <efraim@HIDDEN>) id 1hvem7-00015w-64 for submit <at> debbugs.gnu.org; Thu, 08 Aug 2019 05:32:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50616) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from <efraim@HIDDEN>) id 1hvem5-0003sR-BM for bug-guix@HIDDEN; Thu, 08 Aug 2019 05:31:59 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <efraim@HIDDEN>) id 1hvem3-0003Jz-Ii for bug-guix@HIDDEN; Thu, 08 Aug 2019 05:31:57 -0400 Received: from flashner.co.il ([178.62.234.194]:50388) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <efraim@HIDDEN>) id 1hvem3-0003JE-93 for bug-guix@HIDDEN; Thu, 08 Aug 2019 05:31:55 -0400 Received: from localhost (unknown [31.210.177.218]) by flashner.co.il (Postfix) with ESMTPSA id 62A0A400F6; Thu, 8 Aug 2019 09:31:53 +0000 (UTC) Date: Thu, 8 Aug 2019 12:31:51 +0300 From: Efraim Flashner <efraim@HIDDEN> To: Marc Chantreux <marc.chantreux@HIDDEN> Subject: Re: NativeCall doesn't work with rakudo ? Message-ID: <20190808093151.GB5507@E2140> References: <20190807153311.GA8932@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="8P1HSweYDcXXzwPJ" Content-Disposition: inline In-Reply-To: <20190807153311.GA8932@HIDDEN> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 User-Agent: Mutt/1.12.1 (2019-06-15) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 178.62.234.194 X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: bug-guix@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) --8P1HSweYDcXXzwPJ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 07, 2019 at 05:33:11PM +0200, Marc Chantreux wrote: > hello, >=20 > i don't know if it's ok to report directly to the author, please excuse > me if it's not. It's definately not my first choice but I'm far more likely to respond to it than if you had just sent it to bug-guix or one of the other mailing lists :) I'm going to inline my notes >=20 > i installed the rakudo thru guix over a debian buster. (guix package -i rakudo) provides the 'perl6' binary and $GUIX_PROFILE/share/perl6 directory >=20 > AFAIR, i just installed >=20 > guix install perl6-zef sdl2 >=20 > in my ~/.zshenv, i have >=20 > export GUIX_PROFILE=3D~/.guix-profile > source $GUIX_PROFILE/etc/profile > path+=3D~/.guix-profile/bin > perl6lib+=3D( /home/mc/.guix-profile/share/perl6/lib(N) ) >=20 > then i "successfully" installed SDL2 with >=20 > zef install SDL2::Raw >=20 > i copied the example from this homepage (as attachement). >=20 > https://modules.perl6.org/dist/SDL2::Raw:cpan:TIMOTIMO and saved it as sdl.p6 >=20 > i have >=20 > locate -e libSDL2.so > /gnu/store/gyfg2rhnrny9z9gg6hwzjm13dpclr3v2-sdl2-2.0.9/lib/libSDL2.so > /usr/lib/x86_64-linux-gnu/libSDL2.so >=20 > but if i run (inside or outside a guix environment) (guix environment --ad-hoc rakudo perl6-zef sdl2 -- 'zef install \ SDL2::Raw && perl6 sdl.p6') >=20 > $GUIX_PROFILE/bin/perl6 sdl.p6 >=20 > i get >=20 > Cannot locate native library 'libSDL2.so': libSDL2.so: cannot open shar= ed object file: No such file or directory > in method setup at /gnu/store/in3wgq5mwwc6pqad92zzsay3ri86p6sn-rakudo-2= 019.03.1/share/perl6/sources/947BDAB9F96E0E5FCCB383124F923A6BF6F8D76B (Nati= veCall) line 287 > in method CALL-ME at /gnu/store/in3wgq5mwwc6pqad92zzsay3ri86p6sn-rakudo= -2019.03.1/share/perl6/sources/947BDAB9F96E0E5FCCB383124F923A6BF6F8D76B (Na= tiveCall) line 576 > in block <unit> at sdl.p6 line 3 >=20 I can confirm this, the is the same output that I got. efraim@bayfront ~$ find .perl6/ -name '*947BDAB9F96E0E5FCCB383124F923A6BF6F= 8D76B*' =2Eperl6/precomp/A7BEF869F222B0D8D2C76EF47E1D0480FFD6EA2C/94/947BDAB9F96E0E= 5FCCB383124F923A6BF6F8D76B.repo-id > i tested other Nativecall libs like sqlite and have the same problem. >=20 > thanks for any help you can provide to fix it. >=20 > regards > marc First of all I want to thank you for your report. (and I mean this seriously.) I packaged perl6 and rakudo (and a bunch of libraries working toward rakudo-star) after seeing a presentation at FOSDEM and I was curious. Unfortunately I have never used perl6 and we didn't have anyone who really knew much about it, so I used building packages successively as a test to see if everything seemed to work. Sometimes in Guix we end up with problems where everything works well in the build system, but binaries such as pip (the first one I can think of, although probably not pip) end up not working when used as a stand alone language package manager. =46rom reading through some back and forth from some Debian Developers and some perl6/rakudo people, I got the impression that there were a couple of different ways distro maintainers could distribute perl6 libraries. One way is the way I went, which is to, for each library, precompile it and then to mush (...join) them all together on the users machine, and this is what I went with. The other way was to distribute source, and at install time to recompile all the installed modules together so they'd all be in the target directory. This we can accomplish with profile hooks, and wouldn't be too bad, but I wanted to offload the building of the libraries and not have a time intensive profile hook to finally compile all the code. All this is nice, but it doesn't actually address the error above, which is that 'zef' apparently only knows to look for sources in /gnu/store/...-rakudo-../share/perl6/sources. It should at the very least be taught about profiles, and it would be nice to teach it about $HOME/.perl6 as well. In the interest of testing if making SDL2::Raw a guix package would help, I packaged it in a file (attached) and ran: guix package -f perl6-sdl2-raw.scm -i perl6-zef sdl2 rakudo cleared my $HOME/.perl6 folder and then re-ran perl6 sdl.p6 efraim@bayfront ~$ perl6 sdl.p6 =3D=3D=3DSORRY!=3D=3D=3D Could not find SDL2::Raw at line 1 in: inst#/home/efraim/.perl6 inst#/gnu/store/in3wgq5mwwc6pqad92zzsay3ri86p6sn-rakudo-2019.03.1/share= /perl6/site inst#/gnu/store/in3wgq5mwwc6pqad92zzsay3ri86p6sn-rakudo-2019.03.1/share= /perl6/vendor inst#/gnu/store/in3wgq5mwwc6pqad92zzsay3ri86p6sn-rakudo-2019.03.1/share= /perl6 ap# nqp# perl5# (this I believe is a separate issue, that perl6 doesn't know about our current environment) I then tried 'zef install SDL2::Raw' and re-ran 'perl6 sdl.p6' same error as above: efraim@bayfront ~$ perl6 sdl.p6 Cannot locate native library 'libSDL2.so': libSDL2.so: cannot open shared o= bject file: No such file or directory in method setup at /gnu/store/in3wgq5mwwc6pqad92zzsay3ri86p6sn-rakudo-201= 9.03.1/share/perl6/sources/947BDAB9F96E0E5FCCB383124F923A6BF6F8D76B (Native= Call) line 287 in method CALL-ME at /gnu/store/in3wgq5mwwc6pqad92zzsay3ri86p6sn-rakudo-2= 019.03.1/share/perl6/sources/947BDAB9F96E0E5FCCB383124F923A6BF6F8D76B (Nati= veCall) line 576 in block <unit> at sdl.p6 line 3 So here I'm a bit stumped. The resource 947... exists, in /gnu/store/...perl6-sdl2-raw-0.3/share/perl6/precomp and not in sources, and perl6 is only searching in rakudo/share/perl6 it seems. For another test, I copied my perl6-sdl2-raw package definition into the Guix source tree and ran =2E/pre-inst-env guix environment --ad-hoc rakudo perl6-zef perl6-sdl2-raw = sdl2 cleared my $HOME/.perl6 folder and re-ran 'perl6 sdl.p6' efraim@bayfront ~ [env]$ perl6 sdl.p6 Use of uninitialized value of type Any in string context. Methods .^name, .perl, .gist, or .say can be used to stringify it to someth= ing meaningful. in any statement_control at /gnu/store/in3wgq5mwwc6pqad92zzsay3ri86p6sn-r= akudo-2019.03.1/share/nqp/lib/Perl6/Grammar.moarvm line 1 Use of uninitialized value of type Any in string context. Methods .^name, .perl, .gist, or .say can be used to stringify it to someth= ing meaningful. in any statement_control at /gnu/store/in3wgq5mwwc6pqad92zzsay3ri86p6sn-r= akudo-2019.03.1/share/nqp/lib/Perl6/Grammar.moarvm line 1 =3D=3D=3DSORRY!=3D=3D=3D Cannot resolve caller new(IO::Path:U: Any:U, :CWD(Str)); none of these sign= atures match: (IO::Path: Str $path, :$SPEC =3D { ... }, Str:D :$CWD, *%_) (IO::Path: Str $path, :$SPEC =3D { ... }, :$CWD =3D { ... }, *%_) (IO::Path: Cool $path, :$SPEC =3D { ... }, :$CWD =3D { ... }, *%_) (IO::Path: :$basename!, :$dirname =3D "", :$volume =3D "", :$SPEC =3D {= ... }, :$CWD =3D { ... }, *%_) (IO::Path: *%_) I'm guessing that this is either some mistake on the code that's in the file, or that there's no display from bayfront being passed back to my computer. I've gone ahead and tested on a Debian box that I have (aarch64, Debian Sid, rakudo 2018.12-5, zef 0.6.2-2) sudo apt install rakudo perl6-zef libsdl2-dev zef install SDL2::Raw perl6 sdl.p6 efraim@pine64:~$ perl6 sdl.p6 dl.p6 couldn't initialize SDL2: No available video device in block <unit> at sdl.p6 line 3 it seems 'ssh pine64 -Y' wasn't enough. It does, however, mean that Debian's perl6/zef looks to be working well, and the code example from the website checks out. It looks like the short version is: zef in guix doesn't install runnable software, probably a problem with our copy of rakudo everything works as expected in Debian installing perl6 packages from the guix repo works 'guix package -f perl6-package -i rakudo' doesn't work as expected --=20 Efraim Flashner <efraim@HIDDEN> =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --8P1HSweYDcXXzwPJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIyBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl1L6/8ACgkQQarn3Mo9 g1ELkA/3cGAdcObCZmoJVa64I672vQ+HE+PhvVNSeZyFQGs6tTW68YUDsrRcO16u H8knL98nWKLzjddaFJkUejzCtZ2//ZxDSHVGci7O+GKf2YCy39SmeVVGM0JNVtTB Q+RtXrnCP3baWu4Q+xJN++u0bTQGSRl3Gam1M8r8+rT3LvWpQuaEw214GAd0H2yy CBIuWQ0Fwg32aKLndRCBqQIxfa835t9ovvYcQ/nmEiQvsarbW9vVb2s0DyNU0xtL Y4nx5qrSYMxUV4GRGQoA/puFFmxO71rpRDC8Ni1RSUi2o1Poqxl+nve/7O5icAZD BL/la5RNPfvMpmfuD76Yqg+aDyLWNY5W4DTQTLsv/hYHVDUmUPHS7Nt7kKAuDzWx jBTFrrmv+3/G9Rihi876pz2RWxQGAqCtBNGRaqlhk3mXe80FH4YQmSiUb2itBS0v OF1TnRloVk/xDoTguwyx30fqlZSI+GXnvL6iGwPUBQKNZg1kbksrpnhWKq3MQP5n Qr/q+rsMi4IW5k0q3o4JsNrb2IwtyzaTOPs9OptKGKbuMwXgZQEJPtHHJmcW9MVc TqSQ9t8GqNAtOLRURTTiNX0EntCoTTiGQf3iRsZ7YifKHlxJZ4WjZ1dpu9ycH0xl cMQJecf/CkJZvxL+A9+zte9VtiEi5Zz33Re2gyBZx/X3bwaecQ== =ED8z -----END PGP SIGNATURE----- --8P1HSweYDcXXzwPJ--
Efraim Flashner <efraim@HIDDEN>
:bug-guix@HIDDEN
.
Full text available.bug-guix@HIDDEN
:bug#36973
; Package guix
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.