Command Line too long?

Added by David Cowan over 2 years ago

Running under Windows (launching from Visual Studio workspace)... I'm getting an error on my new jam based project

C.Link actions too long (max 10240)!

Is this coming from jam, or from the Windows command line?


Replies (5)

RE: Command Line too long? - Added by Joshua Jensen over 2 years ago

It's coming from Jam, but I don't see why. Most of the link line is thrown into a response file, so it shouldn't contribute to the overall command line length.

Can you give me any indication as to what you have on your command line?

To be sure, are you using the published snapshot binaries? Version 0.3 is very old, and the snapshot is very stable. The only reason it isn't a 1.0 release is because I haven't had time to finish the documentation properly.

Josh

RE: Command Line too long? - Added by David Cowan over 2 years ago

I'm pretty positive that I'm using the snapshot build of the source and win32 executable (Although the version number still says 0.3 (PATCHED_VERSION a.u)).

The win32, win64 and Xbox360 builds appear to be fine... the problem is with a my wii-cw compiler rules (I modified the existing gcc rules to create a new Nintendo Wii/CodeWarrior platform). I've done a side-by-side compare of the c-gcc.jam, and my new c-cw.jam file - but I can't see any reason for the error.

I suspect the problem is down to my 'relocating' the object files, by setting the LOCATE_TARGET variable... possibly resulting in non-relative paths for each of the object files being passed to the final link stage.

Like you say, I thought it was all thrown into a response file to avoid command line length issues...

I'll zip up the project jam files for you to take a look through and see if you can spot where I've gone wrong.

RE: Command Line too long? - Added by Joshua Jensen over 2 years ago

Ah, that makes sense. There are no response files in use in c-gcc.jam, because I have only really tested it on Linux and Mac OS X. Neither have a command line limit that gets in the way.

Note how c-vc.jam wraps a section of the action in an @(text) block. The text in that block is written to a response file, and the response filename is placed on the command line in the place of the AT block. <- I don't know how to escape the AT symbol, so Redmine formats everything weird.

You need to do the same thing in your c-cw.jam file.

You'll find some Wii Jamfiles in this fork of JamPlus: https://github.com/Scraft/jamplus/commits/master

-Josh

RE: Command Line too long? - Added by David Cowan over 2 years ago

Yeah, that did it -- thanks. I don't know how I missed that :(

RE: Command Line too long? - Added by creg lion about 1 year ago

You may better use long path tool. problem will be solved. http://longpathtool.com/

(1-5/5)