[petsc-dev] ARG_MAX and linking

Jed Brown jed at jedbrown.org
Tue Feb 6 07:05:13 CST 2018


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


More information about the petsc-dev mailing list