Page 1 of 1

[SOLVED] Building Custom Bochs

Posted: Tue Nov 24, 2020 5:11 pm
by foliagecanine
Hello.
I'm having some trouble building Bochs on Ubuntu/WSL2.
Here's my current command line:

Code: Select all

./configure --enable-plugins --enable-usb-xhci --enable-usb --enable-gameport --enable-iodebug
make -j8
echo We are not installing because we already have the apt bochs package. Leave it in its folder.
Do note that I do have the regular apt bochs package with everything working in that.

The reason I need to build it is actually to see how bochs handles USB calls. I added a little debug line at usb_xhci.cc:3037

Code: Select all

  BX_DEBUG(("Broadcast Packet"));
but when I build it it gives this error:

Code: Select all

00000000000i[      ] LTDL_LIBRARY_PATH not set. using compile time default '/usr/local/lib/bochs/plugins'
00000000000i[      ] BXSHARE not set. using compile time default '/usr/local/share/bochs'
00000000000i[      ] lt_dlhandle is (nil)
00000000000p[      ] >>PANIC<< dlopen failed for module 'unmapped' (libbx_unmapped.so): file not found
00000000000e[SIM   ] notify called, but no bxevent_callback function is registered
00000000000e[SIM   ] notify called, but no bxevent_callback function is registered
========================================================================
Bochs is exiting with the following message:
[      ] dlopen failed for module 'unmapped' (libbx_unmapped.so): file not found
What should I do so that it compiles correctly? All I really need is the compile arguments for the apt bochs package.

Re: Building Bochs

Posted: Tue Nov 24, 2020 5:27 pm
by foliagecanine
Well, I might have just found my answer literally 10 minutes after I posted the question.
I ran apt's version of bochs and it said this at the start:

Code: Select all

00000000000i[      ] LTDL_LIBRARY_PATH not set. using compile time default '/usr/lib/bochs/plugins'
00000000000i[      ] BXSHARE not set. using compile time default '/usr/share/bochs'
but my custom-built one says

Code: Select all

00000000000i[      ] LTDL_LIBRARY_PATH not set. using compile time default '/usr/local/lib/bochs/plugins'
00000000000i[      ] BXSHARE not set. using compile time default '/usr/local/share/bochs'
EDIT:
Well, it got a little farther, but failed with this error:

Code: Select all

>>PANIC<< dlopen failed for module 'speaker' (libbx_speaker.so): /usr/lib/bochs/plugins/libbx_speaker.so: undefined symbol: bx_soundmod_ctl
EDIT 2:
Well, I decided to change the prefix to /opt/bochs and actually run make install and voila it works now.

Code: Select all

./configure --prefix="/opt/bochs" --enable-plugins --enable-usb-xhci --enable-usb --enable-debugger --enable-iodebug
make -j8
sudo make install
I didn't realize that make install was required. I thought it was optional.