# Error compiling package in more recent ATS builds

**URL:** <https://discourse.ats-lang.org/t/error-compiling-package-in-more-recent-ats-builds/704>\
**Category:** Google Group\
**Created:** [July 1, 2016, 2:01am UTC](https://discourse.ats-lang.org/t/error-compiling-package-in-more-recent-ats-builds/704 "2016-07-01T02:01: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:** [July 1, 2016, 2:01am UTC](https://discourse.ats-lang.org/t/error-compiling-package-in-more-recent-ats-builds/704/1 "2016-07-01T02:01:59Z")

</div>

Hi,

When trying to build a package [https://github.com/bbarker/FALCON](https://github.com/bbarker/FALCON) using  
more recent versions of ATS includes, I get the following error:

$ make PATSCC=gcc MYCCRULE=PORTABLE -f …/Makefile  
gcc -I"/home/Brandon/ATS2-Postiats-include-0.1.6" -I  
"/home/Brandon/ATS2-Postiats-include-0.1.6"/ccomp/runtime -I  
"/usr/local/lib/ats2-postiats"/contrib -D\_GNU\_SOURCE -O2 -c falcon\_sats.c  
falcon\_sats.c: In function ‘  
\_057\_cygdrive\_057\_c\_057\_cygwin\_057\_home\_057\_brand\_000\_057\_FBA\_057\_FALCON\_057\_GPR\_057\_falcon\_056\_sats\_\_dynload  
’:  
falcon\_sats.c:118:1: warning: implicit declaration of function ‘ATSdynload1’  
[-Wimplicit-function-declaration]  
ATSdynload1(  
^  
falcon\_sats.c:119:1: error: ‘  
\_057\_cygdrive\_057\_c\_057\_cygwin\_057\_home\_057\_brand\_000\_057\_FBA\_057\_FALCON\_057\_GPR\_057\_falcon\_056\_sats\_\_dynloadflag  
’ undeclared (first use in this function)  
\_057\_cygdrive\_057\_c\_057\_cygwin\_057\_home\_057\_brand\_000\_057\_FBA\_057\_FALCON\_057\_GPR\_057\_falcon\_056\_sats\_\_dynloadflag  
^  
falcon\_sats.c:119:1: note: each undeclared identifier is reported only once  
for each function it appears in  
make: \*\*\* [[atsmake-post.mk:68](http://atsmake-post.mk:68): falcon\_sats.o] Error 1

I verified this happens on Linux as well; if we go back to ATS2 v0.0.7 it  
seems to work, for instance. Did something happen with regard to  
ATSdynload1?

---

<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:** [July 1, 2016, 3:48am UTC](https://discourse.ats-lang.org/t/error-compiling-package-in-more-recent-ats-builds/704/2 "2016-07-01T03:48:13Z")

</div>

It was probably generated by a version of ATS earlier than ATS2-0.1.6.  
If you want to use the header files provided by ATS2-0.1.6, please use  
patsopt-0.1.6 to re-generate falcon\_sats.c.

I have kept FALCON as a test case:

[https://github.com/githwxi/ATS-Postiats-contrib/tree/master/projects/MEDIUM/FALCON](https://github.com/githwxi/ATS-Postiats-contrib/tree/master/projects/MEDIUM/FALCON)

So the FALCON package should compile without problems.On Thursday, June 30, 2016 at 11:24:46 PM UTC-4, Brandon Barker wrote:

> It should be a version (likely checked out directly from github) just  
> prior to April 2014.  
> On Jun 30, 2016 11:05 PM, “gmhwxi” \<…hwxi…\> wrote:
> 
> > Interesting. Which version of ATS compiler was used to generate  
> > falcon\_sats.c?
> > 
> > On Thursday, June 30, 2016 at 10:01:59 PM UTC-4, Brandon Barker wrote:
> > 
> > > Hi,
> > > 
> > > When trying to build a package [https://github.com/bbarker/FALCON](https://github.com/bbarker/FALCON)  
> > > using more recent versions of ATS includes, I get the following error:
> > > 
> > > $ make PATSCC=gcc MYCCRULE=PORTABLE -f …/Makefile  
> > > gcc -I"/home/Brandon/ATS2-Postiats-include-0.1.6" -I  
> > > “/home/Brandon/ATS2-Postiats-include-0.1.6”/ccomp/runtime -I  
> > > “/usr/local/lib/ats2-postiats”/contrib -D\_GNU\_SOURCE -O2 -c falcon\_sats.  
> > > c  
> > > falcon\_sats.c: In function ‘  
> > > \_057\_cygdrive\_057\_c\_057\_cygwin\_057\_home\_057\_brand\_000\_057\_FBA\_057\_FALCON\_057\_GPR\_057\_falcon\_056\_sats\_\_dynload  
> > > ’:  
> > > falcon\_sats.c:118:1: warning: implicit declaration of function ‘  
> > > ATSdynload1’ [-Wimplicit-function-declaration]  
> > > ATSdynload1(  
> > > ^  
> > > falcon\_sats.c:119:1: error: ‘  
> > > \_057\_cygdrive\_057\_c\_057\_cygwin\_057\_home\_057\_brand\_000\_057\_FBA\_057\_FALCON\_057\_GPR\_057\_falcon\_056\_sats\_\_dynloadflag  
> > > ’ undeclared (first use in this function)
> > > 
> > > \_057\_cygdrive\_057\_c\_057\_cygwin\_057\_home\_057\_brand\_000\_057\_FBA\_057\_FALCON\_057\_GPR\_057\_falcon\_056\_sats\_\_dynloadflag  
> > > ^  
> > > falcon\_sats.c:119:1: note: each undeclared identifier is reported only  
> > > once for each function it appears in  
> > > make: \*\*\* [atsmake-post.mk:68: falcon\_sats.o] Error 1
> > > 
> > > I verified this happens on Linux as well; if we go back to ATS2 v0.0.7  
> > > it seems to work, for instance. Did something happen with regard to  
> > > ATSdynload1?
> > 
> > –  
> > 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](mailto:ats-lang-user...@googlegroups.com).  
> > To post to this group, send email to [ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com).  
> > Visit this group at [https://groups.google.com/group/ats-lang-users](https://groups.google.com/group/ats-lang-users).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/ats-lang-users/d962602c-8704-457f-a29e-708098c72981%40googlegroups.com](https://groups.google.com/d/msgid/ats-lang-users/d962602c-8704-457f-a29e-708098c72981%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/ats-lang-users/d962602c-8704-457f-a29e-708098c72981%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/ats-lang-users/d962602c-8704-457f-a29e-708098c72981%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .

---

<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:** [July 1, 2016, 4:11pm UTC](https://discourse.ats-lang.org/t/error-compiling-package-in-more-recent-ats-builds/704/3 "2016-07-01T16:11:11Z")

</div>

By the way, I want to state that the C-header files included in  
the distribution of ATS are changed very infrequently. So it is  
likely that mismatch between the version of the C-header files and  
the version of patsopt being used does not cause any compilation  
problems. It is just that this particular case is a bit special…On Thursday, June 30, 2016 at 11:48:13 PM UTC-4, gmhwxi wrote:

> It was probably generated by a version of ATS earlier than ATS2-0.1.6.  
> If you want to use the header files provided by ATS2-0.1.6, please use  
> patsopt-0.1.6 to re-generate falcon\_sats.c.
> 
> I have kept FALCON as a test case:
> 
> [https://github.com/githwxi/ATS-Postiats-contrib/tree/master/projects/MEDIUM/FALCON](https://github.com/githwxi/ATS-Postiats-contrib/tree/master/projects/MEDIUM/FALCON)
> 
> So the FALCON package should compile without problems.
> 
> On Thursday, June 30, 2016 at 11:24:46 PM UTC-4, Brandon Barker wrote:
> 
> > It should be a version (likely checked out directly from github) just  
> > prior to April 2014.  
> > On Jun 30, 2016 11:05 PM, “gmhwxi” \<…hwxi…\> wrote:
> > 
> > > Interesting. Which version of ATS compiler was used to generate  
> > > falcon\_sats.c?
> > > 
> > > On Thursday, June 30, 2016 at 10:01:59 PM UTC-4, Brandon Barker wrote:
> > > 
> > > > Hi,
> > > > 
> > > > When trying to build a package [https://github.com/bbarker/FALCON](https://github.com/bbarker/FALCON)  
> > > > using more recent versions of ATS includes, I get the following error:
> > > > 
> > > > $ make PATSCC=gcc MYCCRULE=PORTABLE -f …/Makefile  
> > > > gcc -I"/home/Brandon/ATS2-Postiats-include-0.1.6" -I  
> > > > “/home/Brandon/ATS2-Postiats-include-0.1.6”/ccomp/runtime -I  
> > > > “/usr/local/lib/ats2-postiats”/contrib -D\_GNU\_SOURCE -O2 -c falcon\_sats  
> > > > .c  
> > > > falcon\_sats.c: In function ‘  
> > > > \_057\_cygdrive\_057\_c\_057\_cygwin\_057\_home\_057\_brand\_000\_057\_FBA\_057\_FALCON\_057\_GPR\_057\_falcon\_056\_sats\_\_dynload  
> > > > ’:  
> > > > falcon\_sats.c:118:1: warning: implicit declaration of function ‘  
> > > > ATSdynload1’ [-Wimplicit-function-declaration]  
> > > > ATSdynload1(  
> > > > ^  
> > > > falcon\_sats.c:119:1: error: ‘  
> > > > \_057\_cygdrive\_057\_c\_057\_cygwin\_057\_home\_057\_brand\_000\_057\_FBA\_057\_FALCON\_057\_GPR\_057\_falcon\_056\_sats\_\_dynloadflag  
> > > > ’ undeclared (first use in this function)
> > > > 
> > > > \_057\_cygdrive\_057\_c\_057\_cygwin\_057\_home\_057\_brand\_000\_057\_FBA\_057\_FALCON\_057\_GPR\_057\_falcon\_056\_sats\_\_dynloadflag  
> > > > ^  
> > > > falcon\_sats.c:119:1: note: each undeclared identifier is reported only  
> > > > once for each function it appears in  
> > > > make: \*\*\* [atsmake-post.mk:68: falcon\_sats.o] Error 1
> > > > 
> > > > I verified this happens on Linux as well; if we go back to ATS2 v0.0.7  
> > > > it seems to work, for instance. Did something happen with regard to  
> > > > ATSdynload1?
> > > 
> > > –  
> > > 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](mailto:ats-lang-user...@googlegroups.com).  
> > > To post to this group, send email to [ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com).  
> > > Visit this group at [https://groups.google.com/group/ats-lang-users](https://groups.google.com/group/ats-lang-users).  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/ats-lang-users/d962602c-8704-457f-a29e-708098c72981%40googlegroups.com](https://groups.google.com/d/msgid/ats-lang-users/d962602c-8704-457f-a29e-708098c72981%40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/ats-lang-users/d962602c-8704-457f-a29e-708098c72981%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/ats-lang-users/d962602c-8704-457f-a29e-708098c72981%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .

---

<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:** [July 1, 2016, 3:24am UTC](https://discourse.ats-lang.org/t/error-compiling-package-in-more-recent-ats-builds/704/4 "2016-07-01T03:24:45Z")

</div>

It should be a version (likely checked out directly from github) just prior  
to April 2014.On Jun 30, 2016 11:05 PM, “gmhwxi” [gmh...@gmail.com](mailto:gmh...@gmail.com) wrote:

> Interesting. Which version of ATS compiler was used to generate  
> falcon\_sats.c?
> 
> On Thursday, June 30, 2016 at 10:01:59 PM UTC-4, Brandon Barker wrote:
> 
> > Hi,
> > 
> > When trying to build a package [https://github.com/bbarker/FALCON](https://github.com/bbarker/FALCON) using  
> > more recent versions of ATS includes, I get the following error:
> > 
> > $ make PATSCC=gcc MYCCRULE=PORTABLE -f …/Makefile  
> > gcc -I"/home/Brandon/ATS2-Postiats-include-0.1.6" -I  
> > “/home/Brandon/ATS2-Postiats-include-0.1.6”/ccomp/runtime -I  
> > “/usr/local/lib/ats2-postiats”/contrib -D\_GNU\_SOURCE -O2 -c falcon\_sats.c  
> > falcon\_sats.c: In function ‘  
> > \_057\_cygdrive\_057\_c\_057\_cygwin\_057\_home\_057\_brand\_000\_057\_FBA\_057\_FALCON\_057\_GPR\_057\_falcon\_056\_sats\_\_dynload  
> > ’:  
> > falcon\_sats.c:118:1: warning: implicit declaration of function ‘  
> > ATSdynload1’ [-Wimplicit-function-declaration]  
> > ATSdynload1(  
> > ^  
> > falcon\_sats.c:119:1: error: ‘  
> > \_057\_cygdrive\_057\_c\_057\_cygwin\_057\_home\_057\_brand\_000\_057\_FBA\_057\_FALCON\_057\_GPR\_057\_falcon\_056\_sats\_\_dynloadflag  
> > ’ undeclared (first use in this function)
> > 
> > \_057\_cygdrive\_057\_c\_057\_cygwin\_057\_home\_057\_brand\_000\_057\_FBA\_057\_FALCON\_057\_GPR\_057\_falcon\_056\_sats\_\_dynloadflag  
> > ^  
> > falcon\_sats.c:119:1: note: each undeclared identifier is reported only  
> > once for each function it appears in  
> > make: \*\*\* [atsmake-post.mk:68: falcon\_sats.o] Error 1
> > 
> > I verified this happens on Linux as well; if we go back to ATS2 v0.0.7 it  
> > seems to work, for instance. Did something happen with regard to  
> > ATSdynload1?
> 
> –  
> 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](mailto:ats-lang-user...@googlegroups.com).  
> To post to this group, send email to [ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com).  
> Visit this group at [https://groups.google.com/group/ats-lang-users](https://groups.google.com/group/ats-lang-users).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/ats-lang-users/d962602c-8704-457f-a29e-708098c72981%40googlegroups.com](https://groups.google.com/d/msgid/ats-lang-users/d962602c-8704-457f-a29e-708098c72981%40googlegroups.com)  
> [https://groups.google.com/d/msgid/ats-lang-users/d962602c-8704-457f-a29e-708098c72981%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/ats-lang-users/d962602c-8704-457f-a29e-708098c72981%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .

---

<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:** [July 1, 2016, 2:54pm UTC](https://discourse.ats-lang.org/t/error-compiling-package-in-more-recent-ats-builds/704/5 "2016-07-01T14:54:38Z")

</div>

That certainly sounds like the way to go, but I seem to be getting  
many errors like this:

“/home/brandon/ATS2-Postiats-0.2.8”/bin/patscc -cleanaft  
-I"/home/brandon/ATS2-Postiats-0.2.8"  
-I"/home/brandon/ATS2-Postiats-0.2.8"/ccomp/runtime  
-I"/home/brandon/ATS-Postiats-contrib"/contrib -IATS  
“/home/brandon/ATS-Postiats-contrib”/contrib -DATS\_MEMALLOC\_GCBDW  
-D\_GNU\_SOURCE -O2 -c falcon\_tokener.dats  
falcon\_tokener\_dats.c:460:1: warning: parameter names (without types)  
in function declaration  
atstkind\_t0ype(atstype\_ulint) atstyarr\_field(atslab\_\_data) ;  
^  
In file included from falcon\_tokener\_dats.c:14:0:  
/home/brandon/ATS2-Postiats-0.2.8/ccomp/runtime/pats\_ccomp\_typedefs.h:176:31:  
error: field ‘atstyarr\_field\_undef’ declared as a function  
#define atstyarr\_field(fname) atstyarr\_field\_undef(fname)  
^  
falcon\_tokener\_dats.c:460:31: note: in expansion of macro ‘atstyarr\_field’  
atstkind\_t0ype(atstype\_ulint) atstyarr\_field(atslab\_\_data) ;  
^  
falcon\_tokener\_dats.c:473:1: warning: parameter names (without types)  
in function declaration  
atstkind\_t0ype(atstype\_ulint) atstyarr\_field(atslab\_\_data) ;  
^  
In file included from falcon\_tokener\_dats.c:14:0:  
/home/brandon/ATS2-Postiats-0.2.8/ccomp/runtime/pats\_ccomp\_typedefs.h:176:31:  
error: field ‘atstyarr\_field\_undef’ declared as a function  
#define atstyarr\_field(fname) atstyarr\_field\_undef(fname)  
^  
falcon\_tokener\_dats.c:473:31: note: in expansion of macro ‘atstyarr\_field’  
atstkind\_t0ype(atstype\_ulint) atstyarr\_field(atslab\_\_data) ;  
^  
falcon\_tokener\_dats.c:479:1: warning: parameter names (without types)  
in function declaration  
atstkind\_t0ype(atstype\_ulint) atstyarr\_field(atslab\_\_data) ;  
^On Thu, Jun 30, 2016 at 11:48 PM, gmhwxi [gmh...@gmail.com](mailto:gmh...@gmail.com) wrote:

> It was probably generated by a version of ATS earlier than ATS2-0.1.6.  
> If you want to use the header files provided by ATS2-0.1.6, please use  
> patsopt-0.1.6 to re-generate falcon\_sats.c.
> 
> I have kept FALCON as a test case:
> 
> [https://github.com/githwxi/ATS-Postiats-contrib/tree/master/projects/MEDIUM/FALCON](https://github.com/githwxi/ATS-Postiats-contrib/tree/master/projects/MEDIUM/FALCON)
> 
> So the FALCON package should compile without problems.
> 
> On Thursday, June 30, 2016 at 11:24:46 PM UTC-4, Brandon Barker wrote:
> 
> > It should be a version (likely checked out directly from github) just  
> > prior to April 2014.
> > 
> > On Jun 30, 2016 11:05 PM, “gmhwxi” \<…hwxi…\> wrote:
> > 
> > > Interesting. Which version of ATS compiler was used to generate  
> > > falcon\_sats.c?
> > > 
> > > On Thursday, June 30, 2016 at 10:01:59 PM UTC-4, Brandon Barker wrote:
> > > 
> > > > Hi,
> > > > 
> > > > When trying to build a package using more recent versions of ATS  
> > > > includes, I get the following error:
> > > > 
> > > > $ make PATSCC=gcc MYCCRULE=PORTABLE -f …/Makefile  
> > > > gcc -I"/home/Brandon/ATS2-Postiats-include-0.1.6"  
> > > > -I"/home/Brandon/ATS2-Postiats-include-0.1.6"/ccomp/runtime  
> > > > -I"/usr/local/lib/ats2-postiats"/contrib -D\_GNU\_SOURCE -O2 -c falcon\_sats.c  
> > > > falcon\_sats.c: In function  
> > > > ‘\_057\_cygdrive\_057\_c\_057\_cygwin\_057\_home\_057\_brand\_000\_057\_FBA\_057\_FALCON\_057\_GPR\_057\_falcon\_056\_sats\_\_dynload’:  
> > > > falcon\_sats.c:118:1: warning: implicit declaration of function  
> > > > ‘ATSdynload1’ [-Wimplicit-function-declaration]  
> > > > ATSdynload1(  
> > > > ^  
> > > > falcon\_sats.c:119:1: error:  
> > > > ‘\_057\_cygdrive\_057\_c\_057\_cygwin\_057\_home\_057\_brand\_000\_057\_FBA\_057\_FALCON\_057\_GPR\_057\_falcon\_056\_sats\_\_dynloadflag’  
> > > > undeclared (first use in this function)
> > > > 
> > > > \_057\_cygdrive\_057\_c\_057\_cygwin\_057\_home\_057\_brand\_000\_057\_FBA\_057\_FALCON\_057\_GPR\_057\_falcon\_056\_sats\_\_dynloadflag  
> > > > ^  
> > > > falcon\_sats.c:119:1: note: each undeclared identifier is reported only  
> > > > once for each function it appears in  
> > > > make: \*\*\* [atsmake-post.mk:68: falcon\_sats.o] Error 1
> > > > 
> > > > I verified this happens on Linux as well; if we go back to ATS2 v0.0.7  
> > > > it seems to work, for instance. Did something happen with regard to  
> > > > ATSdynload1?
> > > 
> > > –  
> > > 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](mailto:ats-lang-user...@googlegroups.com).  
> > > To post to this group, send email to [ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com).  
> > > Visit this group at [https://groups.google.com/group/ats-lang-users](https://groups.google.com/group/ats-lang-users).  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/ats-lang-users/d962602c-8704-457f-a29e-708098c72981%40googlegroups.com](https://groups.google.com/d/msgid/ats-lang-users/d962602c-8704-457f-a29e-708098c72981%40googlegroups.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](mailto:ats-lang-user...@googlegroups.com).  
> To post to this group, send email to [ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com).  
> Visit this group at [https://groups.google.com/group/ats-lang-users](https://groups.google.com/group/ats-lang-users).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/ats-lang-users/588375f4-107f-458c-a115-900e382414f3%40googlegroups.com](https://groups.google.com/d/msgid/ats-lang-users/588375f4-107f-458c-a115-900e382414f3%40googlegroups.com).

Brandon Barker  
[brandon...@gmail.com](mailto:brandon...@gmail.com)

---

<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:** [July 1, 2016, 4:01pm UTC](https://discourse.ats-lang.org/t/error-compiling-package-in-more-recent-ats-builds/704/6 "2016-07-01T16:01:52Z")

</div>

I see.

You need to following lines at the beginning of falcon\_tokner.dats:

%{^  
#define   
atstyarr\_field\_undef(fname) fname  
%} // end of [%{]

Here is the version I have:

[https://github.com/githwxi/ATS-Postiats-contrib/blob/master/projects/MEDIUM/FALCON/falcon\_tokener.datsOn](https://github.com/githwxi/ATS-Postiats-contrib/blob/master/projects/MEDIUM/FALCON/falcon_tokener.datsOn) Fri, Jul 1, 2016 at 10:54 AM, Brandon Barker [brandon...@gmail.com](mailto:brandon...@gmail.com) wrote:

> That certainly sounds like the way to go, but I seem to be getting  
> many errors like this:
> 
> “/home/brandon/ATS2-Postiats-0.2.8”/bin/patscc -cleanaft  
> -I"/home/brandon/ATS2-Postiats-0.2.8"  
> -I"/home/brandon/ATS2-Postiats-0.2.8"/ccomp/runtime  
> -I"/home/brandon/ATS-Postiats-contrib"/contrib -IATS  
> “/home/brandon/ATS-Postiats-contrib”/contrib -DATS\_MEMALLOC\_GCBDW  
> -D\_GNU\_SOURCE -O2 -c falcon\_tokener.dats  
> falcon\_tokener\_dats.c:460:1: warning: parameter names (without types)  
> in function declaration  
> atstkind\_t0ype(atstype\_ulint) atstyarr\_field(atslab\_\_data) ;  
> ^  
> In file included from falcon\_tokener\_dats.c:14:0:
> 
> /home/brandon/ATS2-Postiats-0.2.8/ccomp/runtime/pats\_ccomp\_typedefs.h:176:31:  
> error: field ‘atstyarr\_field\_undef’ declared as a function  
> #define atstyarr\_field(fname) atstyarr\_field\_undef(fname)  
> ^  
> falcon\_tokener\_dats.c:460:31: note: in expansion of macro ‘atstyarr\_field’  
> atstkind\_t0ype(atstype\_ulint) atstyarr\_field(atslab\_\_data) ;  
> ^  
> falcon\_tokener\_dats.c:473:1: warning: parameter names (without types)  
> in function declaration  
> atstkind\_t0ype(atstype\_ulint) atstyarr\_field(atslab\_\_data) ;  
> ^  
> In file included from falcon\_tokener\_dats.c:14:0:
> 
> /home/brandon/ATS2-Postiats-0.2.8/ccomp/runtime/pats\_ccomp\_typedefs.h:176:31:  
> error: field ‘atstyarr\_field\_undef’ declared as a function  
> #define atstyarr\_field(fname) atstyarr\_field\_undef(fname)  
> ^  
> falcon\_tokener\_dats.c:473:31: note: in expansion of macro ‘atstyarr\_field’  
> atstkind\_t0ype(atstype\_ulint) atstyarr\_field(atslab\_\_data) ;  
> ^  
> falcon\_tokener\_dats.c:479:1: warning: parameter names (without types)  
> in function declaration  
> atstkind\_t0ype(atstype\_ulint) atstyarr\_field(atslab\_\_data) ;  
> ^
> 
> On Thu, Jun 30, 2016 at 11:48 PM, gmhwxi [gmh...@gmail.com](mailto:gmh...@gmail.com) wrote:
> 
> > It was probably generated by a version of ATS earlier than ATS2-0.1.6.  
> > If you want to use the header files provided by ATS2-0.1.6, please use  
> > patsopt-0.1.6 to re-generate falcon\_sats.c.
> > 
> > I have kept FALCON as a test case:
> 
> [https://github.com/githwxi/ATS-Postiats-contrib/tree/master/projects/MEDIUM/FALCON](https://github.com/githwxi/ATS-Postiats-contrib/tree/master/projects/MEDIUM/FALCON)
> 
> > So the FALCON package should compile without problems.
> > 
> > On Thursday, June 30, 2016 at 11:24:46 PM UTC-4, Brandon Barker wrote:
> > 
> > > It should be a version (likely checked out directly from github) just  
> > > prior to April 2014.
> > > 
> > > On Jun 30, 2016 11:05 PM, “gmhwxi” \<…hwxi…\> wrote:
> > > 
> > > > Interesting. Which version of ATS compiler was used to generate  
> > > > falcon\_sats.c?
> > > > 
> > > > On Thursday, June 30, 2016 at 10:01:59 PM UTC-4, Brandon Barker wrote:
> > > > 
> > > > > Hi,
> > > > > 
> > > > > When trying to build a package using more recent versions of ATS  
> > > > > includes, I get the following error:
> > > > > 
> > > > > $ make PATSCC=gcc MYCCRULE=PORTABLE -f …/Makefile  
> > > > > gcc -I"/home/Brandon/ATS2-Postiats-include-0.1.6"  
> > > > > -I"/home/Brandon/ATS2-Postiats-include-0.1.6"/ccomp/runtime  
> > > > > -I"/usr/local/lib/ats2-postiats"/contrib -D\_GNU\_SOURCE -O2 -c  
> > > > > falcon\_sats.c  
> > > > > falcon\_sats.c: In function
> 
> ‘\_057\_cygdrive\_057\_c\_057\_cygwin\_057\_home\_057\_brand\_000\_057\_FBA\_057\_FALCON\_057\_GPR\_057\_falcon\_056\_sats\_\_dynload’:
> 
> > > > > falcon\_sats.c:118:1: warning: implicit declaration of function  
> > > > > ‘ATSdynload1’ [-Wimplicit-function-declaration]  
> > > > > ATSdynload1(  
> > > > > ^  
> > > > > falcon\_sats.c:119:1: error:
> 
> ‘\_057\_cygdrive\_057\_c\_057\_cygwin\_057\_home\_057\_brand\_000\_057\_FBA\_057\_FALCON\_057\_GPR\_057\_falcon\_056\_sats\_\_dynloadflag’
> 
> > > > > undeclared (first use in this function)
> 
> \_057\_cygdrive\_057\_c\_057\_cygwin\_057\_home\_057\_brand\_000\_057\_FBA\_057\_FALCON\_057\_GPR\_057\_falcon\_056\_sats\_\_dynloadflag
> 
> > > > > ^  
> > > > > falcon\_sats.c:119:1: note: each undeclared identifier is reported only  
> > > > > once for each function it appears in  
> > > > > make: \*\*\* [atsmake-post.mk:68: falcon\_sats.o] Error 1
> > > > > 
> > > > > I verified this happens on Linux as well; if we go back to ATS2 v0.0.7  
> > > > > it seems to work, for instance. Did something happen with regard to  
> > > > > ATSdynload1?
> > > > 
> > > > –  
> > > > 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](mailto:ats-lang-user...@googlegroups.com).  
> > > > To post to this group, send email to [ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com).  
> > > > Visit this group at [https://groups.google.com/group/ats-lang-users](https://groups.google.com/group/ats-lang-users).  
> > > > To view this discussion on the web visit
> 
> [https://groups.google.com/d/msgid/ats-lang-users/d962602c-8704-457f-a29e-708098c72981%40googlegroups.com](https://groups.google.com/d/msgid/ats-lang-users/d962602c-8704-457f-a29e-708098c72981%40googlegroups.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](mailto:ats-lang-user...@googlegroups.com).  
> > To post to this group, send email to [ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com).  
> > Visit this group at [https://groups.google.com/group/ats-lang-users](https://groups.google.com/group/ats-lang-users).  
> > To view this discussion on the web visit
> 
> [https://groups.google.com/d/msgid/ats-lang-users/588375f4-107f-458c-a115-900e382414f3%40googlegroups.com](https://groups.google.com/d/msgid/ats-lang-users/588375f4-107f-458c-a115-900e382414f3%40googlegroups.com)  
> .
> 
> –  
> Brandon Barker  
> [brandon...@gmail.com](mailto: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](mailto:ats-lang-user...@googlegroups.com).  
> To post to this group, send email to [ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com).  
> Visit this group at [https://groups.google.com/group/ats-lang-users](https://groups.google.com/group/ats-lang-users).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/ats-lang-users/CAORbNRpqqR\_iAfkowAz5s65b-YeF-opB6M4ku%3DpDdZ\_B%3D7\_%2Bvg%40mail.gmail.com](https://groups.google.com/d/msgid/ats-lang-users/CAORbNRpqqR_iAfkowAz5s65b-YeF-opB6M4ku%3DpDdZ_B%3D7_%2Bvg%40mail.gmail.com)  
> .

---

<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:** [July 1, 2016, 3:05am UTC](https://discourse.ats-lang.org/t/error-compiling-package-in-more-recent-ats-builds/704/7 "2016-07-01T03:05:07Z")

</div>

Interesting. Which version of ATS compiler was used to generate  
falcon\_sats.c?On Thursday, June 30, 2016 at 10:01:59 PM UTC-4, Brandon Barker wrote:

> Hi,
> 
> When trying to build a package [https://github.com/bbarker/FALCON](https://github.com/bbarker/FALCON) using  
> more recent versions of ATS includes, I get the following error:
> 
> $ make PATSCC=gcc MYCCRULE=PORTABLE -f …/Makefile  
> gcc -I"/home/Brandon/ATS2-Postiats-include-0.1.6" -I  
> “/home/Brandon/ATS2-Postiats-include-0.1.6”/ccomp/runtime -I  
> “/usr/local/lib/ats2-postiats”/contrib -D\_GNU\_SOURCE -O2 -c falcon\_sats.c  
> falcon\_sats.c: In function ‘  
> \_057\_cygdrive\_057\_c\_057\_cygwin\_057\_home\_057\_brand\_000\_057\_FBA\_057\_FALCON\_057\_GPR\_057\_falcon\_056\_sats\_\_dynload  
> ’:  
> falcon\_sats.c:118:1: warning: implicit declaration of function ‘  
> ATSdynload1’ [-Wimplicit-function-declaration]  
> ATSdynload1(  
> ^  
> falcon\_sats.c:119:1: error: ‘  
> \_057\_cygdrive\_057\_c\_057\_cygwin\_057\_home\_057\_brand\_000\_057\_FBA\_057\_FALCON\_057\_GPR\_057\_falcon\_056\_sats\_\_dynloadflag  
> ’ undeclared (first use in this function)
> 
> \_057\_cygdrive\_057\_c\_057\_cygwin\_057\_home\_057\_brand\_000\_057\_FBA\_057\_FALCON\_057\_GPR\_057\_falcon\_056\_sats\_\_dynloadflag  
> ^  
> falcon\_sats.c:119:1: note: each undeclared identifier is reported only  
> once for each function it appears in  
> make: \*\*\* [atsmake-post.mk:68: falcon\_sats.o] Error 1
> 
> I verified this happens on Linux as well; if we go back to ATS2 v0.0.7 it  
> seems to work, for instance. Did something happen with regard to  
> ATSdynload1?
