cburstedde / p4est

The "p4est" forest-of-octrees library
www.p4est.org/
GNU General Public License v2.0
254 stars 114 forks source link

Configure troubles #166

Closed VictorEijkhout closed 2 months ago

VictorEijkhout commented 1 year ago

Trying to install 2.3.3 (after trying 2.8)

  1. The readme states "Our official tarballs contain the configure script" but I'm not finding any official releases under https://github.com/cburstedde/p4est/releases

  2. Running autoconf gives

    configure.ac:15: error: possibly undefined macro: AM_INIT_AUTOMAKE
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
    configure.ac:16: error: possibly undefined macro: AM_SILENT_RULES
    configure.ac:17: error: possibly undefined macro: AM_EXTRA_RECURSIVE_TARGETS
    configure.ac:74: error: possibly undefined macro: AM_CONDITIONAL

    According to a 20 year post I need to run aclocal https://lists.gnu.org/archive/html/autoconf/2004-09/msg00215.html Ok, that seems to have helped.

  3. Now I'm at

    ## invocation:
    ./configure --prefix=/work/00434/eijkhout/p4est/installation-2.3.3-ls6-oneapi-impi --enable-mpi
    .. with CC=mpicc CXX=mpicxx FC=mpif90
    ## result
    configure: WARNING: unrecognized options: --enable-mpi
    configure: error: cannot find install-sh, install.sh, or shtool in build-aux "."/build-aux
cburstedde commented 1 year ago

Hi and thanks for posting. Your post is timely since I'm in the middle of improving the documentation, where I can take this into account. Both our docs and releases are a bit dated, which I'll fix soon. About your points:

  1. That's correct, with official releases I'm referring to https://www.p4est.org/. Last time I checked, github had issues rolling releases using submodules, and they would differ from the tarball we create with make dist.
  2. Instead of hand-calling the autoconf toolchain, how does ./bootstrap work for you in a fresh checkout?
  3. This may also be resolved by point 2. above. Please let me know how it goes.
VictorEijkhout commented 1 year ago

I've made a note of the "official" release. That one includes a configure script and it builds without a hitch.

Bootstrap on the clone gives me:

--- This is the bootstrap script for libsc ---
It is NOT required to run bootstrap to build from a tar.gz archive
Development requires a libtool recent enough to contain LT_INIT
Current directory is /work2/00434/eijkhout/p4est/p4est-git/sc
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/config.guess'
libtoolize: copying file 'build-aux/config.sub'
libtoolize: copying file 'build-aux/install-sh'
libtoolize: copying file 'build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'config'.
libtoolize: copying file 'config/libtool.m4'
libtoolize: copying file 'config/ltoptions.m4'
libtoolize: copying file 'config/ltsugar.m4'
libtoolize: copying file 'config/ltversion.m4'
libtoolize: copying file 'config/lt~obsolete.m4'
configure.ac:52: installing 'build-aux/ar-lib'
configure.ac:50: installing 'build-aux/compile'
configure.ac:15: installing 'build-aux/missing'
Makefile.am: installing 'build-aux/depcomp'
Makefile.am:26: error: 'pkgconfig_DATA' is used but 'pkgconfigdir' is undefined
parallel-tests: installing 'build-aux/test-driver'
--- This is the bootstrap script for p4est ---
It is NOT required to run bootstrap to build from a tar.gz archive
Development requires a libtool recent enough to contain LT_INIT
Current directory is /work2/00434/eijkhout/p4est/p4est-git
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/config.guess'
libtoolize: copying file 'build-aux/config.sub'
libtoolize: copying file 'build-aux/install-sh'
libtoolize: copying file 'build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'config'.
libtoolize: copying file 'config/libtool.m4'
libtoolize: copying file 'config/ltoptions.m4'
libtoolize: copying file 'config/ltsugar.m4'
libtoolize: copying file 'config/ltversion.m4'
libtoolize: copying file 'config/lt~obsolete.m4'
configure.ac:45: installing 'build-aux/ar-lib'
configure.ac:43: installing 'build-aux/compile'
configure.ac:15: installing 'build-aux/missing'
Makefile.am: installing 'build-aux/depcomp'
Makefile.am:30: error: 'pkgconfig_DATA' is used but 'pkgconfigdir' is undefined
parallel-tests: installing 'build-aux/test-driver'
cburstedde commented 1 year ago

