Checklist
What happened?
at commit
commit 0c7c85e (origin/master, origin/HEAD)
Author: OBattler oubattler@gmail.com
Date: Sun Mar 9 02:18:18 2025 +0100
ACPI: Do not raise or lower IRQ if IRQ line is set to IRQ 0.
I try to build 86Box for NetBSD again and apart from two build fixes and stray -latomic in link.txt file (may be coming from pkgconfig for libpng?) it builds but then ...
Reading symbols from src/86Box...
(gdb) r
Starting program: /home/guest/src/86Box/build/src/86Box
[New LWP 10119 of process 244]
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-guest'
#
# 86Box v4.3 logfile, created 2025/03/09 23:38:33
#
# VM: build
#
# Emulator path: /home/guest/src/86Box/build/src/
# Userfiles path: /home/guest/src/86Box/build/
# ROM path: /home/guest/src/86Box/build/roms/
# ROM path: /home/guest/src/86Box/build/src/roms/
# ROM path: /home/guest/.local/share/86Box/roms/
# ROM path: /usr/pkg/share/86Box/roms/
# ROM path: /usr/local/share/86Box/roms/
# ROM path: /usr/share/86Box/roms/
# Configuration file: /home/guest/src/86Box/build/86box.cfg
#
GDB Stub: Listening on port 12345
[New LWP 12118 of process 244]
Qt: version 5.15.16, platform "xcb"
[New LWP 3301 of process 244]
[New LWP 714 of process 244]
[New LWP 21566 of process 244]
[New LWP 4918 of process 244]
Thread 1 "" received signal SIGSEGV, Segmentation fault.
0x0000000000afe8ff in codegen_addbyte2 (block=0x78184687ffc0, vala=137 '�',
valb=241 '�')
at /home/guest/src/86Box/src/codegen_new/codegen_backend_x86-64_ops_helpers.h:21
21 block_write_data[block_pos++] = vala;
(gdb) thread apply all bt full
Thread 7 (LWP 4918 of process 244 ""):
#0 0x00007818428a8e7a in ___lwp_park60 () from /usr/lib/libc.so.12
No symbol table info available.
#1 0x0000781848c0b1ed in pthread_cond_timedwait () from /usr/lib/libpthread.so.1
No symbol table info available.
#2 0x0000781846ea5870 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () from /usr/pkg/qt5/lib//libQt5Core.so.5
No symbol table info available.
#3 0x0000781846ea3edd in QThreadPoolThread::run() () from /usr/pkg/qt5/lib//libQt5Core.so.5
No symbol table info available.
#4 0x0000781846ea05d2 in QThreadPrivate::start(void*) () from /usr/pkg/qt5/lib//libQt5Core.so.5
No symbol table info available.
#5 0x0000781848c0c89f in pthread.create_tramp () from /usr/lib/libpthread.so.1
No symbol table info available.
#6 0x00007818428930e0 in ?? () from /usr/lib/libc.so.12
No symbol table info available.
#7 0x0000000000200000 in ?? ()
No symbol table info available.
#8 0x0000000000000000 in ?? ()
--Type <RET> for more, q to quit, c to continue without paging--
No symbol table info available.
Thread 6 (LWP 21566 of process 244 ""):
#0 0x00007818428a8e7a in ___lwp_park60 () from /usr/lib/libc.so.12
No symbol table info available.
#1 0x0000781848c0b1ed in pthread_cond_timedwait () from /usr/lib/libpthread.so.1
No symbol table info available.
#2 0x0000781846ea5870 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () from /usr/pkg/qt5/lib//libQt5Core.so.5
No symbol table info available.
#3 0x0000781846ea3edd in QThreadPoolThread::run() () from /usr/pkg/qt5/lib//libQt5Core.so.5
No symbol table info available.
#4 0x0000781846ea05d2 in QThreadPrivate::start(void*) () from /usr/pkg/qt5/lib//libQt5Core.so.5
No symbol table info available.
#5 0x0000781848c0c89f in pthread.create_tramp () from /usr/lib/libpthread.so.1
No symbol table info available.
#6 0x00007818428930e0 in ?? () from /usr/lib/libc.so.12
No symbol table info available.
#7 0x0000000000200000 in ?? ()
No symbol table info available.
--Type <RET> for more, q to quit, c to continue without paging--
#8 0x0000000000000000 in ?? ()
No symbol table info available.
Thread 5 (LWP 714 of process 244 ""):
#0 0x00007818428a8e7a in ___lwp_park60 () from /usr/lib/libc.so.12
No symbol table info available.
#1 0x0000781848c0b1ed in pthread_cond_timedwait () from /usr/lib/libpthread.so.1
No symbol table info available.
#2 0x0000781846ea5870 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () from /usr/pkg/qt5/lib//libQt5Core.so.5
No symbol table info available.
#3 0x0000781846ea3edd in QThreadPoolThread::run() () from /usr/pkg/qt5/lib//libQt5Core.so.5
No symbol table info available.
#4 0x0000781846ea05d2 in QThreadPrivate::start(void*) () from /usr/pkg/qt5/lib//libQt5Core.so.5
No symbol table info available.
#5 0x0000781848c0c89f in pthread.create_tramp () from /usr/lib/libpthread.so.1
No symbol table info available.
#6 0x00007818428930e0 in ?? () from /usr/lib/libc.so.12
No symbol table info available.
#7 0x0000000000000000 in ?? ()
--Type <RET> for more, q to quit, c to continue without paging--
No symbol table info available.
Thread 4 (LWP 3301 of process 244 ""):
#0 0x00007818428a8e7a in ___lwp_park60 () from /usr/lib/libc.so.12
No symbol table info available.
#1 0x0000781848c0b1ed in pthread_cond_timedwait () from /usr/lib/libpthread.so.1
No symbol table info available.
#2 0x0000781846ea5870 in QWaitCondition::wait(QMutex*, QDeadlineTimer) () from /usr/pkg/qt5/lib//libQt5Core.so.5
No symbol table info available.
#3 0x0000781846ea3edd in QThreadPoolThread::run() () from /usr/pkg/qt5/lib//libQt5Core.so.5
No symbol table info available.
#4 0x0000781846ea05d2 in QThreadPrivate::start(void*) () from /usr/pkg/qt5/lib//libQt5Core.so.5
No symbol table info available.
#5 0x0000781848c0c89f in pthread.create_tramp () from /usr/lib/libpthread.so.1
No symbol table info available.
#6 0x00007818428930e0 in ?? () from /usr/lib/libc.so.12
No symbol table info available.
#7 0x00010102464c457f in ?? ()
No symbol table info available.
--Type <RET> for more, q to quit, c to continue without paging--
#8 0x0000000000000000 in ?? ()
No symbol table info available.
Thread 3 (LWP 12118 of process 244 "gdbstub_server_"):
#0 0x000078184284773a in accept () from /usr/lib/libc.so.12
No symbol table info available.
#1 0x0000781848c07db0 in accept () from /usr/lib/libpthread.so.1
No symbol table info available.
#2 0x0000000000461fd3 in gdbstub_server_thread (priv=0x0) at /home/guest/src/86Box/src/gdbstub.c:1629
client = 0x781848f7adc0
sl = 16
#3 0x000000000045e74d in operator() (__closure=0x781849a36428) at /home/guest/src/86Box/src/thread.cpp:21
name = 0xc63270 "gdbstub_server_thread"
param = 0x0
thread_rout = 0x461f4e <gdbstub_server_thread>
#4 0x000000000045eec6 in std::__invoke_impl<void, thread_create_named(void (*)(void*), void*, char const*)::<lambda()> >(std::__invoke_other, struct {...} &&) (__f=...) at /usr/include/g++/bits/invoke.h:60
No locals.
#5 0x000000000045ee75 in std::__invoke<thread_create_named(void (*)(void*), void*, char const*)::<lambda()> >(struct {...} &&) (__fn=...) at /usr/include/g++/b--Type <RET> for more, q to quit, c to continue without paging--
its/invoke.h:95
No locals.
#6 0x000000000045ee1c in std::thread::_Invoker<std::tuple<thread_create_named(void (*)(void*), void*, char const*)::<lambda()> > >::_M_invoke<0>(std::_Index_tuple<0>) (this=0x781849a36428) at /usr/include/g++/thread:264
No locals.
#7 0x000000000045edee in std::thread::_Invoker<std::tuple<thread_create_named(void (*)(void*), void*, char const*)::<lambda()> > >::operator()(void) (this=0x781849a36428) at /usr/include/g++/thread:271
No locals.
#8 0x000000000045edd0 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<thread_create_named(void (*)(void*), void*, char const*)::<lambda()> > > >::_M_run(void) (this=0x781849a36420) at /usr/include/g++/thread:215
No locals.
#9 0x00007818436af44c in execute_native_thread_routine () from /usr/lib/libstdc++.so.9
No symbol table info available.
#10 0x0000781848c0c89f in pthread.create_tramp () from /usr/lib/libpthread.so.1
No symbol table info available.
#11 0x00007818428930e0 in ?? () from /usr/lib/libc.so.12
No symbol table info available.
#12 0x00010102464c457f in ?? ()
No symbol table info available.
--Type <RET> for more, q to quit, c to continue without paging--
#13 0x0000000000000000 in ?? ()
No symbol table info available.
Thread 2 (LWP 10119 of process 244 ""):
#0 0x000078184284745a in poll () from /usr/lib/libc.so.12
No symbol table info available.
#1 0x0000781848c08402 in poll () from /usr/lib/libpthread.so.1
No symbol table info available.
#2 0x0000781845e1915d in _xcb_conn_wait () from /usr/X11R7/lib/libxcb.so.2
No symbol table info available.
#3 0x0000781845e17b48 in xcb_wait_for_event () from /usr/X11R7/lib/libxcb.so.2
No symbol table info available.
#4 0x000078182e45c8dc in QXcbEventQueue::run() () from /usr/pkg/qt5/lib//libQt5XcbQpa.so.5
No symbol table info available.
#5 0x0000781846ea05d2 in QThreadPrivate::start(void*) () from /usr/pkg/qt5/lib//libQt5Core.so.5
No symbol table info available.
#6 0x0000781848c0c89f in pthread.create_tramp () from /usr/lib/libpthread.so.1
No symbol table info available.
#7 0x00007818428930e0 in ?? () from /usr/lib/libc.so.12
No symbol table info available.
#8 0x00010102464c457f in ?? ()
--Type <RET> for more, q to quit, c to continue without paging--
No symbol table info available.
#9 0x0000000000000000 in ?? ()
No symbol table info available.
Thread 1 (LWP 244 of process 244 ""):
#0 0x0000000000afe8ff in codegen_addbyte2 (block=0x78184687ffc0, vala=137 '�', valb=241 '�') at /home/guest/src/86Box/src/codegen_new/codegen_backend_x86-64_ops_helpers.h:21
No locals.
#1 0x0000000000b021fb in host_x86_MOV32_REG_REG (block=0x78184687ffc0, dst_reg=1, src_reg=6) at /home/guest/src/86Box/src/codegen_new/codegen_backend_x86-64_ops.c:1018
No locals.
#2 0x0000000000afd7b3 in build_load_routine (block=0x78184687ffc0, size=1, is_float=0) at /home/guest/src/86Box/src/codegen_new/codegen_backend_x86-64.c:98
branch_offset = 0x0
misaligned_offset = 0x0
#3 0x0000000000afdf2f in build_loadstore_routines (block=0x78184687ffc0) at /home/guest/src/86Box/src/codegen_new/codegen_backend_x86-64.c:259
No locals.
#4 0x0000000000afe4a0 in codegen_backend_init () at /home/guest/src/86Box/src/codegen_new/codegen_backend_x86-64.c:306
block = 0x78184687ffc0
--Type <RET> for more, q to quit, c to continue without paging--
c = 16384
#5 0x0000000000abc757 in codegen_init () at /home/guest/src/86Box/src/codegen_new/codegen_block.c:222
No locals.
#6 0x000000000042cbc1 in pc_init_modules () at /home/guest/src/86Box/src/86box.c:1064
c = 374
m = 390
temp = L"\000\000\001\000\x49ff4678\x7818\x4a0166c0\x7818\xe90083ea\x7f7f\001\x7818\x47e55431\x7818\x4a017400\x7818\xff44ad88\x7f7f\000\000\xe900815e\x7f7f\001\x7f7f\000\000\003\x7818\000\000\000\x7818\xe900889f\x7f7f\xff44ad90\x7f7f\xff44ae30\x7f7f\xff44aea8\x7f7f\000\000\001\000\x49ff28a8\x7818\x4a016400\x7818\xe90083ea\x7f7f\x4a014c00\x7818\x40f5d1\000\x4a017000\x7818\xff44ae28\x7f7f\x2e403868\x7818\xff44ae30\x7f7f\xff44ae78\x7f7f\001\000\xff44aea8\x7f7f\x40f5d1\000\x405d90\000\xe900889f\x7f7f\xff44ae30\x7f7f\x4a012000\x7818\x4a012400\x7818\x4a012800\x7818\x4a012c00\x7818\x4a014000\x7818\x4a014400\x7818\x4a014800\x7818\x4a014c00\x7818\x4a017000\x7818\x420036\x78006f\x67002d\x610072\x400079\x780032\x69002e\x6f0063\x2f40ccc0\x7818\x4a017000\x7818\x2f402cb8\x7818\x2f400980\x7818\001\002\035\000\x2f402850\x7818\x2f407d01\x7818\006\x7818\x5ef0\000\x5f30\000\x2f400980\x7818\x2f400980\x7818\x2f4068b0\x7818\x49fe70e0\x7818\x4a014400\x7818\x49fe70e0\x7818\x42de03c0\x7818\x49fe7108\x7818\000\000\x49fe7108\x7818\xff44aa50\x7f7f\x428dbd2e\x7818\000\000\x49fdbf28\x7818\530\000\xff44ac98\x7f7f\x42bd8cf8\x7818\x428d7200\x7818\x2f402608\x7818\x2f400980\x7818\x246\000\x2f40cfc0\x7818\xdf--Type <RET> for more, q to quit, c to continue without paging--
77f15d\xa6114728\x40a15d82\x54f87e10\x49391aa0\x7818\x428da85d\x7818\xff44ac98\x7f7f\x29000\000\x10000\000\x3a16000\x8b0\xff44ac50\x7f7f\x428dc081\x7818\xff44aa9f\x7f7f\b\000\024\000\b\000\xff44ab90\x7f7f\a\000"...
tempc = "^�\000�\177\177\000\000\340p\376I\030x\000\000\300\003\336B\030x\000\000\bq\376I\030x\000\000\000\000\000\000\000\000\000\000\bq\376I\030x\000\000@\246D\377\177\177\000\000.\275�B\030x\000\000\340\253D\377\177\177\000\000X\254D\377\177\177\000\000\000\000\000\000\000\000\000\000\230\250D\377\177\177\000\000HH\376I\030x\000\000\000d\001J\030x\000\000\b&@/\030x\000\000�\t@/\030x\000\000,\023 (\030x\000\000\300\315@/\030x\000\000G\020\060�\017?9.h�\340\376&<�\274\340\253D\377\177\177\000\000]\250�B\030x\000\000\230\250D\377\177\177\000\000\000P\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000"...
#7 0x0000000000b19681 in main (argc=1, argv=0x7f7fff44b2d8) at /home/guest/src/86Box/src/qt/qt_main.cpp:543
app = <incomplete type>
fmt = {static staticMetaObject = {d = {superdata = {direct = 0x0}, stringdata = 0x781847a70360 <qt_meta_stringdata_QSurfaceFormat>, data = 0x781847a70220 <qt_meta_data_QSurfaceFormat>, static_metacall = 0x0, relatedMetaObjects = 0x0, extradata = 0x0}}, d = 0x781849a330c0}
startMaximized = false
socket = {<QLocalSocket> = {<No data fields>}, static staticMetaObject = {d = {superdata = {direct = 0x781849389b00 <QLocalSocket::staticMetaObject>}, stringdata = 0x11c90a0 <qt_meta_stringdata_UnixManagerSocket>, data = 0x11c9220 <qt_meta_data_UnixManagerSocket>, static_metacall = 0xb2815e <UnixManagerSocket::--Type <RET> for more, q to quit, c to continue without paging--
qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}}
onesec = <incomplete type>
ret = 32639
I tried to set old dynrec and it segfaulted in libc. Tried to turn off cppthread and build failed to link. Any idea that this can be?
Configuration file
[General]
dpi_scale = 0
host_cpu = Unknown
update_icons = 0
uuid = 0ca30966-670e-5167-b846-63d6a3d3e309
vid_renderer = qt_opengl3
[Machine]
cpu_family = celeron_mendocino
cpu_multi = 1
cpu_speed = 66666666
cpu_use_dynarec = 1
fpu_type = internal
machine = s370slm
mem_size = 8192
[Video]
gfxcard = mirocrystal20sv_pci
[Input devices]
mouse_type = none
[Network]
net_01_link = 0
net_02_link = 0
net_03_link = 0
net_04_link = 0
[Storage controllers]
fdc = none
hdc = none
[S3 Vision964 PCI (MiroCRYSTAL 20SV)]
memory = 2
Operating system
NetBSD 10.1 amd64
86Box version
commit 0c7c85e
Build architecture
Linux - x64 (64-bit)
Build type
Additional context
patches
cat ../netbsd-try2/0001-NetBSD-build-fixes.patch
From a03c4c2f0090d14c34cb08185a8b64a2967863a4 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <randrianasulu@gmail.com>
Date: Sun, 9 Mar 2025 16:30:42 +0300
Subject: [PATCH 1/2] NetBSD build fixes
---
src/include/86box/bswap.h | 5 +++--
src/qt/qt_platform.cpp | 2 +-
src/unix/unix_serial_passthrough.c | 3 ++-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/include/86box/bswap.h b/src/include/86box/bswap.h
index 37c846d59..cb7469205 100644
--- a/src/include/86box/bswap.h
+++ b/src/include/86box/bswap.h
@@ -35,7 +35,6 @@
* USA.
*/
-#ifndef __NetBSD__
#ifndef BSWAP_H
#define BSWAP_H
@@ -62,6 +61,8 @@
(((x) & 0x00ff000000000000ull) >> 40) | \
(((x) & 0xff00000000000000ull) >> 56)))
+#ifndef __NetBSD__
+
static __inline uint16_t
bswap16(uint16_t x)
{
@@ -91,6 +92,7 @@ bswap64(uint64_t x)
return bswap_16(x);
#endif
}
+#endif /* netbsd */
static __inline void
bswap16s(uint16_t *s)
@@ -242,4 +244,3 @@ cpu_to_be32wu(uint32_t *p, uint32_t v)
#endif /*BSWAP_H*/
-#endif
diff --git a/src/qt/qt_platform.cpp b/src/qt/qt_platform.cpp
index 561c94d8a..4dd0ea457 100644
--- a/src/qt/qt_platform.cpp
+++ b/src/qt/qt_platform.cpp
@@ -820,7 +820,7 @@ plat_set_thread_name(void *thread, const char *name)
# if defined(Q_OS_DARWIN)
pthread_setname_np(truncated);
# elif defined(Q_OS_NETBSD)
- pthread_setname_np(thread ? *((pthread_t *) thread) : pthread_self(), truncated, "%s");
+ pthread_setname_np(thread ? *((pthread_t *) thread) : pthread_self(), "%s", truncated);
# elif defined(Q_OS_OPENBSD)
pthread_set_name_np(thread ? *((pthread_t *) thread) : pthread_self(), truncated);
# else
diff --git a/src/unix/unix_serial_passthrough.c b/src/unix/unix_serial_passthrough.c
index a12346013..39cf7d867 100644
--- a/src/unix/unix_serial_passthrough.c
+++ b/src/unix/unix_serial_passthrough.c
@@ -149,9 +149,10 @@ plat_serpt_set_params(void *priv)
BAUDRATE_RANGE(dev->baudrate, 9600, 19200, B9600);
BAUDRATE_RANGE(dev->baudrate, 19200, 38400, B19200);
BAUDRATE_RANGE(dev->baudrate, 38400, 57600, B38400);
+#ifndef __NetBSD__
BAUDRATE_RANGE(dev->baudrate, 57600, 115200, B57600);
BAUDRATE_RANGE(dev->baudrate, 115200, 0xFFFFFFFF, B115200);
-
+#endif
term_attr.c_cflag &= ~CSIZE;
switch (dev->data_bits) {
case 8:
--
2.47.1
second
From 31fb07f6cd1fc4cd3ef04ba741fc75c6801eb2e3 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <randrianasulu@gmail.com>
Date: Sun, 9 Mar 2025 16:38:11 +0300
Subject: [PATCH 2/2] More NetBSD fixes
---
src/include/86box/86box.h | 3 +++
src/include/86box/log.h | 2 ++
2 files changed, 5 insertions(+)
diff --git a/src/include/86box/86box.h b/src/include/86box/86box.h
index 79bb84009..25d6357cf 100644
--- a/src/include/86box/86box.h
+++ b/src/include/86box/86box.h
@@ -17,6 +17,9 @@
* Copyright 2021 Laci bá'
* Copyright 2021-2025 Jasmine Iwanek.
*/
+
+#include <stdarg.h>
+
#ifndef EMU_86BOX_H
#define EMU_86BOX_H
diff --git a/src/include/86box/log.h b/src/include/86box/log.h
index a37bdec4f..5ea0398b6 100644
--- a/src/include/86box/log.h
+++ b/src/include/86box/log.h
@@ -17,6 +17,8 @@
* Copyright 2025 Connor Hyde.
*/
+#include <stdarg.h>
+
#ifndef EMU_LOG_H
#define EMU_LOG_H
--
2.47.1
Checklist
What happened?
at commit
commit 0c7c85e (origin/master, origin/HEAD)
Author: OBattler oubattler@gmail.com
Date: Sun Mar 9 02:18:18 2025 +0100
I try to build 86Box for NetBSD again and apart from two build fixes and stray -latomic in link.txt file (may be coming from pkgconfig for libpng?) it builds but then ...
I tried to set old dynrec and it segfaulted in libc. Tried to turn off cppthread and build failed to link. Any idea that this can be?
Configuration file
Operating system
NetBSD 10.1 amd64
86Box version
commit 0c7c85e
Build architecture
Linux - x64 (64-bit)
Build type
Additional context
patches
second