I'm using : NASM version 2.09.10 compiled on Jul 15 2011 When using : nasm -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 I got this error message : D:\Neolinks\xvid\src\bitstream\x86_asm\cbp_mmx.asm:32: fatal: unable to open include file `nasm.inc' nasm.inc is present in D:\Neolinks\xvid\src directory specified by -I option. Now if I type (with a backslash after D:\Neolinks\xvid\src): nasm -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 works fine. Please could you make a path without a trailing slash or backslash will be working too ? Thanks a lot !
Would anyone have a chance to take a look at this one please? It is a real pain when working with NASM and cmake. Currently cmake are saying the onus is on nasm to fix this. https://gitlab.kitware.com/cmake/cmake/issues/12919
I'll take a look once time permit.
Really really appreciate your time, thanks!
Yes, thank you so much :)
Created attachment 411679 [details] Fix nasm_catfile (patch) See patch description inside patch.
Created attachment 411680 [details] Make the preprocessor use nasm_catfile See description in patch.
Patches attached that fix this bug. There is a nasty bug in nasm_catfile today that renders this function useless, that needs to be fixed first. Then you can apply 0002 which will fix the include behaviour using nasm_catfile. I don't know how to PR on this repo, so I'll just leave the patches here.
Hopefully I'll deal with patches tomorrow. But there is a one important question -- can't some of other tool rely on lack of ending slash in the path so that if we start ending lines with a backslash '\' they might see two back slashes after the patching. May not it cause backward compatibility problem? The unix like systems are fine to have double slashes in paths (they simply ignore them) but I've no clue about windows machines.
nasm_catfile seems written for exactly that purpose and detects duplicate slashes (and won't append if it already has a terminating slash). It had a massive bug that rendered it effective (not sure where else it was being used), but once that's fixed it works great and doesn't duplicate slashes - so existing systems relying on the current behaviour should work fine.
Created attachment 411681 [details] Make the preprocessor use nasm_catfile 411680 had a minor bug (I had fixed and forgot to regenerate the patch). Here is the fixed one.
Great! I don't see obvious problems with the patches, so I pushed them out in 2.14.xx branch. Commits are fdb1a1b15130d858d51916cca7e09a2566c4b69f e1bd3bc7b497d58efc1c7a5c56dbc591d5be880f The snapshot should be built soon so please give it a shot.
Thanks a lot night199uk and Cyrill :)