Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work around autoconf 2.69 bugs #947

Merged

Conversation

fingolfin
Copy link
Contributor

Resolves #943. Alternative to #946 and hence closes #946

That issue only affects people working with the git version of Semigroups (because the release tarballs bundle the required files). So it is OK if we play a bit dirty, in this case, by invoking automake and touching install-sh.

See also the comments inside the changes for further details.

Alternatives considered:

  • just require autoconf >= 2.71 and otherwise refuse to run: excludes people who can't easily get a newer autoconf; plus there is no good clean way to check the autoconf version in a script other than to parse the output of autoconf --version which is not meant to be human readable
  • include bundled copies of those files -- simple (we use it for GAP) but those files need to be regularly updated, and you'll get complaints about why they are missing ;-)
  • copy from GAP or SOMEPREFIX/share/automake*/config.sub some other location: a bit fragile (none of those places may have a copy; and it is not even necessarily clear what SOMEPREFIX should be).

Granted, this approach also has drawbacks, e.g. it relies on automake really installing these files even though it complains ("error: no proper invocation of AM_INIT_AUTOMAKE was found"); also the "fgrep" is a bit of a hack (but the consequences are easy to control: false positive will result in a harmlos "touch", false negative at worst in the user reporting yet another version of autotools affected by the bug).

In the end, any of those solutions could have been made to work "good enough" for regular devs, I just hope this particular one will work for most "regular users who for some reason want to use a git version of Semigroups" (whoever they may be ... 😁 )

CC @dimpase

@james-d-mitchell james-d-mitchell added the build-system A label for issues or PRs related to the build system label Sep 11, 2023
@james-d-mitchell
Copy link
Collaborator

Thanks for this @fingolfin, when I try to build the (Semigroups) package on the openbsd machine that @dimpase has kindly given me access to, I get the following (after ./autogen.sh && ./configure successfully completes, when typing make):

*** Parse error in /home/jdm/gap/pkg/Semigroups: Need an operator in 'HPCOMBI_CONSTEXPR_FUN_ARGS' (Makefile:34)
*** Parse error: Need an operator in 'endif' (Makefile:36)
*** Parse error: Need an operator in 'LIBSEMIGROUPS_HPCOMBI_ENABLED' (Makefile:38)
*** Parse error: Need an operator in 'endif' (Makefile:40)
*** Parse error: Need an operator in 'WITH_INCLUDED_LIBSEMIGROUPS' (Makefile:42)
*** Parse error: Need an operator in 'LIBSEMIGROUPS_HPCOMBI_ENABLED' (Makefile:46)
*** Parse error: Need an operator in 'endif' (Makefile:49)
*** Parse error: Need an operator in 'endif' (Makefile:52)
*** Parse error: Need an operator in 'KERNEL_DEBUG' (Makefile:55)
*** Parse error: Need an operator in 'else' (Makefile:57)
*** Parse error: Need an operator in 'endif' (Makefile:59)
*** Parse error: Need an operator in 'SYS_IS_CYGWIN' (Makefile:69)
*** Parse error: Need an operator in 'endif' (Makefile:71)
*** Parse error: Need an operator in 'GAP_KERNEL_MAJOR_VERSION' (Makefile.gappkg:37)
*** Parse error: Need an operator in 'endif' (Makefile.gappkg:40)
*** Parse error: Need an operator in 'KEXT_USE_AUTOCONF' (Makefile.gappkg:62)
*** Parse error: Need an operator in 'else' (Makefile.gappkg:64)
*** Parse error: Need an operator in 'endif' (Makefile.gappkg:66)
*** Parse error: Missing dependency operator (Makefile.gappkg:88)
*** Parse error: Need an operator in 'V' (Makefile.gappkg:89)
*** Parse error: Need an operator in 'endif' (Makefile.gappkg:91)
*** Parse error: Need an operator in 'endif' (Makefile.gappkg:92)
*** Parse error: Filename missing from "-include" (Makefile.gappkg:103)
*** Parse error: Need an operator in 'KEXT_USE_AUTOCONF' (Makefile.gappkg:165)
*** Parse error: Missing dependency operator (Makefile.gappkg:170)
*** Parse error: Missing dependency operator (Makefile.gappkg:178)
*** Parse error: Missing dependency operator (Makefile.gappkg:197)
*** Parse error: Missing dependency operator (Makefile.gappkg:208)
*** Parse error: Missing dependency operator (Makefile.gappkg:210)
*** Parse error: Need an operator in 'WITH_INCLUDED_LIBSEMIGROUPS' (Makefile:80)
*** Parse error: Need an operator in 'endif' (Makefile:93)

Not sure if this is a "me" problem, or a problem with the PR.

@fingolfin
Copy link
Contributor Author

You need to use gmake not make

Copy link
Contributor

@dimpase dimpase left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. tested on Linux

@james-d-mitchell james-d-mitchell merged commit 6c21ed1 into semigroups:main Sep 11, 2023
12 checks passed
@fingolfin fingolfin deleted the mh/workaround-autoconf-bug branch September 11, 2023 11:10
@james-d-mitchell
Copy link
Collaborator

You need to use gmake not make

I noticed that when trying to compile GAP with make rather than gmake I get a helpful message saying this, is it straightforward to add this mechanism to Semigroups?

@fingolfin
Copy link
Contributor Author

In principle yes: you need to rename Makefile.in to (IIRC, just check
gap for the precise name) GNUMakefile.in (and adjust anything referencing it accordingly) and then copy the Makefile from GAP (need to adjust .gitignore, too)

@james-d-mitchell
Copy link
Collaborator

Thanks @fingolfin will give that a try just now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-system A label for issues or PRs related to the build system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

./configure unable to find install-sh, etc.
3 participants