[polyml] Building with msys & GNU Make 3.82 (windows 7)

2015-08-26 Thread Artella Coding
Has anyone had success building via msys? I got the latest copy from github
& "./configure" runs fine, but when I do "make" I eventually get errors
like :

C:\Temp\sml\make: invalid option -- a
C:\Temp\sml\make: invalid option -- c
C:\Temp\sml\make: invalid option -- =
C:\Temp\sml\make: invalid option -- c
C:\Temp\sml\make: invalid option -- c
C:\Temp\sml\make: invalid option --
C:\Temp\sml\make: invalid option -- c
C:\Temp\sml\make: invalid option -- c
C:\Temp\sml\make: invalid option --
C:\Temp\sml\make: invalid option -- c
C:\Temp\sml\make: invalid option --
C:\Temp\sml\make: invalid option -- J

Thanks
___
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml

Re: [polyml] Building with msys & GNU Make 3.82 (windows 7)

2015-08-26 Thread Makarius

On Wed, 26 Aug 2015, Artella Coding wrote:


Has anyone had success building via msys?


I managed after three rounds of private explanations by David Matthews. 
The result is formalized (in a rather terse manner) here:


http://isabelle.in.tum.de/repos/isabelle/file/7b7f01afab71/Admin/polyml/INSTALL-MinGW
http://isabelle.in.tum.de/repos/isabelle/file/7b7f01afab71/Admin/polyml/build

The resulting binaries are part of this test distribution of Isabelle:
http://www4.in.tum.de/~wenzelm/test/Isabelle_21-Aug-2015

Note that aboue "Windows (64bit)" merely refers to the included JVM: 
Poly/ML is always x86-windows.



Makarius
___
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml


Re: [polyml] Building with msys & GNU Make 3.82 (windows 7)

2015-08-26 Thread David Matthews

On 26/08/2015 10:15, Artella Coding wrote:

Has anyone had success building via msys? I got the latest copy from github
& "./configure" runs fine, but when I do "make" I eventually get errors
like :


I've made many attempts to get Poly/ML to build successfully with 
msys/mingw.  There seem to be several forks of the projects and it does 
appear to be a matter of getting a combination that works.  I went 
through a clean re-installation and made some notes that I sent to 
Makarius.  I was planning to put this on the website but I haven't quite 
got round to it.  These are the notes, with a bit of modification as the 
result of feedback from Makarius.


An alternative is to use Visual Studio.  I do most of my development 
with Visual Studio 2010 Express.  I think the free Visual Studio 
Community 2015 will work with the project files in the Poly/ML distribution.


David

Download and install Msys2 from
http://sourceforge.net/projects/msys2
The default install directory is C:\msys64 .  It's probably best to 
leave this.

Certainly don't install it anywhere with a space in the path-name.

Download the mingw-w64-install.exe from
http://sourceforge.net/projects/mingw-w64

Run this.  You will get a dialogue box with various options.  You need
to select win32 from the Threads option.  You may need to select an 
older version in the Version option to find this.

Dwarf exception handling seems to be preferred so I'm running
i686-4.9.2-win32-dwarf-rt_v4-rev3.
Set the install directory to c:\msys64.  The files will actually be 
installed under

c:\msys64\mingw32 and integrated into the Msys2 tree.

It's probably worth installing an x86_64 compiler at the same time.
Again with Win32 threads and again with the install directory as c:\msys64 .
This time the files will be under c:\msys64\mingw64.

Start Msys with mingw32 by running the batch file 
c:\msys64\mingw32_shell.bat

This runs an rxvt window with the same sort of cut-and-paste as xterm.
Msys2 comes with a package manager.  At the very least install "make".
pacman -Sy
pacman -S make

For gmp install the "mingw32/mingw-w64-i686-gmp" package for 32-bit and/or
"mingw64/mingw-w64-x86_64-gmp" for 64-bit.

Download Poly/ML into c:\msys64\home\\
I use TortoiseGit + "Git for Windows" but there's also a git in msys2
via pacman.

