From c2d80f43c039f7e88d26462a1be403c7327ef1f0 Mon Sep 17 00:00:00 2001 From: "Aaron K. Clark" Date: Tue, 26 May 2026 02:01:03 -0500 Subject: [PATCH] ci(codeql): add binutils-dev back for analyzesigs.cc bfd.h include MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #50 first attempt removed `binutils-dev libiberty-dev` from the apt-get install on the theory that libdecomp_dbg.a is a static archive with no link step. That was wrong: In file included from analyzesigs.cc:17: loadimage_bfd.hh:37:10: fatal error: bfd.h: No such file or directory 37 | #include | ^~~~~~~ `analyzesigs.cc` and `loadimage_bfd.cc` `#include ` at the top of the file, so the header is needed at compile time even when we never link against `-lbfd`. Restoring the original deps install. The autobuild replacement (`make libdecomp_dbg.a`) stays as the right approach — the failure was a stale assumption about which headers the archive's component .o files need, not about the overall strategy. Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/ Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/codeql.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index bf610a684bf..5483c5b0b30 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -76,13 +76,14 @@ jobs: if: matrix.language == 'c-cpp' # bison + flex are needed to regenerate xml.cc / slghparse.cc / # slghscan.cc from their .y / .l sources during the manual - # build below. The decompiler's actual link step (decomp_dbg) - # would want binutils-dev + libiberty-dev for BFD, but we don't - # link here — only compile to .o files for CodeQL to extract, - # which doesn't need BFD. + # build below. binutils-dev + libiberty-dev provide bfd.h — + # we don't *link* against libbfd (libdecomp_dbg.a is a static + # archive, no link step), but `analyzesigs.cc` and + # `loadimage_bfd.cc` `#include ` and therefore need + # the header at compile time. run: | sudo apt-get update - sudo apt-get install -y bison flex g++ make + sudo apt-get install -y bison flex g++ make binutils-dev libiberty-dev - name: Initialize CodeQL uses: github/codeql-action/init@v3