Error compiling package in more recent ATS builds

24 views
Skip to first unread message

Brandon Barker

unread,
Jun 30, 2016, 10:01:59 PM6/30/16
to ats-lang-users
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?

gmhwxi

unread,
Jun 30, 2016, 11:05:07 PM6/30/16
to ats-lang-users
Interesting. Which version of ATS compiler was used to generate falcon_sats.c?

Brandon Barker

unread,
Jun 30, 2016, 11:24:46 PM6/30/16
to ats-lang-users

It should be a version (likely checked out directly from github) just prior to April 2014.

--
You received this message because you are subscribed to the Google Groups "ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at 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.

gmhwxi

unread,
Jun 30, 2016, 11:48:13 PM6/30/16
to ats-lang-users

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

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-users+unsubscribe@googlegroups.com.
To post to this group, send email to ats-lang-users@googlegroups.com.

Brandon Barker

unread,
Jul 1, 2016, 10:54:59 AM7/1/16
to ats-lang-users
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) ;
^
>>> email to ats-lang-user...@googlegroups.com.
>>> To post to this group, send email to ats-lan...@googlegroups.com.
> --
> You received this message because you are subscribed to the Google Groups
> "ats-lang-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ats-lang-user...@googlegroups.com.
> To post to this group, send email to ats-lan...@googlegroups.com.
> Visit this group at 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.



--
Brandon Barker
brandon...@gmail.com

Hongwei Xi

unread,
Jul 1, 2016, 12:01:54 PM7/1/16
to ats-lan...@googlegroups.com
I see.

You need to following lines at the beginning of falcon_tokner.dats:

%{^
#define \
atstyarr_field_undef(fname) fname[]
%} // end of [%{]


gmhwxi

unread,
Jul 1, 2016, 12:11:11 PM7/1/16
to ats-lang-users

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...
Reply all
Reply to author
Forward
0 new messages