cd polyml
./configure --host=i686-w32-mingw32 --bindir= 
--mandir= --libdir=installdir>
It appears that the extra option CPPFLAGS=-I/mingw32/include is needed 
to find the gmp header.



make
make compiler
make install

Copy two DLLs into the install directory:
cp /mingw32/bin/{libgcc_s_dw2-1,libstdc++-6}.dll 

___
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml


Re: [polyml] Building with msys & GNU Make 3.82 (windows 7)

2015-08-26 Thread Artella Coding
@Makarius : thanks. I tried the build script that you provided but I still
got the same error message.

@David : I will try the installation instructions you provided later. But
in the meantime I managed to build polyml using Visual Studio 2010 express,
with the settings on "Release" & "Win32". For some reason "Release" and
"x64" dont seem to work. Anyway "Win32" creates a PolyML.exe which I can
then run.

I exported a hello.obj file as outlined in
http://www.polyml.org/documentation/ReleaseNotes.html#Version5_0

However I am not sure how to then create an executable file with this. I
tried the instructions given at :

http://polyml.inf.ed.ac.narkive.com/Gx6CbeV3/building-a-console-polyml-application-on-windows

Namely :

link /OUT:hello.exe /SUBSYSTEM:WINDOWS hello.obj PolyLib.lib
PolyMainLib.lib libcmtd.lib

but I end up with a

"LINK : fatal error LNK1104: cannot open file 'kernel32.lib'"

and I am not sure how to solve this. Do you know how I might make an
executable?

Thanks


On Wed, Aug 26, 2015 at 11:34 AM, David Matthews <
david.matth...@prolingua.co.uk> wrote:

> On 26/08/2015 10:15, Artella Coding wrote:
>
>> Has anyone had success building via msys? I got the latest copy from
>> github
>> & "./configure" runs fine, but when I do "make" I eventually get errors
>> like :
>>
>
> I've made many attempts to get Poly/ML to build successfully with
> msys/mingw.  There seem to be several forks of the projects and it does
> appear to be a matter of getting a combination that works.  I went through
> a clean re-installation and made some notes that I sent to Makarius.  I was
> planning to put this on the website but I haven't quite got round to it.
> These are the notes, with a bit of modification as the result of feedback
> from Makarius.
>
> An alternative is to use Visual Studio.  I do most of my development with
> Visual Studio 2010 Express.  I think the free Visual Studio Community 2015
> will work with the project files in the Poly/ML distribution.
>
> David
>
> Download and install Msys2 from
> http://sourceforge.net/projects/msys2
> The default install directory is C:\msys64 .  It's probably best to leave
> this.
> Certainly don't install it anywhere with a space in the path-name.
>
> Download the mingw-w64-install.exe from
> http://sourceforge.net/projects/mingw-w64
>
> Run this.  You will get a dialogue box with various options.  You need
> to select win32 from the Threads option.  You may need to select an older
> version in the Version option to find this.
> Dwarf exception handling seems to be preferred so I'm running
> i686-4.9.2-win32-dwarf-rt_v4-rev3.
> Set the install directory to c:\msys64.  The files will actually be
> installed under
> c:\msys64\mingw32 and integrated into the Msys2 tree.
>
> It's probably worth installing an x86_64 compiler at the same time.
> Again with Win32 threads and again with the install directory as c:\msys64
> .
> This time the files will be under c:\msys64\mingw64.
>
> Start Msys with mingw32 by running the batch file
> c:\msys64\mingw32_shell.bat
> This runs an rxvt window with the same sort of cut-and-paste as xterm.
> Msys2 comes with a package manager.  At the very least install "make".
> pacman -Sy
> pacman -S make
>
> For gmp install the "mingw32/mingw-w64-i686-gmp" package for 32-bit and/or
> "mingw64/mingw-w64-x86_64-gmp" for 64-bit.
>
> Download Poly/ML into c:\msys64\home\\
> I use TortoiseGit + "Git for Windows" but there's also a git in msys2
> via pacman.
>
> cd polyml
> ./configure --host=i686-w32-mingw32 --bindir=
> --mandir= --libdir=installdir>
> It appears that the extra option CPPFLAGS=-I/mingw32/include is needed to
> find the gmp header.
>
>
> make
> make compiler
> make install
>
> Copy two DLLs into the install directory:
> cp /mingw32/bin/{libgcc_s_dw2-1,libstdc++-6}.dll 
>
> ___
> polyml mailing list
> polyml@inf.ed.ac.uk
> http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
>
___
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml

