ATS and OSX

55 views
Skip to first unread message

gmhwxi

unread,
Dec 19, 2014, 7:17:02 PM12/19/14
to ats-lan...@googlegroups.com

Using ATS under MacOSX  has been a thorny issue for quite sometime.
Probably the easiest way to install ATS2 under OSX is by using a homebrew formula;

https://github.com/Homebrew/homebrew/blob/master/Library/Formula/ats2-postiats.rb

Here are some caveats:

1) ATS1 cannot be correctly compiled by clang. You need genuine gcc (the one
on OSX is hooked to clang by default) to compile ATS1. See below.

2) When using gcc-4.x to compile ATS1, please make sure that you generate
a no-gc version of ATS1. Let us refer to this version as ATS1-ngc.

3) Please use ATS1-ngc to compile ATS2.

Sounds complicated? All the steps can be found in the following file:

https://github.com/githwxi/ATS-Postiats/blob/master/.travis.yml





William Blair

unread,
Dec 22, 2014, 3:35:04 PM12/22/14
to ats-lan...@googlegroups.com
Using the YAML file I was able to compile and run ATS2 from the git repository on Yosemite. A couple of things I found:

- I needed the real gcc to compile ATS2. Otherwise, patsopt crashed with a double free while compiling patscc.

- Homebrew installed gcc-4.9 on my system, so we might want to be able to configure the gcc program to use (the yaml file uses 4.8).

gmhwxi

unread,
Dec 22, 2014, 5:05:41 PM12/22/14
to ats-lan...@googlegroups.com
Can you tell where the double free occurred?

William Blair

unread,
Dec 22, 2014, 5:29:51 PM12/22/14
to ats-lan...@googlegroups.com

It looks like it wasn't a double free issue. Instead, the error I occasionally get is 

     "malloc: *** error for object 0x7ff8e80b7960: pointer being freed was not allocated"

Going through the stack trace it looks like this happens at a call for "myint_free" in pats_lintprgrm.dats. I am thinking that compiling without gmp support would solve the issue.

William Blair

unread,
Dec 22, 2014, 5:46:38 PM12/22/14
to ats-lan...@googlegroups.com
Compiling without gmp seems to have fixed the issue.

gmhwxi

unread,
Dec 22, 2014, 6:27:33 PM12/22/14
to ats-lan...@googlegroups.com
This is very good to know.

Could you use valgrind to get more information on this?

It looks like that there is a good chance for us to fix this bug.
Reply all
Reply to author
Forward
0 new messages