gdal at 3.0.1_3: Argument list too long

Ryan Schmidt ryandesign at macports.org
Thu Nov 28 12:04:40 UTC 2019



On Nov 27, 2019, at 14:50, Dave Allured - NOAA Affiliate wrote:

> I am trying to solve "Argument list too long" when building gdal at 3.0.1_3 from source under macports.  The command that fails is "libtool clang++", used here to combine a large number of objects into a single library libgdal.la.  The trac ticket is https://trac.macports.org/ticket/59510 .
> 
> I found advice suggesting that the maximum command length is related to the stack size.  I am not sure this is correct for Mac OS.  However, if true, this would be an easy fix for argument list too long.
> 
> Can anyone tell me whether increasing the stack size would increase the maximum command length?  If so, what is the best way to increase stack size in a port file or patch, such that it would apply when this libtool command is executed?

I added some comments to the ticket.

I haven't tested if increasing the stack size would help. On High Sierra at least, the default stack size (from "ulimit -s") is 8192, and from Googling the maximum for macOS can be set with "ulimit -s 65532". It would probably be fine to increase the stack size for the entire affected phase, in this case the build phase, if that helps. You could test if this works by running:

port install gdal build.cmd="ulimit -s 65532 && make"

If it does, we can add that into the port.



More information about the macports-users mailing list