Notes |
|
(0029994)
|
Peter Kuemmel
|
2012-07-09 07:41
|
|
I could have a look at it but your test script doesn't work,
neither in msys nor ubuntu: "invalid option" and after
removing -e it simply copies the loop code. |
|
|
(0029995)
|
Zaheer Chothia
|
2012-07-09 07:47
|
|
Hello Peter, thanks for the quick response. I've uploaded a sample project. I think the script didn't work due to trailing whitespace when I copied from the mailing list post -- it should work fine now. |
|
|
(0029996)
|
Peter Kuemmel
|
2012-07-09 07:53
(edited on: 2012-07-10 05:06) |
|
Thanks, script works now, and I can reproduce the error.
Until I've pushed a patch you can fix rules.ninja:
move '$LINK_LIBRARIES' to 'rspfile_content = $in $LINK_LIBRARIES'
|
|
|
(0030006)
|
ClausKlein
|
2012-07-09 12:37
|
|
I have tested this patch only under Darwin!
Please check why the command line length is checked to use response files. |
|
|
(0030011)
|
Peter Kuemmel
|
2012-07-10 05:05
|
|
|
|
(0030026)
|
Zaheer Chothia
|
2012-07-10 14:17
|
|
The patch you pushed works fine on the testcase when using Microsoft's compilers,
although unfortunately it doesn't work correctly with MinGW.
The issue there is the following:
- The corresponding build rule (C_EXECUTABLE_LINKER_RSPFILE) first invokes 'ar'
and passes LINK_LIBRARIES in the response file.
- LINK_LIBRARIES contains a mixture of library files (e.g. libxyz.a) as well as
implicit dependencies (e.g. -lkernel32).
- As a result 'ar' fails with "invalid option" since it doesn't understand the
implicit library options. What should be done instead, is to pass the first
options to 'ar' and the latter only when calling 'gcc'.
- Attached are the relevant files from the build directory (issue13385_build_ninja_mingw.zip).
The build log may be best to observe what I am referring to.
For reference these are the details of what I am using:
$ cmake --version
cmake version 2.8.8.20120710-ge5abdb
$ gcc --version
gcc (rubenvb-4.6.3) 4.6.3 |
|
|
(0030033)
|
Peter Kuemmel
|
2012-07-11 03:08
|
|
Explicit usage of ar.exe is a work around for older mingw versions.
This work around is not needed for gcc >4.4, so I've disabled it.
I don't know which mingw versions <4.4 will need this work around,
but I assume you can't use 3.4 with ninja now. Is this a problem? |
|
|
(0030034)
|
Peter Kuemmel
|
2012-07-11 04:44
|
|
Also on Mac sysconf() can be used.
FYI, on Mac the maximum command line length is 262144. |
|
|
(0030035)
|
Zaheer Chothia
|
2012-07-11 05:48
|
|
|
|
(0030036)
|
Peter Kuemmel
|
2012-07-11 05:58
|
|
AH, I haven't tested -w64.
Thanks for the link, seems it is only a configure problem, --with-gnu-ld must be used.
Isn't MinGW-w64 more experimental than mingw32?
So most -w64 users are forced to update anyway? |
|
|
(0030037)
|
Zaheer Chothia
|
2012-07-11 06:21
|
|
|
|
(0032048)
|
Robert Maynard
|
2013-01-09 10:57
|
|
Closing resolved issues that have not been updated in more than 4 months. |
|