pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/59439: lang/wasi-libc fails to build on NetBSD 9.x (e.g., 9.4_STABLE) after the llvm 19 update
>Number: 59439
>Category: pkg
>Synopsis: lang/wasi-libc fails to build on NetBSD 9.x (e.g., 9.4_STABLE) after the llvm 19 update
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu May 22 02:55:00 +0000 2025
>Originator: David H. Gutteridge
>Release: pkgsrc -current
>Organization:
TNF
>Environment:
>Description:
lang/wasi-libc fails to build on NetBSD 9.x (e.g., 9.4_STABLE) after the llvm 19 update
libc-bottom-half/crt/crt1-command.c:11:clang6: :warning: -Wl,-zrelro: 'linker' input unused [-Wunused-command-line-argument]error:
Invalid address space for WebAssembly target
11 | void _start(void) {
| ^
libc-bottom-half/crt/crt1-command.c:11:6: error: Invalid address space for WebAssembly target
2 errors generated.
gmake: *** [Makefile:585: build/wasm32-wasi/libc-bottom-half/crt/crt1-command.o] Error 1
gmake: *** Waiting for unfinished jobs....
libc-bottom-half/crt/crt1-reactor.c:8:6: error: Invalid address space for WebAssembly target
8 | void _initialize(void) {
| ^
In file included from libc-bottom-half/crt/crt1.clibc-bottom-half/crt/crt1-reactor.c::8:36:
:libc-bottom-half/crt/crt1-command.c :11:6: error: Invalid address space for WebAssembly target
error: Invalid address space for WebAssembly target
11 | void _s2t errorsa generatedr.
t(void) {
| ^
libc-bottom-half/crt/crt1-command.c:11:6: error: Invalid address space for WebAssembly target
gmake: *** [Makefile:585: build/wasm32-wasi/libc-bottom-half/crt/crt1-reactor.o] Error 1
2 errors generated.
gmake: *** [Makefile:585: build/wasm32-wasi/libc-bottom-half/crt/crt1.o] Error 1
In file included from dlmalloc/src/dlmalloc.c:63:
dlmalloc/src/malloc.c:4568:7: error: Invalid address space for WebAssembly target
4568 | void* dlmalloc(size_t bytes) {
| ^
fatal error: error in backend: Cannot select: 0x713b661a3000: i32 = addrspacecast[9511880 -> 9491848] 0x713b661a3700
0x713b661a3700: i32 = WebAssemblyISD::Wrapper TargetGlobalAddress:i32<ptr addrspace(9511880) @_gm_> 0
0x713b661a3690: i32 = TargetGlobalAddress<ptr addrspace(9511880) @_gm_> 0
In function: dlmalloc
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /usr/pkg/bin/clang -Wno-error=implicit-int -Wno-error=int-conversion -Wno-error=incompatible-pointer-types -D_FORTIFY_SOURCE=2 -Wl,-zrelro -fPIC -O2 -DNDEBUG --target=wasm32-wasi -fno-trapping-math -Wall -Wextra -Wno-null-pointer-arithmetic -Wno-unused-parameter -Wno-sign-compare -Wno-unused-variable -Wno-unused-function -Wno-ignored-attributes -Wno-missing-braces -Wno-ignored-pragmas -Wno-unused-but-set-variable -Wno-unknown-warning-option -mthread-model single -isystem /tmp/lang/wasi-libc/work/wasi-libc-4db5398e65c7dd343315db7e13f3dcae056466ba/sysroot/include -Idlmalloc/include -MD -MP -o build/wasm32-wasi/dlmalloc/src/dlmalloc.o -c dlmalloc/src/dlmalloc.c -I/tmp/lang/wasi-libc/work/.buildlink/include
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'dlmalloc/src/dlmalloc.c'.
4. Running pass 'WebAssembly Instruction Selection' on function '@dlmalloc'
#0 0x0000713b5ec37425 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/pkg/lib/libLLVM.so.19.1+0xc37425)
#1 0x0000713b5ec35066 llvm::sys::RunSignalHandlers() (/usr/pkg/lib/libLLVM.so.19.1+0xc35066)
#2 0x0000713b5ec35acc llvm::sys::CleanupOnSignal(unsigned long) (/usr/pkg/lib/libLLVM.so.19.1+0xc35acc)
#3 0x0000713b5eb740ae llvm::CrashRecoveryContext::HandleExit(int) (/usr/pkg/lib/libLLVM.so.19.1+0xb740ae)
#4 0x0000713b5ec2e838 llvm::sys::Process::Exit(int, bool) (/usr/pkg/lib/libLLVM.so.19.1+0xc2e838)
#5 0x0000000153412fa7 (/usr/pkg/bin/clang+0x12fa7)
#6 0x0000713b5eb842dc llvm::report_fatal_error(llvm::Twine const&, bool) (/usr/pkg/lib/libLLVM.so.19.1+0xb842dc)
#7 0x0000713b5f64a5f4 llvm::SelectionDAGISel::CannotYetSelect(llvm::SDNode*) (/usr/pkg/lib/libLLVM.so.19.1+0x164a5f4)
#8 0x0000713b5f64ef22 llvm::SelectionDAGISel::SelectCodeCommon(llvm::SDNode*, unsigned char const*, unsigned int) (/usr/pkg/lib/libLLVM.so.19.1+0x164ef22)
#9 0x0000713b623526a8 (/usr/pkg/lib/libLLVM.so.19.1+0x43526a8)
#10 0x0000713b5f647d59 llvm::SelectionDAGISel::DoInstructionSelection() (/usr/pkg/lib/libLLVM.so.19.1+0x1647d59)
#11 0x0000713b5f65335f llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/usr/pkg/lib/libLLVM.so.19.1+0x165335f)
#12 0x0000713b5f655d47 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/usr/pkg/lib/libLLVM.so.19.1+0x1655d47)
#13 0x0000713b5f65790e llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/usr/pkg/lib/libLLVM.so.19.1+0x165790e)
#14 0x0000713b5f64b07d llvm::SelectionDAGISelLegacy::runOnMachineFunction(llvm::MachineFunction&) (/usr/pkg/lib/libLLVM.so.19.1+0x164b07d)
#15 0x0000713b5f0b6d72 (/usr/pkg/lib/libLLVM.so.19.1+0x10b6d72)
#16 0x0000713b5eda8d10 llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/pkg/lib/libLLVM.so.19.1+0xda8d10)
#17 0x0000713b5eda8f20 llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/pkg/lib/libLLVM.so.19.1+0xda8f20)
#18 0x0000713b5eda9804 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/pkg/lib/libLLVM.so.19.1+0xda9804)
#19 0x0000713b681856c4 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/usr/pkg/lib/libclang-cpp.so.19.1+0x1f856c4)
#20 0x0000713b685d68c8 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/usr/pkg/lib/libclang-cpp.so.19.1+0x23d68c8)
#21 0x0000713b66e93d58 clang::ParseAST(clang::Sema&, bool, bool) (/usr/pkg/lib/libclang-cpp.so.19.1+0xc93d58)
#22 0x0000713b685d74ff clang::CodeGenAction::ExecuteAction() (/usr/pkg/lib/libclang-cpp.so.19.1+0x23d74ff)
#23 0x0000713b690493f0 clang::FrontendAction::Execute() (/usr/pkg/lib/libclang-cpp.so.19.1+0x2e493f0)
#24 0x0000713b68fd0557 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/pkg/lib/libclang-cpp.so.19.1+0x2dd0557)
#25 0x0000713b690d37ed clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/pkg/lib/libclang-cpp.so.19.1+0x2ed37ed)
#26 0x0000000153415819 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/pkg/bin/clang+0x15819)
#27 0x000000015340ef79 (/usr/pkg/bin/clang+0xef79)
#28 0x0000713b68c7912c (/usr/pkg/lib/libclang-cpp.so.19.1+0x2a7912c)
#29 0x0000713b5eb73feb llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/usr/pkg/lib/libLLVM.so.19.1+0xb73feb)
#30 0x0000713b68c7b649 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (/usr/pkg/lib/libclang-cpp.so.19.1+0x2a7b649)
#31 0x0000713b68c45b9b clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/usr/pkg/lib/libclang-cpp.so.19.1+0x2a45b9b)
#32 0x0000713b68c4644a clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/usr/pkg/lib/libclang-cpp.so.19.1+0x2a4644a)
#33 0x0000713b68c4e2e2 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/usr/pkg/lib/libclang-cpp.so.19.1+0x2a4e2e2)
#34 0x00000001534121ec clang_main(int, char**, llvm::ToolContext const&) (/usr/pkg/bin/clang+0x121ec)
#35 0x000000015340e6d1 main (/usr/pkg/bin/clang+0xe6d1)
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 19.1.7
Target: wasm32-unknown-wasi
Thread model: single
InstalledDir: /usr/pkg/bin
clang: note: diagnostic msg: Error generating preprocessed source(s).
gmake: *** [Makefile:585: build/wasm32-wasi/dlmalloc/src/dlmalloc.o] Error 1
*** Error code 2
This can be seen in:
http://www.ki.nu/pkgsrc/reports/current/NetBSD-9.0/20250517.1036/wasi-libc-0.0.0pre20231007nb7/build.log
It's reproducible for me.
>How-To-Repeat:
Try to build lang/wasi-libc.
>Fix:
Unknown.
Home |
Main Index |
Thread Index |
Old Index