View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012919CMakeCMakepublic2012-01-30 06:022016-06-10 14:31
ReporterCédric OCHS 
Assigned ToAlex Neundorf 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformWindowsOSWindows 7OS VersionWindows 7 x64
Product VersionCMake 2.8.7 
Target VersionFixed in Version 
Summary0012919: Wrong include path passed to nasm
DescriptionWhen ASM files are using %include, current CMake configuration for nasm is wrong and we got "Unable to open include file ...".

That's because nasm seems to need a trailing slash/backslash in path after a -I
Steps To ReproduceCreate a project with a .asm file which is including another file (%include "nasm.inc" for example), use nasm as ASM compiler with ENABLE_LANGUAGE(ASM_NASM).

Compilation will fail with a "fatal: unable to open include file `nasm.inc'" error.
Additional InformationOutput example (without fix):

---
[ 56%] Building ASM_NASM object CMakeFiles/xvidcore.dir/src/bitstream/x86_asm/cb
p_mmx.asm.obj
        C:\Users\kervala\AppData\Local\nasm\nasm.exe -ID:\Neolinks\xvid\src -f win64 -o CMakeFiles\xvidcore.dir\src\bitstream\x86_asm\cbp_mmx.asm.obj D:\Neolinks\xvid\src\bitstream\x86_asm\cbp_mmx.asm
D:\Neolinks\xvid\src\bitstream\x86_asm\cbp_mmx.asm:32: fatal: unable to open include file `nasm.inc'
NMAKE : fatal error U1077: 'C:\Users\kervala\AppData\Local\nasm\nasm.exe' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\amd64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\amd64\nmake.exe"' : return code '0x2'
Stop.
---

If I try to launch (notice the backslash after -ID:\Neolinks\xvid\src):

C:\Users\kervala\AppData\Local\nasm\nasm.exe -ID:\Neolinks\xvid\src\ -f win64 -o CMakeFiles\xvidcore.dir\src\bitstream\x86_asm\cbp_mmx.asm.obj D:\Neolinks\xvid\src\bitstream\x86_asm\cbp_mmx.asm

It compiles fine even if you replace backslashes by slashes :)

The current ugly fix I'm using to compile my project is (in CMakeLists.txt):

SET(CMAKE_ASM_NASM_FLAGS_INIT "-I${CMAKE_CURRENT_SOURCE_DIR}/src/")

Please could you fix it ?

Thanks a lot
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0028419)
Cédric OCHS (reporter)
2012-01-30 06:26

I also posted a bug report on nasm bugzilla : http://bugzilla.nasm.us/show_bug.cgi?id=3392205 [^]

If the bug is fixed upstream, CMake won't need to be "fixed" :)
(0030578)
Alex Neundorf (developer)
2012-08-13 14:44

It would be good if this could be fixed upstream.
(0041974)
Kitware Robot (administrator)
2016-06-10 14:28

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2012-01-30 06:02 Cédric OCHS New Issue
2012-01-30 06:26 Cédric OCHS Note Added: 0028419
2012-02-01 12:13 Alex Neundorf Assigned To => Alex Neundorf
2012-02-01 12:13 Alex Neundorf Status new => assigned
2012-08-13 14:44 Alex Neundorf Note Added: 0030578
2012-08-13 14:44 Alex Neundorf Status assigned => backlog
2016-06-10 14:28 Kitware Robot Note Added: 0041974
2016-06-10 14:28 Kitware Robot Status backlog => resolved
2016-06-10 14:28 Kitware Robot Resolution open => moved
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team