[m-users.] Signal 253 error on MinGW32 during compilation of module with a large table

Julien Fischer jfischer at opturion.com
Wed Feb 18 12:21:55 AEDT 2015


Hi,

On Tue, 17 Feb 2015, Dirk Ziegemeyer wrote:

> I developed an app with Mercury 14.01.1 on Mac OS X where it compiles
> fine and I'm struggling now to compile it on Windows/MinGW32.
>
> First issue - concerning pragma fact_table:
> The app contains two very large fact tables (40,000 and 400,000 rows)
> and therefore I make use of pragma fact_table. I ran into the following error message:
> "Making Mercury\none.gc\i686-pc-mingw32\Mercury\cs\moduleOne.c
> sort: open failed: C:/Users/dirk/AppData/Local/Tempmtmpml1ugf: No such
> file or directory
> ..."

The main problem here is that the way fact tables are currently compiled
is Unix-specific and external commands run by the Mercury compiler using
libc's system function are executed by cmd.exe on Windows**.  It doesn't
understand Unix specific stuff.  An additional problem, may be that that
the compilation of fact tables requires the Unix sort, cut and cat
utilities and those may not be available in the cmd.exe environment.
(I'm not sure if the MinGW/MSYS versions will actually work outside of
the MSYS environment.)

I will take a look and see if there is some way we can avoid the
Unix-specific stuff on Windows.

> As a workaround I adjusted MSYS variable $TMP from "/tmp" to "/tmp/"
> and mercury compiled this module.
>
> Is it a good solution to adjust $TMP or may there be side effects
> during further compilation?

I don't think the value of $TMP is the issue here.

(** strictly speaking they are executed by whatever the environment
variable COMSPEC is pointing to.)

> Second Issue - concerning a large table without pragma fact_table:
> The compilation stops with an error message for a module which
> contains a large table (2,400 facts). One column of the table is a discriminated union type and therefore I can't use pragma fact_table.
>
> The app compiled well on Mac OS X 10.10 with grade none.gc but under MinGW I receive this error message:
> "$ mmc --make --grade none.gc appName
> Making Mercury\none.gc\i686-pc-mingw32\Mercury\cs\moduleTwo.c
> Error: system command received signal 253.
> ** Error making 'Mercury\none.gc\i686-pc-mingw32\Mercury\cs\moduleTwo.c'."

I would guess that's coming from the C compiler.  Could you please
re-run that and inclucde the option --verbose-commands, so that we can
see what's going on.

Cheers,
Julien.>



More information about the users mailing list