[petsc-dev] ARG_MAX and linking

Pierre Jolivet pierre.jolivet at enseeiht.fr
Tue Feb 6 08:10:35 CST 2018

I’m on master.
Thanks, I think this is the way to go, though I’m now seeing a lot of undefined references, like there http://mingw-users.1079350.n2.nabble.com/imp-prefixes-when-linking-td7386007.html <http://mingw-users.1079350.n2.nabble.com/imp-prefixes-when-linking-td7386007.html>

> On 6 Feb 2018, at 2:05 PM, Jed Brown <jed at jedbrown.org> wrote:
> What branch are you on?  I wonder if this is exacerbated by Scott's
> "absolute path".  You can configure --with-single-library=0 which will
> link a separate libpetscsys, libpetscvec, etc.
> There are Cygwin recipes in gmakefile that create argument files that
> the linker reads as @args.  We could use $(file > args, $^) to write
> them with arbitrarily long command lines.
> Pierre Jolivet <pierre.jolivet at enseeiht.fr> writes:
>> Hello,
>> I’m trying to compile PETSc with msys2 and MS MPI.
>> Everything works out almost flawlessly, except when linking. Indeed, you generate a nice line of 
>> $ wc /tmp/cl
>>    2  1234 69041 /tmp/cl
>> 69041 characters, but 
>> $ getconf.exe ARG_MAX
>> 32000
>> Thus, sadly, the make fails with the following error
>> /usr/bin/sh: /mingw64/bin/gcc: Argument list too long
>> Do you know of a work around? Anyway to link the full library as multiple smaller libraries (I think you did that for some version X.Y with X << 3, didn’t you?)?
>> Thanks,
>> Pierre

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20180206/5449503d/attachment.html>

More information about the petsc-dev mailing list