The best branch to clone is prev3-develop. It's modern and well-tested. It will have the proper branch configured for the submodule sc as well. Would that work better for you?

cburstedde commented 1 year ago

I've bumped the master, develop and prev3-develop branches to the same state. For modern yet conservative code, use the master branch. The latest will be on the development branches.

I've so far not been happy with the github releases. Please use the latest tarball from p4est.org.

Anything left to address version wise?

VictorEijkhout commented 1 year ago

My install script reports the following:

First autoreconf
Configuring as:
./configure --prefix=/Users/eijkhout/Installation/p4est/installation-git-macbookair-gcc-mpich --enable-mpi
 .. with CC=mpicc CXX=mpicxx FC=mpif90
configure: WARNING: unrecognized options: --enable-mpi
configure: error: cannot find required auxiliary files: config.guess config.sub ltmain.sh compile ar-lib missing install-sh
cburstedde commented 1 year ago

Autoreconf is not working right, that's why in ./bootstrap I've been hardcoding the individual steps. The cause is that autoreconf (a perl script) chokes on ACLOCAL_AMFLAGS = -I config @P4EST_SC_AMFLAGS@. I've never got around filing a bug report (or hacking the script myself, since there's a lot of variable substitution).

Could you just call ./bootstrap?

cburstedde commented 1 year ago

Bump and also relating this to #217.

VictorEijkhout commented 1 year ago

It's been a while. I'm reading through this....

  1. you say that official releaeses are on p4est.org but the list of stable releases takes me to https://github.com/p4est/p4est.github.io/tree/master/release/.
  2. My own notes have me downloading from https://p4est.github.io/release/p4est. Which is the authoritative location?
  3. The releases from point 1. have all sorts of numbering schemes. Could you please stick to a consistent scheme? major.minor.micro? That makes life much more easy for my shell script that automates my builds. For instance for automatic comparison which of two versions is the newer.
VictorEijkhout commented 1 year ago

What on earth? 2.8.5.tar.gz is not in gzip format it seems. It contains

