How to build ATS(1) on Cygwin64

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,

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,

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,

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,

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,

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
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,

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
I don’t have time to try now, I will try after Xmas

happy chrismas folk :wink:

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,