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

gettext: fix cross compile #34866

Closed
wants to merge 1 commit into from

Conversation

lfdebrux
Copy link
Contributor

@lfdebrux lfdebrux commented Jan 5, 2022

For gettext-0.21 cross-compile does not work, because the pre-configure step tries to run autoreconf -fi, which fails with the error

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

This pre-configure step was added back in commit 17f6ad8 for gettext-0.18.3, but its not clear what the error seen back then was, and now cross-compiling without running autoreconf works fine.

So this PR just removes the pre-configure step, reverting 17f6ad8. This fixes #34810.

Testing the changes

  • I tested the changes in this PR: YES

Local build testing

  • I built this PR locally for my native architecture, (x86_64-musl)
  • I built this PR locally for these architectures:
    • aarch64-musl
    • armv5tel-musl
    • i686-musl

For gettext-0.21 cross-compile does not work, because the
pre-configure step tries to run `autoreconf -fi`, which fails with the
error

    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

This pre-configure step was added back in commit 17f6ad8 for
gettext-0.18.3, but its not clear what the error seen back then was, and
now cross-compiling without running autoreconf works fine.

So this commit just removes the pre-configure step, reverting 17f6ad8.
@Chocimier
Copy link
Member

@lfdebrux
Copy link
Contributor Author

lfdebrux commented Jan 6, 2022

Alternatively, apply https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=patch;h=d1836dbbd6a90b4c0ab79bc5292c023f08b49511

Oh, that's interesting, nice find!

Forgive my ignorance, but what's the advantage of running autoreconf before cross-compiling?

@github-actions
Copy link

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot cross-compile gettext
2 participants