# How to build ATS(1) on Cygwin64

**URL:** <https://discourse.ats-lang.org/t/how-to-build-ats-1-on-cygwin64/189>\
**Category:** Google Group\
**Created:** [December 22, 2013, 5:27am UTC](https://discourse.ats-lang.org/t/how-to-build-ats-1-on-cygwin64/189 "2013-12-22T05:27:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brandon\_Barker](https://sea1.discourse-cdn.com/flex019/user_avatar/discourse.ats-lang.org/brandon_barker/32/61_2.png) [@Brandon\_Barker](https://discourse.ats-lang.org/u/Brandon_Barker)\
**Post date:** [December 22, 2013, 5:27am UTC](https://discourse.ats-lang.org/t/how-to-build-ats-1-on-cygwin64/189/1 "2013-12-22T05:27:59Z")

</div>

Trying to build ATS 0.2.11 on cygwin64 resulted in the following  
interesting situation (I will try Cygwin32 on the same machine soon):

…  
gcc -I"/home/brand\_000/ats-lang-anairiats-0.2.11"  
-I"/home/brand\_000/ats-lang-anairiats-0.2.11"/ccomp/runtime -O2 -g -o  
libats\_lex\_tables\_dats.o -c libats\_lex\_tables\_dats.c  
libats\_lex\_tables\_dats.c: In function ‘\_\_accept\_table\_make\_fun’:  
libats\_lex\_tables\_dats.c:635:24: warning: incompatible implicit declaration  
of built-in function ‘calloc’ [enabled by default]  
sz = ntot + 1 ; p0 = calloc (sz, sizeof(ats\_int16\_type)) ;  
^  
libats\_lex\_tables\_dats.c: In function ‘\_\_transition\_table\_make\_fun’:  
libats\_lex\_tables\_dats.c:667:8: warning: incompatible implicit declaration  
of built-in function ‘malloc’ [enabled by default]  
p0 = malloc (sz\*sizeof(ats\_int16\_type)) ; p = p0 ;  
^  
gcc -I"/home/brand\_000/ats-lang-anairiats-0.2.11"  
-I"/home/brand\_000/ats-lang-anairiats-0.2.11"/ccomp/runtime -O2 -g  
-L/home/brand\_000/FBA/local/lib -o atsopt ats\_array\_sats.o  
ats\_array\_dats.o ats\_charlst\_sats.o ats\_charlst\_dats.o ats\_comarg\_sats.o  
ats\_comarg\_dats.o ats\_counter\_sats.o ats\_counter\_dats.o ats\_debug\_sats.o  
ats\_debug\_dats.o ats\_effect\_sats.o ats\_effect\_dats.o ats\_error\_sats.o  
ats\_error\_dats.o ats\_filename\_sats.o ats\_filename\_dats.o  
ats\_fixity\_sats.o ats\_fixity\_prec\_dats.o ats\_fixity\_fxty\_dats.o  
ats\_global\_sats.o ats\_global\_dats.o ats\_hashtbl\_sats.o ats\_hashtbl\_dats.o  
ats\_intinf\_sats.o ats\_intinf\_dats.o ats\_keyword\_sats.o ats\_keyword\_dats.o  
ats\_label\_sats.o ats\_label\_dats.o ats\_location\_sats.o ats\_location\_dats.o  
ats\_namespace\_sats.o ats\_namespace\_dats.o ats\_posmark\_sats.o  
ats\_posmark\_dats.o ats\_stamp\_sats.o ats\_stamp\_dats.o ats\_symbol\_sats.o  
ats\_symbol\_dats.o ats\_symenv\_sats.o ats\_symenv\_dats.o ats\_symtbl\_sats.o  
ats\_symtbl\_dats.o ats\_list\_sats.o ats\_list\_dats.o ats\_map\_lin\_sats.o  
ats\_map\_lin\_dats.o ats\_reference\_sats.o ats\_reference\_dats.o  
ats\_set\_fun\_sats.o ats\_set\_fun\_dats.o ats\_parser\_sats.o ats\_parser\_dats.o  
ats\_syntax\_sats.o ats\_syntax\_dats.o ats\_syntax\_depgen\_dats.o  
ats\_syntax\_taggen\_dats.o ats\_syntax\_posmark\_dats.o ats\_staexp1\_sats.o  
ats\_staexp1\_dats.o ats\_staexp1\_print\_dats.o ats\_dynexp1\_sats.o  
ats\_dynexp1\_dats.o ats\_dynexp1\_print\_dats.o ats\_dynexp1\_syndef\_dats.o  
ats\_dynexp1\_syndef\_sats.o ats\_trans1\_env\_sats.o ats\_trans1\_env\_dats.o  
ats\_e1xp\_eval\_sats.o ats\_e1xp\_eval\_dats.o ats\_trans1\_sats.o  
ats\_trans1\_sta\_dats.o ats\_trans1\_dyn\_dats.o ats\_staexp2\_sats.o  
ats\_staexp2\_dats.o ats\_staexp2\_print\_dats.o ats\_staexp2\_scst\_dats.o  
ats\_staexp2\_svVar\_dats.o ats\_staexp2\_dcon\_dats.o  
ats\_staexp2\_util1\_dats.o ats\_staexp2\_util2\_dats.o  
ats\_staexp2\_pprint\_sats.o ats\_staexp2\_pprint\_dats.o ats\_dynexp2\_sats.o  
ats\_dynexp2\_dats.o ats\_dynexp2\_dcst\_dats.o ats\_dynexp2\_dmac\_dats.o  
ats\_dynexp2\_dvar\_dats.o ats\_dynexp2\_print\_dats.o ats\_dynexp2\_util\_dats.o  
ats\_trans2\_env\_sats.o ats\_trans2\_env\_dats.o ats\_stadyncst2\_sats.o  
ats\_stadyncst2\_dats.o ats\_trans2\_sats.o ats\_trans2\_sta\_dats.o  
ats\_trans2\_dyn1\_dats.o ats\_trans2\_dyn2\_dats.o ats\_macro2\_sats.o  
ats\_macro2\_dats.o ats\_patcst2\_sats.o ats\_patcst2\_dats.o  
ats\_string\_parse\_sats.o ats\_string\_parse\_dats.o ats\_printf\_c\_lats\_dats.o  
ats\_dynexp3\_sats.o ats\_dynexp3\_dats.o ats\_dynexp3\_print\_dats.o  
ats\_trans3\_env\_sats.o ats\_trans3\_env\_dats.o ats\_trans3\_env\_eff\_dats.o  
ats\_trans3\_env\_loop\_dats.o ats\_trans3\_env\_met\_dats.o  
ats\_trans3\_env\_scst\_dats.o ats\_trans3\_env\_state\_dats.o  
ats\_trans3\_env\_print\_dats.o ats\_staexp2\_solve\_sats.o  
ats\_staexp2\_solve\_dats.o ats\_trans3\_sats.o ats\_trans3\_pat\_dats.o  
ats\_trans3\_assgn\_dats.o ats\_trans3\_deref\_dats.o ats\_trans3\_view\_dats.o  
ats\_trans3\_util\_dats.o ats\_trans3\_exp\_up\_dats.o ats\_trans3\_exp\_dn\_dats.o  
ats\_trans3\_loop\_dats.o ats\_trans3\_dec\_dats.o ats\_constraint\_sats.o  
ats\_constraint\_dats.o ats\_constraint\_print\_dats.o ats\_solver\_fm\_sats.o  
ats\_solver\_fm\_dats.o ats\_hiexp\_sats.o ats\_hiexp\_dats.o  
ats\_hiexp\_print\_dats.o ats\_hiexp\_util\_dats.o ats\_trans4\_sats.o  
ats\_trans4\_dats.o ats\_ccomp\_sats.o ats\_ccomp\_dats.o ats\_ccomp\_env\_sats.o  
ats\_ccomp\_env\_dats.o ats\_ccomp\_print\_dats.o ats\_ccomp\_util\_dats.o  
ats\_ccomp\_trans\_dats.o ats\_ccomp\_trans\_clau\_dats.o  
ats\_ccomp\_trans\_tailcal\_dats.o ats\_ccomp\_trans\_temp\_dats.o  
ats\_ccomp\_emit\_dats.o ats\_ccomp\_main\_dats.o ats\_lexer\_lats\_dats.o  
ats\_lexer\_sats.o ats\_grammar\_yats.o prelude\_dats\_basics\_dats.o  
prelude\_dats\_bool\_dats.o prelude\_dats\_char\_dats.o  
prelude\_dats\_integer\_dats.o prelude\_dats\_array\_dats.o  
prelude\_dats\_string\_dats.o prelude\_dats\_printf\_dats.o  
prelude\_dats\_filebas\_dats.o libc\_sats\_gmp\_sats.o libc\_sats\_time\_sats.o  
libc\_dats\_unistd\_dats.o libats\_lex\_lexing\_sats.o libats\_lex\_lexing\_dats.o  
libats\_lex\_tables\_dats.o ats\_main\_dats.c …/ccomp/runtime/ats\_prelude.c  
…/ccomp/runtime/ats\_bootstrap.c -lgmp  
collect2: error: ld terminated with signal 11 [Segmentation fault], core  
dumped  
…/Makefile\_bootstrap:263: recipe for target ‘atsopt’ failed  
make[1]: \*\*\* [atsopt] Error 1  
make[1]: Leaving directory  
’/home/brand\_000/ats-lang-anairiats-0.2.11/bootstrap1’  
Makefile:172: recipe for target ‘atsopt1’ failed  
make: \*\*\* [atsopt1] Error 2

#Make seems unable to recover:

brand\_000@ideapc ~/ats-lang-anairiats-0.2.11  
$ make all  
make -C bootstrap1 -f …/Makefile\_bootstrap BOOTSTRAP1=1 atsopt  
make[1]: Entering directory  
’/home/brand\_000/ats-lang-anairiats-0.2.11/bootstrap1’  
make[1]: ‘atsopt’ is up to date.  
make[1]: Leaving directory  
’/home/brand\_000/ats-lang-anairiats-0.2.11/bootstrap1’  
cp bootstrap1/atsopt “/home/brand\_000/ats-lang-anairiats-0.2.11”/bin/atsopt  
make -C utils/scripts atscc  
make[1]: Entering directory  
’/home/brand\_000/ats-lang-anairiats-0.2.11/utils/scripts’  
"/home/brand\_000/ats-lang-anairiats-0.2.11"/bin/atsopt --output  
atscc\_main\_dats.c --dynamic atscc\_main.dats  
"/home/brand\_000/ats-lang-anairiats-0.2.11"/bin/atsopt --output top\_sats.c  
–static top.sats  
gcc -I"/home/brand\_000/ats-lang-anairiats-0.2.11"  
-I"/home/brand\_000/ats-lang-anairiats-0.2.11"/ccomp/runtime -O2 -g -o  
top\_sats.o -c top\_sats.c  
gcc: error: top\_sats.c: No such file or directory  
gcc: fatal error: no input files  
compilation terminated.  
Makefile:88: recipe for target ‘top\_sats.o’ failed  
make[1]: \*\*\* [top\_sats.o] Error 1  
make[1]: Leaving directory  
’/home/brand\_000/ats-lang-anairiats-0.2.11/utils/scripts’  
Makefile:202: recipe for target ‘bin/atscc’ failed  
make: \*\*\* [bin/atscc] Error 2

Thanks,

---

<div class="post-metadata">

**Author:** ![gmhwxi](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Post date:** [December 22, 2013, 5:53am UTC](https://discourse.ats-lang.org/t/how-to-build-ats-1-on-cygwin64/189/2 "2013-12-22T05:53:50Z")

</div>

Here is my guess:

In the file

${ATSHOME}/libats/lex/tables.dats

you can see the following two lines:

extern void \*malloc (size\_t bsz) ;  
extern void \*calloc (size\_t n, size\_t tsz) ;

Please replace them with the following one:

#include \<stdlib.h\>

Then try to re-compile.On Sunday, December 22, 2013 12:27:59 AM UTC-5, Brandon Barker wrote:

> Trying to build ATS 0.2.11 on cygwin64 resulted in the following  
> interesting situation (I will try Cygwin32 on the same machine soon):
> 
> …  
> gcc -I"/home/brand\_000/ats-lang-anairiats-0.2.11"  
> -I"/home/brand\_000/ats-lang-anairiats-0.2.11"/ccomp/runtime -O2 -g -o  
> libats\_lex\_tables\_dats.o -c libats\_lex\_tables\_dats.c  
> libats\_lex\_tables\_dats.c: In function ‘\_\_accept\_table\_make\_fun’:  
> libats\_lex\_tables\_dats.c:635:24: warning: incompatible implicit  
> declaration of built-in function ‘calloc’ [enabled by default]  
> sz = ntot + 1 ; p0 = calloc (sz, sizeof(ats\_int16\_type)) ;  
> ^  
> libats\_lex\_tables\_dats.c: In function ‘\_\_transition\_table\_make\_fun’:  
> libats\_lex\_tables\_dats.c:667:8: warning: incompatible implicit declaration  
> of built-in function ‘malloc’ [enabled by default]  
> p0 = malloc (sz\*sizeof(ats\_int16\_type)) ; p = p0 ;  
> ^  
> gcc -I"/home/brand\_000/ats-lang-anairiats-0.2.11"  
> -I"/home/brand\_000/ats-lang-anairiats-0.2.11"/ccomp/runtime -O2 -g  
> -L/home/brand\_000/FBA/local/lib -o atsopt ats\_array\_sats.o  
> ats\_array\_dats.o ats\_charlst\_sats.o ats\_charlst\_dats.o ats\_comarg\_sats.o  
> ats\_comarg\_dats.o ats\_counter\_sats.o ats\_counter\_dats.o ats\_debug\_sats.o  
> ats\_debug\_dats.o ats\_effect\_sats.o ats\_effect\_dats.o ats\_error\_sats.o  
> ats\_error\_dats.o ats\_filename\_sats.o ats\_filename\_dats.o  
> ats\_fixity\_sats.o ats\_fixity\_prec\_dats.o ats\_fixity\_fxty\_dats.o  
> ats\_global\_sats.o ats\_global\_dats.o ats\_hashtbl\_sats.o ats\_hashtbl\_dats.o  
> ats\_intinf\_sats.o ats\_intinf\_dats.o ats\_keyword\_sats.o ats\_keyword\_dats.o  
> ats\_label\_sats.o ats\_label\_dats.o ats\_location\_sats.o ats\_location\_dats.o  
> ats\_namespace\_sats.o ats\_namespace\_dats.o ats\_posmark\_sats.o  
> ats\_posmark\_dats.o ats\_stamp\_sats.o ats\_stamp\_dats.o ats\_symbol\_sats.o  
> ats\_symbol\_dats.o ats\_symenv\_sats.o ats\_symenv\_dats.o ats\_symtbl\_sats.o  
> ats\_symtbl\_dats.o ats\_list\_sats.o ats\_list\_dats.o ats\_map\_lin\_sats.o  
> ats\_map\_lin\_dats.o ats\_reference\_sats.o ats\_reference\_dats.o  
> ats\_set\_fun\_sats.o ats\_set\_fun\_dats.o ats\_parser\_sats.o ats\_parser\_dats.o  
> ats\_syntax\_sats.o ats\_syntax\_dats.o ats\_syntax\_depgen\_dats.o  
> ats\_syntax\_taggen\_dats.o ats\_syntax\_posmark\_dats.o ats\_staexp1\_sats.o  
> ats\_staexp1\_dats.o ats\_staexp1\_print\_dats.o ats\_dynexp1\_sats.o  
> ats\_dynexp1\_dats.o ats\_dynexp1\_print\_dats.o ats\_dynexp1\_syndef\_dats.o  
> ats\_dynexp1\_syndef\_sats.o ats\_trans1\_env\_sats.o ats\_trans1\_env\_dats.o  
> ats\_e1xp\_eval\_sats.o ats\_e1xp\_eval\_dats.o ats\_trans1\_sats.o  
> ats\_trans1\_sta\_dats.o ats\_trans1\_dyn\_dats.o ats\_staexp2\_sats.o  
> ats\_staexp2\_dats.o ats\_staexp2\_print\_dats.o ats\_staexp2\_scst\_dats.o  
> ats\_staexp2\_svVar\_dats.o ats\_staexp2\_dcon\_dats.o  
> ats\_staexp2\_util1\_dats.o ats\_staexp2\_util2\_dats.o  
> ats\_staexp2\_pprint\_sats.o ats\_staexp2\_pprint\_dats.o ats\_dynexp2\_sats.o  
> ats\_dynexp2\_dats.o ats\_dynexp2\_dcst\_dats.o ats\_dynexp2\_dmac\_dats.o  
> ats\_dynexp2\_dvar\_dats.o ats\_dynexp2\_print\_dats.o ats\_dynexp2\_util\_dats.o  
> ats\_trans2\_env\_sats.o ats\_trans2\_env\_dats.o ats\_stadyncst2\_sats.o  
> ats\_stadyncst2\_dats.o ats\_trans2\_sats.o ats\_trans2\_sta\_dats.o  
> ats\_trans2\_dyn1\_dats.o ats\_trans2\_dyn2\_dats.o ats\_macro2\_sats.o  
> ats\_macro2\_dats.o ats\_patcst2\_sats.o ats\_patcst2\_dats.o  
> ats\_string\_parse\_sats.o ats\_string\_parse\_dats.o ats\_printf\_c\_lats\_dats.o  
> ats\_dynexp3\_sats.o ats\_dynexp3\_dats.o ats\_dynexp3\_print\_dats.o  
> ats\_trans3\_env\_sats.o ats\_trans3\_env\_dats.o ats\_trans3\_env\_eff\_dats.o  
> ats\_trans3\_env\_loop\_dats.o ats\_trans3\_env\_met\_dats.o  
> ats\_trans3\_env\_scst\_dats.o ats\_trans3\_env\_state\_dats.o  
> ats\_trans3\_env\_print\_dats.o ats\_staexp2\_solve\_sats.o  
> ats\_staexp2\_solve\_dats.o ats\_trans3\_sats.o ats\_trans3\_pat\_dats.o  
> ats\_trans3\_assgn\_dats.o ats\_trans3\_deref\_dats.o ats\_trans3\_view\_dats.o  
> ats\_trans3\_util\_dats.o ats\_trans3\_exp\_up\_dats.o ats\_trans3\_exp\_dn\_dats.o  
> ats\_trans3\_loop\_dats.o ats\_trans3\_dec\_dats.o ats\_constraint\_sats.o  
> ats\_constraint\_dats.o ats\_constraint\_print\_dats.o ats\_solver\_fm\_sats.o  
> ats\_solver\_fm\_dats.o ats\_hiexp\_sats.o ats\_hiexp\_dats.o  
> ats\_hiexp\_print\_dats.o ats\_hiexp\_util\_dats.o ats\_trans4\_sats.o  
> ats\_trans4\_dats.o ats\_ccomp\_sats.o ats\_ccomp\_dats.o ats\_ccomp\_env\_sats.o  
> ats\_ccomp\_env\_dats.o ats\_ccomp\_print\_dats.o ats\_ccomp\_util\_dats.o  
> ats\_ccomp\_trans\_dats.o ats\_ccomp\_trans\_clau\_dats.o  
> ats\_ccomp\_trans\_tailcal\_dats.o ats\_ccomp\_trans\_temp\_dats.o  
> ats\_ccomp\_emit\_dats.o ats\_ccomp\_main\_dats.o ats\_lexer\_lats\_dats.o  
> ats\_lexer\_sats.o ats\_grammar\_yats.o prelude\_dats\_basics\_dats.o  
> prelude\_dats\_bool\_dats.o prelude\_dats\_char\_dats.o  
> prelude\_dats\_integer\_dats.o prelude\_dats\_array\_dats.o  
> prelude\_dats\_string\_dats.o prelude\_dats\_printf\_dats.o  
> prelude\_dats\_filebas\_dats.o libc\_sats\_gmp\_sats.o libc\_sats\_time\_sats.o  
> libc\_dats\_unistd\_dats.o libats\_lex\_lexing\_sats.o libats\_lex\_lexing\_dats.o  
> libats\_lex\_tables\_dats.o ats\_main\_dats.c …/ccomp/runtime/ats\_prelude.c  
> …/ccomp/runtime/ats\_bootstrap.c -lgmp  
> collect2: error: ld terminated with signal 11 [Segmentation fault], core  
> dumped  
> …/Makefile\_bootstrap:263: recipe for target ‘atsopt’ failed  
> make[1]: \*\*\* [atsopt] Error 1  
> make[1]: Leaving directory  
> ‘/home/brand\_000/ats-lang-anairiats-0.2.11/bootstrap1’  
> Makefile:172: recipe for target ‘atsopt1’ failed  
> make: \*\*\* [atsopt1] Error 2
> 
> #Make seems unable to recover:
> 
> brand\_000@ideapc ~/ats-lang-anairiats-0.2.11  
> $ make all  
> make -C bootstrap1 -f …/Makefile\_bootstrap BOOTSTRAP1=1 atsopt  
> make[1]: Entering directory  
> ‘/home/brand\_000/ats-lang-anairiats-0.2.11/bootstrap1’  
> make[1]: ‘atsopt’ is up to date.  
> make[1]: Leaving directory  
> ‘/home/brand\_000/ats-lang-anairiats-0.2.11/bootstrap1’  
> cp bootstrap1/atsopt “/home/brand\_000/ats-lang-anairiats-0.2.11”/bin/atsopt  
> make -C utils/scripts atscc  
> make[1]: Entering directory  
> ‘/home/brand\_000/ats-lang-anairiats-0.2.11/utils/scripts’  
> “/home/brand\_000/ats-lang-anairiats-0.2.11”/bin/atsopt --output  
> atscc\_main\_dats.c --dynamic atscc\_main.dats  
> “/home/brand\_000/ats-lang-anairiats-0.2.11”/bin/atsopt --output top\_sats.c  
> –static top.sats  
> gcc -I"/home/brand\_000/ats-lang-anairiats-0.2.11"  
> -I"/home/brand\_000/ats-lang-anairiats-0.2.11"/ccomp/runtime -O2 -g -o  
> top\_sats.o -c top\_sats.c  
> gcc: error: top\_sats.c: No such file or directory  
> gcc: fatal error: no input files  
> compilation terminated.  
> Makefile:88: recipe for target ‘top\_sats.o’ failed  
> make[1]: \*\*\* [top\_sats.o] Error 1  
> make[1]: Leaving directory  
> ‘/home/brand\_000/ats-lang-anairiats-0.2.11/utils/scripts’  
> Makefile:202: recipe for target ‘bin/atscc’ failed  
> make: \*\*\* [bin/atscc] Error 2
> 
> Thanks,

---

<div class="post-metadata">

**Author:** ![Brandon\_Barker](https://sea1.discourse-cdn.com/flex019/user_avatar/discourse.ats-lang.org/brandon_barker/32/61_2.png) [@Brandon\_Barker](https://discourse.ats-lang.org/u/Brandon_Barker)\
**Post date:** [December 22, 2013, 2:40pm UTC](https://discourse.ats-lang.org/t/how-to-build-ats-1-on-cygwin64/189/3 "2013-12-22T14:40:22Z")

</div>

That did not seem to change the outcome, but Cygwin64 seems somewhat  
unstable in my experience (even emacs crashes a lot). I had no problems  
building with Cygwin32, which should be fine for me.On Sunday, December 22, 2013 12:53:50 AM UTC-5, gmhwxi wrote:

> Here is my guess:
> 
> In the file
> 
> ${ATSHOME}/libats/lex/tables.dats
> 
> you can see the following two lines:
> 
> extern void \*malloc (size\_t bsz) ;  
> extern void \*calloc (size\_t n, size\_t tsz) ;
> 
> Please replace them with the following one:
> 
> #include \<stdlib.h\>
> 
> Then try to re-compile.
> 
> On Sunday, December 22, 2013 12:27:59 AM UTC-5, Brandon Barker wrote:
> 
> > Trying to build ATS 0.2.11 on cygwin64 resulted in the following  
> > interesting situation (I will try Cygwin32 on the same machine soon):
> > 
> > …  
> > gcc -I"/home/brand\_000/ats-lang-anairiats-0.2.11"  
> > -I"/home/brand\_000/ats-lang-anairiats-0.2.11"/ccomp/runtime -O2 -g -o  
> > libats\_lex\_tables\_dats.o -c libats\_lex\_tables\_dats.c  
> > libats\_lex\_tables\_dats.c: In function ‘\_\_accept\_table\_make\_fun’:  
> > libats\_lex\_tables\_dats.c:635:24: warning: incompatible implicit  
> > declaration of built-in function ‘calloc’ [enabled by default]  
> > sz = ntot + 1 ; p0 = calloc (sz, sizeof(ats\_int16\_type)) ;  
> > ^  
> > libats\_lex\_tables\_dats.c: In function ‘\_\_transition\_table\_make\_fun’:  
> > libats\_lex\_tables\_dats.c:667:8: warning: incompatible implicit  
> > declaration of built-in function ‘malloc’ [enabled by default]  
> > p0 = malloc (sz\*sizeof(ats\_int16\_type)) ; p = p0 ;  
> > ^  
> > gcc -I"/home/brand\_000/ats-lang-anairiats-0.2.11"  
> > -I"/home/brand\_000/ats-lang-anairiats-0.2.11"/ccomp/runtime -O2 -g  
> > -L/home/brand\_000/FBA/local/lib -o atsopt ats\_array\_sats.o  
> > ats\_array\_dats.o ats\_charlst\_sats.o ats\_charlst\_dats.o ats\_comarg\_sats.o  
> > ats\_comarg\_dats.o ats\_counter\_sats.o ats\_counter\_dats.o ats\_debug\_sats.o  
> > ats\_debug\_dats.o ats\_effect\_sats.o ats\_effect\_dats.o ats\_error\_sats.o  
> > ats\_error\_dats.o ats\_filename\_sats.o ats\_filename\_dats.o  
> > ats\_fixity\_sats.o ats\_fixity\_prec\_dats.o ats\_fixity\_fxty\_dats.o  
> > ats\_global\_sats.o ats\_global\_dats.o ats\_hashtbl\_sats.o ats\_hashtbl\_dats.o  
> > ats\_intinf\_sats.o ats\_intinf\_dats.o ats\_keyword\_sats.o ats\_keyword\_dats.o  
> > ats\_label\_sats.o ats\_label\_dats.o ats\_location\_sats.o ats\_location\_dats.o  
> > ats\_namespace\_sats.o ats\_namespace\_dats.o ats\_posmark\_sats.o  
> > ats\_posmark\_dats.o ats\_stamp\_sats.o ats\_stamp\_dats.o ats\_symbol\_sats.o  
> > ats\_symbol\_dats.o ats\_symenv\_sats.o ats\_symenv\_dats.o ats\_symtbl\_sats.o  
> > ats\_symtbl\_dats.o ats\_list\_sats.o ats\_list\_dats.o ats\_map\_lin\_sats.o  
> > ats\_map\_lin\_dats.o ats\_reference\_sats.o ats\_reference\_dats.o  
> > ats\_set\_fun\_sats.o ats\_set\_fun\_dats.o ats\_parser\_sats.o ats\_parser\_dats.o  
> > ats\_syntax\_sats.o ats\_syntax\_dats.o ats\_syntax\_depgen\_dats.o  
> > ats\_syntax\_taggen\_dats.o ats\_syntax\_posmark\_dats.o ats\_staexp1\_sats.o  
> > ats\_staexp1\_dats.o ats\_staexp1\_print\_dats.o ats\_dynexp1\_sats.o  
> > ats\_dynexp1\_dats.o ats\_dynexp1\_print\_dats.o ats\_dynexp1\_syndef\_dats.o  
> > ats\_dynexp1\_syndef\_sats.o ats\_trans1\_env\_sats.o ats\_trans1\_env\_dats.o  
> > ats\_e1xp\_eval\_sats.o ats\_e1xp\_eval\_dats.o ats\_trans1\_sats.o  
> > ats\_trans1\_sta\_dats.o ats\_trans1\_dyn\_dats.o ats\_staexp2\_sats.o  
> > ats\_staexp2\_dats.o ats\_staexp2\_print\_dats.o ats\_staexp2\_scst\_dats.o  
> > ats\_staexp2\_svVar\_dats.o ats\_staexp2\_dcon\_dats.o  
> > ats\_staexp2\_util1\_dats.o ats\_staexp2\_util2\_dats.o  
> > ats\_staexp2\_pprint\_sats.o ats\_staexp2\_pprint\_dats.o ats\_dynexp2\_sats.o  
> > ats\_dynexp2\_dats.o ats\_dynexp2\_dcst\_dats.o ats\_dynexp2\_dmac\_dats.o  
> > ats\_dynexp2\_dvar\_dats.o ats\_dynexp2\_print\_dats.o ats\_dynexp2\_util\_dats.o  
> > ats\_trans2\_env\_sats.o ats\_trans2\_env\_dats.o ats\_stadyncst2\_sats.o  
> > ats\_stadyncst2\_dats.o ats\_trans2\_sats.o ats\_trans2\_sta\_dats.o  
> > ats\_trans2\_dyn1\_dats.o ats\_trans2\_dyn2\_dats.o ats\_macro2\_sats.o  
> > ats\_macro2\_dats.o ats\_patcst2\_sats.o ats\_patcst2\_dats.o  
> > ats\_string\_parse\_sats.o ats\_string\_parse\_dats.o ats\_printf\_c\_lats\_dats.o  
> > ats\_dynexp3\_sats.o ats\_dynexp3\_dats.o ats\_dynexp3\_print\_dats.o  
> > ats\_trans3\_env\_sats.o ats\_trans3\_env\_dats.o ats\_trans3\_env\_eff\_dats.o  
> > ats\_trans3\_env\_loop\_dats.o ats\_trans3\_env\_met\_dats.o  
> > ats\_trans3\_env\_scst\_dats.o ats\_trans3\_env\_state\_dats.o  
> > ats\_trans3\_env\_print\_dats.o ats\_staexp2\_solve\_sats.o  
> > ats\_staexp2\_solve\_dats.o ats\_trans3\_sats.o ats\_trans3\_pat\_dats.o  
> > ats\_trans3\_assgn\_dats.o ats\_trans3\_deref\_dats.o ats\_trans3\_view\_dats.o  
> > ats\_trans3\_util\_dats.o ats\_trans3\_exp\_up\_dats.o ats\_trans3\_exp\_dn\_dats.o  
> > ats\_trans3\_loop\_dats.o ats\_trans3\_dec\_dats.o ats\_constraint\_sats.o  
> > ats\_constraint\_dats.o ats\_constraint\_print\_dats.o ats\_solver\_fm\_sats.o  
> > ats\_solver\_fm\_dats.o ats\_hiexp\_sats.o ats\_hiexp\_dats.o  
> > ats\_hiexp\_print\_dats.o ats\_hiexp\_util\_dats.o ats\_trans4\_sats.o  
> > ats\_trans4\_dats.o ats\_ccomp\_sats.o ats\_ccomp\_dats.o ats\_ccomp\_env\_sats.o  
> > ats\_ccomp\_env\_dats.o ats\_ccomp\_print\_dats.o ats\_ccomp\_util\_dats.o  
> > ats\_ccomp\_trans\_dats.o ats\_ccomp\_trans\_clau\_dats.o  
> > ats\_ccomp\_trans\_tailcal\_dats.o ats\_ccomp\_trans\_temp\_dats.o  
> > ats\_ccomp\_emit\_dats.o ats\_ccomp\_main\_dats.o ats\_lexer\_lats\_dats.o  
> > ats\_lexer\_sats.o ats\_grammar\_yats.o prelude\_dats\_basics\_dats.o  
> > prelude\_dats\_bool\_dats.o prelude\_dats\_char\_dats.o  
> > prelude\_dats\_integer\_dats.o prelude\_dats\_array\_dats.o  
> > prelude\_dats\_string\_dats.o prelude\_dats\_printf\_dats.o  
> > prelude\_dats\_filebas\_dats.o libc\_sats\_gmp\_sats.o libc\_sats\_time\_sats.o  
> > libc\_dats\_unistd\_dats.o libats\_lex\_lexing\_sats.o libats\_lex\_lexing\_dats.o  
> > libats\_lex\_tables\_dats.o ats\_main\_dats.c …/ccomp/runtime/ats\_prelude.c  
> > …/ccomp/runtime/ats\_bootstrap.c -lgmp  
> > collect2: error: ld terminated with signal 11 [Segmentation fault], core  
> > dumped  
> > …/Makefile\_bootstrap:263: recipe for target ‘atsopt’ failed  
> > make[1]: \*\*\* [atsopt] Error 1  
> > make[1]: Leaving directory  
> > ‘/home/brand\_000/ats-lang-anairiats-0.2.11/bootstrap1’  
> > Makefile:172: recipe for target ‘atsopt1’ failed  
> > make: \*\*\* [atsopt1] Error 2
> > 
> > #Make seems unable to recover:
> > 
> > brand\_000@ideapc ~/ats-lang-anairiats-0.2.11  
> > $ make all  
> > make -C bootstrap1 -f …/Makefile\_bootstrap BOOTSTRAP1=1 atsopt  
> > make[1]: Entering directory  
> > ‘/home/brand\_000/ats-lang-anairiats-0.2.11/bootstrap1’  
> > make[1]: ‘atsopt’ is up to date.  
> > make[1]: Leaving directory  
> > ‘/home/brand\_000/ats-lang-anairiats-0.2.11/bootstrap1’  
> > cp bootstrap1/atsopt  
> > “/home/brand\_000/ats-lang-anairiats-0.2.11”/bin/atsopt  
> > make -C utils/scripts atscc  
> > make[1]: Entering directory  
> > ‘/home/brand\_000/ats-lang-anairiats-0.2.11/utils/scripts’  
> > “/home/brand\_000/ats-lang-anairiats-0.2.11”/bin/atsopt --output  
> > atscc\_main\_dats.c --dynamic atscc\_main.dats  
> > “/home/brand\_000/ats-lang-anairiats-0.2.11”/bin/atsopt --output  
> > top\_sats.c --static top.sats  
> > gcc -I"/home/brand\_000/ats-lang-anairiats-0.2.11"  
> > -I"/home/brand\_000/ats-lang-anairiats-0.2.11"/ccomp/runtime -O2 -g -o  
> > top\_sats.o -c top\_sats.c  
> > gcc: error: top\_sats.c: No such file or directory  
> > gcc: fatal error: no input files  
> > compilation terminated.  
> > Makefile:88: recipe for target ‘top\_sats.o’ failed  
> > make[1]: \*\*\* [top\_sats.o] Error 1  
> > make[1]: Leaving directory  
> > ‘/home/brand\_000/ats-lang-anairiats-0.2.11/utils/scripts’  
> > Makefile:202: recipe for target ‘bin/atscc’ failed  
> > make: \*\*\* [bin/atscc] Error 2
> > 
> > Thanks,

---

<div class="post-metadata">

**Author:** ![gmhwxi](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Post date:** [December 22, 2013, 3:32pm UTC](https://discourse.ats-lang.org/t/how-to-build-ats-1-on-cygwin64/189/4 "2013-12-22T15:32:13Z")

</div>

If you send me the entire output generated during the building process, I  
may get some clues as to what caused the failure.On Sunday, December 22, 2013 9:40:22 AM UTC-5, Brandon Barker wrote:

> That did not seem to change the outcome, but Cygwin64 seems somewhat  
> unstable in my experience (even emacs crashes a lot). I had no problems  
> building with Cygwin32, which should be fine for me.
> 
> On Sunday, December 22, 2013 12:53:50 AM UTC-5, gmhwxi wrote:
> 
> > Here is my guess:
> > 
> > In the file
> > 
> > ${ATSHOME}/libats/lex/tables.dats
> > 
> > you can see the following two lines:
> > 
> > extern void \*malloc (size\_t bsz) ;  
> > extern void \*calloc (size\_t n, size\_t tsz) ;
> > 
> > Please replace them with the following one:
> > 
> > #include \<stdlib.h\>
> > 
> > Then try to re-compile.
> > 
> > On Sunday, December 22, 2013 12:27:59 AM UTC-5, Brandon Barker wrote:
> > 
> > > Trying to build ATS 0.2.11 on cygwin64 resulted in the following  
> > > interesting situation (I will try Cygwin32 on the same machine soon):
> > > 
> > > …  
> > > gcc -I"/home/brand\_000/ats-lang-anairiats-0.2.11"  
> > > -I"/home/brand\_000/ats-lang-anairiats-0.2.11"/ccomp/runtime -O2 -g -o  
> > > libats\_lex\_tables\_dats.o -c libats\_lex\_tables\_dats.c  
> > > libats\_lex\_tables\_dats.c: In function ‘\_\_accept\_table\_make\_fun’:  
> > > libats\_lex\_tables\_dats.c:635:24: warning: incompatible implicit  
> > > declaration of built-in function ‘calloc’ [enabled by default]  
> > > sz = ntot + 1 ; p0 = calloc (sz, sizeof(ats\_int16\_type)) ;  
> > > ^  
> > > libats\_lex\_tables\_dats.c: In function ‘\_\_transition\_table\_make\_fun’:  
> > > libats\_lex\_tables\_dats.c:667:8: warning: incompatible implicit  
> > > declaration of built-in function ‘malloc’ [enabled by default]  
> > > p0 = malloc (sz\*sizeof(ats\_int16\_type)) ; p = p0 ;  
> > > ^  
> > > gcc -I"/home/brand\_000/ats-lang-anairiats-0.2.11"  
> > > -I"/home/brand\_000/ats-lang-anairiats-0.2.11"/ccomp/runtime -O2 -g  
> > > -L/home/brand\_000/FBA/local/lib -o atsopt ats\_array\_sats.o  
> > > ats\_array\_dats.o ats\_charlst\_sats.o ats\_charlst\_dats.o ats\_comarg\_sats.o  
> > > ats\_comarg\_dats.o ats\_counter\_sats.o ats\_counter\_dats.o ats\_debug\_sats.o  
> > > ats\_debug\_dats.o ats\_effect\_sats.o ats\_effect\_dats.o ats\_error\_sats.o  
> > > ats\_error\_dats.o ats\_filename\_sats.o ats\_filename\_dats.o  
> > > ats\_fixity\_sats.o ats\_fixity\_prec\_dats.o ats\_fixity\_fxty\_dats.o  
> > > ats\_global\_sats.o ats\_global\_dats.o ats\_hashtbl\_sats.o ats\_hashtbl\_dats.o  
> > > ats\_intinf\_sats.o ats\_intinf\_dats.o ats\_keyword\_sats.o ats\_keyword\_dats.o  
> > > ats\_label\_sats.o ats\_label\_dats.o ats\_location\_sats.o ats\_location\_dats.o  
> > > ats\_namespace\_sats.o ats\_namespace\_dats.o ats\_posmark\_sats.o  
> > > ats\_posmark\_dats.o ats\_stamp\_sats.o ats\_stamp\_dats.o ats\_symbol\_sats.o  
> > > ats\_symbol\_dats.o ats\_symenv\_sats.o ats\_symenv\_dats.o ats\_symtbl\_sats.o  
> > > ats\_symtbl\_dats.o ats\_list\_sats.o ats\_list\_dats.o ats\_map\_lin\_sats.o  
> > > ats\_map\_lin\_dats.o ats\_reference\_sats.o ats\_reference\_dats.o  
> > > ats\_set\_fun\_sats.o ats\_set\_fun\_dats.o ats\_parser\_sats.o ats\_parser\_dats.o  
> > > ats\_syntax\_sats.o ats\_syntax\_dats.o ats\_syntax\_depgen\_dats.o  
> > > ats\_syntax\_taggen\_dats.o ats\_syntax\_posmark\_dats.o ats\_staexp1\_sats.o  
> > > ats\_staexp1\_dats.o ats\_staexp1\_print\_dats.o ats\_dynexp1\_sats.o  
> > > ats\_dynexp1\_dats.o ats\_dynexp1\_print\_dats.o ats\_dynexp1\_syndef\_dats.o  
> > > ats\_dynexp1\_syndef\_sats.o ats\_trans1\_env\_sats.o ats\_trans1\_env\_dats.o  
> > > ats\_e1xp\_eval\_sats.o ats\_e1xp\_eval\_dats.o ats\_trans1\_sats.o  
> > > ats\_trans1\_sta\_dats.o ats\_trans1\_dyn\_dats.o ats\_staexp2\_sats.o  
> > > ats\_staexp2\_dats.o ats\_staexp2\_print\_dats.o ats\_staexp2\_scst\_dats.o  
> > > ats\_staexp2\_svVar\_dats.o ats\_staexp2\_dcon\_dats.o  
> > > ats\_staexp2\_util1\_dats.o ats\_staexp2\_util2\_dats.o  
> > > ats\_staexp2\_pprint\_sats.o ats\_staexp2\_pprint\_dats.o ats\_dynexp2\_sats.o  
> > > ats\_dynexp2\_dats.o ats\_dynexp2\_dcst\_dats.o ats\_dynexp2\_dmac\_dats.o  
> > > ats\_dynexp2\_dvar\_dats.o ats\_dynexp2\_print\_dats.o ats\_dynexp2\_util\_dats.o  
> > > ats\_trans2\_env\_sats.o ats\_trans2\_env\_dats.o ats\_stadyncst2\_sats.o  
> > > ats\_stadyncst2\_dats.o ats\_trans2\_sats.o ats\_trans2\_sta\_dats.o  
> > > ats\_trans2\_dyn1\_dats.o ats\_trans2\_dyn2\_dats.o ats\_macro2\_sats.o  
> > > ats\_macro2\_dats.o ats\_patcst2\_sats.o ats\_patcst2\_dats.o  
> > > ats\_string\_parse\_sats.o ats\_string\_parse\_dats.o ats\_printf\_c\_lats\_dats.o  
> > > ats\_dynexp3\_sats.o ats\_dynexp3\_dats.o ats\_dynexp3\_print\_dats.o  
> > > ats\_trans3\_env\_sats.o ats\_trans3\_env\_dats.o ats\_trans3\_env\_eff\_dats.o  
> > > ats\_trans3\_env\_loop\_dats.o ats\_trans3\_env\_met\_dats.o  
> > > ats\_trans3\_env\_scst\_dats.o ats\_trans3\_env\_state\_dats.o  
> > > ats\_trans3\_env\_print\_dats.o ats\_staexp2\_solve\_sats.o  
> > > ats\_staexp2\_solve\_dats.o ats\_trans3\_sats.o ats\_trans3\_pat\_dats.o  
> > > ats\_trans3\_assgn\_dats.o ats\_trans3\_deref\_dats.o ats\_trans3\_view\_dats.o  
> > > ats\_trans3\_util\_dats.o ats\_trans3\_exp\_up\_dats.o ats\_trans3\_exp\_dn\_dats.o  
> > > ats\_trans3\_loop\_dats.o ats\_trans3\_dec\_dats.o ats\_constraint\_sats.o  
> > > ats\_constraint\_dats.o ats\_constraint\_print\_dats.o ats\_solver\_fm\_sats.o  
> > > ats\_solver\_fm\_dats.o ats\_hiexp\_sats.o ats\_hiexp\_dats.o  
> > > ats\_hiexp\_print\_dats.o ats\_hiexp\_util\_dats.o ats\_trans4\_sats.o  
> > > ats\_trans4\_dats.o ats\_ccomp\_sats.o ats\_ccomp\_dats.o ats\_ccomp\_env\_sats.o  
> > > ats\_ccomp\_env\_dats.o ats\_ccomp\_print\_dats.o ats\_ccomp\_util\_dats.o  
> > > ats\_ccomp\_trans\_dats.o ats\_ccomp\_trans\_clau\_dats.o  
> > > ats\_ccomp\_trans\_tailcal\_dats.o ats\_ccomp\_trans\_temp\_dats.o  
> > > ats\_ccomp\_emit\_dats.o ats\_ccomp\_main\_dats.o ats\_lexer\_lats\_dats.o  
> > > ats\_lexer\_sats.o ats\_grammar\_yats.o prelude\_dats\_basics\_dats.o  
> > > prelude\_dats\_bool\_dats.o prelude\_dats\_char\_dats.o  
> > > prelude\_dats\_integer\_dats.o prelude\_dats\_array\_dats.o  
> > > prelude\_dats\_string\_dats.o prelude\_dats\_printf\_dats.o  
> > > prelude\_dats\_filebas\_dats.o libc\_sats\_gmp\_sats.o libc\_sats\_time\_sats.o  
> > > libc\_dats\_unistd\_dats.o libats\_lex\_lexing\_sats.o libats\_lex\_lexing\_dats.o  
> > > libats\_lex\_tables\_dats.o ats\_main\_dats.c …/ccomp/runtime/ats\_prelude.c  
> > > …/ccomp/runtime/ats\_bootstrap.c -lgmp  
> > > collect2: error: ld terminated with signal 11 [Segmentation fault], core  
> > > dumped  
> > > …/Makefile\_bootstrap:263: recipe for target ‘atsopt’ failed  
> > > make[1]: \*\*\* [atsopt] Error 1  
> > > make[1]: Leaving directory  
> > > ‘/home/brand\_000/ats-lang-anairiats-0.2.11/bootstrap1’  
> > > Makefile:172: recipe for target ‘atsopt1’ failed  
> > > make: \*\*\* [atsopt1] Error 2
> > > 
> > > #Make seems unable to recover:
> > > 
> > > brand\_000@ideapc ~/ats-lang-anairiats-0.2.11  
> > > $ make all  
> > > make -C bootstrap1 -f …/Makefile\_bootstrap BOOTSTRAP1=1 atsopt  
> > > make[1]: Entering directory  
> > > ‘/home/brand\_000/ats-lang-anairiats-0.2.11/bootstrap1’  
> > > make[1]: ‘atsopt’ is up to date.  
> > > make[1]: Leaving directory  
> > > ‘/home/brand\_000/ats-lang-anairiats-0.2.11/bootstrap1’  
> > > cp bootstrap1/atsopt  
> > > “/home/brand\_000/ats-lang-anairiats-0.2.11”/bin/atsopt  
> > > make -C utils/scripts atscc  
> > > make[1]: Entering directory  
> > > ‘/home/brand\_000/ats-lang-anairiats-0.2.11/utils/scripts’  
> > > “/home/brand\_000/ats-lang-anairiats-0.2.11”/bin/atsopt --output  
> > > atscc\_main\_dats.c --dynamic atscc\_main.dats  
> > > “/home/brand\_000/ats-lang-anairiats-0.2.11”/bin/atsopt --output  
> > > top\_sats.c --static top.sats  
> > > gcc -I"/home/brand\_000/ats-lang-anairiats-0.2.11"  
> > > -I"/home/brand\_000/ats-lang-anairiats-0.2.11"/ccomp/runtime -O2 -g -o  
> > > top\_sats.o -c top\_sats.c  
> > > gcc: error: top\_sats.c: No such file or directory  
> > > gcc: fatal error: no input files  
> > > compilation terminated.  
> > > Makefile:88: recipe for target ‘top\_sats.o’ failed  
> > > make[1]: \*\*\* [top\_sats.o] Error 1  
> > > make[1]: Leaving directory  
> > > ‘/home/brand\_000/ats-lang-anairiats-0.2.11/utils/scripts’  
> > > Makefile:202: recipe for target ‘bin/atscc’ failed  
> > > make: \*\*\* [bin/atscc] Error 2
> > > 
> > > Thanks,

---

<div class="post-metadata">

**Author:** ![Brandon\_Barker](https://sea1.discourse-cdn.com/flex019/user_avatar/discourse.ats-lang.org/brandon_barker/32/61_2.png) [@Brandon\_Barker](https://discourse.ats-lang.org/u/Brandon_Barker)\
**Post date:** [December 22, 2013, 8:17pm UTC](https://discourse.ats-lang.org/t/how-to-build-ats-1-on-cygwin64/189/5 "2013-12-22T20:17:48Z")

</div>

This is a bit odd; I did the rebuild only to find that it worked today, and  
unfortunately I can’t say if I did anything differently this time  
(obviously I thought not).On Sunday, December 22, 2013 10:32:13 AM UTC-5, gmhwxi wrote:

> If you send me the entire output generated during the building process, I  
> may get some clues as to what caused the failure.
> 
> On Sunday, December 22, 2013 9:40:22 AM UTC-5, Brandon Barker wrote:
> 
> > That did not seem to change the outcome, but Cygwin64 seems somewhat  
> > unstable in my experience (even emacs crashes a lot). I had no problems  
> > building with Cygwin32, which should be fine for me.
> > 
> > On Sunday, December 22, 2013 12:53:50 AM UTC-5, gmhwxi wrote:
> > 
> > > Here is my guess:
> > > 
> > > In the file
> > > 
> > > ${ATSHOME}/libats/lex/tables.dats
> > > 
> > > you can see the following two lines:
> > > 
> > > extern void \*malloc (size\_t bsz) ;  
> > > extern void \*calloc (size\_t n, size\_t tsz) ;
> > > 
> > > Please replace them with the following one:
> > > 
> > > #include \<stdlib.h\>
> > > 
> > > Then try to re-compile.
> > > 
> > > On Sunday, December 22, 2013 12:27:59 AM UTC-5, Brandon Barker wrote:
> > > 
> > > > Trying to build ATS 0.2.11 on cygwin64 resulted in the following  
> > > > interesting situation (I will try Cygwin32 on the same machine soon):
> > > > 
> > > > …  
> > > > gcc -I"/home/brand\_000/ats-lang-anairiats-0.2.11"  
> > > > -I"/home/brand\_000/ats-lang-anairiats-0.2.11"/ccomp/runtime -O2 -g -o  
> > > > libats\_lex\_tables\_dats.o -c libats\_lex\_tables\_dats.c  
> > > > libats\_lex\_tables\_dats.c: In function ‘\_\_accept\_table\_make\_fun’:  
> > > > libats\_lex\_tables\_dats.c:635:24: warning: incompatible implicit  
> > > > declaration of built-in function ‘calloc’ [enabled by default]  
> > > > sz = ntot + 1 ; p0 = calloc (sz, sizeof(ats\_int16\_type)) ;  
> > > > ^  
> > > > libats\_lex\_tables\_dats.c: In function ‘\_\_transition\_table\_make\_fun’:  
> > > > libats\_lex\_tables\_dats.c:667:8: warning: incompatible implicit  
> > > > declaration of built-in function ‘malloc’ [enabled by default]  
> > > > p0 = malloc (sz\*sizeof(ats\_int16\_type)) ; p = p0 ;  
> > > > ^  
> > > > gcc -I"/home/brand\_000/ats-lang-anairiats-0.2.11"  
> > > > -I"/home/brand\_000/ats-lang-anairiats-0.2.11"/ccomp/runtime -O2 -g  
> > > > -L/home/brand\_000/FBA/local/lib -o atsopt ats\_array\_sats.o  
> > > > ats\_array\_dats.o ats\_charlst\_sats.o ats\_charlst\_dats.o ats\_comarg\_sats.o  
> > > > ats\_comarg\_dats.o ats\_counter\_sats.o ats\_counter\_dats.o ats\_debug\_sats.o  
> > > > ats\_debug\_dats.o ats\_effect\_sats.o ats\_effect\_dats.o ats\_error\_sats.o  
> > > > ats\_error\_dats.o ats\_filename\_sats.o ats\_filename\_dats.o  
> > > > ats\_fixity\_sats.o ats\_fixity\_prec\_dats.o ats\_fixity\_fxty\_dats.o  
> > > > ats\_global\_sats.o ats\_global\_dats.o ats\_hashtbl\_sats.o ats\_hashtbl\_dats.o  
> > > > ats\_intinf\_sats.o ats\_intinf\_dats.o ats\_keyword\_sats.o ats\_keyword\_dats.o  
> > > > ats\_label\_sats.o ats\_label\_dats.o ats\_location\_sats.o ats\_location\_dats.o  
> > > > ats\_namespace\_sats.o ats\_namespace\_dats.o ats\_posmark\_sats.o  
> > > > ats\_posmark\_dats.o ats\_stamp\_sats.o ats\_stamp\_dats.o ats\_symbol\_sats.o  
> > > > ats\_symbol\_dats.o ats\_symenv\_sats.o ats\_symenv\_dats.o ats\_symtbl\_sats.o  
> > > > ats\_symtbl\_dats.o ats\_list\_sats.o ats\_list\_dats.o ats\_map\_lin\_sats.o  
> > > > ats\_map\_lin\_dats.o ats\_reference\_sats.o ats\_reference\_dats.o  
> > > > ats\_set\_fun\_sats.o ats\_set\_fun\_dats.o ats\_parser\_sats.o ats\_parser\_dats.o  
> > > > ats\_syntax\_sats.o ats\_syntax\_dats.o ats\_syntax\_depgen\_dats.o  
> > > > ats\_syntax\_taggen\_dats.o ats\_syntax\_posmark\_dats.o ats\_staexp1\_sats.o  
> > > > ats\_staexp1\_dats.o ats\_staexp1\_print\_dats.o ats\_dynexp1\_sats.o  
> > > > ats\_dynexp1\_dats.o ats\_dynexp1\_print\_dats.o ats\_dynexp1\_syndef\_dats.o  
> > > > ats\_dynexp1\_syndef\_sats.o ats\_trans1\_env\_sats.o ats\_trans1\_env\_dats.o  
> > > > ats\_e1xp\_eval\_sats.o ats\_e1xp\_eval\_dats.o ats\_trans1\_sats.o  
> > > > ats\_trans1\_sta\_dats.o ats\_trans1\_dyn\_dats.o ats\_staexp2\_sats.o  
> > > > ats\_staexp2\_dats.o ats\_staexp2\_print\_dats.o ats\_staexp2\_scst\_dats.o  
> > > > ats\_staexp2\_svVar\_dats.o ats\_staexp2\_dcon\_dats.o  
> > > > ats\_staexp2\_util1\_dats.o ats\_staexp2\_util2\_dats.o  
> > > > ats\_staexp2\_pprint\_sats.o ats\_staexp2\_pprint\_dats.o ats\_dynexp2\_sats.o  
> > > > ats\_dynexp2\_dats.o ats\_dynexp2\_dcst\_dats.o ats\_dynexp2\_dmac\_dats.o  
> > > > ats\_dynexp2\_dvar\_dats.o ats\_dynexp2\_print\_dats.o ats\_dynexp2\_util\_dats.o  
> > > > ats\_trans2\_env\_sats.o ats\_trans2\_env\_dats.o ats\_stadyncst2\_sats.o  
> > > > ats\_stadyncst2\_dats.o ats\_trans2\_sats.o ats\_trans2\_sta\_dats.o  
> > > > ats\_trans2\_dyn1\_dats.o ats\_trans2\_dyn2\_dats.o ats\_macro2\_sats.o  
> > > > ats\_macro2\_dats.o ats\_patcst2\_sats.o ats\_patcst2\_dats.o  
> > > > ats\_string\_parse\_sats.o ats\_string\_parse\_dats.o ats\_printf\_c\_lats\_dats.o  
> > > > ats\_dynexp3\_sats.o ats\_dynexp3\_dats.o ats\_dynexp3\_print\_dats.o  
> > > > ats\_trans3\_env\_sats.o ats\_trans3\_env\_dats.o ats\_trans3\_env\_eff\_dats.o  
> > > > ats\_trans3\_env\_loop\_dats.o ats\_trans3\_env\_met\_dats.o  
> > > > ats\_trans3\_env\_scst\_dats.o ats\_trans3\_env\_state\_dats.o  
> > > > ats\_trans3\_env\_print\_dats.o ats\_staexp2\_solve\_sats.o  
> > > > ats\_staexp2\_solve\_dats.o ats\_trans3\_sats.o ats\_trans3\_pat\_dats.o  
> > > > ats\_trans3\_assgn\_dats.o ats\_trans3\_deref\_dats.o ats\_trans3\_view\_dats.o  
> > > > ats\_trans3\_util\_dats.o ats\_trans3\_exp\_up\_dats.o ats\_trans3\_exp\_dn\_dats.o  
> > > > ats\_trans3\_loop\_dats.o ats\_trans3\_dec\_dats.o ats\_constraint\_sats.o  
> > > > ats\_constraint\_dats.o ats\_constraint\_print\_dats.o ats\_solver\_fm\_sats.o  
> > > > ats\_solver\_fm\_dats.o ats\_hiexp\_sats.o ats\_hiexp\_dats.o  
> > > > ats\_hiexp\_print\_dats.o ats\_hiexp\_util\_dats.o ats\_trans4\_sats.o  
> > > > ats\_trans4\_dats.o ats\_ccomp\_sats.o ats\_ccomp\_dats.o ats\_ccomp\_env\_sats.o  
> > > > ats\_ccomp\_env\_dats.o ats\_ccomp\_print\_dats.o ats\_ccomp\_util\_dats.o  
> > > > ats\_ccomp\_trans\_dats.o ats\_ccomp\_trans\_clau\_dats.o  
> > > > ats\_ccomp\_trans\_tailcal\_dats.o ats\_ccomp\_trans\_temp\_dats.o  
> > > > ats\_ccomp\_emit\_dats.o ats\_ccomp\_main\_dats.o ats\_lexer\_lats\_dats.o  
> > > > ats\_lexer\_sats.o ats\_grammar\_yats.o prelude\_dats\_basics\_dats.o  
> > > > prelude\_dats\_bool\_dats.o prelude\_dats\_char\_dats.o  
> > > > prelude\_dats\_integer\_dats.o prelude\_dats\_array\_dats.o  
> > > > prelude\_dats\_string\_dats.o prelude\_dats\_printf\_dats.o  
> > > > prelude\_dats\_filebas\_dats.o libc\_sats\_gmp\_sats.o libc\_sats\_time\_sats.o  
> > > > libc\_dats\_unistd\_dats.o libats\_lex\_lexing\_sats.o libats\_lex\_lexing\_dats.o  
> > > > libats\_lex\_tables\_dats.o ats\_main\_dats.c …/ccomp/runtime/ats\_prelude.c  
> > > > …/ccomp/runtime/ats\_bootstrap.c -lgmp  
> > > > collect2: error: ld terminated with signal 11 [Segmentation fault],  
> > > > core dumped  
> > > > …/Makefile\_bootstrap:263: recipe for target ‘atsopt’ failed  
> > > > make[1]: \*\*\* [atsopt] Error 1  
> > > > make[1]: Leaving directory  
> > > > ‘/home/brand\_000/ats-lang-anairiats-0.2.11/bootstrap1’  
> > > > Makefile:172: recipe for target ‘atsopt1’ failed  
> > > > make: \*\*\* [atsopt1] Error 2
> > > > 
> > > > #Make seems unable to recover:
> > > > 
> > > > brand\_000@ideapc ~/ats-lang-anairiats-0.2.11  
> > > > $ make all  
> > > > make -C bootstrap1 -f …/Makefile\_bootstrap BOOTSTRAP1=1 atsopt  
> > > > make[1]: Entering directory  
> > > > ‘/home/brand\_000/ats-lang-anairiats-0.2.11/bootstrap1’  
> > > > make[1]: ‘atsopt’ is up to date.  
> > > > make[1]: Leaving directory  
> > > > ‘/home/brand\_000/ats-lang-anairiats-0.2.11/bootstrap1’  
> > > > cp bootstrap1/atsopt  
> > > > “/home/brand\_000/ats-lang-anairiats-0.2.11”/bin/atsopt  
> > > > make -C utils/scripts atscc  
> > > > make[1]: Entering directory  
> > > > ‘/home/brand\_000/ats-lang-anairiats-0.2.11/utils/scripts’  
> > > > “/home/brand\_000/ats-lang-anairiats-0.2.11”/bin/atsopt --output  
> > > > atscc\_main\_dats.c --dynamic atscc\_main.dats  
> > > > “/home/brand\_000/ats-lang-anairiats-0.2.11”/bin/atsopt --output  
> > > > top\_sats.c --static top.sats  
> > > > gcc -I"/home/brand\_000/ats-lang-anairiats-0.2.11"  
> > > > -I"/home/brand\_000/ats-lang-anairiats-0.2.11"/ccomp/runtime -O2 -g -o  
> > > > top\_sats.o -c top\_sats.c  
> > > > gcc: error: top\_sats.c: No such file or directory  
> > > > gcc: fatal error: no input files  
> > > > compilation terminated.  
> > > > Makefile:88: recipe for target ‘top\_sats.o’ failed  
> > > > make[1]: \*\*\* [top\_sats.o] Error 1  
> > > > make[1]: Leaving directory  
> > > > ‘/home/brand\_000/ats-lang-anairiats-0.2.11/utils/scripts’  
> > > > Makefile:202: recipe for target ‘bin/atscc’ failed  
> > > > make: \*\*\* [bin/atscc] Error 2
> > > > 
> > > > Thanks,

---

<div class="post-metadata">

**Author:** ![Cyrille\_Duret](https://avatars.discourse-cdn.com/v4/letter/c/3d9bf3/32.png) [@Cyrille\_Duret](https://discourse.ats-lang.org/u/Cyrille_Duret)\
**Post date:** [December 23, 2013, 8:06am UTC](https://discourse.ats-lang.org/t/how-to-build-ats-1-on-cygwin64/189/6 "2013-12-23T08:06:44Z")

</div>

Do you think it would be possible to use the mingw-w64 compiler and obtain  
a binary independent from the cygwin dll ?  
Maybe trying this is enough  
: [http://go.kblog.us/2013/01/setting-up-mingw-for-use-with-cygwin.html](http://go.kblog.us/2013/01/setting-up-mingw-for-use-with-cygwin.html)  
I don’t have time to try now, I will try after Xmas

happy chrismas folk ;-)Le dimanche 22 décembre 2013 21:17:48 UTC+1, Brandon Barker a écrit :

> This is a bit odd; I did the rebuild only to find that it worked today,  
> and unfortunately I can’t say if I did anything differently this time  
> (obviously I thought not).
> 
> On Sunday, December 22, 2013 10:32:13 AM UTC-5, gmhwxi wrote:
> 
> > If you send me the entire output generated during the building process, I  
> > may get some clues as to what caused the failure.
> > 
> > On Sunday, December 22, 2013 9:40:22 AM UTC-5, Brandon Barker wrote:
> > 
> > > That did not seem to change the outcome, but Cygwin64 seems somewhat  
> > > unstable in my experience (even emacs crashes a lot). I had no problems  
> > > building with Cygwin32, which should be fine for me.
> > > 
> > > On Sunday, December 22, 2013 12:53:50 AM UTC-5, gmhwxi wrote:
> > > 
> > > > Here is my guess:
> > > > 
> > > > In the file
> > > > 
> > > > ${ATSHOME}/libats/lex/tables.dats
> > > > 
> > > > you can see the following two lines:
> > > > 
> > > > extern void \*malloc (size\_t bsz) ;  
> > > > extern void \*calloc (size\_t n, size\_t tsz) ;
> > > > 
> > > > Please replace them with the following one:
> > > > 
> > > > #include \<stdlib.h\>
> > > > 
> > > > Then try to re-compile.
> > > > 
> > > > On Sunday, December 22, 2013 12:27:59 AM UTC-5, Brandon Barker wrote:
> > > > 
> > > > > Trying to build ATS 0.2.11 on cygwin64 resulted in the following  
> > > > > interesting situation (I will try Cygwin32 on the same machine soon):
> > > > > 
> > > > > …  
> > > > > gcc -I"/home/brand\_000/ats-lang-anairiats-0.2.11"  
> > > > > -I"/home/brand\_000/ats-lang-anairiats-0.2.11"/ccomp/runtime -O2 -g -o  
> > > > > libats\_lex\_tables\_dats.o -c libats\_lex\_tables\_dats.c  
> > > > > libats\_lex\_tables\_dats.c: In function ‘\_\_accept\_table\_make\_fun’:  
> > > > > libats\_lex\_tables\_dats.c:635:24: warning: incompatible implicit  
> > > > > declaration of built-in function ‘calloc’ [enabled by default]  
> > > > > sz = ntot + 1 ; p0 = calloc (sz, sizeof(ats\_int16\_type)) ;  
> > > > > ^  
> > > > > libats\_lex\_tables\_dats.c: In function ‘\_\_transition\_table\_make\_fun’:  
> > > > > libats\_lex\_tables\_dats.c:667:8: warning: incompatible implicit  
> > > > > declaration of built-in function ‘malloc’ [enabled by default]  
> > > > > p0 = malloc (sz\*sizeof(ats\_int16\_type)) ; p = p0 ;  
> > > > > ^  
> > > > > gcc -I"/home/brand\_000/ats-lang-anairiats-0.2.11"  
> > > > > -I"/home/brand\_000/ats-lang-anairiats-0.2.11"/ccomp/runtime -O2 -g  
> > > > > -L/home/brand\_000/FBA/local/lib -o atsopt ats\_array\_sats.o  
> > > > > ats\_array\_dats.o ats\_charlst\_sats.o ats\_charlst\_dats.o ats\_comarg\_sats.o  
> > > > > ats\_comarg\_dats.o ats\_counter\_sats.o ats\_counter\_dats.o ats\_debug\_sats.o  
> > > > > ats\_debug\_dats.o ats\_effect\_sats.o ats\_effect\_dats.o ats\_error\_sats.o  
> > > > > ats\_error\_dats.o ats\_filename\_sats.o ats\_filename\_dats.o  
> > > > > ats\_fixity\_sats.o ats\_fixity\_prec\_dats.o ats\_fixity\_fxty\_dats.o  
> > > > > ats\_global\_sats.o ats\_global\_dats.o ats\_hashtbl\_sats.o ats\_hashtbl\_dats.o  
> > > > > ats\_intinf\_sats.o ats\_intinf\_dats.o ats\_keyword\_sats.o ats\_keyword\_dats.o  
> > > > > ats\_label\_sats.o ats\_label\_dats.o ats\_location\_sats.o ats\_location\_dats.o  
> > > > > ats\_namespace\_sats.o ats\_namespace\_dats.o ats\_posmark\_sats.o  
> > > > > ats\_posmark\_dats.o ats\_stamp\_sats.o ats\_stamp\_dats.o ats\_symbol\_sats.o  
> > > > > ats\_symbol\_dats.o ats\_symenv\_sats.o ats\_symenv\_dats.o ats\_symtbl\_sats.o  
> > > > > ats\_symtbl\_dats.o ats\_list\_sats.o ats\_list\_dats.o ats\_map\_lin\_sats.o  
> > > > > ats\_map\_lin\_dats.o ats\_reference\_sats.o ats\_reference\_dats.o  
> > > > > ats\_set\_fun\_sats.o ats\_set\_fun\_dats.o ats\_parser\_sats.o ats\_parser\_dats.o  
> > > > > ats\_syntax\_sats.o ats\_syntax\_dats.o ats\_syntax\_depgen\_dats.o  
> > > > > ats\_syntax\_taggen\_dats.o ats\_syntax\_posmark\_dats.o ats\_staexp1\_sats.o  
> > > > > ats\_staexp1\_dats.o ats\_staexp1\_print\_dats.o ats\_dynexp1\_sats.o  
> > > > > ats\_dynexp1\_dats.o ats\_dynexp1\_print\_dats.o ats\_dynexp1\_syndef\_dats.o  
> > > > > ats\_dynexp1\_syndef\_sats.o ats\_trans1\_env\_sats.o ats\_trans1\_env\_dats.o  
> > > > > ats\_e1xp\_eval\_sats.o ats\_e1xp\_eval\_dats.o ats\_trans1\_sats.o  
> > > > > ats\_trans1\_sta\_dats.o ats\_trans1\_dyn\_dats.o ats\_staexp2\_sats.o  
> > > > > ats\_staexp2\_dats.o ats\_staexp2\_print\_dats.o ats\_staexp2\_scst\_dats.o  
> > > > > ats\_staexp2\_svVar\_dats.o ats\_staexp2\_dcon\_dats.o  
> > > > > ats\_staexp2\_util1\_dats.o ats\_staexp2\_util2\_dats.o  
> > > > > ats\_staexp2\_pprint\_sats.o ats\_staexp2\_pprint\_dats.o ats\_dynexp2\_sats.o  
> > > > > ats\_dynexp2\_dats.o ats\_dynexp2\_dcst\_dats.o ats\_dynexp2\_dmac\_dats.o  
> > > > > ats\_dynexp2\_dvar\_dats.o ats\_dynexp2\_print\_dats.o ats\_dynexp2\_util\_dats.o  
> > > > > ats\_trans2\_env\_sats.o ats\_trans2\_env\_dats.o ats\_stadyncst2\_sats.o  
> > > > > ats\_stadyncst2\_dats.o ats\_trans2\_sats.o ats\_trans2\_sta\_dats.o  
> > > > > ats\_trans2\_dyn1\_dats.o ats\_trans2\_dyn2\_dats.o ats\_macro2\_sats.o  
> > > > > ats\_macro2\_dats.o ats\_patcst2\_sats.o ats\_patcst2\_dats.o  
> > > > > ats\_string\_parse\_sats.o ats\_string\_parse\_dats.o ats\_printf\_c\_lats\_dats.o  
> > > > > ats\_dynexp3\_sats.o ats\_dynexp3\_dats.o ats\_dynexp3\_print\_dats.o  
> > > > > ats\_trans3\_env\_sats.o ats\_trans3\_env\_dats.o ats\_trans3\_env\_eff\_dats.o  
> > > > > ats\_trans3\_env\_loop\_dats.o ats\_trans3\_env\_met\_dats.o  
> > > > > ats\_trans3\_env\_scst\_dats.o ats\_trans3\_env\_state\_dats.o  
> > > > > ats\_trans3\_env\_print\_dats.o ats\_staexp2\_solve\_sats.o  
> > > > > ats\_staexp2\_solve\_dats.o ats\_trans3\_sats.o ats\_trans3\_pat\_dats.o  
> > > > > ats\_trans3\_assgn\_dats.o ats\_trans3\_deref\_dats.o ats\_trans3\_view\_dats.o  
> > > > > ats\_trans3\_util\_dats.o ats\_trans3\_exp\_up\_dats.o ats\_trans3\_exp\_dn\_dats.o  
> > > > > ats\_trans3\_loop\_dats.o ats\_trans3\_dec\_dats.o ats\_constraint\_sats.o  
> > > > > ats\_constraint\_dats.o ats\_constraint\_print\_dats.o ats\_solver\_fm\_sats.o  
> > > > > ats\_solver\_fm\_dats.o ats\_hiexp\_sats.o ats\_hiexp\_dats.o  
> > > > > ats\_hiexp\_print\_dats.o ats\_hiexp\_util\_dats.o ats\_trans4\_sats.o  
> > > > > ats\_trans4\_dats.o ats\_ccomp\_sats.o ats\_ccomp\_dats.o ats\_ccomp\_env\_sats.o  
> > > > > ats\_ccomp\_env\_dats.o ats\_ccomp\_print\_dats.o ats\_ccomp\_util\_dats.o  
> > > > > ats\_ccomp\_trans\_dats.o ats\_ccomp\_trans\_clau\_dats.o  
> > > > > ats\_ccomp\_trans\_tailcal\_dats.o ats\_ccomp\_trans\_temp\_dats.o  
> > > > > ats\_ccomp\_emit\_dats.o ats\_ccomp\_main\_dats.o ats\_lexer\_lats\_dats.o  
> > > > > ats\_lexer\_sats.o ats\_grammar\_yats.o prelude\_dats\_basics\_dats.o  
> > > > > prelude\_dats\_bool\_dats.o prelude\_dats\_char\_dats.o  
> > > > > prelude\_dats\_integer\_dats.o prelude\_dats\_array\_dats.o  
> > > > > prelude\_dats\_string\_dats.o prelude\_dats\_printf\_dats.o  
> > > > > prelude\_dats\_filebas\_dats.o libc\_sats\_gmp\_sats.o libc\_sats\_time\_sats.o  
> > > > > libc\_dats\_unistd\_dats.o libats\_lex\_lexing\_sats.o libats\_lex\_lexing\_dats.o  
> > > > > libats\_lex\_tables\_dats.o ats\_main\_dats.c …/ccomp/runtime/ats\_prelude.c  
> > > > > …/ccomp/runtime/ats\_bootstrap.c -lgmp  
> > > > > collect2: error: ld terminated with signal 11 [Segmentation fault],  
> > > > > core dumped  
> > > > > …/Makefile\_bootstrap:263: recipe for target ‘atsopt’ failed  
> > > > > make[1]: \*\*\* [atsopt] Error 1  
> > > > > make[1]: Leaving directory  
> > > > > ‘/home/brand\_000/ats-lang-anairiats-0.2.11/bootstrap1’  
> > > > > Makefile:172: recipe for target ‘atsopt1’ failed  
> > > > > make: \*\*\* [atsopt1] Error 2
> > > > > 
> > > > > #Make seems unable to recover:
> > > > > 
> > > > > brand\_000@ideapc ~/ats-lang-anairiats-0.2.11  
> > > > > $ make all  
> > > > > make -C bootstrap1 -f …/Makefile\_bootstrap BOOTSTRAP1=1 atsopt  
> > > > > make[1]: Entering directory  
> > > > > ‘/home/brand\_000/ats-lang-anairiats-0.2.11/bootstrap1’  
> > > > > make[1]: ‘atsopt’ is up to date.  
> > > > > make[1]: Leaving directory  
> > > > > ‘/home/brand\_000/ats-lang-anairiats-0.2.11/bootstrap1’  
> > > > > cp bootstrap1/atsopt  
> > > > > “/home/brand\_000/ats-lang-anairiats-0.2.11”/bin/atsopt  
> > > > > make -C utils/scripts atscc  
> > > > > make[1]: Entering directory  
> > > > > ‘/home/brand\_000/ats-lang-anairiats-0.2.11/utils/scripts’  
> > > > > “/home/brand\_000/ats-lang-anairiats-0.2.11”/bin/atsopt --output  
> > > > > atscc\_main\_dats.c --dynamic atscc\_main.dats  
> > > > > “/home/brand\_000/ats-lang-anairiats-0.2.11”/bin/atsopt --output  
> > > > > top\_sats.c --static top.sats  
> > > > > gcc -I"/home/brand\_000/ats-lang-anairiats-0.2.11"  
> > > > > -I"/home/brand\_000/ats-lang-anairiats-0.2.11"/ccomp/runtime -O2 -g -o  
> > > > > top\_sats.o -c top\_sats.c  
> > > > > gcc: error: top\_sats.c: No such file or directory  
> > > > > gcc: fatal error: no input files  
> > > > > compilation terminated.  
> > > > > Makefile:88: recipe for target ‘top\_sats.o’ failed  
> > > > > make[1]: \*\*\* [top\_sats.o] Error 1  
> > > > > make[1]: Leaving directory  
> > > > > ‘/home/brand\_000/ats-lang-anairiats-0.2.11/utils/scripts’  
> > > > > Makefile:202: recipe for target ‘bin/atscc’ failed  
> > > > > make: \*\*\* [bin/atscc] Error 2
> > > > > 
> > > > > Thanks,

---

<div class="post-metadata">

**Author:** ![Brandon\_Barker](https://sea1.discourse-cdn.com/flex019/user_avatar/discourse.ats-lang.org/brandon_barker/32/61_2.png) [@Brandon\_Barker](https://discourse.ats-lang.org/u/Brandon_Barker)\
**Post date:** [December 25, 2013, 4:14am UTC](https://discourse.ats-lang.org/t/how-to-build-ats-1-on-cygwin64/189/7 "2013-12-25T04:14:43Z")

</div>

I’d be interested to hear how this goes as well - I can’t recall if anyone  
has used ATS with mingw.On Monday, December 23, 2013 3:06:44 AM UTC-5, Cyrille Duret wrote:

> Do you think it would be possible to use the mingw-w64 compiler and obtain  
> a binary independent from the cygwin dll ?  
> Maybe trying this is enough :  
> [http://go.kblog.us/2013/01/setting-up-mingw-for-use-with-cygwin.html](http://go.kblog.us/2013/01/setting-up-mingw-for-use-with-cygwin.html)  
> I don’t have time to try now, I will try after Xmas
> 
> happy chrismas folk 😉
> 
> Le dimanche 22 décembre 2013 21:17:48 UTC+1, Brandon Barker a écrit :
> 
> > This is a bit odd; I did the rebuild only to find that it worked today,  
> > and unfortunately I can’t say if I did anything differently this time  
> > (obviously I thought not).
> > 
> > On Sunday, December 22, 2013 10:32:13 AM UTC-5, gmhwxi wrote:
> > 
> > > If you send me the entire output generated during the building process,  
> > > I may get some clues as to what caused the failure.
> > > 
> > > On Sunday, December 22, 2013 9:40:22 AM UTC-5, Brandon Barker wrote:
> > > 
> > > > That did not seem to change the outcome, but Cygwin64 seems somewhat  
> > > > unstable in my experience (even emacs crashes a lot). I had no problems  
> > > > building with Cygwin32, which should be fine for me.
> > > > 
> > > > On Sunday, December 22, 2013 12:53:50 AM UTC-5, gmhwxi wrote:
> > > > 
> > > > > Here is my guess:
> > > > > 
> > > > > In the file
> > > > > 
> > > > > ${ATSHOME}/libats/lex/tables.dats
> > > > > 
> > > > > you can see the following two lines:
> > > > > 
> > > > > extern void \*malloc (size\_t bsz) ;  
> > > > > extern void \*calloc (size\_t n, size\_t tsz) ;
> > > > > 
> > > > > Please replace them with the following one:
> > > > > 
> > > > > #include \<stdlib.h\>
> > > > > 
> > > > > Then try to re-compile.
> > > > > 
> > > > > On Sunday, December 22, 2013 12:27:59 AM UTC-5, Brandon Barker wrote:
> > > > > 
> > > > > > Trying to build ATS 0.2.11 on cygwin64 resulted in the following  
> > > > > > interesting situation (I will try Cygwin32 on the same machine soon):
> > > > > > 
> > > > > > …  
> > > > > > gcc -I"/home/brand\_000/ats-lang-anairiats-0.2.11"  
> > > > > > -I"/home/brand\_000/ats-lang-anairiats-0.2.11"/ccomp/runtime -O2 -g -o  
> > > > > > libats\_lex\_tables\_dats.o -c libats\_lex\_tables\_dats.c  
> > > > > > libats\_lex\_tables\_dats.c: In function ‘\_\_accept\_table\_make\_fun’:  
> > > > > > libats\_lex\_tables\_dats.c:635:24: warning: incompatible implicit  
> > > > > > declaration of built-in function ‘calloc’ [enabled by default]  
> > > > > > sz = ntot + 1 ; p0 = calloc (sz, sizeof(ats\_int16\_type)) ;  
> > > > > > ^  
> > > > > > libats\_lex\_tables\_dats.c: In function ‘\_\_transition\_table\_make\_fun’:  
> > > > > > libats\_lex\_tables\_dats.c:667:8: warning: incompatible implicit  
> > > > > > declaration of built-in function ‘malloc’ [enabled by default]  
> > > > > > p0 = malloc (sz\*sizeof(ats\_int16\_type)) ; p = p0 ;  
> > > > > > ^  
> > > > > > gcc -I"/home/brand\_000/ats-lang-anairiats-0.2.11"  
> > > > > > -I"/home/brand\_000/ats-lang-anairiats-0.2.11"/ccomp/runtime -O2 -g  
> > > > > > -L/home/brand\_000/FBA/local/lib -o atsopt ats\_array\_sats.o  
> > > > > > ats\_array\_dats.o ats\_charlst\_sats.o ats\_charlst\_dats.o ats\_comarg\_sats.o  
> > > > > > ats\_comarg\_dats.o ats\_counter\_sats.o ats\_counter\_dats.o ats\_debug\_sats.o  
> > > > > > ats\_debug\_dats.o ats\_effect\_sats.o ats\_effect\_dats.o ats\_error\_sats.o  
> > > > > > ats\_error\_dats.o ats\_filename\_sats.o ats\_filename\_dats.o  
> > > > > > ats\_fixity\_sats.o ats\_fixity\_prec\_dats.o ats\_fixity\_fxty\_dats.o  
> > > > > > ats\_global\_sats.o ats\_global\_dats.o ats\_hashtbl\_sats.o ats\_hashtbl\_dats.o  
> > > > > > ats\_intinf\_sats.o ats\_intinf\_dats.o ats\_keyword\_sats.o ats\_keyword\_dats.o  
> > > > > > ats\_label\_sats.o ats\_label\_dats.o ats\_location\_sats.o ats\_location\_dats.o  
> > > > > > ats\_namespace\_sats.o ats\_namespace\_dats.o ats\_posmark\_sats.o  
> > > > > > ats\_posmark\_dats.o ats\_stamp\_sats.o ats\_stamp\_dats.o ats\_symbol\_sats.o  
> > > > > > ats\_symbol\_dats.o ats\_symenv\_sats.o ats\_symenv\_dats.o ats\_symtbl\_sats.o  
> > > > > > ats\_symtbl\_dats.o ats\_list\_sats.o ats\_list\_dats.o ats\_map\_lin\_sats.o  
> > > > > > ats\_map\_lin\_dats.o ats\_reference\_sats.o ats\_reference\_dats.o  
> > > > > > ats\_set\_fun\_sats.o ats\_set\_fun\_dats.o ats\_parser\_sats.o ats\_parser\_dats.o  
> > > > > > ats\_syntax\_sats.o ats\_syntax\_dats.o ats\_syntax\_depgen\_dats.o  
> > > > > > ats\_syntax\_taggen\_dats.o ats\_syntax\_posmark\_dats.o ats\_staexp1\_sats.o  
> > > > > > ats\_staexp1\_dats.o ats\_staexp1\_print\_dats.o ats\_dynexp1\_sats.o  
> > > > > > ats\_dynexp1\_dats.o ats\_dynexp1\_print\_dats.o ats\_dynexp1\_syndef\_dats.o  
> > > > > > ats\_dynexp1\_syndef\_sats.o ats\_trans1\_env\_sats.o ats\_trans1\_env\_dats.o  
> > > > > > ats\_e1xp\_eval\_sats.o ats\_e1xp\_eval\_dats.o ats\_trans1\_sats.o  
> > > > > > ats\_trans1\_sta\_dats.o ats\_trans1\_dyn\_dats.o ats\_staexp2\_sats.o  
> > > > > > ats\_staexp2\_dats.o ats\_staexp2\_print\_dats.o ats\_staexp2\_scst\_dats.o  
> > > > > > ats\_staexp2\_svVar\_dats.o ats\_staexp2\_dcon\_dats.o  
> > > > > > ats\_staexp2\_util1\_dats.o ats\_staexp2\_util2\_dats.o  
> > > > > > ats\_staexp2\_pprint\_sats.o ats\_staexp2\_pprint\_dats.o ats\_dynexp2\_sats.o  
> > > > > > ats\_dynexp2\_dats.o ats\_dynexp2\_dcst\_dats.o ats\_dynexp2\_dmac\_dats.o  
> > > > > > ats\_dynexp2\_dvar\_dats.o ats\_dynexp2\_print\_dats.o ats\_dynexp2\_util\_dats.o  
> > > > > > ats\_trans2\_env\_sats.o ats\_trans2\_env\_dats.o ats\_stadyncst2\_sats.o  
> > > > > > ats\_stadyncst2\_dats.o ats\_trans2\_sats.o ats\_trans2\_sta\_dats.o  
> > > > > > ats\_trans2\_dyn1\_dats.o ats\_trans2\_dyn2\_dats.o ats\_macro2\_sats.o  
> > > > > > ats\_macro2\_dats.o ats\_patcst2\_sats.o ats\_patcst2\_dats.o  
> > > > > > ats\_string\_parse\_sats.o ats\_string\_parse\_dats.o ats\_printf\_c\_lats\_dats.o  
> > > > > > ats\_dynexp3\_sats.o ats\_dynexp3\_dats.o ats\_dynexp3\_print\_dats.o  
> > > > > > ats\_trans3\_env\_sats.o ats\_trans3\_env\_dats.o ats\_trans3\_env\_eff\_dats.o  
> > > > > > ats\_trans3\_env\_loop\_dats.o ats\_trans3\_env\_met\_dats.o  
> > > > > > ats\_trans3\_env\_scst\_dats.o ats\_trans3\_env\_state\_dats.o  
> > > > > > ats\_trans3\_env\_print\_dats.o ats\_staexp2\_solve\_sats.o  
> > > > > > ats\_staexp2\_solve\_dats.o ats\_trans3\_sats.o ats\_trans3\_pat\_dats.o  
> > > > > > ats\_trans3\_assgn\_dats.o ats\_trans3\_deref\_dats.o ats\_trans3\_view\_dats.o  
> > > > > > ats\_trans3\_util\_dats.o ats\_trans3\_exp\_up\_dats.o ats\_trans3\_exp\_dn\_dats.o  
> > > > > > ats\_trans3\_loop\_dats.o ats\_trans3\_dec\_dats.o ats\_constraint\_sats.o  
> > > > > > ats\_constraint\_dats.o ats\_constraint\_print\_dats.o ats\_solver\_fm\_sats.o  
> > > > > > ats\_solver\_fm\_dats.o ats\_hiexp\_sats.o ats\_hiexp\_dats.o  
> > > > > > ats\_hiexp\_print\_dats.o ats\_hiexp\_util\_dats.o ats\_trans4\_sats.o  
> > > > > > ats\_trans4\_dats.o ats\_ccomp\_sats.o ats\_ccomp\_dats.o ats\_ccomp\_env\_sats.o  
> > > > > > ats\_ccomp\_env\_dats.o ats\_ccomp\_print\_dats.o ats\_ccomp\_util\_dats.o  
> > > > > > ats\_ccomp\_trans\_dats.o ats\_ccomp\_trans\_clau\_dats.o  
> > > > > > ats\_ccomp\_trans\_tailcal\_dats.o ats\_ccomp\_trans\_temp\_dats.o  
> > > > > > ats\_ccomp\_emit\_dats.o ats\_ccomp\_main\_dats.o ats\_lexer\_lats\_dats.o  
> > > > > > ats\_lexer\_sats.o ats\_grammar\_yats.o prelude\_dats\_basics\_dats.o  
> > > > > > prelude\_dats\_bool\_dats.o prelude\_dats\_char\_dats.o  
> > > > > > prelude\_dats\_integer\_dats.o prelude\_dats\_array\_dats.o  
> > > > > > prelude\_dats\_string\_dats.o prelude\_dats\_printf\_dats.o  
> > > > > > prelude\_dats\_filebas\_dats.o libc\_sats\_gmp\_sats.o libc\_sats\_time\_sats.o  
> > > > > > libc\_dats\_unistd\_dats.o libats\_lex\_lexing\_sats.o libats\_lex\_lexing\_dats.o  
> > > > > > libats\_lex\_tables\_dats.o ats\_main\_dats.c …/ccomp/runtime/ats\_prelude.c  
> > > > > > …/ccomp/runtime/ats\_bootstrap.c -lgmp  
> > > > > > collect2: error: ld terminated with signal 11 [Segmentation fault],  
> > > > > > core dumped  
> > > > > > …/Makefile\_bootstrap:263: recipe for target ‘atsopt’ failed  
> > > > > > make[1]: \*\*\* [atsopt] Error 1  
> > > > > > make[1]: Leaving directory  
> > > > > > ‘/home/brand\_000/ats-lang-anairiats-0.2.11/bootstrap1’  
> > > > > > Makefile:172: recipe for target ‘atsopt1’ failed  
> > > > > > make: \*\*\* [atsopt1] Error 2
> > > > > > 
> > > > > > #Make seems unable to recover:
> > > > > > 
> > > > > > brand\_000@ideapc ~/ats-lang-anairiats-0.2.11  
> > > > > > $ make all  
> > > > > > make -C bootstrap1 -f …/Makefile\_bootstrap BOOTSTRAP1=1 atsopt  
> > > > > > make[1]: Entering directory  
> > > > > > ‘/home/brand\_000/ats-lang-anairiats-0.2.11/bootstrap1’  
> > > > > > make[1]: ‘atsopt’ is up to date.  
> > > > > > make[1]: Leaving directory  
> > > > > > ‘/home/brand\_000/ats-lang-anairiats-0.2.11/bootstrap1’  
> > > > > > cp bootstrap1/atsopt  
> > > > > > “/home/brand\_000/ats-lang-anairiats-0.2.11”/bin/atsopt  
> > > > > > make -C utils/scripts atscc  
> > > > > > make[1]: Entering directory  
> > > > > > ‘/home/brand\_000/ats-lang-anairiats-0.2.11/utils/scripts’  
> > > > > > “/home/brand\_000/ats-lang-anairiats-0.2.11”/bin/atsopt --output  
> > > > > > atscc\_main\_dats.c --dynamic atscc\_main.dats  
> > > > > > “/home/brand\_000/ats-lang-anairiats-0.2.11”/bin/atsopt --output  
> > > > > > top\_sats.c --static top.sats  
> > > > > > gcc -I"/home/brand\_000/ats-lang-anairiats-0.2.11"  
> > > > > > -I"/home/brand\_000/ats-lang-anairiats-0.2.11"/ccomp/runtime -O2 -g -o  
> > > > > > top\_sats.o -c top\_sats.c  
> > > > > > gcc: error: top\_sats.c: No such file or directory  
> > > > > > gcc: fatal error: no input files  
> > > > > > compilation terminated.  
> > > > > > Makefile:88: recipe for target ‘top\_sats.o’ failed  
> > > > > > make[1]: \*\*\* [top\_sats.o] Error 1  
> > > > > > make[1]: Leaving directory  
> > > > > > ‘/home/brand\_000/ats-lang-anairiats-0.2.11/utils/scripts’  
> > > > > > Makefile:202: recipe for target ‘bin/atscc’ failed  
> > > > > > make: \*\*\* [bin/atscc] Error 2
> > > > > > 
> > > > > > Thanks,
