[m-users.] "posix" extra library won't compile

Volker Wysk post at volker-wysk.de
Fri Mar 15 05:25:29 AEDT 2019


Am Donnerstag, 14. März 2019, 19:15:58 CET schrieb Zoltan Somogyi:
> On Thu, 14 Mar 2019 19:08:48 +0100, Volker Wysk <post at volker-wysk.de> wrote:
> > > > io.mh:268,
> > > > 
> > > >                  from Mercury/cs/posix.open.c:28:
> > > > In function ‘open’,
> > > > 
> > > >     inlined from ‘posix__open_module4’ at posix.open.m:74:15:
> > > > /usr/include/x86_64-linux-gnu/bits/fcntl2.h:50:4: error: call to
> > > > ‘__open_missing_mode’ declared with attribute error: open with O_CREAT
> > > > or
> > > > O_TMPFILE in second argument needs 3 arguments
> > > > In function ‘open’,
> > > > 
> > > >     inlined from ‘posix__open_module0’ at posix.open.m:74:15:
> > > > /usr/include/x86_64-linux-gnu/bits/fcntl2.h:50:4: error: call to
> > > > ‘__open_missing_mode’ declared with attribute error: open with O_CREAT
> > > > or
> > > > O_TMPFILE in second argument needs 3 arguments
> > > > 
> > > > Could this be a compiler version problem...? Any chances to get this
> > > > fixed
> > > > soon?
> > > 
> > > That one looks like your problem. ANSI C has both two and three argument
> > > versions of open, and so posix.open.m has two different copies of the
> > > open
> > > predicate, with different arities. It looks like you called the wrong
> > > one.
> > 
> > I'm not using it yet. I'm still trying to compile and install the library.
> > So this is an error inside the "posix" library, isn't it?
> 
> I can compile the posix library just fine, *without* getting the above
> error. The line mentioned in the error message does NOT have any flags O_*
> flags specified; they come from the caller. The file posix.open.m has NO
> calls to open itself.
> 
> Exactly what command is giving you the above error? Give us all the details.

I've downloaded and installed a Mercury rodt just fine. The Mercury source 
code (including extras/) is in /usr/local/src/mercury-srcdist-
rotd-2019-01-03/. Inside of that is the "extras/posix" directory.

All I've done is "mmc --make libposix" inside that directory. Just like I've 
found it in the Mercury User's Guide, section 6.2.1.

Bye
Volker




More information about the users mailing list