Software⏱️ 3 min read📅 2026-06-19

How to Fix: Error in FreeBSD 8.0 Kernel compilation

FreeBSD kernel compilation error, 'struct pcpu' has no member named 'pc_tss', GUCODE32_SEL and GUFS32_SEL undeclared.

Quick Answer: The issue is likely due to missing or outdated dependencies in the FreeBSD 8.0 kernel. Try updating the dependencies using `make clean` and then re-run `make depend`.

Error in FreeBSD 8.0 Kernel compilation occurs when trying to compile the GENERIC kernel or custom kernels with VESA and SC_PIXEL_MODE additions, resulting in errors related to 'struct pcpu' and undeclared macros.

This issue is frustrating because it prevents users from compiling their own custom kernels for FreeBSD 8.0, which can lead to a lack of control over the system's configuration and performance.

🔍 Why This Happens

  • The primary cause of this error is due to the changes made in the amd64 architecture for the 'pc_tss' field in struct pcpu, which was removed in FreeBSD 8.0.
  • Another possible reason for this error is that some macros like GUCODE32_SEL, GUFS32_SEL, and GUGS32_SEL are not declared or defined properly in the kernel compilation process.

🔧 Proven Troubleshooting Steps

Fixing the issue by modifying the GENERIC kernel configuration

  1. Step 1: Edit the GENERIC kernel configuration file (usually located at /usr/src/sys/i386/compile/GENERIC/KERNEL_CONFIG) and remove or comment out any lines that reference 'pc_tss' or the mentioned macros.
  2. Step 2: Save the changes and proceed with the compilation process using the command 'make depend'.
  3. Step 3: If necessary, adjust the kernel configuration to include these macros and re-apply the changes before proceeding.

Alternative fix method for specific modules

  1. Step 1: For VESA module additions, ensure that the VESA drivers are properly installed and configured on your system.
  2. Step 2: Check if there are any other dependencies required by the VESA module and install them using 'pkg_add' or 'pkg_install' commands.

🎯 Final Words

To resolve this issue, it is recommended to modify the GENERIC kernel configuration and adjust the compilation process accordingly. Additionally, ensure that all necessary modules and drivers are properly installed and configured for specific additions like VESA.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions