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

Zoltan Somogyi zoltan.somogyi at runbox.com
Fri Mar 15 05:15:58 AEDT 2019



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.

Zoltan.


More information about the users mailing list