View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013461CMakeCMakepublic2012-08-07 08:402013-01-09 14:05
ReporterAndreas Langs 
Assigned ToPeter Kuemmel 
PrioritynormalSeverityblockReproducibilityalways
StatusclosedResolutionfixed 
PlatformWindowsOSWindows 7, 64-bitOS Version7
Product VersionCMake 2.8.8 
Target VersionCMake 2.8.10Fixed in Version 
Summary0013461: Ninja: linker response file gets expanded, command to long
DescriptionIn my project a .dll is created with about 680 .obj and .lib files linked in.
I use cmake 2.8.9-rc3, ninja, cl.exe v15.

The call to the linker created by the ninja generator looks like this:

c:\cmake-2.9.0\bin\cmake.exe -E vs_link_dll C:\PROGRA~2\MICROS~1.0\VC\bin\amd64\link.exe /nologo @foo.dll.rsp /out:foo.dll

This call fails because the .rsp file is expanded by "cmake.exe -E vs_link_dll" and its content given to link.exe on the command line which then becomes to long and is cropped.
I can see this very long command by setting the environment variable VERBOSE=1.

When I prevent cmake.exe from touching the .rsp file (by modifing cmake.cxx:4020) my big project builds just fine.
TagsNo tags attached.
Attached Files

 Relationships
related to 0013385closedPeter Kuemmel Ninja: LINK_LIBRARIES not spilled to response file 

  Notes
(0030192)
Andreas Langs (reporter)
2012-08-08 09:41

The complete Project builds just fine if I use "NMake Makefiles" or "NMake Makefiles JOM"
(0030458)
Peter Kuemmel (developer)
2012-08-12 06:19

I could not reproduce the error with the tar.bz2 files from 0013385. There is a very long command line when link.exe is called but it doesn't break the build.

A test case similar to the ones for 0013385 is needed.
(0030463)
Andreas Langs (reporter)
2012-08-13 05:06

I tested with the 0013385 tar.bz2, too, and also could not reproduce the error.

Then I used the testcase-fixed.sh script from 0013385 to generate a project with 1500 instead of 500 libraries. Then the build broke:

C:\hello\bin>cmake -GNinja ../
-- The C compiler identification is MSVC 15.0.30729.1
-- Check for CL compiler version
-- Check for CL compiler version - 1500
-- Check if this is a free VC compiler
-- Check if this is a free VC compiler - no
-- Check for working C compiler using: Ninja
-- Check for working C compiler using: Ninja -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- The CXX compiler identification is MSVC 15.0.30729.1
-- Check for working CXX compiler using: Ninja
-- Check for working CXX compiler using: Ninja -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/hello/bin

C:\hello\bin>ninja
[3002/3002] Linking C executable hello.exe
FAILED: cmd.exe /c cd . && c:\cmake-2.9.0\bin\cmake.exe -E vs_link_exe C:\PROGRA~2\MICROS~1.0\VC\bin\amd64\cl.exe /nologo @hello.exe.rsp /DWIN32 /D_WINDOWS /W3 /Zm1000 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 /Fehello.exe /Fdhello.pdb -link /implib:hello.lib /version:0.0 /STACK:10000000 /machine:x64 /debug /INCREMENTAL:YES /subsystem:console && cd .
The filename or extension is too long
hello.exe.intermediate.manifest : general error c1010070: Failed to load and parse the manifest. The system cannot find the file specified.
ninja: build stopped: subcommand failed.
(0030643)
Peter Kuemmel (developer)
2012-08-14 10:10

Using ninja no rsp files are expanded:

http://cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=f50f3cbca8ef2f10a9c84935be9e9d5b4fef3917 [^]

Should be fixed now.
(0030665)
Andreas Langs (reporter)
2012-08-15 09:32

This patch works for my project. Thank you very much.
(0030668)
Peter Kuemmel (developer)
2012-08-15 09:49

also no errors on cdash
(0032066)
Robert Maynard (manager)
2013-01-09 14:05

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2012-08-07 08:40 Andreas Langs New Issue
2012-08-08 09:41 Andreas Langs Note Added: 0030192
2012-08-12 06:16 Peter Kuemmel Relationship added related to 0013385
2012-08-12 06:19 Peter Kuemmel Note Added: 0030458
2012-08-13 05:06 Andreas Langs Note Added: 0030463
2012-08-13 08:31 Peter Kuemmel Assigned To => Peter Kuemmel
2012-08-13 08:31 Peter Kuemmel Status new => assigned
2012-08-13 08:31 Peter Kuemmel Target Version => CMake 2.8.10
2012-08-14 10:10 Peter Kuemmel Note Added: 0030643
2012-08-15 09:32 Andreas Langs Note Added: 0030665
2012-08-15 09:49 Peter Kuemmel Note Added: 0030668
2012-08-15 09:49 Peter Kuemmel Status assigned => resolved
2012-08-15 09:49 Peter Kuemmel Resolution open => fixed
2013-01-09 14:05 Robert Maynard Note Added: 0032066
2013-01-09 14:05 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team