Open Randrianasulu opened 5 days ago
I was able to get pass first 3 obstacles with such changes:
diff --git a/bochs/gui/textconfig.cc b/bochs/gui/textconfig.cc
index 9b7035f0c..41a611f0a 100644
--- a/bochs/gui/textconfig.cc
+++ b/bochs/gui/textconfig.cc
@@ -48,6 +48,7 @@ extern "C" {
#include <ctype.h>
#include <string.h>
#include <assert.h>
+#include <stdarg.h>
#ifndef __QNXNTO__
}
diff --git a/bochs/iodev/network/eth_slirp.cc b/bochs/iodev/network/eth_slirp.cc
index 735f1b281..b9c871937 100644
--- a/bochs/iodev/network/eth_slirp.cc
+++ b/bochs/iodev/network/eth_slirp.cc
@@ -32,6 +32,10 @@
#include "pc_system.h"
#include "netmod.h"
+#ifdef __NetBSD__
+#include <sys/wait.h>
+#endif
+
#if BX_NETWORKING && BX_NETMOD_SLIRP
#ifdef _WIN32
diff --git a/bochs/iodev/network/eth_socket.cc b/bochs/iodev/network/eth_socket.cc
index 4c96cc9c2..155c53f21 100644
--- a/bochs/iodev/network/eth_socket.cc
+++ b/bochs/iodev/network/eth_socket.cc
@@ -93,7 +93,9 @@ extern "C" {
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <netinet/in.h>
+#ifndef __NetBSD__
#include <net/ethernet.h>
+#endif
#include <net/if.h>
#ifdef __linux__
#include <linux/types.h>
But this one still puzzles me:
may be make vs gmake (gnu make as on linux) difference?
try gmake instead of make?
try gmake instead of make?
It solved the problem, thanks.
I configured Bochs with ./.conf.linux normal
by the way. Looks like you tried something different since you did not encountered eth_slirp/eth_socket problems.
Thanks! Yes, I used plain ./configure + gmake
Is it required to apply the changes above to fix this issue?
I don't completely understand your question.
These changes are what was needed to make successfull build of Bochs with gmake
for me.
Are they perfect? I don't know.
Is it required to apply the changes above to fix this issue?
I added patch for textconfig.cc and build finished. Probably need to add more configure enables for others to have effect ...
building with .conf.linux required additional patches as posted here.
But sadly I have pulseaudio as dependency so on NetBSD where pkgsrc soft installed in /usr/pkg build fail a bit later:
soundpulse.h:25:10: fatal error: pulse/simple.h: No such file or directory
25 | #include <pulse/simple.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
pkg-config --cflags libpulse-simple
-I/usr/pkg/include -D_REENTRANT
hopefully adding this -I will fix that?
I don't understand entirely how (g
)make
works, but this change allowed to compile Bochs with Pulse support:
(autoreconf
and reconfiguration are needed, maybe also gmake all-clean
before all of this)
diff --git a/bochs/configure.ac b/bochs/configure.ac
index c94e48411..f9c79186c 100644
--- a/bochs/configure.ac
+++ b/bochs/configure.ac
@@ -2172,6 +2172,7 @@ if test "$soundcard_present" = 1; then
if test "x$PKG_CONFIG" != x; then
$PKG_CONFIG --exists libpulse-simple
if test x$? = x0; then
+ PULSE_SOUND_CFLAGS="`$PKG_CONFIG --cflags libpulse-simple`"
SOUNDLOW_OBJS="$SOUNDLOW_OBJS soundpulse.o"
soundlow_drivers="$soundlow_drivers pulse"
AC_DEFINE(BX_HAVE_SOUND_PULSE, 1)
@@ -2209,6 +2210,7 @@ fi
AC_SUBST(SOUNDHW_OBJS)
AC_SUBST(SOUNDLOW_OBJS)
AC_SUBST(ALSA_SOUND_LINK_OPTS)
+AC_SUBST(PULSE_SOUND_CFLAGS)
AC_SUBST(PULSE_SOUND_LINK_OPTS)
AC_SUBST(SDL_SOUND_LINK_OPTS)
AC_SUBST(SOUNDHW_DLL_TARGETS)
diff --git a/bochs/iodev/sound/Makefile.in b/bochs/iodev/sound/Makefile.in
index 4dcc724e0..af95c56d3 100644
--- a/bochs/iodev/sound/Makefile.in
+++ b/bochs/iodev/sound/Makefile.in
@@ -40,7 +40,7 @@ SHELL = @SHELL@
CXX = @CXX@
CXXFLAGS = @CXXFLAGS@ @GUI_CXXFLAGS@
-CPPFLAGS = $(BX_INCDIRS) @CPPFLAGS@
+CPPFLAGS = $(BX_INCDIRS) @PULSE_SOUND_CFLAGS@ @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
Attempt to use it with Bochs ended with Assertion 'p' failed at ../src/pulse/simple.c:273, function pa_simple_write(). Aborting.
message however.
git commit 07047ee279f98e38041bc10db7708f8999a9e56d