Closed radna0 closed 5 months ago
Try installing build-essential
package
I already have build-essential installed
(base) r4-0@r40-desktop:~/ZLUDA$ sudo apt install build-essential
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
build-essential is already the newest version (12.9ubuntu3).
The following packages were automatically installed and are no longer required:
libllvm16.0.50703-amdgpu libllvm16.0.50703-amdgpu:i386
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
I remember having installed all of the dependencies already, by following the dockerfile.
Same Error?
(base) r4-0@r40-desktop:~/ZLUDA$ cargo xtask --release
Finished dev [unoptimized + debuginfo] target(s) in 0.06s
Running `target/debug/xtask --release`
Compiling llvm-sys v150.1.2 (/home/r4-0/ZLUDA/ext/llvm-sys.rs)
warning: crate `cublasLt` should have a snake case name
|
= help: convert the identifier to snake case: `cublas_lt`
= note: `#[warn(non_snake_case)]` on by default
warning: `zluda_blaslt` (lib) generated 1 warning
error: failed to run custom build command for `llvm-sys v150.1.2 (/home/r4-0/ZLUDA/ext/llvm-sys.rs)`
Caused by:
process didn't exit successfully: `/home/r4-0/ZLUDA/target/release/build/llvm-sys-04d8e9102fc43ca1/build-script-build` (exit status: 101)
--- stdout
cargo:rerun-if-changed=build.rs
cargo:rerun-if-changed=/home/r4-0/ZLUDA/ext/llvm-project/llvm
cargo:rerun-if-changed=/home/r4-0/ZLUDA/ext/llvm-sys.rs/build.cmake
CMAKE_TOOLCHAIN_FILE_x86_64-unknown-linux-gnu = None
CMAKE_TOOLCHAIN_FILE_x86_64_unknown_linux_gnu = None
HOST_CMAKE_TOOLCHAIN_FILE = None
CMAKE_TOOLCHAIN_FILE = None
CMAKE_PREFIX_PATH_x86_64-unknown-linux-gnu = None
CMAKE_PREFIX_PATH_x86_64_unknown_linux_gnu = None
HOST_CMAKE_PREFIX_PATH = None
CMAKE_PREFIX_PATH = None
CMAKE_x86_64-unknown-linux-gnu = None
CMAKE_x86_64_unknown_linux_gnu = None
HOST_CMAKE = None
CMAKE = None
running: "cmake" "/home/r4-0/ZLUDA/ext/llvm-project/llvm" "-G" "Ninja" "-DLLVM_ENABLE_LIBXML2=OFF" "-DLLVM_ENABLE_ZLIB=OFF" "-DLLVM_ENABLE_ZSTD=OFF" "-DLLVM_ENABLE_CURL=OFF" "-DLLVM_ENABLE_HTTPLIB=OFF" "-DLLVM_ENABLE_LIBEDIT=OFF" "-DLLVM_ENABLE_TERMINFO=OFF" "-DLLVM_BUILD_TOOLS=OFF" "-DLLVM_TARGETS_TO_BUILD=" "-DLLVM_ENABLE_PROJECTS=" "-DCMAKE_PROJECT_INCLUDE_BEFORE=/home/r4-0/ZLUDA/ext/llvm-sys.rs/build.cmake" "-DCMAKE_INSTALL_PREFIX=/home/r4-0/ZLUDA/target/release/build/llvm-sys-22ea7c535897be01/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/home/r4-0/miniconda3/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/home/r4-0/miniconda3/bin/cc" "-DCMAKE_BUILD_TYPE=Release"
-- Native target X86 is not selected; lli will not JIT code
-- Threads enabled.
-- Doxygen disabled.
-- Go bindings disabled.
-- Ninja version: 1.10.2
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- OCaml bindings disabled.
-- LLVM host triple: x86_64-unknown-linux-gnu
-- LLVM default target triple: x86_64-unknown-linux-gnu
-- Building with -fPIC
-- Registering Bye as a pass plugin (static build: OFF)
-- Failed to find LLVM FileCheck
-- git version: v0.0.0 normalized to 0.0.0
-- Version: 1.6.0
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX -- success
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Configuring done (2.2s)
-- Generating done (1.0s)
-- Build files have been written to: /home/r4-0/ZLUDA/target/release/build/llvm-sys-22ea7c535897be01/out/build
running: "cmake" "--build" "." "--target" "LLVMCore" "--config" "Release" "--parallel" "12"
[1/98] Linking CXX executable bin/llvm-tblgen
FAILED: bin/llvm-tblgen
: && /usr/bin/c++ -ffunction-sections -fdata-sections -fPIC -m64 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,-rpath-link,/home/r4-0/ZLUDA/target/release/build/llvm-sys-22ea7c535897be01/out/build/./lib -Wl,--gc-sections utils/TableGen/CMakeFiles/llvm-tblgen.dir/AsmMatcherEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/AsmWriterEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/AsmWriterInst.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/Attributes.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/CallingConvEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/CodeEmitterGen.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/CodeGenDAGPatterns.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/CodeGenHwModes.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/CodeGenInstruction.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/CodeGenMapTable.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/CodeGenRegisters.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/CodeGenSchedule.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/CodeGenTarget.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/DAGISelEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/DAGISelMatcherEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/DAGISelMatcherGen.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/DAGISelMatcherOpt.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/DAGISelMatcher.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/DecoderEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/DFAEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/DFAPacketizerEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/DirectiveEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/DisassemblerEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/DXILEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/ExegesisEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/FastISelEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/GICombinerEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/GlobalISelEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/InfoByHwMode.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/InstrInfoEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/InstrDocsEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/IntrinsicEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/OptEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/OptParserEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/OptRSTEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/PredicateExpander.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/PseudoLoweringEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/CompressInstEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/RegisterBankEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/RegisterInfoEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/SDNodeProperties.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/SearchableTableEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/SubtargetEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/SubtargetFeatureInfo.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/TableGen.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/Types.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/VarLenCodeEmitterGen.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/X86DisassemblerTables.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/X86EVEX2VEXTablesEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/X86FoldTablesEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/X86MnemonicTables.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/X86ModRMFilters.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/X86RecognizableInstr.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/WebAssemblyDisassemblerEmitter.cpp.o utils/TableGen/CMakeFiles/llvm-tblgen.dir/CTagsEmitter.cpp.o -o bin/llvm-tblgen -L/home/r4-0/miniconda3/lib/gcc/x86_64-conda-linux-gnu/12.1.0 -L/home/r4-0/miniconda3/lib/gcc -L/home/r4-0/miniconda3/x86_64-conda-linux-gnu/lib -L/home/r4-0/miniconda3/lib -L/home/r4-0/miniconda3/x86_64-conda-linux-gnu/sysroot/lib -L/home/r4-0/miniconda3/x86_64-conda-linux-gnu/sysroot/usr/lib -Wl,-rpath,"\$ORIGIN/../lib" lib/libLLVMSupport.a lib/libLLVMTableGen.a -lpthread lib/libLLVMTableGenGlobalISel.a lib/libLLVMTableGen.a lib/libLLVMSupport.a -lrt -ldl -lpthread -lm lib/libLLVMDemangle.a && :
/usr/bin/ld: cannot find /lib64/libpthread.so.0: No such file or directory
/usr/bin/ld: cannot find /usr/lib64/libpthread_nonshared.a: No such file or directory
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
--- stderr
thread 'main' panicked at '
command did not execute successfully, got: exit status: 1
build script failed, must exit now', /home/r4-0/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.50/src/lib.rs:1098:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: "\"/home/r4-0/.rustup/toolchains/1.66.1-x86_64-unknown-linux-gnu/bin/cargo\" \"build\" \"--locked\" \"-p\" \"zluda_blas\" \"-p\" \"zluda_blaslt\" \"-p\" \"zluda_ccl\" \"-p\" \"zluda_dnn\" \"-p\" \"zluda_dump\" \"-p\" \"zluda_fft\" \"-p\" \"zluda_ml\" \"-p\" \"zluda_lib\" \"-p\" \"zluda_sparse\" \"--release\" failed with exit code 101"
Weird, linker is complaining about the lack of pthread libraries, but pthread is so fundamental that it's hard to avoid having it installed.
Check if you have package libc6-dev
and if file /usr/lib/x86_64-linux-gnu/libpthread.so.0
exists
I wasn't able to get that instance to work, Normally I would just run a script to setup the OS, this time around I tried installing some unsual packages which I thought might help conpiling.
In the end, I resulted to just reseting everything and with the regular packages it compiled successfully
System:
Ubuntu22.04