>Category: devel/boost >Environment: System : OpenBSD 7.9Details : OpenBSD 7.9 (GENERIC.MP) #449: Wed May 6 13:17:25 MDT 2026
[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
Architecture: OpenBSD.amd64 Machine : amd64 >Description:I am trying to build HiPerConTracer (https://www.nntb.no/~dreibh/hipercontracer/) under OpenBSD. This fails with linker error for BOOST iostreams and zstd filter. I tracked down the issue to the following simple test program:
#include <fcntl.h>
#include <sys/stat.h>
#include <boost/iostreams/device/file_descriptor.hpp>
#include <boost/iostreams/filtering_stream.hpp>
#include <boost/iostreams/filter/bzip2.hpp>
#include <boost/iostreams/filter/gzip.hpp>
#include <boost/iostreams/filter/lzma.hpp>
#include <boost/iostreams/filter/zstd.hpp>
int main(int argc, char** argv)
{
int handle = ::open("test.txt.zst", O_CREAT|O_TRUNC|O_WRONLY,
S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
if(handle < 0) {
perror("open()");
return 1;
}
boost::iostreams::filtering_ostream os;
boost::iostreams::file_descriptor_sink sink(handle,
boost::iostreams::file_descriptor_flags::close_handle);
os.push(boost::iostreams::zstd_compressor()); os.push(sink); os << "This is a test!\n"; os.flush(); os.strict_sync(); return 0; }Build of this test program works fine under FreeBSD, NetBSD, and Ubuntu Linux (should work with other Linux variants as well):
clang t1.cc -o t1 -I /usr/local/include/ -I /usr/pkg/include/ -L /usr/local/lib -L /usr/pkg/lib -lboost_iostreams -lstdc++
However, under OpenBSD 7.9: ld: error: undefined symbol: boost::iostreams::zstd::default_compression >>> referenced by t1.cc >>> /tmp/t1-a0cbad.o:(main)ld: error: undefined symbol: boost::iostreams::detail::zstd_base::zstd_base()
>>> referenced by t1.cc>>> /tmp/t1-a0cbad.o:(boost::iostreams::detail::zstd_compressor_impl<std::__1::allocator<char>>::zstd_compressor_impl(boost::iostreams::zstd_params const&))
ld: error: undefined symbol: boost::iostreams::detail::zstd_base::~zstd_base()
>>> referenced by t1.cc>>> /tmp/t1-a0cbad.o:(boost::iostreams::detail::zstd_compressor_impl<std::__1::allocator<char>>::zstd_compressor_impl(boost::iostreams::zstd_params const&))
>>> referenced by t1.cc>>> /tmp/t1-a0cbad.o:(boost::iostreams::detail::zstd_compressor_impl<std::__1::allocator<char>>::~zstd_compressor_impl())
FreeBSD has such a BOOST issue, probably the same, some time ago as well: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=286403 . This was fixed.
>How-To-Repeat: Just try to compile the test program. >Fix:Possibly the same as in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=286403 for FreeBSD.
SENDBUG: Run sendbug as root if this is an ACPI report! SENDBUG: dmesg and usbdevs are attached.SENDBUG: Feel free to delete or use the -D flag if they contain sensitive information.
dmesg: OpenBSD 7.9 (GENERIC.MP) #449: Wed May 6 13:17:25 MDT 2026 [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 4239011840 (4042MB) avail mem = 4083007488 (3893MB) random: good seed from bootblocks mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.5 @ 0xde9fd020 (10 entries) bios0: vendor innotek GmbH version "VirtualBox" date 12/01/2006 bios0: innotek GmbH VirtualBox efi0 at bios0: UEFI 2.7 efi0: EDK II rev 0x10000 acpi0 at bios0: ACPI 4.0 acpi0: sleep states S0 S5 acpi0: tables DSDT FACP APIC SSDT BGRT acpi0: wakeup devices acpitimer0 at acpi0: 3579545 Hz, 32 bits acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor)cpu0: Intel(R) Xeon(R) W-2135 CPU @ 3.70GHz, 3696.22 MHz, 06-55-04, patch 02007006 cpu0: cpuid 1 edx=178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT> ecx=76da3203<SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,RDRAND>
cpu0: cpuid 6 eax=4<ARAT>cpu0: cpuid 7.0 ebx=8c2569<FSGSBASE,BMI1,AVX2,BMI2,INVPCID,RDSEED,ADX,CLFLUSHOPT> edx=30000400<MD_CLEAR,L1DF>
cpu0: cpuid 80000001 edx=28100800<NXE,RDTSCP,LONG> ecx=121<LAHF,ABM,3DNOWP> cpu0: cpuid 80000007 edx=100<ITSC> cpu0: msr 10a=4<RSBA> cpu0: MELTDOWNcpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 1MB 64b/line 16-way L2 cache, 8MB 64b/line 11-way L3 cache
cpu0: smt 0, core 0, package 0, type P mtrr: Pentium Pro MTRR support, 16 var ranges, 88 fixed ranges cpu0: apic clock running at 1000MHz cpu1 at mainbus0: apid 1 (application processor)cpu1: Intel(R) Xeon(R) W-2135 CPU @ 3.70GHz, 3696.55 MHz, 06-55-04, patch 02007006
cpu1: smt 0, core 1, package 0, type P cpu2 at mainbus0: apid 2 (application processor)cpu2: Intel(R) Xeon(R) W-2135 CPU @ 3.70GHz, 3696.43 MHz, 06-55-04, patch 02007006
cpu2: smt 0, core 2, package 0, type P cpu3 at mainbus0: apid 3 (application processor)cpu3: Intel(R) Xeon(R) W-2135 CPU @ 3.70GHz, 3697.08 MHz, 06-55-04, patch 02007006
cpu3: smt 0, core 3, package 0, type P ioapic0 at mainbus0: apid 4 pa 0xfec00000, version 20, 24 pins, remapped acpiprt0 at acpi0: bus 0 (PCI0) acpipci0 at acpi0 PCI0: 0x00000000 0x00000011 0x00000001 "PNP0303" at acpi0 not configured "PNP0F03" at acpi0 not configured acpiac0 at acpi0: AC unit online acpicpu0 at acpi0: C1(@1 halt!) acpicpu1 at acpi0: C1(@1 halt!) acpicpu2 at acpi0: C1(@1 halt!) acpicpu3 at acpi0: C1(@1 halt!) acpivideo0 at acpi0: GFX0 cpu0: using VERW MDS workaround (except on vmm entry) pci0 at mainbus0 bus 0 pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02 pcib0 at pci0 dev 1 function 0 "Intel 82371SB ISA" rev 0x00pciide0 at pci0 dev 1 function 1 "Intel 82371AB IDE" rev 0x01: DMA, channel 0 configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 0: <VBOX HARDDISK> wd0: 128-sector PIO, LBA, 32768MB, 67108864 sectors atapiscsi0 at pciide0 channel 0 drive 1 scsibus1 at atapiscsi0: 2 targets cd0 at scsibus1 targ 0 lun 0: <VBOX, CD-ROM, 1.0> removable wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2 cd0(pciide0:0:1): using PIO mode 4, Ultra-DMA mode 2 atapiscsi1 at pciide0 channel 1 drive 0 scsibus2 at atapiscsi1: 2 targets cd1 at scsibus2 targ 0 lun 0: <VBOX, CD-ROM, 1.0> removable cd1(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2 "VMware SVGA II" rev 0x00 at pci0 dev 2 function 0 not configuredem0 at pci0 dev 3 function 0 "Intel 82540EM" rev 0x02: apic 4 int 19, address 08:00:27:c1:bc:cc
"InnoTek Guest Service" rev 0x00 at pci0 dev 4 function 0 not configuredauich0 at pci0 dev 5 function 0 "Intel 82801AA AC97" rev 0x01: apic 4 int 21, ICH
ac97: codec id 0x83847600 (SigmaTel STAC9700) audio0 at auich0ohci0 at pci0 dev 6 function 0 "Apple Intrepid USB" rev 0x00: apic 4 int 22, version 1.0 piixpm0 at pci0 dev 7 function 0 "Intel 82371AB Power" rev 0x08: apic 4 int 23
iic0 at piixpm0 ehci0 at pci0 dev 11 function 0 "Intel 82801FB USB" rev 0x00: apic 4 int 19 usb0 at ehci0: USB revision 2.0uhub0 at usb0 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
isa0 at pcib0 isadma0 at isa0 pckbc0 at isa0 port 0x60/5 irq 1 irq 12 pckbd0 at pckbc0 (kbd slot) wskbd0 at pckbd0: console keyboard pms0 at pckbc0 (aux slot) wsmouse0 at pms0 mux 0 pcppi0 at isa0 port 0x61 spkr0 at pcppi0 usb1 at ohci0: USB revision 1.0uhub1 at usb1 configuration 1 interface 0 "Apple OHCI root hub" rev 1.00/1.00 addr 1
efifb0 at mainbus0: 2560x1600, 32bpp wsdisplay0 at efifb0 mux 1: console (std, vt100 emulation), using wskbd0 wsdisplay0: screen 1-5 added (std, vt100 emulation) vscsi0 at root scsibus3 at vscsi0: 256 targets softraid0 at root scsibus4 at softraid0: 256 targets root on wd0a (f8587cc9b53868eb.a) swap on wd0b dump on wd0b WARNING: clock gained 2 days WARNING: CHECK AND RESET THE DATE! usbdevs: Controller /dev/usb0: addr 01: 8086:0000 Intel, EHCI root hub high speed, self powered, config 1, rev 1.00 driver: uhub0 Controller /dev/usb1: addr 01: 106b:0000 Apple, OHCI root hub full speed, self powered, config 1, rev 1.00 driver: uhub1 -- Best regards / Mit freundlichen Grüßen / Med vennlig hilsen ======================================================================= Thomas Dreibholz Simula Metropolitan Centre for Digital Engineering Centre for Resilient Networks and Applications Stensberggata 27 0170 Oslo, Norway ----------------------------------------------------------------------- E-Mail:[email protected] Homepage:http://simula.no/people/dreibh =======================================================================
OpenPGP_signature.asc
Description: OpenPGP digital signature