Re: [polyml] Building with msys & GNU Make 3.82 (windows 7)

2015-08-26 Thread Artella Coding
Hi,

I tried the msys instructions and encountered an error upon running
"make".

make --debug=b

yields the following :

make[4]: Entering directory '/home/linux/polyml/libffi'
restore=: && backupdir=".am$$" && \
am__cwd=`pwd` && CDPATH="${ZSH_VERSION+.}:" && cd . && \
rm -rf $backupdir && mkdir $backupdir && \
if (makeinfo   --version) >/dev/null 2>&1; then \
  for f in doc/libffi.info doc/libffi.info-[0-9] doc/libffi.info-[0-9][0-9]
doc/libffi.i[0-9] doc/libffi.i[0-9][0-9]; do \
if test -f $f; then mv $f $backupdir; restore=mv; else :; fi; \
  done; \
else :; fi && \
cd "$am__cwd"; \
if makeinfo -I doc -I ./doc \
 -o doc/libffi.info ./doc/libffi.texi; \
then \
  rc=0; \
  CDPATH="${ZSH_VERSION+.}:" && cd .; \
else \
  rc=$?; \
  CDPATH="${ZSH_VERSION+.}:" && cd . && \
  $restore $backupdir/* `echo "./doc/libffi.info" | sed 's|[^/]*$||'`; \
fi; \
rm -rf $backupdir; exit $rc
/bin/sh: line 9: makeinfo: command not found
Makefile:1289: recipe for target 'doc/libffi.info' failed
make[4]: *** [doc/libffi.info] Error 127
make[4]: Leaving directory '/home/linux/polyml/libffi'
Makefile:1473: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/home/linux/polyml/libffi'
Makefile:692: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/linux/polyml/libffi'
Makefile:696: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/linux/polyml'
Makefile:460: recipe for target 'all' failed
make: *** [all] Error 2



On Wed, Aug 26, 2015 at 11:34 AM, David Matthews <
david.matth...@prolingua.co.uk> wrote:

> On 26/08/2015 10:15, Artella Coding wrote:
>
>> Has anyone had success building via msys? I got the latest copy from
>> github
>> & "./configure" runs fine, but when I do "make" I eventually get errors
>> like :
>>
>
> I've made many attempts to get Poly/ML to build successfully with
> msys/mingw.  There seem to be several forks of the projects and it does
> appear to be a matter of getting a combination that works.  I went through
> a clean re-installation and made some notes that I sent to Makarius.  I was
> planning to put this on the website but I haven't quite got round to it.
> These are the notes, with a bit of modification as the result of feedback
> from Makarius.
>
> An alternative is to use Visual Studio.  I do most of my development with
> Visual Studio 2010 Express.  I think the free Visual Studio Community 2015
> will work with the project files in the Poly/ML distribution.
>
> David
>
> Download and install Msys2 from
> http://sourceforge.net/projects/msys2
> The default install directory is C:\msys64 .  It's probably best to leave
> this.
> Certainly don't install it anywhere with a space in the path-name.
>
> Download the mingw-w64-install.exe from
> http://sourceforge.net/projects/mingw-w64
>
> Run this.  You will get a dialogue box with various options.  You need
> to select win32 from the Threads option.  You may need to select an older
> version in the Version option to find this.
> Dwarf exception handling seems to be preferred so I'm running
> i686-4.9.2-win32-dwarf-rt_v4-rev3.
> Set the install directory to c:\msys64.  The files will actually be
> installed under
> c:\msys64\mingw32 and integrated into the Msys2 tree.
>
> It's probably worth installing an x86_64 compiler at the same time.
> Again with Win32 threads and again with the install directory as c:\msys64
> .
> This time the files will be under c:\msys64\mingw64.
>
> Start Msys with mingw32 by running the batch file
> c:\msys64\mingw32_shell.bat
> This runs an rxvt window with the same sort of cut-and-paste as xterm.
> Msys2 comes with a package manager.  At the very least install "make".
> pacman -Sy
> pacman -S make
>
> For gmp install the "mingw32/mingw-w64-i686-gmp" package for 32-bit and/or
> "mingw64/mingw-w64-x86_64-gmp" for 64-bit.
>
> Download Poly/ML into c:\msys64\home\\
> I use TortoiseGit + "Git for Windows" but there's also a git in msys2
> via pacman.
>
> cd polyml
> ./configure --host=i686-w32-mingw32 --bindir=
> --mandir= --libdir=installdir>
> It appears that the extra option CPPFLAGS=-I/mingw32/include is needed to
> find the gmp header.
>
>
> make
> make compiler
> make install
>
> Copy two DLLs into the install directory:
> cp /mingw32/bin/{libgcc_s_dw2-1,libstdc++-6}.dll 
>
> ___
> polyml mailing list
> polyml@inf.ed.ac.uk
> http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
>
___
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml

Re: [polyml] Building with msys & GNU Make 3.82 (windows 7)

2015-08-26 Thread Makarius

On Wed, 26 Aug 2015, Artella Coding wrote:


I tried the msys instructions and encountered an error upon running
"make".



/bin/sh: line 9: makeinfo: command not found


You need to install the texinfo package, e.g. like this:

  pacman -S texinfo


Makarius
___
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml


Re: [polyml] Building with msys & GNU Make 3.82 (windows 7)

2015-08-26 Thread David Matthews

On 26/08/2015 22:03, Makarius wrote:

On Wed, 26 Aug 2015, Artella Coding wrote:


I tried the msys instructions and encountered an error upon running
"make".



/bin/sh: line 9: makeinfo: command not found


You need to install the texinfo package, e.g. like this:

   pacman -S texinfo



libffi/doc/libffi.info used to be in the repository so there was no need 
to build it.  I committed a change on 23rd June that removed it since it 
appeared to be an output, at least when built on Linux.  To be honest 
there doesn't seem to be any reason to include the documentation in the 
version of libffi that we include with Poly/ML.  It does seem to be 
overkill to have to install texinfo.  I hadn't noticed the problem 
because I seem to have texinfo somewhere else.  It may be simplest just 
to restore libffi.info.


David
___
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml


Re: [polyml] Building with msys & GNU Make 3.82 (windows 7)

2015-08-26 Thread Artella Coding
Hi, now I am getting a new error.

To summarise I installed :

mingw :
version 4.9.3
Architecture : x86_64
Threads : Win32
Exception : seh
Build revision : 0

and put in path, so I get :

$ g++ --version
g++.exe (x86_64-win32-seh-rev0, Built by MinGW-W64 project) 4.9.3

Then configured via :

./configure --host=i686-w32-mingw32 --bindir=... --mandir=... --libdir=...
CPPFLAGS=-I/mingw64/include

After creating "libffi/doc/libffi.info", I do "make" again, at which point
I get the
following error message :

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude
-I./src -I/mingw64/include -I. -I./include -Iinclude -I./src -MT
src/x86/win32.lo -MD -MP -MF src/x86/.deps/win32.Tpo -c src/x86/win32.S
-DDLL_EXPORT -DPIC -o src/x86/.libs/win32.o
src/x86/win32.S: Assembler messages:
src/x86/win32.S:486: Error: invalid instruction suffix for `push'
src/x86/win32.S:497: Error: invalid instruction suffix for `push'
src/x86/win32.S:498: Error: invalid instruction suffix for `push'
src/x86/win32.S:643: Error: invalid instruction suffix for `pop'
src/x86/win32.S:652: Error: invalid instruction suffix for `push'
src/x86/win32.S:669: Error: invalid instruction suffix for `push'
src/x86/win32.S:768: Error: invalid instruction suffix for `pop'
src/x86/win32.S:780: Error: invalid instruction suffix for `pop'
src/x86/win32.S:797: Error: invalid instruction suffix for `push'
src/x86/win32.S:799: Error: invalid instruction suffix for `push'
src/x86/win32.S:814: Error: invalid instruction suffix for `push'
src/x86/win32.S:818: Error: invalid instruction suffix for `push'
src/x86/win32.S:918: Error: invalid instruction suffix for `pop'
src/x86/win32.S:919: Error: invalid instruction suffix for `pop'
src/x86/win32.S:934: Error: invalid instruction suffix for `push'
src/x86/win32.S:1032: Error: invalid instruction suffix for `pop'
Makefile:1221: recipe for target 'src/x86/win32.lo' failed
make[4]: *** [src/x86/win32.lo] Error 1
make[4]: Leaving directory '/home/monolith/polyml/libffi'
Makefile:1473: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1

Thanks


On Wed, Aug 26, 2015 at 10:27 PM, David Matthews <
david.matth...@prolingua.co.uk> wrote:

> On 26/08/2015 22:03, Makarius wrote:
>
>> On Wed, 26 Aug 2015, Artella Coding wrote:
>>
>> I tried the msys instructions and encountered an error upon running
>>> "make".
>>>
>>
>> /bin/sh: line 9: makeinfo: command not found
>>>
>>
>> You need to install the texinfo package, e.g. like this:
>>
>>pacman -S texinfo
>>
>>
> libffi/doc/libffi.info used to be in the repository so there was no need
> to build it.  I committed a change on 23rd June that removed it since it
> appeared to be an output, at least when built on Linux.  To be honest there
> doesn't seem to be any reason to include the documentation in the version
> of libffi that we include with Poly/ML.  It does seem to be overkill to
> have to install texinfo.  I hadn't noticed the problem because I seem to
> have texinfo somewhere else.  It may be simplest just to restore
> libffi.info.
>
> David
>
> ___
> polyml mailing list
> polyml@inf.ed.ac.uk
> http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
>
___
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml

Re: [polyml] Building with msys & GNU Make 3.82 (windows 7)

2015-08-26 Thread Artella Coding
Is this because I have

Exception : seh

instead of :

Exception : dwarf

in my installation of g++?

Thanks

On Thu, Aug 27, 2015 at 6:30 AM, Artella Coding <
artella.cod...@googlemail.com> wrote:

> Hi, now I am getting a new error.
>
> To summarise I installed :
>
> mingw :
> version 4.9.3
> Architecture : x86_64
> Threads : Win32
> Exception : seh
> Build revision : 0
>
> and put in path, so I get :
>
> $ g++ --version
> g++.exe (x86_64-win32-seh-rev0, Built by MinGW-W64 project) 4.9.3
>
> Then configured via :
>
> ./configure --host=i686-w32-mingw32 --bindir=... --mandir=... --libdir=...
> CPPFLAGS=-I/mingw64/include
>
> After creating "libffi/doc/libffi.info", I do "make" again, at which
> point I get the
> following error message :
>
> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude
> -I./src -I/mingw64/include -I. -I./include -Iinclude -I./src -MT
> src/x86/win32.lo -MD -MP -MF src/x86/.deps/win32.Tpo -c src/x86/win32.S
> -DDLL_EXPORT -DPIC -o src/x86/.libs/win32.o
> src/x86/win32.S: Assembler messages:
> src/x86/win32.S:486: Error: invalid instruction suffix for `push'
> src/x86/win32.S:497: Error: invalid instruction suffix for `push'
> src/x86/win32.S:498: Error: invalid instruction suffix for `push'
> src/x86/win32.S:643: Error: invalid instruction suffix for `pop'
> src/x86/win32.S:652: Error: invalid instruction suffix for `push'
> src/x86/win32.S:669: Error: invalid instruction suffix for `push'
> src/x86/win32.S:768: Error: invalid instruction suffix for `pop'
> src/x86/win32.S:780: Error: invalid instruction suffix for `pop'
> src/x86/win32.S:797: Error: invalid instruction suffix for `push'
> src/x86/win32.S:799: Error: invalid instruction suffix for `push'
> src/x86/win32.S:814: Error: invalid instruction suffix for `push'
> src/x86/win32.S:818: Error: invalid instruction suffix for `push'
> src/x86/win32.S:918: Error: invalid instruction suffix for `pop'
> src/x86/win32.S:919: Error: invalid instruction suffix for `pop'
> src/x86/win32.S:934: Error: invalid instruction suffix for `push'
> src/x86/win32.S:1032: Error: invalid instruction suffix for `pop'
> Makefile:1221: recipe for target 'src/x86/win32.lo' failed
> make[4]: *** [src/x86/win32.lo] Error 1
> make[4]: Leaving directory '/home/monolith/polyml/libffi'
> Makefile:1473: recipe for target 'all-recursive' failed
> make[3]: *** [all-recursive] Error 1
>
> Thanks
>
>
> On Wed, Aug 26, 2015 at 10:27 PM, David Matthews <
> david.matth...@prolingua.co.uk> wrote:
>
>> On 26/08/2015 22:03, Makarius wrote:
>>
>>> On Wed, 26 Aug 2015, Artella Coding wrote:
>>>
>>> I tried the msys instructions and encountered an error upon running
 "make".

>>>
>>> /bin/sh: line 9: makeinfo: command not found

>>>
>>> You need to install the texinfo package, e.g. like this:
>>>
>>>pacman -S texinfo
>>>
>>>
>> libffi/doc/libffi.info used to be in the repository so there was no need
>> to build it.  I committed a change on 23rd June that removed it since it
>> appeared to be an output, at least when built on Linux.  To be honest there
>> doesn't seem to be any reason to include the documentation in the version
>> of libffi that we include with Poly/ML.  It does seem to be overkill to
>> have to install texinfo.  I hadn't noticed the problem because I seem to
>> have texinfo somewhere else.  It may be simplest just to restore
>> libffi.info.
>>
>> David
>>
>> ___
>> polyml mailing list
>> polyml@inf.ed.ac.uk
>> http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
>>
>
>
___
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml

Re: [polyml] Building with msys & GNU Make 3.82 (windows 7)

2015-08-26 Thread Artella Coding
Hi, so I reinstalled with i686-4.9.3-win32-dwarf-rt_v4-rev0 and used the
appropriate CPPFLAGS, and this time everything went fine (i.e. make, make
compiler, and make install worked fine without error)

But now if I create a "hello.ml" with the contents :

fun main () = print "Hello World\n";

and compile it with "polyc" I get the following error :

$ polyc hello.ml
Exception- SysErr ... raised

Do you know what might be going wrong?

Thanks


On Thu, Aug 27, 2015 at 6:46 AM, Artella Coding <
artella.cod...@googlemail.com> wrote:

> Is this because I have
>
> Exception : seh
>
> instead of :
>
> Exception : dwarf
>
> in my installation of g++?
>
> Thanks
>
> On Thu, Aug 27, 2015 at 6:30 AM, Artella Coding <
> artella.cod...@googlemail.com> wrote:
>
>> Hi, now I am getting a new error.
>>
>> To summarise I installed :
>>
>> mingw :
>> version 4.9.3
>> Architecture : x86_64
>> Threads : Win32
>> Exception : seh
>> Build revision : 0
>>
>> and put in path, so I get :
>>
>> $ g++ --version
>> g++.exe (x86_64-win32-seh-rev0, Built by MinGW-W64 project) 4.9.3
>>
>> Then configured via :
>>
>> ./configure --host=i686-w32-mingw32 --bindir=... --mandir=...
>> --libdir=... CPPFLAGS=-I/mingw64/include
>>
>> After creating "libffi/doc/libffi.info", I do "make" again, at which
>> point I get the
>> following error message :
>>
>> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude
>> -I./src -I/mingw64/include -I. -I./include -Iinclude -I./src -MT
>> src/x86/win32.lo -MD -MP -MF src/x86/.deps/win32.Tpo -c src/x86/win32.S
>> -DDLL_EXPORT -DPIC -o src/x86/.libs/win32.o
>> src/x86/win32.S: Assembler messages:
>> src/x86/win32.S:486: Error: invalid instruction suffix for `push'
>> src/x86/win32.S:497: Error: invalid instruction suffix for `push'
>> src/x86/win32.S:498: Error: invalid instruction suffix for `push'
>> src/x86/win32.S:643: Error: invalid instruction suffix for `pop'
>> src/x86/win32.S:652: Error: invalid instruction suffix for `push'
>> src/x86/win32.S:669: Error: invalid instruction suffix for `push'
>> src/x86/win32.S:768: Error: invalid instruction suffix for `pop'
>> src/x86/win32.S:780: Error: invalid instruction suffix for `pop'
>> src/x86/win32.S:797: Error: invalid instruction suffix for `push'
>> src/x86/win32.S:799: Error: invalid instruction suffix for `push'
>> src/x86/win32.S:814: Error: invalid instruction suffix for `push'
>> src/x86/win32.S:818: Error: invalid instruction suffix for `push'
>> src/x86/win32.S:918: Error: invalid instruction suffix for `pop'
>> src/x86/win32.S:919: Error: invalid instruction suffix for `pop'
>> src/x86/win32.S:934: Error: invalid instruction suffix for `push'
>> src/x86/win32.S:1032: Error: invalid instruction suffix for `pop'
>> Makefile:1221: recipe for target 'src/x86/win32.lo' failed
>> make[4]: *** [src/x86/win32.lo] Error 1
>> make[4]: Leaving directory '/home/monolith/polyml/libffi'
>> Makefile:1473: recipe for target 'all-recursive' failed
>> make[3]: *** [all-recursive] Error 1
>>
>> Thanks
>>
>>
>> On Wed, Aug 26, 2015 at 10:27 PM, David Matthews <
>> david.matth...@prolingua.co.uk> wrote:
>>
>>> On 26/08/2015 22:03, Makarius wrote:
>>>
 On Wed, 26 Aug 2015, Artella Coding wrote:

 I tried the msys instructions and encountered an error upon running
> "make".
>

 /bin/sh: line 9: makeinfo: command not found
>

 You need to install the texinfo package, e.g. like this:

pacman -S texinfo


>>> libffi/doc/libffi.info used to be in the repository so there was no
>>> need to build it.  I committed a change on 23rd June that removed it since
>>> it appeared to be an output, at least when built on Linux.  To be honest
>>> there doesn't seem to be any reason to include the documentation in the
>>> version of libffi that we include with Poly/ML.  It does seem to be
>>> overkill to have to install texinfo.  I hadn't noticed the problem because
>>> I seem to have texinfo somewhere else.  It may be simplest just to restore
>>> libffi.info.
>>>
>>> David
>>>
>>> ___
>>> polyml mailing list
>>> polyml@inf.ed.ac.uk
>>> http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
>>>
>>
>>
>
___
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml

Re: [polyml] Building with msys & GNU Make 3.82 (windows 7)

2015-08-27 Thread David Matthews

On 27/08/2015 07:33, Artella Coding wrote:

Hi, so I reinstalled with i686-4.9.3-win32-dwarf-rt_v4-rev0 and used the
appropriate CPPFLAGS, and this time everything went fine (i.e. make, make
compiler, and make install worked fine without error)

But now if I create a "hello.ml" with the contents :

fun main () = print "Hello World\n";

and compile it with "polyc" I get the following error :

$ polyc hello.ml
Exception- SysErr ... raised

Do you know what might be going wrong?


This was something else I discovered and mentioned in a private email to 
Makarius.  There's a problem, hopefully temporary, with compiling and 
linking in a single step.  The "polyc" script creates the name of a 
temporary file and passes it to "poly" as the file name to use when 
exporting the compiled source.  Unfortunately it uses a name of the form 
"/tmp/polyobj.1234.obj" and "poly", being a Windows executable, doesn't 
understand "/tmp" and chokes.  The work-around is to do the compilation 
in two steps:

polyc -c hello.ml
polyc hello.obj


David
___
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml


Re: [polyml] Building with msys & GNU Make 3.82 (windows 7)

2015-08-28 Thread David Matthews

On 27/08/2015 06:30, Artella Coding wrote:

Hi, now I am getting a new error.

To summarise I installed :

mingw :
version 4.9.3
Architecture : x86_64
Threads : Win32
Exception : seh
Build revision : 0

and put in path, so I get :

$ g++ --version
g++.exe (x86_64-win32-seh-rev0, Built by MinGW-W64 project) 4.9.3

Then configured via :

./configure --host=i686-w32-mingw32 --bindir=... --mandir=... --libdir=...
CPPFLAGS=-I/mingw64/include

After creating "libffi/doc/libffi.info", I do "make" again, at which point
I get the
following error message :

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude
-I./src -I/mingw64/include -I. -I./include -Iinclude -I./src -MT
src/x86/win32.lo -MD -MP -MF src/x86/.deps/win32.Tpo -c src/x86/win32.S
-DDLL_EXPORT -DPIC -o src/x86/.libs/win32.o
src/x86/win32.S: Assembler messages:
src/x86/win32.S:486: Error: invalid instruction suffix for `push'
src/x86/win32.S:497: Error: invalid instruction suffix for `push'
src/x86/win32.S:498: Error: invalid instruction suffix for `push'
src/x86/win32.S:643: Error: invalid instruction suffix for `pop'
src/x86/win32.S:652: Error: invalid instruction suffix for `push'
src/x86/win32.S:669: Error: invalid instruction suffix for `push'
src/x86/win32.S:768: Error: invalid instruction suffix for `pop'
src/x86/win32.S:780: Error: invalid instruction suffix for `pop'
src/x86/win32.S:797: Error: invalid instruction suffix for `push'
src/x86/win32.S:799: Error: invalid instruction suffix for `push'
src/x86/win32.S:814: Error: invalid instruction suffix for `push'
src/x86/win32.S:818: Error: invalid instruction suffix for `push'
src/x86/win32.S:918: Error: invalid instruction suffix for `pop'
src/x86/win32.S:919: Error: invalid instruction suffix for `pop'
src/x86/win32.S:934: Error: invalid instruction suffix for `push'
src/x86/win32.S:1032: Error: invalid instruction suffix for `pop'
Makefile:1221: recipe for target 'src/x86/win32.lo' failed
make[4]: *** [src/x86/win32.lo] Error 1
make[4]: Leaving directory '/home/monolith/polyml/libffi'
Makefile:1473: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1

The problem is, or was since you seem to have fixed it, that you were 
using the 64-bit version of GCC but giving the 32-bit option to 
"configure".  To build the 64-bit version you need

./configure --host=x86_64-w64-mingw32.
I think SEH is the correct exception handling for 64-bits.

David

___
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml


Re: [polyml] Building with msys & GNU Make 3.82 (windows 7)

2015-08-28 Thread David Matthews

On 27/08/2015 13:37, David Matthews wrote:

This was something else I discovered and mentioned in a private email to
Makarius.  There's a problem, hopefully temporary, with compiling and
linking in a single step.  The "polyc" script creates the name of a
temporary file and passes it to "poly" as the file name to use when
exporting the compiled source.  Unfortunately it uses a name of the form
"/tmp/polyobj.1234.obj" and "poly", being a Windows executable, doesn't
understand "/tmp" and chokes.  The work-around is to do the compilation
in two steps:
polyc -c hello.ml
polyc hello.obj



This was complicated because Msys redefines the TEMP environment 
variable as /tmp.  Fortunately it seems to save the original in "temp" 
(lower case) so I've been able to commit a fix that seems to allow polyc 
to compile and link in a single step.


David
___
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml