Ats and mingw

Hi,

I know ATS hasn’t been compiled using mingw. Has anyone had any problems
using mingw to build ats programs though? Or foresee problems? I haven’t
used it myself, but cygwin is problematic for JNI.

Brandon Barker
brandon...@gmail.com

OK, good point.

Now I wonder, what is the missing link here (likely not an ATS issue but a
“user error”):

patscc -atsccomp /usr/bin/x86_64-w64-mingw32-gcc -D_XOPEN_SOURCE
-D_JNI_IMPLEMENTATION -D_GNU_SOURCE -DATS_MEMALLOC_LIBC -fPIC
-I/home/brand_000/ATS-Postiats -I/home/brand_000/ATS-Postiats/ccomp/runtime
-IIATS /home/brand_000/ATS-Postiats-contrib/contrib
-I/usr/Java/jdk1.8.0_25/include -I/usr/Java/jdk1.8.0_25/include/win32
-D__int64=int64_t -D_ATS_CCOMP_HEADER_NONE -D_ATS_CCOMP_PRELUDE_NONE
-D_ATS_CCOMP_PRELUDE_USER="/home/brand_000/ATS-Postiats-contrib/contrib/libats-/bbarker/winats/pats_ccomp.h"
-c Calculator_controller.dats -verbose 2> tmp~

Excerpt from ‘tmp~’ (stderr):

exec(patsopt -IATS /home/brand_000/ATS-Postiats-contrib/contrib --output
Calculator_controller_dats.c --dynamic Calculator_controller.dats)
exec(patsopt -IATS /home/brand_000/ATS-Postiats-contrib/contrib --output
Calculator_controller_dats.c --dynamic Calculator_controller.dats) = 0
exec(/usr/bin/x86_64-w64-mingw32-gcc -D_XOPEN_SOURCE -D_JNI_IMPLEMENTATION
-D_GNU_SOURCE -DATS_MEMALLOC_LIBC -fPIC -I/home/brand_000/ATS-Postiats
-I/home/brand_000/ATS-Postiats/ccomp/runtime -I
/home/brand_000/ATS-Postiats-contrib/contrib
-I/usr/Java/jdk1.8.0_25/include -I/usr/Java/jdk1.8.0_25/include/win32
-D__int64=int64_t -D_ATS_CCOMP_HEADER_NONE -D_ATS_CCOMP_PRELUDE_NONE
-D_ATS_CCOMP_PRELUDE_USER=“/home/brand_000/ATS-Postiats-contrib/contrib/libats-/bbarker/winats/pats_ccomp.h”
-c Calculator_controller_dats.c)
Calculator_controller_dats.c:1:0: warning: -fPIC ignored for target (all
code is position independent) [enabled by default]
/*
^
Calculator_controller_dats.c:57:10: error: #include expects “FILENAME” or

#include _ATS_CCOMP_PRELUDE_USEROn Friday, December 26, 2014 3:54:26 PM UTC-5, gmhwxi wrote:

For now, there is no need to support exceptions on Windows. This piece can
always be added later.

On Thu, Dec 25, 2014 at 12:21 AM, Brandon Barker <brand...@gmail.com <javascript:>> wrote:

To expand a bit on this process, I found the following relevant lines in
a Makefile for adruino, which all seem like they will be relevant except
the D_ATS_CCOMP_EXCEPTION_NONE; I assume there is no reason why this
couldn’t be supported on windows (supposedly Boehm GC supports Windows but
I have not tried it yet).

MYCFLAGS := -fpermissive -wMYCFLAGS += -D_ATS_CCOMP_HEADER_NONEMYCFLAGS
+= -D_ATS_CCOMP_PRELUDE_NONEMYCFLAGS +=
-D_ATS_CCOMP_PRELUDE_USER="arduino/H/pats_ccomp.h"MYCFLAGS +=
-D_ATS_CCOMP_EXCEPTION_NONEMYCFLAGS += -D_ATSTYPE_VAR_SIZE=1024MYCFLAGS
+= -I$(PATSHOME) -I$(PATSHOME)/ccomp/runtime -I${PATSHOMERELOC}/contrib
I will try to start with your kernelats code and modify as necessary to
work with windows. Perhaps afterwards, we can somehow separate
platform-dependent portions out elsewhere to make it easier to maintain
(assuming the majority of the code in ccomp/runtime/pats_ccomp_.h and ${PATSHOME}/prelude/CATS/.cats
is not platform-dependent).

On Mon, Dec 15, 2014 at 11:29 PM, gmhwxi <gmh...@gmail.com <javascript:>> wrote:

This is my understanding. Have not tried it.

Step 1: Build ATS under Cygwin
Step 2: Use patscc/patsopt under Cygwin to generate C code
Step 3: Use -mno-cygwin to generate “native” code for Windows:

gcc –mno-cygwin

In order for Step3 to work, you need to have a new set of the following
files:

ccomp/runtime/pats_ccomp_.h
${ATSHOME}/prelude/CATS/
.cats

I basically did this to support kernel programming:

https://github.com/githwxi/ATS-Postiats-contrib/tree/master/contrib/kernelats

You can use my code to get started quickly. How to use it?

Please take a look at the setup for the Arduino example:

https://github.com/githwxi/ATS-Postiats-contrib/tree/master/contrib/arduino

On Monday, December 15, 2014 9:41:33 PM UTC-5, Brandon Barker wrote:

Hi,

I know ATS hasn’t been compiled using mingw. Has anyone had any
problems using mingw to build ats programs though? Or foresee problems? I
haven’t used it myself, but cygwin is problematic for JNI.


Brandon Barker
brand...@gmail.com


You received this message because you are subscribed to the Google
Groups “ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to ats-lang...@googlegroups.com <javascript:>.
To post to this group, send email to ats-l...@googlegroups.com
<javascript:>.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/ae8826f6-5cc3-49cd-904c-ee8bbc8fb45f%40googlegroups.com
https://groups.google.com/d/msgid/ats-lang-users/ae8826f6-5cc3-49cd-904c-ee8bbc8fb45f%40googlegroups.com?utm_medium=email&utm_source=footer
.


Brandon Barker
brand...@gmail.com <javascript:>


You received this message because you are subscribed to the Google Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ats-lang...@googlegroups.com <javascript:>.
To post to this group, send email to ats-l...@googlegroups.com
<javascript:>.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/CAORbNRqsFUttYCcdVg3xF_2wUTbbMDT-xjK0u%2BLVNWmYP_%2BKsQ%40mail.gmail.com
https://groups.google.com/d/msgid/ats-lang-users/CAORbNRqsFUttYCcdVg3xF_2wUTbbMDT-xjK0u%2BLVNWmYP_%2BKsQ%40mail.gmail.com?utm_medium=email&utm_source=footer
.

Yes that was how it started but soon it was apparent that I need to use the
cygwin to compile the tool chain:
https://groups.google.com/d/msg/ats-lang-users/D218JKFWgew/td7MQEYd7aAJOn Wednesday, December 17, 2014 8:35:46 AM UTC-8, Brandon Barker wrote:

Indeed. I actually did look at that thread again during this process, but
I thought the gist of it was more about trying to build ATS itself using
mingw. Which is a great goal but one I’m not currently up to pursuing.

On Wed, Dec 17, 2014 at 11:31 AM, H Zhang <zht...@gmail.com <javascript:>> wrote:

See this thread for a detailed discussion of this earlier this year. How
time flies.

Redirecting to Google Groups


You received this message because you are subscribed to the Google Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ats-lang...@googlegroups.com <javascript:>.
To post to this group, send email to ats-l...@googlegroups.com
<javascript:>.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/b735e3a4-e76d-4f17-98ab-772ff3697d74%40googlegroups.com
https://groups.google.com/d/msgid/ats-lang-users/b735e3a4-e76d-4f17-98ab-772ff3697d74%40googlegroups.com?utm_medium=email&utm_source=footer
.


Brandon Barker
brand...@gmail.com <javascript:>

Or you can specify the target platform to be windows native but you do need
to install the corresponding gcc packages under Cygwin and you will live
with the Cygwin version of mingw/gcc. If you want more up-to-date gcc
versions then you need to go with mingw itself.

Your intuition seems to be correct (though I have no idea why, but it may
be one of those things I don’t want to know =)).On Friday, December 26, 2014 9:44:45 PM UTC-5, gmhwxi wrote:

Not sure how to make it work on Cygwin. Maybe:

-D_ATS_CCOMP_PRELUDE_USER=‘“/home/brand_000/ATS-Postiats-contrib/contrib/libats-/bbarker/winats/pats_ccomp.h”’

(putting double quotes inside single quotes).

On Fri, Dec 26, 2014 at 6:37 PM, Brandon Barker <brand...@gmail.com <javascript:>> wrote:

OK, good point.

Now I wonder, what is the missing link here (likely not an ATS issue but
a “user error”):

patscc -atsccomp /usr/bin/x86_64-w64-mingw32-gcc -D_XOPEN_SOURCE
-D_JNI_IMPLEMENTATION -D_GNU_SOURCE -DATS_MEMALLOC_LIBC -fPIC
-I/home/brand_000/ATS-Postiats -I/home/brand_000/ATS-Postiats/ccomp/runtime
-IIATS /home/brand_000/ATS-Postiats-contrib/contrib
-I/usr/Java/jdk1.8.0_25/include -I/usr/Java/jdk1.8.0_25/include/win32
-D__int64=int64_t -D_ATS_CCOMP_HEADER_NONE -D_ATS_CCOMP_PRELUDE_NONE
-D_ATS_CCOMP_PRELUDE_USER="/home/brand_000/ATS-Postiats-contrib/contrib/libats-/bbarker/winats/pats_ccomp.h"
-c Calculator_controller.dats -verbose 2> tmp~

Excerpt from ‘tmp~’ (stderr):

exec(patsopt -IATS /home/brand_000/ATS-Postiats-contrib/contrib --output
Calculator_controller_dats.c --dynamic Calculator_controller.dats)
exec(patsopt -IATS /home/brand_000/ATS-Postiats-contrib/contrib --output
Calculator_controller_dats.c --dynamic Calculator_controller.dats) = 0
exec(/usr/bin/x86_64-w64-mingw32-gcc -D_XOPEN_SOURCE
-D_JNI_IMPLEMENTATION -D_GNU_SOURCE -DATS_MEMALLOC_LIBC -fPIC
-I/home/brand_000/ATS-Postiats -I/home/brand_000/ATS-Postiats/ccomp/runtime
-I /home/brand_000/ATS-Postiats-contrib/contrib
-I/usr/Java/jdk1.8.0_25/include -I/usr/Java/jdk1.8.0_25/include/win32
-D__int64=int64_t -D_ATS_CCOMP_HEADER_NONE -D_ATS_CCOMP_PRELUDE_NONE
-D_ATS_CCOMP_PRELUDE_USER=“/home/brand_000/ATS-Postiats-contrib/contrib/libats-/bbarker/winats/pats_ccomp.h”
-c Calculator_controller_dats.c)
Calculator_controller_dats.c:1:0: warning: -fPIC ignored for target (all
code is position independent) [enabled by default]
/*
^
Calculator_controller_dats.c:57:10: error: #include expects “FILENAME” or

#include _ATS_CCOMP_PRELUDE_USER

On Friday, December 26, 2014 3:54:26 PM UTC-5, gmhwxi wrote:

For now, there is no need to support exceptions on Windows. This piece
can always be added later.

On Thu, Dec 25, 2014 at 12:21 AM, Brandon Barker brand...@gmail.com wrote:

To expand a bit on this process, I found the following relevant lines
in a Makefile for adruino, which all seem like they will be relevant except
the D_ATS_CCOMP_EXCEPTION_NONE; I assume there is no reason why this
couldn’t be supported on windows (supposedly Boehm GC supports Windows but
I have not tried it yet).

MYCFLAGS := -fpermissive -wMYCFLAGS += -D_ATS_CCOMP_HEADER_NONEMYCFLAGS
+= -D_ATS_CCOMP_PRELUDE_NONEMYCFLAGS += -D_ATS_CCOMP_PRELUDE_USER="
arduino/H/pats_ccomp.h"MYCFLAGS += -D_ATS_CCOMP_EXCEPTION_NONEMYCFLAGS
+= -D_ATSTYPE_VAR_SIZE=1024MYCFLAGS += -I$(PATSHOME) -I$(PATSHOME)/ccomp/runtime
-I${PATSHOMERELOC}/contrib
I will try to start with your kernelats code and modify as necessary to
work with windows. Perhaps afterwards, we can somehow separate
platform-dependent portions out elsewhere to make it easier to maintain
(assuming the majority of the code in ccomp/runtime/pats_ccomp_.h and
${PATSHOME}/prelude/CATS/
.cats is not platform-dependent).

On Mon, Dec 15, 2014 at 11:29 PM, gmhwxi gmh...@gmail.com wrote:

This is my understanding. Have not tried it.

Step 1: Build ATS under Cygwin
Step 2: Use patscc/patsopt under Cygwin to generate C code
Step 3: Use -mno-cygwin to generate “native” code for Windows:

gcc –mno-cygwin

In order for Step3 to work, you need to have a new set of the following
files:

ccomp/runtime/pats_ccomp_.h
${ATSHOME}/prelude/CATS/
.cats

I basically did this to support kernel programming:

https://github.com/githwxi/ATS-Postiats-contrib/tree/
master/contrib/kernelats

You can use my code to get started quickly. How to use it?

Please take a look at the setup for the Arduino example:

https://github.com/githwxi/ATS-Postiats-contrib/tree/
master/contrib/arduino

On Monday, December 15, 2014 9:41:33 PM UTC-5, Brandon Barker wrote:

Hi,

I know ATS hasn’t been compiled using mingw. Has anyone had any
problems using mingw to build ats programs though? Or foresee problems? I
haven’t used it myself, but cygwin is problematic for JNI.


Brandon Barker
brand...@gmail.com


You received this message because you are subscribed to the Google
Groups “ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to ats-lang...@googlegroups.com.
To post to this group, send email to ats-l...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/
msgid/ats-lang-users/ae8826f6-5cc3-49cd-904c-ee8bbc8fb45f%
40googlegroups.com
https://groups.google.com/d/msgid/ats-lang-users/ae8826f6-5cc3-49cd-904c-ee8bbc8fb45f%40googlegroups.com?utm_medium=email&utm_source=footer
.


Brandon Barker
brand...@gmail.com


You received this message because you are subscribed to the Google
Groups “ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to ats-lang...@googlegroups.com.
To post to this group, send email to ats-l...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/
msgid/ats-lang-users/CAORbNRqsFUttYCcdVg3xF_2wUTbbMDT-xjK0u%2BLVNWmYP_%
2BKsQ%40mail.gmail.com
https://groups.google.com/d/msgid/ats-lang-users/CAORbNRqsFUttYCcdVg3xF_2wUTbbMDT-xjK0u%2BLVNWmYP_%2BKsQ%40mail.gmail.com?utm_medium=email&utm_source=footer
.


You received this message because you are subscribed to the Google Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ats-lang...@googlegroups.com <javascript:>.
To post to this group, send email to ats-l...@googlegroups.com
<javascript:>.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/93ece491-355c-48bb-a456-1bcd821a835a%40googlegroups.com
https://groups.google.com/d/msgid/ats-lang-users/93ece491-355c-48bb-a456-1bcd821a835a%40googlegroups.com?utm_medium=email&utm_source=footer
.

See this thread for a detailed discussion of this earlier this year. How
time flies.
https://groups.google.com/forum/#!searchin/ats-lang-users/zhang/ats-lang-users/D218JKFWgew/cqdl8Ef-VeYJ

To expand a bit on this process, I found the following relevant lines in a
Makefile for adruino, which all seem like they will be relevant except
the D_ATS_CCOMP_EXCEPTION_NONE;
I assume there is no reason why this couldn’t be supported on windows
(supposedly Boehm GC supports Windows but I have not tried it yet).

MYCFLAGS := -fpermissive -wMYCFLAGS += -D_ATS_CCOMP_HEADER_NONEMYCFLAGS +=
-D_ATS_CCOMP_PRELUDE_NONEMYCFLAGS +=
-D_ATS_CCOMP_PRELUDE_USER="arduino/H/pats_ccomp.h"MYCFLAGS +=
-D_ATS_CCOMP_EXCEPTION_NONEMYCFLAGS += -D_ATSTYPE_VAR_SIZE=1024MYCFLAGS +=
-I$(PATSHOME) -I$(PATSHOME)/ccomp/runtime -I${PATSHOMERELOC}/contrib
I will try to start with your kernelats code and modify as necessary to
work with windows. Perhaps afterwards, we can somehow separate
platform-dependent portions out elsewhere to make it easier to maintain
(assuming the majority of the code in ccomp/runtime/pats_ccomp_.h and
${PATSHOME}/prelude/CATS/
.cats
is not platform-dependent).On Mon, Dec 15, 2014 at 11:29 PM, gmhwxi gmh...@gmail.com wrote:

This is my understanding. Have not tried it.

Step 1: Build ATS under Cygwin
Step 2: Use patscc/patsopt under Cygwin to generate C code
Step 3: Use -mno-cygwin to generate “native” code for Windows:

gcc –mno-cygwin

In order for Step3 to work, you need to have a new set of the following
files:

ccomp/runtime/pats_ccomp_.h
${ATSHOME}/prelude/CATS/
.cats

I basically did this to support kernel programming:

https://github.com/githwxi/ATS-Postiats-contrib/tree/master/contrib/kernelats

You can use my code to get started quickly. How to use it?

Please take a look at the setup for the Arduino example:

https://github.com/githwxi/ATS-Postiats-contrib/tree/master/contrib/arduino

On Monday, December 15, 2014 9:41:33 PM UTC-5, Brandon Barker wrote:

Hi,

I know ATS hasn’t been compiled using mingw. Has anyone had any problems
using mingw to build ats programs though? Or foresee problems? I haven’t
used it myself, but cygwin is problematic for JNI.


Brandon Barker
brand...@gmail.com


You received this message because you are subscribed to the Google Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/ae8826f6-5cc3-49cd-904c-ee8bbc8fb45f%40googlegroups.com
https://groups.google.com/d/msgid/ats-lang-users/ae8826f6-5cc3-49cd-904c-ee8bbc8fb45f%40googlegroups.com?utm_medium=email&utm_source=footer
.

Brandon Barker
brandon...@gmail.com

Not sure how to make it work on Cygwin. Maybe:

-D_ATS_CCOMP_PRELUDE_USER=‘“/home/brand_000/ATS-Postiats-contrib/contrib/libats-/bbarker/winats/pats_ccomp.h”’

(putting double quotes inside single quotes).On Fri, Dec 26, 2014 at 6:37 PM, Brandon Barker brandon...@gmail.com wrote:

OK, good point.

Now I wonder, what is the missing link here (likely not an ATS issue but a
“user error”):

patscc -atsccomp /usr/bin/x86_64-w64-mingw32-gcc -D_XOPEN_SOURCE
-D_JNI_IMPLEMENTATION -D_GNU_SOURCE -DATS_MEMALLOC_LIBC -fPIC
-I/home/brand_000/ATS-Postiats -I/home/brand_000/ATS-Postiats/ccomp/runtime
-IIATS /home/brand_000/ATS-Postiats-contrib/contrib
-I/usr/Java/jdk1.8.0_25/include -I/usr/Java/jdk1.8.0_25/include/win32
-D__int64=int64_t -D_ATS_CCOMP_HEADER_NONE -D_ATS_CCOMP_PRELUDE_NONE
-D_ATS_CCOMP_PRELUDE_USER="/home/brand_000/ATS-Postiats-contrib/contrib/libats-/bbarker/winats/pats_ccomp.h"
-c Calculator_controller.dats -verbose 2> tmp~

Excerpt from ‘tmp~’ (stderr):

exec(patsopt -IATS /home/brand_000/ATS-Postiats-contrib/contrib --output
Calculator_controller_dats.c --dynamic Calculator_controller.dats)
exec(patsopt -IATS /home/brand_000/ATS-Postiats-contrib/contrib --output
Calculator_controller_dats.c --dynamic Calculator_controller.dats) = 0
exec(/usr/bin/x86_64-w64-mingw32-gcc -D_XOPEN_SOURCE -D_JNI_IMPLEMENTATION
-D_GNU_SOURCE -DATS_MEMALLOC_LIBC -fPIC -I/home/brand_000/ATS-Postiats
-I/home/brand_000/ATS-Postiats/ccomp/runtime -I
/home/brand_000/ATS-Postiats-contrib/contrib
-I/usr/Java/jdk1.8.0_25/include -I/usr/Java/jdk1.8.0_25/include/win32
-D__int64=int64_t -D_ATS_CCOMP_HEADER_NONE -D_ATS_CCOMP_PRELUDE_NONE
-D_ATS_CCOMP_PRELUDE_USER=“/home/brand_000/ATS-Postiats-contrib/contrib/libats-/bbarker/winats/pats_ccomp.h”
-c Calculator_controller_dats.c)
Calculator_controller_dats.c:1:0: warning: -fPIC ignored for target (all
code is position independent) [enabled by default]
/*
^
Calculator_controller_dats.c:57:10: error: #include expects “FILENAME” or

#include _ATS_CCOMP_PRELUDE_USER

On Friday, December 26, 2014 3:54:26 PM UTC-5, gmhwxi wrote:

For now, there is no need to support exceptions on Windows. This piece
can always be added later.

On Thu, Dec 25, 2014 at 12:21 AM, Brandon Barker brand...@gmail.com wrote:

To expand a bit on this process, I found the following relevant lines in
a Makefile for adruino, which all seem like they will be relevant except
the D_ATS_CCOMP_EXCEPTION_NONE; I assume there is no reason why this
couldn’t be supported on windows (supposedly Boehm GC supports Windows but
I have not tried it yet).

MYCFLAGS := -fpermissive -wMYCFLAGS += -D_ATS_CCOMP_HEADER_NONEMYCFLAGS
+= -D_ATS_CCOMP_PRELUDE_NONEMYCFLAGS += -D_ATS_CCOMP_PRELUDE_USER="
arduino/H/pats_ccomp.h"MYCFLAGS += -D_ATS_CCOMP_EXCEPTION_NONEMYCFLAGS
+= -D_ATSTYPE_VAR_SIZE=1024MYCFLAGS += -I$(PATSHOME) -I$(PATSHOME)/ccomp/runtime
-I${PATSHOMERELOC}/contrib
I will try to start with your kernelats code and modify as necessary to
work with windows. Perhaps afterwards, we can somehow separate
platform-dependent portions out elsewhere to make it easier to maintain
(assuming the majority of the code in ccomp/runtime/pats_ccomp_.h and
${PATSHOME}/prelude/CATS/
.cats is not platform-dependent).

On Mon, Dec 15, 2014 at 11:29 PM, gmhwxi gmh...@gmail.com wrote:

This is my understanding. Have not tried it.

Step 1: Build ATS under Cygwin
Step 2: Use patscc/patsopt under Cygwin to generate C code
Step 3: Use -mno-cygwin to generate “native” code for Windows:

gcc –mno-cygwin

In order for Step3 to work, you need to have a new set of the following
files:

ccomp/runtime/pats_ccomp_.h
${ATSHOME}/prelude/CATS/
.cats

I basically did this to support kernel programming:

https://github.com/githwxi/ATS-Postiats-contrib/tree/
master/contrib/kernelats

You can use my code to get started quickly. How to use it?

Please take a look at the setup for the Arduino example:

https://github.com/githwxi/ATS-Postiats-contrib/tree/
master/contrib/arduino

On Monday, December 15, 2014 9:41:33 PM UTC-5, Brandon Barker wrote:

Hi,

I know ATS hasn’t been compiled using mingw. Has anyone had any
problems using mingw to build ats programs though? Or foresee problems? I
haven’t used it myself, but cygwin is problematic for JNI.


Brandon Barker
brand...@gmail.com


You received this message because you are subscribed to the Google
Groups “ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to ats-lang...@googlegroups.com.
To post to this group, send email to ats-l...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/
msgid/ats-lang-users/ae8826f6-5cc3-49cd-904c-ee8bbc8fb45f%
40googlegroups.com
https://groups.google.com/d/msgid/ats-lang-users/ae8826f6-5cc3-49cd-904c-ee8bbc8fb45f%40googlegroups.com?utm_medium=email&utm_source=footer
.


Brandon Barker
brand...@gmail.com


You received this message because you are subscribed to the Google
Groups “ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to ats-lang...@googlegroups.com.
To post to this group, send email to ats-l...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/
msgid/ats-lang-users/CAORbNRqsFUttYCcdVg3xF_2wUTbbMDT-xjK0u%2BLVNWmYP_%
2BKsQ%40mail.gmail.com
https://groups.google.com/d/msgid/ats-lang-users/CAORbNRqsFUttYCcdVg3xF_2wUTbbMDT-xjK0u%2BLVNWmYP_%2BKsQ%40mail.gmail.com?utm_medium=email&utm_source=footer
.


You received this message because you are subscribed to the Google Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/93ece491-355c-48bb-a456-1bcd821a835a%40googlegroups.com
https://groups.google.com/d/msgid/ats-lang-users/93ece491-355c-48bb-a456-1bcd821a835a%40googlegroups.com?utm_medium=email&utm_source=footer
.

It seems that the flag -mno-cygwin has been deprecated.
So you need MinGW to do Step 3.

In short, use Cygwin to build ATS2 and use MinGW to compile
the C output generated from ATS2 source code. Of course, using
Miscirsoft C/C++ compiler is another option.On Monday, December 15, 2014 11:29:26 PM UTC-5, gmhwxi wrote:

This is my understanding. Have not tried it.

Step 1: Build ATS under Cygwin
Step 2: Use patscc/patsopt under Cygwin to generate C code
Step 3: Use -mno-cygwin to generate “native” code for Windows:

gcc –mno-cygwin

In order for Step3 to work, you need to have a new set of the following
files:

ccomp/runtime/pats_ccomp_.h
${ATSHOME}/prelude/CATS/
.cats

I basically did this to support kernel programming:

https://github.com/githwxi/ATS-Postiats-contrib/tree/master/contrib/kernelats

You can use my code to get started quickly. How to use it?

Please take a look at the setup for the Arduino example:

https://github.com/githwxi/ATS-Postiats-contrib/tree/master/contrib/arduino

On Monday, December 15, 2014 9:41:33 PM UTC-5, Brandon Barker wrote:

Hi,

I know ATS hasn’t been compiled using mingw. Has anyone had any problems
using mingw to build ats programs though? Or foresee problems? I haven’t
used it myself, but cygwin is problematic for JNI.


Brandon Barker
brand...@gmail.com

This is my understanding. Have not tried it.

Step 1: Build ATS under Cygwin
Step 2: Use patscc/patsopt under Cygwin to generate C code
Step 3: Use -mno-cygwin to generate “native” code for Windows:

gcc –mno-cygwin

In order for Step3 to work, you need to have a new set of the following
files:

ccomp/runtime/pats_ccomp_.h
${ATSHOME}/prelude/CATS/
.cats

I basically did this to support kernel programming:

You can use my code to get started quickly. How to use it?

Please take a look at the setup for the Arduino example:

https://github.com/githwxi/ATS-Postiats-contrib/tree/master/contrib/arduinoOn Monday, December 15, 2014 9:41:33 PM UTC-5, Brandon Barker wrote:

Hi,

I know ATS hasn’t been compiled using mingw. Has anyone had any problems
using mingw to build ats programs though? Or foresee problems? I haven’t
used it myself, but cygwin is problematic for JNI.


Brandon Barker
brand...@gmail.com <javascript:>

Thanks, I’ll have a more careful read when I switch back to this in a few
days. From skimming, an interesting point of discussion on github recently
is that patscc/patsopt should probably be rewritten if it is meant to be
run using Windows file paths (I am not sure if the idea is to have two
separate implementations, or just a more generalized single
implementation).

I am trying to sidestep the issue by starting patscc in cygwin’s bash
(which, when used with bash -l, can also have the advantage of loading
environment variables from .bash_profile). I suppose/hope mingw’s bash
could work just as well.On Wed, Dec 17, 2014 at 11:42 AM, H Zhang zht...@gmail.com wrote:

Yes that was how it started but soon it was apparent that I need to use
the cygwin to compile the tool chain:
https://groups.google.com/d/msg/ats-lang-users/D218JKFWgew/td7MQEYd7aAJ

On Wednesday, December 17, 2014 8:35:46 AM UTC-8, Brandon Barker wrote:

Indeed. I actually did look at that thread again during this process, but
I thought the gist of it was more about trying to build ATS itself using
mingw. Which is a great goal but one I’m not currently up to pursuing.

On Wed, Dec 17, 2014 at 11:31 AM, H Zhang zht...@gmail.com wrote:

See this thread for a detailed discussion of this earlier this year. How
time flies.
Redirecting to Google Groups
users/zhang/ats-lang-users/D218JKFWgew/cqdl8Ef-VeYJ


You received this message because you are subscribed to the Google
Groups “ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to ats-lang...@googlegroups.com.
To post to this group, send email to ats-l...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/
msgid/ats-lang-users/b735e3a4-e76d-4f17-98ab-772ff3697d74%
40googlegroups.com
https://groups.google.com/d/msgid/ats-lang-users/b735e3a4-e76d-4f17-98ab-772ff3697d74%40googlegroups.com?utm_medium=email&utm_source=footer
.


Brandon Barker
brand...@gmail.com


You received this message because you are subscribed to the Google Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/482d4c46-a867-4509-aae0-5bbe084eeb3c%40googlegroups.com
https://groups.google.com/d/msgid/ats-lang-users/482d4c46-a867-4509-aae0-5bbe084eeb3c%40googlegroups.com?utm_medium=email&utm_source=footer
.

Brandon Barker
brandon...@gmail.com

For now, there is no need to support exceptions on Windows. This piece can
always be added later.On Thu, Dec 25, 2014 at 12:21 AM, Brandon Barker brandon...@gmail.com wrote:

To expand a bit on this process, I found the following relevant lines in a
Makefile for adruino, which all seem like they will be relevant except the D_ATS_CCOMP_EXCEPTION_NONE;
I assume there is no reason why this couldn’t be supported on windows
(supposedly Boehm GC supports Windows but I have not tried it yet).

MYCFLAGS := -fpermissive -wMYCFLAGS += -D_ATS_CCOMP_HEADER_NONEMYCFLAGS
+= -D_ATS_CCOMP_PRELUDE_NONEMYCFLAGS +=
-D_ATS_CCOMP_PRELUDE_USER="arduino/H/pats_ccomp.h"MYCFLAGS +=
-D_ATS_CCOMP_EXCEPTION_NONEMYCFLAGS += -D_ATSTYPE_VAR_SIZE=1024MYCFLAGS
+= -I$(PATSHOME) -I$(PATSHOME)/ccomp/runtime -I${PATSHOMERELOC}/contrib
I will try to start with your kernelats code and modify as necessary to
work with windows. Perhaps afterwards, we can somehow separate
platform-dependent portions out elsewhere to make it easier to maintain
(assuming the majority of the code in ccomp/runtime/pats_ccomp_.h and ${PATSHOME}/prelude/CATS/.cats
is not platform-dependent).

On Mon, Dec 15, 2014 at 11:29 PM, gmhwxi gmh...@gmail.com wrote:

This is my understanding. Have not tried it.

Step 1: Build ATS under Cygwin
Step 2: Use patscc/patsopt under Cygwin to generate C code
Step 3: Use -mno-cygwin to generate “native” code for Windows:

gcc –mno-cygwin

In order for Step3 to work, you need to have a new set of the following
files:

ccomp/runtime/pats_ccomp_.h
${ATSHOME}/prelude/CATS/
.cats

I basically did this to support kernel programming:

https://github.com/githwxi/ATS-Postiats-contrib/tree/master/contrib/kernelats

You can use my code to get started quickly. How to use it?

Please take a look at the setup for the Arduino example:

https://github.com/githwxi/ATS-Postiats-contrib/tree/master/contrib/arduino

On Monday, December 15, 2014 9:41:33 PM UTC-5, Brandon Barker wrote:

Hi,

I know ATS hasn’t been compiled using mingw. Has anyone had any problems
using mingw to build ats programs though? Or foresee problems? I haven’t
used it myself, but cygwin is problematic for JNI.


Brandon Barker
brand...@gmail.com


You received this message because you are subscribed to the Google Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/ae8826f6-5cc3-49cd-904c-ee8bbc8fb45f%40googlegroups.com
https://groups.google.com/d/msgid/ats-lang-users/ae8826f6-5cc3-49cd-904c-ee8bbc8fb45f%40googlegroups.com?utm_medium=email&utm_source=footer
.


Brandon Barker
brandon...@gmail.com


You received this message because you are subscribed to the Google Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/CAORbNRqsFUttYCcdVg3xF_2wUTbbMDT-xjK0u%2BLVNWmYP_%2BKsQ%40mail.gmail.com
https://groups.google.com/d/msgid/ats-lang-users/CAORbNRqsFUttYCcdVg3xF_2wUTbbMDT-xjK0u%2BLVNWmYP_%2BKsQ%40mail.gmail.com?utm_medium=email&utm_source=footer
.

Indeed. I actually did look at that thread again during this process, but I
thought the gist of it was more about trying to build ATS itself using
mingw. Which is a great goal but one I’m not currently up to pursuing.On Wed, Dec 17, 2014 at 11:31 AM, H Zhang zht...@gmail.com wrote:

See this thread for a detailed discussion of this earlier this year. How
time flies.

Redirecting to Google Groups


You received this message because you are subscribed to the Google Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/b735e3a4-e76d-4f17-98ab-772ff3697d74%40googlegroups.com
https://groups.google.com/d/msgid/ats-lang-users/b735e3a4-e76d-4f17-98ab-772ff3697d74%40googlegroups.com?utm_medium=email&utm_source=footer
.

Brandon Barker
brandon...@gmail.com