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

Cannot cross-compile gettext #34810

Closed
lfdebrux opened this issue Jan 2, 2022 · 4 comments
Closed

Cannot cross-compile gettext #34810

lfdebrux opened this issue Jan 2, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@lfdebrux
Copy link
Contributor

lfdebrux commented Jan 2, 2022

System

  • xuname:
    Void 5.11.22_1 x86_64-musl GenuineIntel notuptodate rFFF
  • package:
    gettext-0.21_4

Expected behavior

./xbps-src -a <target> configure gettext runs successfully.

Actual behavior

The pre-configure step fails with error

=> gettext-0.21_4: running pre_configure ...
... ( lines omitted)
configure.ac:25: error: AC_INIT should be called with package and version arguments
: gl_AM_INIT_AUTOMAKE is expanded from...
/usr/share/aclocal-1.16/init.m4:29: AM_INIT_AUTOMAKE is expanded from...
configure.ac:25: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal: error: /usr/bin/autom4te failed with exit status: 1
autoreconf: aclocal failed with exit status: 1
=> ERROR: gettext-0.21_4: pre_configure: 'autoreconf -fi' exited with 1
=> ERROR:   in pre_configure() at srcpkgs/gettext/template:42

I've tried this with various targets, the error is always the same.

I noticed that for this template the pre-configure step only happens when cross-compiling:

if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" automake libtool"
pre_configure() {
autoreconf -fi

If the command to run autoreconf is removed from the template then the configure completes successfully, and the package can be built and run without any issues that I've seen.

@lfdebrux
Copy link
Contributor Author

lfdebrux commented Jan 2, 2022

The step to run autoreconf -fi was added back in 2013 for version 0.18.3 of gettext:

17f6ad8

There isn't and detail in the commit message why running autoreconf is needed, I tried googling 'gettext autoreconf' but couldn't find anything relevant. Googling 'gettext cross-compile' also didn't suggest that autoreconf is needed. There's also nothing about in the package INSTALL doc, either then or now.

@ericonr
Copy link
Member

ericonr commented Jan 2, 2022

Can you specify the target you're using?

The most likely thing is that their pre generated configure script had issues for cross which were fixed by re generating them. It's possible that no longer applies.

@lfdebrux
Copy link
Contributor Author

lfdebrux commented Jan 3, 2022

@ericonr

I was compiling for targets i686-musl and armv5tel-musl. Same result for both, error running autoreconf, compilation went fine. I also tried with i686 and x86_64, also got the same error.

I'm not sure the target makes a difference, it just seems like running autoreconf doesn't work in the gettext source directory? I didn't try running autoreconf on a glibc system though, I guess that could make a difference?

@ericonr
Copy link
Member

ericonr commented Jan 3, 2022

Ok, I can reproduce this locally.

I think it has to do with the automake updates... Fixing this in their build system would be ideal, but I'm not sure I'd like to delve inside :P

If you'd like to create a PR to remove the autoreconf, that sounds reasonable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants