mojo icon indicating copy to clipboard operation
mojo copied to clipboard

Cannot install on AIX 7.2

Open thomasseeling-ibm opened this issue 4 months ago • 12 comments

Mojolicous-9.41.tar.gz contains extended headers which confuse cpan on AIX 7.2.

/tmp $ gzip -cd /tmp/Mojolicious-9.41.tar.gz | tar xf -
/tmp $ cd Mojolicious-9.41
/tmp/Mojolicious-9.41 $ perl Makefile.PL
Checking if your kit is complete...
Looks good
Bareword found where operator expected at ./Makefile.PL line 1, near "57 LIBARCHIVE"
        (Missing operator before LIBARCHIVE?)
Number found where operator expected at ./Makefile.PL line 2, near "AQIAitJiCoN6KfQ
49"
        (Missing semicolon on previous line?)
Bareword found where operator expected at ./Makefile.PL line 2, near "49 SCHILY"
        (Missing operator before SCHILY?)
ERROR from evaluation of /tmp/Mojolicious-9.41/PaxHeader/Makefile.PL:
 Unrecognized character \x01; marked by <-- HERE after rovenance=<-- HERE near column 38 at ./Makefile.PL line 2.
/tmp/Mojolicious-9.41 $ ls
Changes  MANIFEST       MANIFEST.bak  META.yml     PaxHeader  examples  script
LICENSE  MANIFEST.SKIP  META.json     Makefile.PL  README.md  lib       t
/tmp/Mojolicious-9.41 $ rm -fr PaxHeader/ ../PaxHeader/
/tmp/Mojolicious-9.41 $ perl Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Mojolicious
Writing MYMETA.yml and MYMETA.json
... (works now)

thomasseeling-ibm avatar Sep 01 '25 13:09 thomasseeling-ibm

I'd be happy to fix this if someone could finally tell me which env vars to set during make dist on macOS. So far nobody has been able to unfortunately.

kraih avatar Sep 01 '25 13:09 kraih

Can you install and use gnu-tar?

https://chatgpt.com/share/68b5a6c8-6854-8000-88bd-7cfaca0d5228

On Mon, Sep 1, 2025, 8:44 AM Sebastian Riedel @.***> wrote:

kraih left a comment (mojolicious/mojo#2273) https://github.com/mojolicious/mojo/issues/2273#issuecomment-3242439413

I'd be happy to fix this if someone could finally tell me which env vars to set during make dist on macOS. So far nobody has been able to unfortunately.

— Reply to this email directly, view it on GitHub https://github.com/mojolicious/mojo/issues/2273#issuecomment-3242439413, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD6K6X2WAKT2NQACWIYWYT3QRESPAVCNFSM6AAAAACFKM6JSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTENBSGQZTSNBRGM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

s1037989 avatar Sep 01 '25 14:09 s1037989

@s1037989 the tar arguments listed in your slop script are to be specified when creating the archive, not when unpacking it.

If you're not gonna bother writing it, and you're not gonna bother reading it, maybe don't bother posting it either?

guest20 avatar Sep 01 '25 14:09 guest20

Can you install and use gnu-tar?

https://chatgpt.com/share/68b5a6c8-6854-8000-88bd-7cfaca0d5228

Can you instruct tar to omit PaxHeaders when creating the archive? I cannot install additional tools.

Use tar --format=ustar and maybe even the additional environment variables to avoid MacOS specialties in the archive.

thomasseeling-ibm avatar Sep 02 '25 07:09 thomasseeling-ibm

I'd be happy to fix this if someone could finally tell me which env vars to set during make dist on macOS. So far nobody has been able to unfortunately.

set the environment variable COPYFILE_DISABLE=1 before invoking tar or make.

https://unix.stackexchange.com/questions/9665/create-tar-archive-of-a-directory-except-for-hidden-files

thomasseeling-ibm avatar Sep 02 '25 07:09 thomasseeling-ibm

Although the AIX man page for tar refers to pax format only when using -c archive create switch I found out that it also works for extracting, so for manual installation the following snippet using --format=pax works. The man page says this requires AIX 7.3.1 though. YMMV.

gzip -cd "${module}".tar.gz | tar -x --format=pax -f -
cd "${moduledir}"
perl Makefile.PL
...

But cpan would still fail.

thomasseeling-ibm avatar Sep 02 '25 09:09 thomasseeling-ibm

Of course it's not that easy, i've had these env variables for many years, they just stopped working one or two macOS updates ago:

export COPYFILE_DISABLE=1
export COPY_EXTENDED_ATTRIBUTES_DISABLE=1

What i need is the newer version of this for my .bashrc.

kraih avatar Sep 02 '25 11:09 kraih

I work around this by having the gnu tar on macOS.

People have been arguing about this for years: https://superuser.com/q/318809/12972

briandfoy avatar Sep 02 '25 14:09 briandfoy

Just for cross-linking, the post on /r/perl.

briandfoy avatar Sep 02 '25 14:09 briandfoy

Just for cross-linking, the post on /r/perl.

The link to that other discussion at superuser.com does not exactly match my problem - MacOS adds some attributes and some other tar complains about unknown extended attributes (since I also compile for RHEL 8, 9 and 10 I've seen those error messages too, but fortunately the build can ignore that successfully). My problem was complete failure to run perl Makefile.PL. I tried shortly to understand the problem with perl -d Makefile.PL but ran out of time and patience.

thomasseeling-ibm avatar Sep 02 '25 14:09 thomasseeling-ibm

See also https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/issues/349 and https://github.com/jib/archive-tar-new/pull/45

choroba avatar Sep 03 '25 17:09 choroba

This is probably fixed wit the release of 9.42.

kraih avatar Oct 01 '25 14:10 kraih