@@ -20,38 +20,59 @@ jobs:
2020 options : -v ${{ github.workspace }}:/work
2121 run : |
2222 set -ex
23+
24+ # Debug system info
25+ echo "System information:"
26+ uname -a
27+ ldd --version
28+ cat /etc/issue || true
29+
30+ # Check available GCC versions
31+ ls -la /usr/bin/gcc*
32+ gcc-9 --version
33+
2334 apt-get update
24- apt-get install -y curl build-essential gcc-9 g++-9
35+ apt-get install -y curl build-essential gcc-9 g++-9 wget
36+
37+ # Try to install Rust using the official package instead of rustup
38+ echo "Attempting to install Rust from packaged version..."
39+ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
40+ echo "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial main" > /etc/apt/sources.list.d/llvm.list
41+ apt-get update
42+ apt-get install -y rustc cargo
43+
44+ # Debug Rust installation
45+ echo "Rust version:"
46+ rustc --version
47+ cargo --version
2548
2649 # Create linker script inside container
2750 cat > /tmp/linker.sh << 'EOL'
2851 #!/bin/bash
52+ echo "Linker args: $@" >&2
2953 for arg do
3054 shift
3155 case $arg in
3256 (-lgcc_s) : ;;
3357 (*) set -- "$@" "$arg" ;;
3458 esac
3559 done
60+ echo "Modified linker args: $@" >&2
3661 exec "$CC" "$@" -lgcc
3762 EOL
3863 chmod +x /tmp/linker.sh
3964
40- # Setup modern GCC
65+ # Setup modern GCC with debug output
4166 export CC=gcc-9
4267 export CXX=g++-9
68+ echo "CC version: $($CC --version)"
4369
44- # Install Rust
45- curl -sSf https://sh.rustup.rs > rustup.sh
46- export CARGO_HOME=/cargo
47- sh rustup.sh --profile minimal -y
48- export PATH="/cargo/bin:${PATH}"
49-
50- # Configure Rust to use our linker script
51- export RUSTFLAGS="-C linker=/tmp/linker.sh"
70+ # Configure Rust to use our linker script with verbose output
71+ export RUSTFLAGS="-C linker=/tmp/linker.sh -C link-arg=-v"
5272
5373 cd /work/lib
54- cargo build --release
74+ # Build with more verbose output
75+ RUST_BACKTRACE=1 cargo build -vv --release
5576
5677 mkdir -p /work/artifacts
5778 cp target/release/libdmi.so /work/artifacts/
0 commit comments