View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015253CMakeCMakepublic2014-11-16 21:132015-06-01 08:38
Reporterkarlhungus 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformAMD64OSWindowsOS Version8.1 Pro
Product VersionCMake 3.0.2 
Target VersionFixed in VersionCMake 3.2 
Summary0015253: Ninja generator causes build failure for ASM files via NASM
DescriptionOn Windows (haven't tested on other platforms), the Ninja generator for ASM files compiled with NASM adds the "/showIncludes" flag to the NASM command line in "rules.ninja":

    #############################################
    # Rule for compiling ASM_NASM files.

    rule ASM_NASM_COMPILER
      deps = msvc
      command = C:\dev\bin\nasm.exe $FLAGS /showIncludes -f win64 -o $out $in
      description = Building ASM_NASM object $out

This causes a build failure with the error message:

"nasm: error: more than one input file specified"

Using YASM instead of NASM turns this into a warning instead of an error, but inconvenient nonetheless.

Removing "/showIncludes" from the above line in "rules.ninja" fixes the error.
Steps To Reproduce# Have nasm.exe in path #
git clone https://boringssl.googlesource.com/boringssl [^]
mkdir build
cd build
cmake -GNinja ..
ninja
TagsNo tags attached.
Attached Filespatch file icon 0001-Ninja-Pass-only-the-flags-relevant-to-the-language.patch [^] (1,923 bytes) 2015-01-28 07:33 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0037848)
Brian Smith (reporter)
2015-01-28 07:34

The patch I just attached fixes the issue for me so that BoringSSL builds successfully without warnings from yasm.
(0037849)
Brad King (manager)
2015-01-28 08:48

Re 0015253:0037848: Thanks. For reference, the mailing list discussion of the patch is here:

 [PATCH for bug 15253] Ninja: Pass only the flags relevant to the language.
 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/12246 [^]
(0037868)
Brad King (manager)
2015-01-30 10:17

This should fix it:

 Ninja: Use "deps = msvc" only for C and CXX
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8a93d3ea [^]
(0038864)
Robert Maynard (manager)
2015-06-01 08:38

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

- Issue History
Date Modified Username Field Change
2014-11-16 21:13 karlhungus New Issue
2015-01-28 07:33 Brian Smith File Added: 0001-Ninja-Pass-only-the-flags-relevant-to-the-language.patch
2015-01-28 07:34 Brian Smith Note Added: 0037848
2015-01-28 08:48 Brad King Note Added: 0037849
2015-01-30 10:17 Brad King Note Added: 0037868
2015-01-30 10:18 Brad King Status new => resolved
2015-01-30 10:18 Brad King Resolution open => fixed
2015-01-30 10:18 Brad King Fixed in Version => CMake 3.2
2015-06-01 08:38 Robert Maynard Note Added: 0038864
2015-06-01 08:38 Robert Maynard Status resolved => closed


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker