[m-users.] Can't compile sample program

Mark Brown mark at mercurylang.org
Wed Mar 20 02:55:42 AEDT 2019


On Wed, Mar 20, 2019 at 2:18 AM Volker Wysk <post at volker-wysk.de> wrote:
>
> Hello!
>
> I've successfully built and installed the posix library. But the example
> program "hello" can't be built:
>
> In extras/posix:
>
> > mmc  --make libposix
> Making libposix.a
> Making libposix.so
>
> > sudo checkinstall mmc --make --no-libgrade \
> >   libposix.install \
> >   --libgrade asm_fast.gc.prof \
> >   --libgrade asm_fast.par.gc.stseg \
> >   --libgrade asm_fast.gc \
> >   --libgrade hlc.gc \
> >   --libgrade asm_fast.gc.decldebug.stseg \
> >   --libgrade hlc.par.gc \
> >   --libgrade asm_fast.gc.debug.stseg \
> >   --libgrade asm_fast.gc.trseg.debug.stseg \
> >   --libgrade asm_fast.gc.profdeep.stseg \
> >   --libgrade asm_fast.gc.memprof \
> >   --libgrade asm_fast.gc.trseg \
> >   --libgrade hlc.gc.trseg
>
> (This succeeds and installs all grades except for "java".)
>
> > LANG=C mmc --make hello
> Making hello
> ** Error making `hello'.
> Mercury/os/posix.select.o: In function `<predicate
> 'posix:select.new_fdset_ptr'/3 mode 0>':
> posix.select.c:(.text+0x291): undefined reference to `ME_fd_zero'
> Mercury/os/posix.select.o: In function `<predicate 'posix:select.fd_zero'/3
> mode 0>':
> posix.select.c:(.text+0x2cc): undefined reference to `ME_fd_zero'
> Mercury/os/posix.select.o: In function `<predicate 'posix:select.fd_clr'/4
> mode 0>':
> posix.select.c:(.text+0x2ff): undefined reference to `ME_fd_clr'
> Mercury/os/posix.select.o: In function `<predicate 'posix:select.fd_isset'/5
> mode 0>':
> posix.select.c:(.text+0x33f): undefined reference to `ME_fd_isset'
> Mercury/os/posix.select.o: In function `<predicate 'posix:select.fd_set'/4
> mode 0>':
> posix.select.c:(.text+0x37f): undefined reference to `ME_fd_set'
> collect2: error: ld returned 1 exit status
>
> Any hints about what I should try? (I've already read the user manual chapter
> about libraries).

The author of that library has provided an Mmakefile, so I recommend
you try using mmake to build it.

Mark


More information about the users mailing list