Grub2-pcbsd compilation errors


I’m currently trying to create a dual booting system with Freebsd and Gentoo, following the blog of Eric McCorkle. The issue I run into is when I try to install grub, when trying to build grub2-pcbsd as a dependency from ports, I get a compilation error. I do use TrueOS as well as FreeBSD but I thought that since the port relates to pcbsd I would post here first. Although I’m not sure this is the correct forum. My apologies if it is.

Thank you,


===> Building for grub2-pcbsd-2.02q_13
gmake[2]: Entering directory ‘/usr/ports/sysutils/grub2-pcbsd/work/grub-2.02’
gmake all-recursive
gmake[3]: Entering directory ‘/usr/ports/sysutils/grub2-pcbsd/work/grub-2.02’
Making all in grub-core/gnulib
gmake[4]: Entering directory ‘/usr/ports/sysutils/grub2-pcbsd/work/grub-2.02/grub-core/gnulib’
gmake all-recursive
gmake[5]: Entering directory ‘/usr/ports/sysutils/grub2-pcbsd/work/grub-2.02/grub-core/gnulib’
gmake[6]: Entering directory ‘/usr/ports/sysutils/grub2-pcbsd/work/grub-2.02/grub-core/gnulib’
gmake[6]: Nothing to be done for ‘all-am’.
gmake[6]: Leaving directory ‘/usr/ports/sysutils/grub2-pcbsd/work/grub-2.02/grub-core/gnulib’
gmake[5]: Leaving directory ‘/usr/ports/sysutils/grub2-pcbsd/work/grub-2.02/grub-core/gnulib’
gmake[4]: Leaving directory ‘/usr/ports/sysutils/grub2-pcbsd/work/grub-2.02/grub-core/gnulib’
Making all in .
gmake[4]: Entering directory ‘/usr/ports/sysutils/grub2-pcbsd/work/grub-2.02’
gmake[4]: Leaving directory ‘/usr/ports/sysutils/grub2-pcbsd/work/grub-2.02’
Making all in grub-core
gmake[4]: Entering directory ‘/usr/ports/sysutils/grub2-pcbsd/work/grub-2.02/grub-core’
gmake all-am
gmake[5]: Entering directory ‘/usr/ports/sysutils/grub2-pcbsd/work/grub-2.02/grub-core’
rm -f efiemu32.o
rm -f efiemu32.o.bin
gcc8 -DHAVE_CONFIG_H -I…/grub-core/efiemu/runtime -DGRUB_FILE=“efiemu/runtime/efiemu.c” -I. -I. -I… -I… -I…/include -I…/include -I…/grub-core/lib/libgcrypt-grub/src/ -m32 -Wall -Werror -nostdlib -static -O2 -c -o efiemu32.o.bin efiemu/runtime/efiemu.c
In file included from efiemu/runtime/efiemu.c:33:
…/include/grub/efiemu/runtime.h:36:1: error: alignment 1 of ‘struct efi_variable’ is less than 8 [-Werror=packed-not-aligned]
cc1: all warnings being treated as errors
gmake[5]: *** [Makefile:44112: efiemu32.o] Error 1
gmake[5]: Leaving directory ‘/usr/ports/sysutils/grub2-pcbsd/work/grub-2.02/grub-core’
gmake[4]: *** [Makefile:23964: all] Error 2
gmake[4]: Leaving directory ‘/usr/ports/sysutils/grub2-pcbsd/work/grub-2.02/grub-core’
gmake[3]: *** [Makefile:11089: all-recursive] Error 1
gmake[3]: Leaving directory ‘/usr/ports/sysutils/grub2-pcbsd/work/grub-2.02’
gmake[2]: *** [Makefile:3479: all] Error 2
gmake[2]: Leaving directory ‘/usr/ports/sysutils/grub2-pcbsd/work/grub-2.02’
*** Error code 1

make[1]: stopped in /usr/ports/sysutils/grub2-pcbsd
*** Error code 1

make: stopped in /usr/ports/sysutils/grub2-pcbsd


—<<BOOT>>— Copyright © 1992-2018 The FreeBSD Project. Copyright © 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 12.0-RELEASE r341666 GENERIC amd64 FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1) VT(efifb): resolution 1024x768 CPU: Intel® Core™ i5-4200U CPU @ 1.60GHz (2294.74-MHz K8-class CPU) Origin=“GenuineIntel” Id=0x40651 Family=0x6 Model=0x45 Stepping=1 Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE> Features2=0x7fdafbbf<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,SDBG,FMA,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,MOVBE,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND> AMD Features=0x2c100800<SYSCALL,NX,Page1GB,RDTSCP,LM> AMD Features2=0x21<LAHF,ABM> Structured Extended Features=0x27ab<FSGSBASE,TSCADJ,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,NFPUSG> XSAVE Features=0x1<XSAVEOPT> VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID TSC: P-state invariant, performance statistics real memory = 8589934592 (8192 MB) avail memory = 7669604352 (7314 MB) Event timer “LAPIC” quality 600 ACPI APIC Table: <ASUS Notebook> FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs FreeBSD/SMP: 1 package(s) x 2 core(s) x 2 hardware threads random: unblocking device. ioapic0 <Version 2.0> irqs 0-39 on motherboard Launching APs: 1 2 3 Timecounter “TSC-low” frequency 1147369067 Hz quality 1000 random: entropy device external interface kbd1 at kbdmux0 netmap: loaded module [ath_hal] loaded module_register_init: MOD_LOAD (vesa, 0xffffffff810f9770, 0) error 19 random: registering fast source Intel Secure Key RNG random: fast provider: “Intel Secure Key RNG” nexus0 efirtc0: <EFI Realtime Clock> on motherboard efirtc0: registered as a time-of-day clock, resolution 1.000000s cryptosoft0: <software crypto> on motherboard acpi0: <ASUS Notebook> on motherboard acpi_ec0: <Embedded Controller: GPE 0xa, ECDT> port 0x62,0x66 on acpi0 acpi0: Power Button (fixed) cpu0: <ACPI CPU> on acpi0 hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0 Timecounter “HPET” frequency 14318180 Hz quality 950 Event timer “HPET” frequency 14318180 Hz quality 550 Event timer “HPET1” frequency 14318180 Hz quality 440 Event timer “HPET2” frequency 14318180 Hz quality 440 Event timer “HPET3” frequency 14318180 Hz quality 440 Event timer “HPET4” frequency 14318180 Hz quality 440 atrtc0: <AT realtime clock> port 0x70-0x77 irq 8 on acpi0 atrtc0: Warning: Couldn’t map I/O. atrtc0: registered as a time-of-day clock, resolution 1.000000s Event timer “RTC” frequency 32768 Hz quality 0 attimer0: <AT timer> port 0x40-0x43,0x50-0x53 irq 0 on acpi0 Timecounter “i8254” frequency 1193182 Hz quality 0 Event timer “i8254” frequency 1193182 Hz quality 100 Timecounter “ACPI-fast” frequency 3579545 Hz quality 900 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1808-0x180b on acpi0 pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0 pci0: <ACPI PCI bus> on pcib0 vgapci0: <VGA-compatible display> port 0xf000-0xf03f mem 0xf7400000-0xf77fffff,0xd0000000-0xdfffffff irq 16 at device 2.0 on pci0 vgapci0: Boot video device hdac0: <Intel Haswell HDA Controller> mem 0xf7a1c000-0xf7a1ffff irq 16 at device 3.0 on pci0 xhci0: <Intel Panther Point USB 3.0 controller> mem 0xf7a00000-0xf7a0ffff irq 16 at device 20.0 on pci0 xhci0: 32 bytes context size, 64-bit DMA xhci0: Port routing mask set to 0xffffffff usbus0 on xhci0 usbus0: 5.0Gbps Super Speed USB v3.0 pci0: <simple comms> at device 22.0 (no driver attached) hdac1: <Intel Lynx Point-LP HDA Controller> mem 0xf7a18000-0xf7a1bfff irq 22 at device 27.0 on pci0 pcib1: <ACPI PCI-PCI bridge> irq 16 at device 28.0 on pci0 pci1: <ACPI PCI bus> on pcib1 pcib2: <ACPI PCI-PCI bridge> irq 18 at device 28.2 on pci0 pci2: <ACPI PCI bus> on pcib2 alc0: <Atheros AR8171 PCIe Gigabit Ethernet> port 0xe000-0xe07f mem 0xf7900000-0xf793ffff irq 18 at device 0.0 on pci2 alc0: 11776 Tx FIFO, 12032 Rx FIFO alc0: Using 1 MSIX message(s). alc0: 4GB boundary crossed, switching to 32bit DMA addressing mode. miibus0: <MII bus> on alc0 atphy0: <Atheros F1 10/100/1000 PHY> PHY 0 on miibus0 atphy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto, auto-flow alc0: Using defaults for TSO: 65518/35/2048 alc0: Ethernet address: 10:c3:7b:5b:79:45 pcib3: <ACPI PCI-PCI bridge> irq 19 at device 28.3 on pci0 pci3: <ACPI PCI bus> on pcib3 ath0: <Atheros AR9485> mem 0xf7800000-0xf787ffff irq 19 at device 0.0 on pci3 ar9300_flash_map: unimplemented for now Restoring Cal data from DRAM Restoring Cal data from EEPROM Restoring Cal data from Flash Restoring Cal data from Flash Restoring Cal data from OTP ar9300_hw_attach: ar9300_eeprom_attach returned 0 ath0: [HT] enabling HT modes ath0: [HT] enabling short-GI in 20MHz mode ath0: [HT] 1 stream STBC receive enabled ath0: [HT] 1 RX streams; 1 TX streams ath0: AR9485 mac 576.1 RF5110 phy 2457.9 ath0: 2GHz radio: 0x0000; 5GHz radio: 0x0000 pcib4: <ACPI PCI-PCI bridge> irq 16 at device 28.4 on pci0 pci4: <ACPI PCI bus> on pcib4 vgapci1: <VGA-compatible display> port 0xd000-0xd07f mem 0xf6000000-0xf6ffffff,0xe0000000-0xefffffff,0xf0000000-0xf1ffffff irq 16 at device 0.0 on pci4 ehci0: <Intel Lynx Point LP USB 2.0 controller USB> mem 0xf7a23000-0xf7a233ff irq 23 at device 29.0 on pci0 usbus1: EHCI version 1.0 usbus1 on ehci0 usbus1: 480Mbps High Speed USB v2.0 isab0: <PCI-ISA bridge> at device 31.0 on pci0 isa0: <ISA bus> on isab0 ahci0: <Intel Lynx Point-LP AHCI SATA controller> port 0xf0b0-0xf0b7,0xf0a0-0xf0a3,0xf090-0xf097,0xf080-0xf083,0xf060-0xf07f mem 0xf7a22000-0xf7a227ff irq 19 at device 31.2 on pci0 ahci0: AHCI v1.30 with 4 6Gbps ports, Port Multiplier not supported ahcich0: <AHCI channel> at channel 0 on ahci0 ahcich1: <AHCI channel> at channel 1 on ahci0 acpi_lid0: <Control Method Lid Switch> on acpi0 acpi_button0: <Sleep Button> on acpi0 acpi_tz0: <Thermal Zone> on acpi0 acpi_acad0: <AC Adapter> on acpi0 battery0: <ACPI Control Method Battery> on acpi0 atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0 atkbd0: <AT Keyboard> irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] psm0: <PS/2 Mouse> irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: model Generic PS/2 mouse, device ID 0 est0: <Enhanced SpeedStep Frequency Control> on cpu0 ZFS filesystem version: 5 ZFS storage pool version: features support (5000) Timecounters tick every 1.000 msec hdacc0: <Intel Haswell HDA CODEC> at cad 0 on hdac0 hdaa0: <Intel Haswell Audio Function Group> at nid 1 on hdacc0 hdacc1: <Conexant CX20751/2 HDA CODEC> at cad 0 on hdac1 hdaa1: <Conexant CX20751/2 Audio Function Group> at nid 1 on hdacc1 pcm0: <Conexant CX20751/2 (Analog)> at nid 23 and 26 on hdaa1 pcm1: <Conexant CX20751/2 (Right Analog)> at nid 22 and 25 on hdaa1 ugen1.1: <Intel EHCI root HUB> at usbus1 ugen0.1: <0x8086 XHCI root HUB> at usbus0 uhub0: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1 uhub1: <0x8086 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0 ada0 at ahcich0 bus 0 scbus0 target 0 lun 0 ada0: <Hitachi HTS545050A7E380 GG2OA6C0> ATA8-ACS SATA 2.x device ada0: Serial Number TE851349CW5VNR ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes) ada0: Command Queueing enabled ada0: 476940MB (976773168 512 byte sectors) ada0: quirks=0x1<4K> cd0 at ahcich1 bus 0 scbus1 target 0 lun 0 cd0: <MATSHITA DVD-RAM UJ8E2 S 1.00> Removable CD-ROM SCSI device cd0: Serial Number H090 310793 cd0: 150.000MB/s transfers (SATA 1.x, UDMA6, ATAPI 12bytes, PIO 8192bytes) cd0: 2402MB (1230208 2048 byte sectors) Trying to mount root from zfs:inferno/freebsd []… uhub1: 13 ports with 13 removable, self powered uhub0: 2 ports with 2 removable, self powered ugen1.2: <vendor 0x8087 product 0x8000> at usbus1 uhub2 on uhub0 uhub2: <vendor 0x8087 product 0x8000, class 9/0, rev 2.00/0.04, addr 2> on usbus1 uhub2: 8 ports with 8 removable, self powered ugen1.3: <Atheros Communications Bluetooth USB Host Controller> at usbus1 ugen1.4: <Chicony Electronics Co.,Ltd. USB2.0 HD UVC WebCam> at usbus1 ugen1.5: <vendor 0x138a product 0x0010> at usbus1 info: [drm] Initialized drm 1.1.0 20060810 drmn0: ======================================================= drmn0: This code is obsolete abandonware. Install the graphics/drm-legacy-kmod pkg drmn0: ======================================================= drmn0: Deprecated code (to be removed in FreeBSD 13): drm2 drivers drmn0: ======================================================= drmn0: This code is obsolete abandonware. Install the graphics/drm-legacy-kmod pkg drmn0: ======================================================= drmn0: Deprecated code (to be removed in FreeBSD 13): drm2 drivers drmn0: <Intel Haswell (ULT GT2 mobile)> on vgapci0 info: [drm] Memory usable by graphics device = 2048M info: [drm] MTRR allocation failed. Graphics performance may suffer. intel_iicbb0 on drmn0 iicbus0: <Philips I2C bus>error: [drm:pid14870:i915_write32] ERROR Unknown unclaimed register before writing to c5100 on iicbb0 addr 0xff iic0: <I2C generic I/O> on iicbus0 iicbus1: <Philips I2C bus> on intel_gmbus0 iic1: <I2C generic I/O> on iicbus1 intel_iicbb1 on drmn0 iicbus2: <Philips I2C bus> on iicbb1 addr 0xff iic2: <I2C generic I/O> on iicbus2 iicbus3: <Philips I2C bus> on intel_gmbus1 iic3: <I2C generic I/O> on iicbus3 intel_iicbb2 on drmn0 iicbus4: <Philips I2C bus> on iicbb2 addr 0xff iic4: <I2C generic I/O> on iicbus4 iicbus5: <Philips I2C bus> on intel_gmbus2 iic5: <I2C generic I/O> on iicbus5 intel_iicbb3 on drmn0 iicbus6: <Philips I2C bus> on iicbb3 addr 0xff iic6: <I2C generic I/O> on iicbus6 iicbus7: <Philips I2C bus> on intel_gmbus3 iic7: <I2C generic I/O> on iicbus7 intel_iicbb4 on drmn0 iicbus8: <Philips I2C bus> on iicbb4 addr 0xff iic8: <I2C generic I/O> on iicbus8 iicbus9: <Philips I2C bus> on intel_gmbus4 iic9: <I2C generic I/O> on iicbus9 intel_iicbb5 on drmn0 iicbus10: <Philips I2C bus> on iicbb5 addr 0xff iic10: <I2C generic I/O> on iicbus10 iicbus11: <Philips I2C bus> on intel_gmbus5 iic11: <I2C generic I/O> on iicbus11 info: [drm] MSI enabled 1 message(s) info: [drm] Supports vblank timestamp caching Rev 1 (10.10.2010). info: [drm] Driver supports precise vblank timestamp query. drm_iic_dp_aux0 on drmn0 drm_iic_dp_aux1 on drmn0 drm_iic_dp_aux2 on drmn0 drmn0: taking over the fictitious range 0xd0000000-0xe0000000 info: [drm] Connector eDP-1: get mode from tunables: info: [drm] - kern.vt.fb.modes.eDP-1 info: [drm] - kern.vt.fb.default_mode info: [drm] Connector HDMI-A-1: get mode from tunables: info: [drm] - kern.vt.fb.modes.HDMI-A-1 info: [drm] - kern.vt.fb.default_mode info: [drm] Connector DP-1: get mode from tunables: info: [drm] - kern.vt.fb.modes.DP-1 info: [drm] - kern.vt.fb.default_mode info: [drm] Connector HDMI-A-2: get mode from tunables: info: [drm] - kern.vt.fb.modes.HDMI-A-2 info: [drm] - kern.vt.fb.default_mode info: [drm] Connector DP-2: get mode from tunables: info: [drm] - kern.vt.fb.modes.DP-2 info: [drm] - kern.vt.fb.default_mode fbd0 on drmn0 VT: Replacing driver “efifb” with new “fb”. drmn0: More than 8 outputs detected info: [drm] Initialized i915 1.6.0 20080730 for drmn0 on minor 0 wlan0: Ethernet address: 6c:71:d9:29:be:f1 lo0: link state changed to UP info: [drm] Enabling RC6 states: RC6 on, RC6p off, RC6pp off wlan0: link state changed to UP


i know, when the devs left pcBSD and started trueos. They pretty much dropped support for grub, only using EFI.

maybe search the threads?


That is my issue, grub2-efi has grub2-pcbsd as a dependency. I’ll take a look and see what I can find though. Thx.


pcbsd has been depreciated for 5+ years :frowning:


My apologies, I miss understood your post.


I’m assuming this is the Blog post you are following?

That blog is from 3 years ago and from what I understand the whole PC-BSD tool chain has been deprecated.

Presumably his instructions might still work, but he is using FreeBSD not Trident.