{"payload":{"allShortcutsEnabled":false,"fileTree":{"release":{"items":
VictorEijkhout commented 1 year ago

Problems with bootstrap approach: (this is all output, plus progress messages from my script)

Clone of package=p4est, version=git into p4est-git
.. cloning repo https://github.com/cburstedde/p4est.git into /work2/00434/eijkhout/p4est/p4est-git
Cloning into 'p4est-git'...
remote: Enumerating objects: 24071, done.
remote: Counting objects: 100% (831/831), done.
remote: Compressing objects: 100% (319/319), done.
remote: Total 24071 (delta 533), reused 776 (delta 505), pack-reused 23240
Receiving objects: 100% (24071/24071), 13.69 MiB | 22.19 MiB/s, done.
Resolving deltas: 100% (16977/16977), done.
Updating files: 100% (421/421), done.
.. switching to branch master
Already on 'master'
Your branch is up to date with 'origin/master'.
.. loading submodules
Submodule 'sc' (https://github.com/cburstedde/libsc.git) registered for path 'sc'
Cloning into '/work2/00434/eijkhout/p4est/p4est-git/sc'...
Submodule path 'sc': checked out '83bd019fc9f029a9c15a3ae823e6d7d20e6e0340'
Clone of package=p4est, version=git into p4est-git
.. repo already in place: /work2/00434/eijkhout/p4est/p4est-git
Updating repo: /work2/00434/eijkhout/p4est/p4est-git
Already up to date.
Checking out branch: master
Already on 'master'
Your branch is up to date with 'origin/master'.
.. also doing: ./bootstrap
Running bootstrap in subdirectory sc
--- This is the bootstrap script for libsc calling autoreconf ---
It is NOT required to run bootstrap to build from a tar.gz archive
Current directory is /work2/00434/eijkhout/p4est/p4est-git/sc
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'config'.
libtoolize: copying file 'config/libtool.m4'
libtoolize: copying file 'config/ltoptions.m4'
libtoolize: copying file 'config/ltsugar.m4'
libtoolize: copying file 'config/ltversion.m4'
libtoolize: copying file 'config/lt~obsolete.m4'
configure.ac:55: installing 'build-aux/ar-lib'
configure.ac:53: installing 'build-aux/compile'
configure.ac:58: installing 'build-aux/config.guess'
configure.ac:58: installing 'build-aux/config.sub'
configure.ac:15: installing 'build-aux/install-sh'
configure.ac:15: installing 'build-aux/missing'
Makefile.am: installing 'build-aux/depcomp'
Makefile.am:26: error: 'pkgconfig_DATA' is used but 'pkgconfigdir' is undefined
VictorEijkhout commented 1 year ago

It continues:

autoreconf: automake failed with exit status: 1
--- This is the bootstrap script for p4est ---
It is NOT required to run bootstrap to build from a tar.gz archive
Current directory is /work2/00434/eijkhout/p4est/p4est-git
which: no glibtoolize in (/opt/apps/xalt/xalt/bin:/opt/intel/oneapi/mpi/2021.9.0/libfabric/bin:/opt/intel/oneapi/mpi/2021.9.0/bin:/opt/intel/oneapi/dpcpp-ct/2023.1.0/bin:/opt/intel/oneapi/mkl/2023.1.0/bin/intel64:/opt/intel/oneapi/compiler/2023.1.0/linux/lib/oclfpga/llvm/aocl-bin:/opt/intel/oneapi/compiler/2023.1.0/linux/lib/oclfpga/bin:/opt/intel/oneapi/compiler/2023.1.0/linux/bin/intel64:/opt/intel/oneapi/compiler/2023.1.0/linux/bin:/opt/apps/gcc/12.2.0/bin:/opt/apps/hwloc/1.11.12/bin:/opt/apps/pmix/3.1.4/bin:/opt/apps/cmake/3.24.2/bin:/opt/apps/autotools/1.2/bin:/opt/apps/git/2.24.1/bin:/opt/intel/compilers_and_libraries_2020.4.304/linux/mpi/intel64/bin:/scratch1/projects/compilers/oneapi_2023.1.0/itac/2021.9.0/bin:/scratch1/projects/compilers/oneapi_2023.1.0/vtune/2023.1.0/bin64:/scratch1/projects/compilers/oneapi_2023.1.0/advisor/2023.1.0/bin64:/scratch1/projects/compilers/oneapi_2023.1.0/dpcpp-ct/2023.1.0/bin:/scratch1/projects/compilers/oneapi_2023.1.0/mkl/2023.1.0/bin/intel64:/scratch1/projects/compilers/oneapi_2023.1.0/compiler/2023.1.0/linux/lib/oclfpga/llvm/aocl-bin:/scratch1/projects/compilers/oneapi_2023.1.0/compiler/2023.1.0/linux/lib/oclfpga/bin:/scratch1/projects/compilers/oneapi_2023.1.0/compiler/2023.1.0/linux/bin/intel64:/scratch1/projects/compilers/oneapi_2023.1.0/compiler/2023.1.0/linux/bin:/work2/00434/eijkhout/gklib/installation-/bin:/work2/00434/eijkhout/testers335394fall2022:/work2/00434/eijkhout/testers335394fall2021:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/opt/ddn/ime/bin:/home1/00434/eijkhout/bin:/work2/00434/eijkhout/hipsycl/installation-intel/bin:/home1/00434/eijkhout/.local/bin:.)
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
libtoolize: copying file 'build-aux/config.guess'
libtoolize: copying file 'build-aux/config.sub'
libtoolize: copying file 'build-aux/install-sh'
libtoolize: copying file 'build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'config'.
libtoolize: copying file 'config/libtool.m4'
libtoolize: copying file 'config/ltoptions.m4'
libtoolize: copying file 'config/ltsugar.m4'
libtoolize: copying file 'config/ltversion.m4'
libtoolize: copying file 'config/lt~obsolete.m4'
configure.ac:47: installing 'build-aux/ar-lib'
configure.ac:45: installing 'build-aux/compile'
configure.ac:15: installing 'build-aux/missing'
Makefile.am: installing 'build-aux/depcomp'
Makefile.am:30: error: 'pkgconfig_DATA' is used but 'pkgconfigdir' is undefined
parallel-tests: installing 'build-aux/test-driver'
cburstedde commented 1 year ago

What on earth? 2.8.5.tar.gz is not in gzip format it seems. It contains

{"payload":{"allShortcutsEnabled":false,"fileTree":{"release":{"items":

Weird. The github way of releases is not cool. Please use the .tar.gz files linked from p4est.org.

cburstedde commented 1 year ago

We try to do x.y.z. Just there were some updates after the fact that made us release p4est-2.8.5.5-9ddbb.tar.gz. Does that one work for you?

Right now I cannot reproduce your script output about the pkgconfig_DATA. It runs for me but I'll double check.

VictorEijkhout commented 1 year ago

The 2.8.5 came from the p4est.org page. Specifically that pointed me to github for older tarballs. But really, the official releases work. They don't seem to need that bootstrap.

tangqi commented 11 months ago

Hi, I have seen a similar issue on macOS 12.6.9.

(base) pn1804102:git.p4est qtang$ ./bootstrap
Running bootstrap in subdirectory sc
--- This is the bootstrap script for libsc calling autoreconf ---
It is NOT required to run bootstrap to build from a tar.gz archive
Current directory is /Users/qtang/software/petsc.master/macx/externalpackages/git.p4est/sc
Makefile.am:26: error: 'pkgconfig_DATA' is used but 'pkgconfigdir' is undefined
autoreconf: error: automake failed with exit status: 1
--- This is the bootstrap script for p4est ---
It is NOT required to run bootstrap to build from a tar.gz archive
Current directory is /Users/qtang/software/petsc.master/macx/externalpackages/git.p4est
Makefile.am:30: error: 'pkgconfig_DATA' is used but 'pkgconfigdir' is undefined

I always install p4est through petsc which worked out smoothly. But I have seen this issue very recently. I believe petsc used to point to an old p4est: https://github.com/tisaac/p4est. But now instead it points to this newer version here. petsc configuration runs bootstrap and it gets stuck with the above error.

Any hint would be helpful. Thanks.

cburstedde commented 11 months ago

If you just cloned p4est from github, there will be a mostly empty subdirectory sc. If that's the case, can you run git submodule update --init and see if that fixes it?

tangqi commented 11 months ago

No. I tried to install p4est alone through a clone and it has the same error. I did run git submodule update --init

I had some system upgrade recently, and had to re-install libtool/autconf through brew. I am not sure if that is related. The previous successful installed p4est on the same laptop was on eb24772a118d4bb843530bbe013bf87a5f366472

cburstedde commented 11 months ago

No. I tried to install p4est alone through a clone and it has the same error. I did run git submodule update --init

I had some system upgrade recently, and had to re-install libtool/autconf through brew. I am not sure if that is related. The previous successful installed p4est on the same laptop was on eb24772

Thanks for the research! I'd like the pkgconfig logic supplied by autoconf and automake in the most vanilla way possible, that is, consistent with the best practices from available documentation and simplified to the minimum. There should only be a couple macros and variables to be examined and compared with the documented state of the art. Remove all that seems too out of the ordinary. Would you like to look into it?

tangqi commented 11 months ago

Sure, happy to help if you can give me some hints. What you said makes sense. You mean I should have a look at the most recent automake/autconf doc and figure out the redundant ones in your current Makefile.am. Is that right?

cburstedde commented 11 months ago

Sure, happy to help if you can give me some hints. What you said makes sense. You mean I should have a look at the most recent automake/autconf doc and figure out the redundant ones in your current Makefile.am. Is that right?

Thanks! Yes, whatever you think may need updating in the Makefile.am files and under config/.

cburstedde commented 7 months ago

We have released v2.8.6. The authoritative tarball is p4est-2.8.6.tar.gz linked from our pages and attached to the github release. Please do not use github's auto-generated zip and tar files, they are missing the sc submodule and more.

Would this file work as expected for y'all?

cburstedde commented 3 months ago

I'm leaning towards closing this as resolved. Any further issues?

VictorEijkhout commented 3 months ago

My install script now has

https://github.com/cburstedde/p4est/releases/download/v${PACKAGEVERSION}/p4est-${PACKAGEVERSION}.tar.gz

as the parametrized location of the archive. If that is correct, you can close this ticket afaic.

cburstedde commented 3 months ago

My install script now has

https://github.com/cburstedde/p4est/releases/download/v${PACKAGEVERSION}/p4est-${PACKAGEVERSION}.tar.gz

as the parametrized location of the archive. If that is correct, you can close this ticket afaic.

Thanks for the feedback. This is fine as long as github doesn't change their convention.