unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Error when compiling file using Bigloo Scheme
       [not found] <20220707155649.zmegt2ncimhroxxx.ref@localhost>
@ 2022-07-07 15:56 ` Sam Lee
  2022-07-08 14:25   ` zimoun
  0 siblings, 1 reply; 5+ messages in thread
From: Sam Lee @ 2022-07-07 15:56 UTC (permalink / raw)
  To: guix-devel

I installed Bigloo version 4.3g using Guix, but there is always an error
when trying to compile a Scheme program:

    $ bigloo myfile.scm
    /usr/bin/ld: cannot find -lunistring
    collect2: error: ld returned 1 exit status

Contents of myfile.scm:

    (module mymodule
            (main start))

    (define (start argv)
      (display "Hello!")
      (newline))

Is there something wrong with Bigloo's package definition in Guix?

I tried to "solve" the problem by installing libunistring-dev on my OS
(sudo apt-get install libunistring-dev). But I get a different error:

--8<---------------cut here---------------start------------->8---
$ bigloo myfile.scm
/usr/bin/ld: warning: libpcre.so.1, needed by /gnu/store/nnkm3cg8k28c3i2vsclwhkzp3jd6cgxr-bigloo-4.3g/lib/bigloo/4.3g/libbigloo_s-4.3g.so, may conflict with libpcre.so.3
/usr/bin/ld: /gnu/store/nnkm3cg8k28c3i2vsclwhkzp3jd6cgxr-bigloo-4.3g/lib/bigloo/4.3g/libbigloo_s-4.3g.so: undefined reference to `fstat@GLIBC_2.33'
/usr/bin/ld: /gnu/store/nnkm3cg8k28c3i2vsclwhkzp3jd6cgxr-bigloo-4.3g/lib/bigloo/4.3g/libbigloo_s-4.3g.so: undefined reference to `lstat@GLIBC_2.33'
/usr/bin/ld: /gnu/store/nnkm3cg8k28c3i2vsclwhkzp3jd6cgxr-bigloo-4.3g/lib/bigloo/4.3g/libbigloo_s-4.3g.so: undefined reference to `stat@GLIBC_2.33'
collect2: error: ld returned 1 exit status
--8<---------------cut here---------------end--------------->8---


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Error when compiling file using Bigloo Scheme
  2022-07-07 15:56 ` Error when compiling file using Bigloo Scheme Sam Lee
@ 2022-07-08 14:25   ` zimoun
  2022-07-08 15:42     ` Sam Lee
  0 siblings, 1 reply; 5+ messages in thread
From: zimoun @ 2022-07-08 14:25 UTC (permalink / raw)
  To: Sam Lee, guix-devel

Hi,

On jeu., 07 juil. 2022 at 15:56, Sam Lee <samlee746@yahoo.com> wrote:

>     $ bigloo myfile.scm
>     /usr/bin/ld: cannot find -lunistring
>     collect2: error: ld returned 1 exit status

Indeed, bigloo requires some packages.  This works for me:

--8<---------------cut here---------------start------------->8---
$ guix shell -C bigloo libunistring gcc-toolchain libgc pcre \
     -- bigloo /tmp/myfile.scm
--8<---------------cut here---------------end--------------->8---

where myfile.scm is the same as yours.

>     (module mymodule
>             (main start))
>
>     (define (start argv)
>       (display "Hello!")
>       (newline))

Note that it outputs nothing, right?


Well, “guix shell -C” is for being sure all the packages required by the
bigloo compiler are inside the environment.  For regular usage, you can
just use “guix shell --pure” or without any special option, or even
install all the packages in a profile.


Cheers,
simon


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Error when compiling file using Bigloo Scheme
  2022-07-08 14:25   ` zimoun
@ 2022-07-08 15:42     ` Sam Lee
  2022-07-08 16:53       ` Liliana Marie Prikler
  0 siblings, 1 reply; 5+ messages in thread
From: Sam Lee @ 2022-07-08 15:42 UTC (permalink / raw)
  To: zimoun; +Cc: guix-devel

On 2022-07-08 16:25 +0200, zimoun wrote:
> On jeu., 07 juil. 2022 at 15:56, Sam Lee <samlee746@yahoo.com> wrote:
> 
> >     $ bigloo myfile.scm
> >     /usr/bin/ld: cannot find -lunistring
> >     collect2: error: ld returned 1 exit status
> 
> Indeed, bigloo requires some packages.  This works for me:
> 
> --8<---------------cut here---------------start------------->8---
> $ guix shell -C bigloo libunistring gcc-toolchain libgc pcre \
>      -- bigloo /tmp/myfile.scm
> --8<---------------cut here---------------end--------------->8---

Thank you for providing a workaround.

When I install Bigloo using Guix, shouldn't all of Bigloo's dependencies
be installed by Guix? Why do I need to manually install additional
packages? Is there something wrong with Bigloo's package definition in
Guix?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Error when compiling file using Bigloo Scheme
  2022-07-08 15:42     ` Sam Lee
