Failure to assemble ARM64 code with MSVC's ARMASM64
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- cmake
- Domain
- build-system
Research direction
Start with the generated build.ninja rules for the three ARMASM64 targets and trace them back to the CMake configuration that creates those assembler commands. Reproduce with the listed Boost, CMake, Visual Studio, and Ninja versions; done means ARMASM64 builds successfully without receiving unsupported -D definitions.
Written by the indexing model from the issue text.
Description
Boost 1.84
CMake 3.28.3
Visual Studio 2022 17.9.2
Ninja 1.11.1
This is building Boost Context on a ARM64 machine. Not x-compiling.
Description
Failure to assemble ARM64 code:
[0/2] Re-checking globbed directories...
[1/2] Building ASM_ARMASM object libs\context\CMakeFiles\boost_context.dir\src\asm\ontop_arm64_aapcs_pe_armasm.asm.obj
FAILED: libs/context/CMakeFiles/boost_context.dir/src/asm/ontop_arm64_aapcs_pe_armasm.asm.obj
C:\PROGRA~1\MICROS~1\2022\PROFES~1\VC\Tools\MSVC\1439~1.335\bin\HOSTAR~1\arm64\armasm64.exe -DBOOST_CONTEXT_EXPORT="" -DBOOST_CONTEXT_NO_LIB="" -DBOOST_CONTEXT_SOURCE="" -DBOOST_CONTEXT_STATIC_LINK="" -IC:\Dev\Github\PrusaSlicer\deps\build\dep_Boost-prefix\src\dep_Boost\libs\context\include -IC:\Dev\Github\PrusaSlicer\deps\build\dep_Boost-prefix\src\dep_Boost\libs\assert\include -IC:\Dev\Github\PrusaSlicer\deps\build\dep_Boost-prefix\src\dep_Boost\libs\config\include -IC:\Dev\Github\PrusaSlicer\deps\build\dep_Boost-prefix\src\dep_Boost\libs\core\include -IC:\Dev\Github\PrusaSlicer\deps\build\dep_Boost-prefix\src\dep_Boost\libs\static_assert\include -IC:\Dev\Github\PrusaSlicer\deps\build\dep_Boost-prefix\src\dep_Boost\libs\throw_exception\include -IC:\Dev\Github\PrusaSlicer\deps\build\dep_Boost-prefix\src\dep_Boost\libs\mp11\include -IC:\Dev\Github\PrusaSlicer\deps\build\dep_Boost-prefix\src\dep_Boost\libs\pool\include -IC:\Dev\Github\PrusaSlicer\deps\build\dep_Boost-prefix\src\dep_Boost\libs\integer\include -IC:\Dev\Github\PrusaSlicer\deps\build\dep_Boost-prefix\src\dep_Boost\libs\type_traits\include -IC:\Dev\Github\PrusaSlicer\deps\build\dep_Boost-prefix\src\dep_Boost\libs\winapi\include -IC:\Dev\Github\PrusaSlicer\deps\build\dep_Boost-prefix\src\dep_Boost\libs\predef\include -IC:\Dev\Github\PrusaSlicer\deps\build\dep_Boost-prefix\src\dep_Boost\libs\smart_ptr\include -IC:\Dev\Github\PrusaSlicer\deps\build\dep_Boost-prefix\src\dep_Boost\libs\move\include -o libs\context\CMakeFiles\boost_context.dir\src\asm\ontop_arm64_aapcs_pe_armasm.asm.obj C:\Dev\Github\PrusaSlicer\deps\build\dep_Boost-prefix\src\dep_Boost\libs\context\src\asm\ontop_arm64_aapcs_pe_armasm.asm
Microsoft (R) ARM Macro Assembler Version 14.39.33521.0 for 64 bits
Copyright (C) Microsoft Corporation. All rights reserved.
error A2029: unknown command-line argument or argument value -DBOOST_CONTEXT_EXPORT=
Usage: armasm [<options>] sourcefile objectfile
armasm [<options>] -o objectfile sourcefile
armasm -h for help
ninja: build stopped: subcommand failed.
Possible explanation
It seems that the Microsoft ARM Assembler is very poor of command line options:
Microsoft (R) ARM Macro Assembler Version 14.39.33521.0 for 64 bits
Copyright (C) Microsoft Corporation. All rights reserved.
Usage: armasm [<options>] sourcefile objectfile
armasm [<options>] -o objectfile sourcefile
armasm -h for help
<options>: (Upper case shows allowable abbreviation)
-Errors errorsfile redirect stderr diagnostics to errorsfile
-I dir[;dir] add dirs to include search path
-PreDefine directive pre-execute a SET{L,A,S} directive
-NOWarn turn off warning messages
-ignore <warning-num> don't report warning-num
-help help (this information)
-via <file> read further arguments from <file>
-machine <machine> set the PE machine type field
-g generate debugging info
-gh:SHA1 use SHA1 for file checksum in debug info
-gh:SHA_256 use SHA256 for file checksum in debug info (default)
-funcOverride:<func> emit function overriding support for <func>
-errorReport:<option> deprecated. Report internal assembler errors to Microsoft
none - do not send report
prompt - prompt to immediately send report
queue - at next admin logon, prompt to send report (default)
send - send report automatically
<machine>: ARM64 | ARM64EC
I manually edited the build.ninja file to remove all the DEFINES section for the three targets that run ARMASM64 and that got me to the finish line.
I unfortunately don't know CMake enough to be able to tell the build to not emit any DEFINE for the assembler calls :(
- Dominant language
- Assembly
- Stars
- 371
- Forks
- 186
- Avg merge
- 4d 13h
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/context
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Support for the PACOpen
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in boostorg/context
Similar issues
-
[Bug]: core doesn't build standalone on dev since a17068054 (go-mp3 require dropped, go.sum pruned)Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
code-quality libc++
Difficulty 1/5 Under an hour Newbie friendliness 82/100
llvm/llvm-project#229284 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
txn2/mcp-data-platform#2030 ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
benbalter/change_agent#11 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100