mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-06 21:17:14 -06:00
chore: uncucked gpuminer
This commit is contained in:
parent
452583cf44
commit
ca65436dfb
1 changed files with 63 additions and 49 deletions
|
|
@ -232,13 +232,23 @@ in
|
||||||
export CC=${gccCompiler}/bin/gcc
|
export CC=${gccCompiler}/bin/gcc
|
||||||
export CXX=${gccCompiler}/bin/g++
|
export CXX=${gccCompiler}/bin/g++
|
||||||
|
|
||||||
# Point nvcc to GCC 13 headers for compilation
|
# CRITICAL: Force nvcc to use GCC 13 by creating a wrapper script
|
||||||
export CPATH=${gccCompiler}/include/c++/${gccCompiler.version}:${cudaPackages.cudatoolkit}/include:$CPATH
|
# The wrapper must pass both --compiler-bindir and ensure CUDA headers are found
|
||||||
export C_INCLUDE_PATH=${cudaPackages.cudatoolkit}/include:$C_INCLUDE_PATH
|
mkdir -p /tmp/nvcc-wrapper
|
||||||
export CPLUS_INCLUDE_PATH=${gccCompiler}/include/c++/${gccCompiler.version}:${cudaPackages.cudatoolkit}/include:$CPLUS_INCLUDE_PATH
|
cat > /tmp/nvcc-wrapper/nvcc <<WRAPPER_EOF
|
||||||
export LIBRARY_PATH=${cudaPackages.cudatoolkit}/lib:$LIBRARY_PATH
|
#!${pkgs.bash}/bin/bash
|
||||||
|
# Add CUDA include path to help nvcc find cuda_runtime.h
|
||||||
|
exec ${cudaPackages.cudatoolkit}/bin/nvcc \\
|
||||||
|
--compiler-bindir ${gccCompiler}/bin \\
|
||||||
|
-I${cudaPackages.cudatoolkit}/include \\
|
||||||
|
"\$@"
|
||||||
|
WRAPPER_EOF
|
||||||
|
chmod +x /tmp/nvcc-wrapper/nvcc
|
||||||
|
|
||||||
# CRITICAL: Use GCC 14 runtime libraries for CXXABI_1.3.15 at runtime
|
# Put our wrapper at the front of PATH
|
||||||
|
export PATH="/tmp/nvcc-wrapper:$PATH"
|
||||||
|
|
||||||
|
# Use GCC 14 runtime libraries for CXXABI_1.3.15 at runtime
|
||||||
export LD_LIBRARY_PATH=${
|
export LD_LIBRARY_PATH=${
|
||||||
lib.makeLibraryPath [
|
lib.makeLibraryPath [
|
||||||
cudaPackages.cudatoolkit
|
cudaPackages.cudatoolkit
|
||||||
|
|
@ -266,6 +276,7 @@ in
|
||||||
echo "Compile-time GCC: ${gccCompiler}/bin/gcc ($(${gccCompiler}/bin/gcc --version | head -n1))"
|
echo "Compile-time GCC: ${gccCompiler}/bin/gcc ($(${gccCompiler}/bin/gcc --version | head -n1))"
|
||||||
echo "Runtime GCC library: ${gccRuntime.cc.lib}/lib"
|
echo "Runtime GCC library: ${gccRuntime.cc.lib}/lib"
|
||||||
echo "Working directory: $(pwd)"
|
echo "Working directory: $(pwd)"
|
||||||
|
echo "NVCC wrapper: $(type -p nvcc)"
|
||||||
|
|
||||||
# Verify the critical library is available
|
# Verify the critical library is available
|
||||||
echo "Checking for CXXABI_1.3.15..."
|
echo "Checking for CXXABI_1.3.15..."
|
||||||
|
|
@ -275,10 +286,13 @@ in
|
||||||
echo "✗ WARNING: CXXABI_1.3.15 not found"
|
echo "✗ WARNING: CXXABI_1.3.15 not found"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Test nvcc compilation
|
||||||
|
echo "Testing nvcc compiler configuration..."
|
||||||
|
/tmp/nvcc-wrapper/nvcc --version
|
||||||
|
|
||||||
# Run the miner
|
# Run the miner
|
||||||
exec venv/bin/python main.py --workers ${builtins.toString cfg.maxWorkers} 2>&1
|
exec venv/bin/python main.py --workers ${builtins.toString cfg.maxWorkers} 2>&1
|
||||||
'';
|
'';
|
||||||
|
|
||||||
StandardOutput = "journal";
|
StandardOutput = "journal";
|
||||||
StandardError = "journal";
|
StandardError = "journal";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue