Re: Seeking feedback for nng egg
Is nng compiled as a shared library? Because it looks like it’s linking against an archive file. > On Oct 14, 2021, at 20:49, Matt Welland wrote: > > > I added "-C" "-fPIC" and get this: > > matt@mars:~/src/chicken-nng$ ck5 chicken-install -s > building nng >/home/matt/data/buildall/ck5.2/bin/csc -host -D compiling-extension -J -s > -regenerate-import-libraries -setup-mode -I /home/matt/src/chicken-nng -C > -I/home/matt/src/chicken-nng -C -fPIC -L -lnng src/nng.scm -o > /home/matt/src/chicken-nng/nng.so > /usr/bin/ld: //usr/local/lib/libnng.a(nng.c.o): relocation R_X86_64_PC32 > against symbol `nng_recvmsg' can not be used when making a shared object; > recompile with -fPIC > /usr/bin/ld: final link failed: Bad value > collect2: error: ld returned 1 exit status > > Error: shell command terminated with non-zero exit status 256: 'gcc' > '/home/matt/src/chicken-nng/nng.o' -o '/home/matt/src/chicken-nng/nng.so' > -shared -lnng -L/home/matt/data/buildall/ck5.2/lib > -Wl,-R/home/matt/data/buildall/ck5.2/lib -lchicken -lm -ldl > > Error: shell command terminated with nonzero exit code > 256 > "sh /home/matt/src/chicken-nng/nng.build.sh" > > I'm wondering if my nng install is somehow broken? I compiled and ran the > reqrep demo and it works fine. > >> On Wed, Oct 13, 2021 at 4:22 PM Ariela Wenner wrote: >> >> Huh, weird. I have been trying to replicate whatever is going on, without >> luck >> so far. >> >> Would you mind editing the csc-options inside the egg definition on line 8? >> >> Should look like this: >> >> (csc-options "-C" "-fPIC" "-L" "-lnng") >> >> Then try building again. If the error persist send me the logs and I'll look >> into it. >> >> Cheers! >> >> On Wed, 13 Oct 2021 16:00:46 -0400 >> Matt Welland wrote: >> >> > OS is lubuntu 20.04, latest nng from git. >> > >> > Thanks. >> > > > > -- > -- > Complexity is your enemy. Any fool can make something complicated. > It is hard to keep things simple. - Richard Branson.
Re: Seeking feedback for nng egg
I added "-C" "-fPIC" and get this: matt@mars:~/src/chicken-nng$ ck5 chicken-install -s building nng /home/matt/data/buildall/ck5.2/bin/csc -host -D compiling-extension -J -s -regenerate-import-libraries -setup-mode -I /home/matt/src/chicken-nng -C -I/home/matt/src/chicken-nng -C -fPIC -L -lnng src/nng.scm -o /home/matt/src/chicken-nng/nng.so /usr/bin/ld: //usr/local/lib/libnng.a(nng.c.o): relocation R_X86_64_PC32 against symbol `nng_recvmsg' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status Error: shell command terminated with non-zero exit status 256: 'gcc' '/home/matt/src/chicken-nng/nng.o' -o '/home/matt/src/chicken-nng/nng.so' -shared -lnng -L/home/matt/data/buildall/ck5.2/lib -Wl,-R/home/matt/data/buildall/ck5.2/lib -lchicken -lm -ldl Error: shell command terminated with nonzero exit code 256 "sh /home/matt/src/chicken-nng/nng.build.sh" I'm wondering if my nng install is somehow broken? I compiled and ran the reqrep demo and it works fine. On Wed, Oct 13, 2021 at 4:22 PM Ariela Wenner wrote: > > Huh, weird. I have been trying to replicate whatever is going on, without > luck > so far. > > Would you mind editing the csc-options inside the egg definition on line 8? > > Should look like this: > > (csc-options "-C" "-fPIC" "-L" "-lnng") > > Then try building again. If the error persist send me the logs and I'll > look > into it. > > Cheers! > > On Wed, 13 Oct 2021 16:00:46 -0400 > Matt Welland wrote: > > > OS is lubuntu 20.04, latest nng from git. > > > > Thanks. > > > -- -- Complexity is your enemy. Any fool can make something complicated. It is hard to keep things simple. - Richard Branson.
Re: Installing srfi-29 when .../share is read-only
Greetings, On 14 Oct 2021, at 13:21, Norman Gray wrote: I'm trying to install srfi-29 using the Chicken installed as part of Nixpkgs. I had a conversation about this off-list, with Kon Lovett (to whom, many thanks). It does appear to be a bug, and I've submitted https://bugs.call-cc.org/ticket/1792 with a couple of additional details. Best wishes, Norman -- Norman Gray : https://nxg.me.uk
Installing srfi-29 when .../share is read-only
Greetings. I'm trying to install srfi-29 using the Chicken installed as part of Nixpkgs. Since .../share is expected to be read-only in this context, I've defined a separate repository for eggs to be installed in: CHICKEN_REPOSITORY_PATH=$HOME/.chicken-install:/nix/store/1sy3rv81crwlviknmqnfs1cwz3bbqr1g-chicken-5.2.0/lib/chicken/11 CHICKEN_INSTALL_REPOSITORY=$HOME/.chicken-install CHICKEN_INCLUDE_PATH=/nix/store/na72pj8gy1gyqd0llz6myvk8dzd4q5i0-compiler-rt-libc-7.1.0/share:/nix/store/1sy3rv81crwlviknmqnfs1cwz3bbqr1g-chicken-5.2.0/share That works OK for several eggs, but srfi-29 fails: installing srfi-29 mkdir: cannot create directory ‘/nix/store/1sy3rv81crwlviknmqnfs1cwz3bbqr1g-chicken-5.2.0/share/chicken/srfi-29-bundles’: Permission denied and sure enough, $HOME/.cache/chicken-install/srfi-29/srfi-29.install.sh includes mkdir -p ${DESTDIR}'/nix/store/1sy3rv81crwlviknmqnfs1cwz3bbqr1g-chicken-5.2.0/share/chicken' mkdir -p ${DESTDIR}'/nix/store/1sy3rv81crwlviknmqnfs1cwz3bbqr1g-chicken-5.2.0/share/chicken/srfi-29-bundles' install -m 644 '/Users/norman/.cache/chicken-install/srfi-29/srfi-29-bundles/srfi-29' ${DESTDIR}'/nix/store/1sy3rv81crwlviknmqnfs1cwz3bbqr1g-chicken-5.2.0/share/chicken/srfi-29-bundles' That is, it seems to unconditionally want to install in the system share directory. I'm not sure if this is a srfi-29 egg bug, or if I've missed a step in setting up the alternative repository [1]. I can report it on bugs.call-cc.org in the former case. Best wishes, Norman [1] http://wiki.call-cc.org/man/5/Extension%20tools -- Norman Gray : https://nxg.me.uk