Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meson setup finds an old NASM version that it doesn't accommodate #14043

Open
seishun opened this issue Dec 23, 2024 · 0 comments
Open

meson setup finds an old NASM version that it doesn't accommodate #14043

seishun opened this issue Dec 23, 2024 · 0 comments

Comments

@seishun
Copy link

seishun commented Dec 23, 2024

Describe the bug

https://nasm.us/doc/nasmdoc2.html

2.1.18 The -i Option: Include File Search Directories

<...>

Prior NASM 2.14 a path provided in the option has been considered as a verbatim copy and providing a path separator been up to a caller. One could implicitly concatenate a search path together with a filename. Still this was rather a trick than something useful. Now the trailing path separator is made to always present, thus -ifoo will be considered as the -ifoo/ directory.

Meson doesn't add a trailing path separator even if it finds a NASM version older than 2.14. As a result, .asm files that include other files fail to build:

[1/2] Compiling Nasm object hello.exe.p/hello.asm.obj
FAILED: hello.exe.p/hello.asm.obj
"C:\Program Files\NASM\nasm.EXE" "-f" "win64" "-DWIN64" "-D__x86_64__" "-O0" "-g" "-I..\included" "-I.." "-I." "-Ihello.exe.p" -MD "hello.exe.p\hello.asm.obj.d" -MQ hello.exe.p/hello.asm.obj -o hello.exe.p/hello.asm.obj ../hello.asm
../hello.asm:5: fatal: unable to open include file `included.asm'
ninja: build stopped: subcommand failed.

To Reproduce

meson.build

project('test', 'nasm')

inc = include_directories('included')

exe = executable('hello', 'hello.asm', include_directories: inc)
test('hello', exe)

hello.asm

section .text
    global main
    extern ExitProcess

%include "included.asm"

main:
    ; Exit
    xor rcx, rcx        ; status: 0
    call ExitProcess

included/included.asm can be empty.

Expected behavior
Meson ignores NASM versions that it doesn't accommodate.

system parameters

  • Windows 10
  • meson 1.6.1
  • ninja 1.12.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant