githwxi / ATS-Postiats

ATS2: Unleashing the Potentials of Types and Templates
www.ats-lang.org
Other
353 stars 54 forks source link

build files missing in git repo but available in tar archive #262

Open saifikhan opened 3 years ago

saifikhan commented 3 years ago

Nihao,

files in ATS2 0.4.2 tar archive

UTHORS      ccomp/        config.h      configure*    COPYING  install-sh*  Makefile_dist  prelude/  src/
autogen.sh*  CHANGES-ats2     config.h.in   configure.ac  doc/     libats/  missing*       RELEASE/  utils/
bin/         CHANGES-contrib  config.mk.in  contrib/      INSTALL  Makefile@    npm-utils/     share/    VERSION

and the files in the ATS2 git repo

appveyor/     ccomp/           config.h         COPYING-lgpl-2.1.txt  docugen/   nix/        README src/
appveyor.yml  CHANGES-ats2     contrib/         COPYING-lgpl-3.0.txt  INSTALL    NOTES       README.md  travis-ci/
AUTHORS       CHANGES-contrib  COPYING          default.nix       libats/    npm-utils/  share/ utils/
bin/          codegen/         COPYING-gpl-3.0.txt  doc/          Makefile_devl  prelude/    shell.nix  VERSION

If i want to exclusively clone the git repo and use it to build ATS2, how do i generate the following files ?

The instructions provided at http://www.ats-lang.org/Downloads.html are completely silent about this. Any pointers ?

githwxi commented 3 years ago

There is a build script in share/SCRIPT/build_release.sh, which you can use to build ATS2. The files you listed above are vestiges of some sort; they should really be removed in the future.

saifikhan commented 3 years ago

build script in share/SCRIPT/build_release.sh

the script cannot find 'atscc'.

so i git clone the ATS-Anairiats repo. following the instructions in the INSTALL file,

./configure

leads to the following error

configure: error: cannot find install-sh, install.sh, or shtool in "." "./.." "./../.."

this is rather strange since the shtool is available at /usr/bin/shtool

so i dig in a little more. In the file ats-lang-anairiats-0.2.12/configure line 2354

for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
  if test -f "$ac_dir/install-sh"; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install-sh -c"
    break
  elif test -f "$ac_dir/install.sh"; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install.sh -c"
    break
  elif test -f "$ac_dir/shtool"; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/shtool install -c"
    break
  fi

Is there a better way than just adding "/usr/local/bin" path to the for loop ? Any pointers ?

githwxi commented 3 years ago

Did you install automake?

For instance, the file install-sh was linked to the following file on my machine:

/usr/share/automake-1.15/install-sh

saifikhan commented 3 years ago

Did you install automake?

auto tools are installed as this is a build machine. please see.

$ automake --version
automake (GNU automake) 1.16.3
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later <https://gnu.org/licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Here is the list of the files that constitute the package.

$ pacman -Q -l automake

file list

