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

Zoltan Somogyi zoltan.somogyi at runbox.com
Sat Mar 16 04:17:54 AEDT 2019



On Fri, 15 Mar 2019 17:13:22 +0100, Volker Wysk <post at volker-wysk.de> wrote:
> > Actually, not glibc, the explanation is about half way down:
> > 
> > https://wiki.ubuntu.com/ToolChain/CompilerFlags?action=show&redirect=Compile
> > rFlags#-D_FORTIFY_SOURCE=2
> > 
> > It seems Ubuntu have started making the C compile with
> > -D_FORTIFY_SOURCE=2 by default and that will reject calls to open()
> > without a mode argument.
> 
> So will it be fixed?

The person who is best positioned to fix the problem is YOU,
because you seem to be the only person whose machine
actually *has* the problem.

Look up your machine's documentation of fortify source,
figure out what C compiler options turn it off, then
add a file named Mercury.options to the posix directory
containing a line like this, with the dots replaced by that
C compiler option.

CFLAGS-posix.open = ...

A more drastic solution would be to simply delete the code
that calls the two-argument version of open, directly or indirectly.
However, that would not be backwards compatible.

Zoltan.


More information about the users mailing list