"make[1]: execvp: printf: Argument list too long"

René J. V. Bertin rjvbertin at gmail.com
Sun Aug 18 15:08:48 UTC 2019


This Portfile hack fixed the issue for me:

{{{
    package require md5
    set portbuildpath.old ${portbuildpath}
    set workdir [md5::md5 -hex ${portpath}]
    set portbuildpath [file join ${portdbpath} build ${workdir}]
    ui_debug "${portpath}->${workdir} portbuildpath=${portbuildpath}"
    pre-fetch {
        system "mkdir -p ${portbuildpath}"
    }
    if {[file exists ${portbuildpath}] && ![file exists ${portbuildpath.old}]} {
        ln -s ${portbuildpath} ${portbuildpath.old}
    }
}}}

Surprisingly even `port work` returns the actual work dir (i.e. not 
`${portbuildpath.old}`) ... but maybe that's I already normalise the return 
string in a local hack.

Had it not been enough I would have run crc::cksum from the crc32 package on the 
2 relevant components of `portpath` (the tree root dir and the category/portdir 
path), to get a shorter XXXX/YYYY instead of the single 
_path_to_portree_category_portdir contraption.

FWIW, I'd love to see the better organisation of the builddir this would give, 
instead of the single flat directory it is now.

R.



More information about the macports-dev mailing list