automake /usr/
automake /usr/bin/
automake /usr/bin/aclocal
automake /usr/bin/aclocal-1.16
automake /usr/bin/automake
automake /usr/bin/automake-1.16
automake /usr/share/
automake /usr/share/aclocal-1.16/
automake /usr/share/aclocal-1.16/amversion.m4
automake /usr/share/aclocal-1.16/ar-lib.m4
automake /usr/share/aclocal-1.16/as.m4
automake /usr/share/aclocal-1.16/auxdir.m4
automake /usr/share/aclocal-1.16/cond-if.m4
automake /usr/share/aclocal-1.16/cond.m4
automake /usr/share/aclocal-1.16/depend.m4
automake /usr/share/aclocal-1.16/depout.m4
automake /usr/share/aclocal-1.16/dmalloc.m4
automake /usr/share/aclocal-1.16/extra-recurs.m4
automake /usr/share/aclocal-1.16/gcj.m4
automake /usr/share/aclocal-1.16/init.m4
automake /usr/share/aclocal-1.16/install-sh.m4
automake /usr/share/aclocal-1.16/internal/
automake /usr/share/aclocal-1.16/internal/ac-config-macro-dirs.m4
automake /usr/share/aclocal-1.16/lead-dot.m4
automake /usr/share/aclocal-1.16/lex.m4
automake /usr/share/aclocal-1.16/lispdir.m4
automake /usr/share/aclocal-1.16/maintainer.m4
automake /usr/share/aclocal-1.16/make.m4
automake /usr/share/aclocal-1.16/missing.m4
automake /usr/share/aclocal-1.16/mkdirp.m4
automake /usr/share/aclocal-1.16/obsolete.m4
automake /usr/share/aclocal-1.16/options.m4
automake /usr/share/aclocal-1.16/prog-cc-c-o.m4
automake /usr/share/aclocal-1.16/python.m4
automake /usr/share/aclocal-1.16/runlog.m4
automake /usr/share/aclocal-1.16/sanity.m4
automake /usr/share/aclocal-1.16/silent.m4
automake /usr/share/aclocal-1.16/strip.m4
automake /usr/share/aclocal-1.16/substnot.m4
automake /usr/share/aclocal-1.16/tar.m4
automake /usr/share/aclocal-1.16/upc.m4
automake /usr/share/aclocal-1.16/vala.m4
automake /usr/share/aclocal/
automake /usr/share/aclocal/README
automake /usr/share/automake-1.16/
automake /usr/share/automake-1.16/Automake/
automake /usr/share/automake-1.16/Automake/ChannelDefs.pm
automake /usr/share/automake-1.16/Automake/Channels.pm
automake /usr/share/automake-1.16/Automake/Condition.pm
automake /usr/share/automake-1.16/Automake/Config.pm
automake /usr/share/automake-1.16/Automake/Configure_ac.pm
automake /usr/share/automake-1.16/Automake/DisjConditions.pm
automake /usr/share/automake-1.16/Automake/FileUtils.pm
automake /usr/share/automake-1.16/Automake/General.pm
automake /usr/share/automake-1.16/Automake/Getopt.pm
automake /usr/share/automake-1.16/Automake/Item.pm
automake /usr/share/automake-1.16/Automake/ItemDef.pm
automake /usr/share/automake-1.16/Automake/Language.pm
automake /usr/share/automake-1.16/Automake/Location.pm
automake /usr/share/automake-1.16/Automake/Options.pm
automake /usr/share/automake-1.16/Automake/Rule.pm
automake /usr/share/automake-1.16/Automake/RuleDef.pm
automake /usr/share/automake-1.16/Automake/VarDef.pm
automake /usr/share/automake-1.16/Automake/Variable.pm
automake /usr/share/automake-1.16/Automake/Version.pm
automake /usr/share/automake-1.16/Automake/Wrap.pm
automake /usr/share/automake-1.16/Automake/XFile.pm
automake /usr/share/automake-1.16/COPYING
automake /usr/share/automake-1.16/INSTALL
automake /usr/share/automake-1.16/am/
automake /usr/share/automake-1.16/am/check.am
automake /usr/share/automake-1.16/am/check2.am
automake /usr/share/automake-1.16/am/clean-hdr.am
automake /usr/share/automake-1.16/am/clean.am
automake /usr/share/automake-1.16/am/compile.am
automake /usr/share/automake-1.16/am/configure.am
automake /usr/share/automake-1.16/am/data.am
automake /usr/share/automake-1.16/am/dejagnu.am
automake /usr/share/automake-1.16/am/depend.am
automake /usr/share/automake-1.16/am/depend2.am
automake /usr/share/automake-1.16/am/distdir.am
automake /usr/share/automake-1.16/am/footer.am
automake /usr/share/automake-1.16/am/header-vars.am
automake /usr/share/automake-1.16/am/header.am
automake /usr/share/automake-1.16/am/inst-vars.am
automake /usr/share/automake-1.16/am/install.am
automake /usr/share/automake-1.16/am/java.am
automake /usr/share/automake-1.16/am/lang-compile.am
automake /usr/share/automake-1.16/am/lex.am
automake /usr/share/automake-1.16/am/library.am
automake /usr/share/automake-1.16/am/libs.am
automake /usr/share/automake-1.16/am/libtool.am
automake /usr/share/automake-1.16/am/lisp.am
automake /usr/share/automake-1.16/am/ltlib.am
automake /usr/share/automake-1.16/am/ltlibrary.am
automake /usr/share/automake-1.16/am/mans-vars.am
automake /usr/share/automake-1.16/am/mans.am
automake /usr/share/automake-1.16/am/program.am
automake /usr/share/automake-1.16/am/progs.am
automake /usr/share/automake-1.16/am/python.am
automake /usr/share/automake-1.16/am/remake-hdr.am
automake /usr/share/automake-1.16/am/scripts.am
automake /usr/share/automake-1.16/am/subdirs.am
automake /usr/share/automake-1.16/am/tags.am
automake /usr/share/automake-1.16/am/texi-vers.am
automake /usr/share/automake-1.16/am/texibuild.am
automake /usr/share/automake-1.16/am/texinfos.am
automake /usr/share/automake-1.16/am/vala.am
automake /usr/share/automake-1.16/am/yacc.am
automake /usr/share/automake-1.16/ar-lib
automake /usr/share/automake-1.16/compile
automake /usr/share/automake-1.16/config.guess
automake /usr/share/automake-1.16/config.sub
automake /usr/share/automake-1.16/depcomp
automake /usr/share/automake-1.16/install-sh
automake /usr/share/automake-1.16/mdate-sh
automake /usr/share/automake-1.16/missing
automake /usr/share/automake-1.16/mkinstalldirs
automake /usr/share/automake-1.16/py-compile
automake /usr/share/automake-1.16/tap-driver.sh
automake /usr/share/automake-1.16/test-driver
automake /usr/share/automake-1.16/texinfo.tex
automake /usr/share/automake-1.16/ylwrap
automake /usr/share/doc/
automake /usr/share/doc/automake/
automake /usr/share/doc/automake/amhello-1.0.tar.gz
automake /usr/share/info/
automake /usr/share/info/automake-history.info.gz
automake /usr/share/info/automake.info-1.gz
automake /usr/share/info/automake.info-2.gz
automake /usr/share/info/automake.info.gz
automake /usr/share/man/
automake /usr/share/man/man1/
automake /usr/share/man/man1/aclocal-1.16.1.gz
automake /usr/share/man/man1/aclocal.1.gz
automake /usr/share/man/man1/automake-1.16.1.gz
automake /usr/share/man/man1/automake.1.gz

that brings us back to the question as to why ./configure looks at "." "./.." "./../.." directories ?

is creating a symbolic link to /usr/share/automake-1.16/install-sh from the top of the source tree a recommended approach for the ATS-Postiats project ?

githwxi commented 3 years ago

why ./configure looks at "." "./.." "./../.." directories

Since 'configure' is generated by 'autoconf', one really needs to understand how 'autoconf' works to answer this question. Unfortunately, I don't.

If you run 'autoconf' to generate 'configure' on your own machine, the problem may just go away. If not, adding a symbolic link for install-sh (and for another file of the name 'missing') should resolve the issue.

Honestly, I don't remember who wrote this part of the script for building ATS2.