Linker Error: Arg list too long, error 126

Am trying to compile a simulation model onto opensuse 10.3. Running the makefile appears to work fine right up to the point it tries to link all the objects. I get the following error

pgf90 Arg list too long
…/Linux/esams.x error 126

Any ideas?

Hi Jet Jockey,

How many characters is your argument list? Does it exceed your shell’s max? (getconf ARG_MAX).

My best guess is that the full path to your objects is being use and that this path is long. If this is the case, then can the makefile be changed to use a relative PATH?

For example the makefile might look something like this:

OBJ_DIR = /very/long/path/to/the/object/directory

mylink:
pgf90 -o myexe.out (LDFLAGS) (OBJ_DIR)/obj1.o … $(OBJ_DIR)/obj128.o


Instead, cd to the “/very/long/path/to/the/object/directory” and change “OBJ_DIR” to “.”.

Hope this helps,
Mat