@ 2022-07-08 16:53       ` Liliana Marie Prikler
  2022-07-11  7:29         ` zimoun
  0 siblings, 1 reply; 5+ messages in thread
From: Liliana Marie Prikler @ 2022-07-08 16:53 UTC (permalink / raw)
  To: Sam Lee, zimoun; +Cc: guix-devel

Am Freitag, dem 08.07.2022 um 15:42 +0000 schrieb Sam Lee:
> On 2022-07-08 16:25 +0200, zimoun wrote:
> > On jeu., 07 juil. 2022 at 15:56, Sam Lee <samlee746@yahoo.com>
> > wrote:
> > 
> > >     $ bigloo myfile.scm
> > >     /usr/bin/ld: cannot find -lunistring
> > >     collect2: error: ld returned 1 exit status
> > 
> > Indeed, bigloo requires some packages.  This works for me:
> > 
> > --8<---------------cut here---------------start------------->8---
> > $ guix shell -C bigloo libunistring gcc-toolchain libgc pcre \
> >      -- bigloo /tmp/myfile.scm
> > --8<---------------cut here---------------end--------------->8---
> 
> Thank you for providing a workaround.
> 
> When I install Bigloo using Guix, shouldn't all of Bigloo's
> dependencies be installed by Guix?  Why do I need to manually install
> additional packages?  Is there something wrong with Bigloo's package
> definition in Guix?
We don't typically propagate packages, especially not gcc-toolchain. 
You should be able to swap that out for any other toolchain, e.g.
another version of gcc-toolchain or perhaps even clang-toolchain.  I'm
not sure about libunistring, libgc and pcre.  There is a somewhat
similar bug in libgccjit not finding its own object files, which I find
rather silly; search paths definitely need adjusting imho.

Cheers


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Error when compiling file using Bigloo Scheme
  2022-07-08 16:53       ` Liliana Marie Prikler
@ 2022-07-11  7:29         ` zimoun
  0 siblings, 0 replies; 5+ messages in thread
From: zimoun @ 2022-07-11  7:29 UTC (permalink / raw)
  To: Liliana Marie Prikler, Sam Lee; +Cc: guix-devel


On Fri, 08 Jul 2022 at 18:53, Liliana Marie Prikler <liliana.prikler@gmail.com> wrote:

> We don't typically propagate packages, especially not gcc-toolchain. 
> You should be able to swap that out for any other toolchain, e.g.
> another version of gcc-toolchain or perhaps even clang-toolchain.  I'm
> not sure about libunistring, libgc and pcre.  There is a somewhat
> similar bug in libgccjit not finding its own object files, which I find
> rather silly; search paths definitely need adjusting imho.


Well, indeed the convention is to not propagate some packages.  For
instance, it is similar with Haskell: the installation of GHC “guix
shell ghc” is not enough to have a working Haskell environment; it is
also required other packages as gcc-toolchain.

As I wrote elsewhere [1], I think Guix should provide ready-to-use
“compiler” toolsuite.  Other said, something like “bigloo-toolchain” or
“haskell-toolchain” or etc.

First, it eases the usuability; hiding plumbing details.  Second, it
eases the “swap out”; the application of a transformation appears to me
much easier because all is explicit instead of having beforehand
an implicit knowledge on the “compiler” itself.

Somehow, it was the rationale behind gcc-toolchain or gfortran-toolchain.


Cheers,
simon


1: <https://yhetil.org/guix/CAJ3okZ0i0DjQMzgJ9WwzDC2tKc8WeTZxqW46KH+vq9zKbgBzhQ@mail.gmail.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-07-11  7:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20220707155649.zmegt2ncimhroxxx.ref@localhost>
2022-07-07 15:56 ` Error when compiling file using Bigloo Scheme Sam Lee
2022-07-08 14:25   ` zimoun
2022-07-08 15:42     ` Sam Lee
2022-07-08 16:53       ` Liliana Marie Prikler
2022-07-11  7:29         ` zimoun

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).