0

I tried to set up bochs-2.6.2 in Ubuntu. First, I unpack Bochs from .tar file to home/userName/Downloads/bochs-2.6.2.

Then I use the configure command:

./configure --prefix=/home/userName/Desktop/bochs --enable-debugger --enable-disasm \
--enable-iodebug --enable-x86-debugger --with-x --with-x11

After that, I use make ( there are too many character, this body is limited 30000 characters )

last, I use sudo make install and get following messages

    make[1]: Entering directory '/home/eecheng/Downloads/bochs-2.6.2/memory'
    make[1]: 'libmemory.a' is up to date.
    make[1]: Leaving directory '/home/eecheng/Downloads/bochs-2.6.2/memory'
    echo done
    done
    cd gui && \
    make  libgui.a
    make[1]: Entering directory '/home/eecheng/Downloads/bochs-2.6.2/gui'
    make[1]: 'libgui.a' is up to date.
    make[1]: Leaving directory '/home/eecheng/Downloads/bochs-2.6.2/gui'
    echo done
    done
    cd disasm && \
    make  libdisasm.a
    make[1]: Entering directory '/home/eecheng/Downloads/bochs-2.6.2/disasm'
    make[1]: 'libdisasm.a' is up to date.
    make[1]: Leaving directory '/home/eecheng/Downloads/bochs-2.6.2/disasm'
    echo done
    done
    cd cpu/fpu && \
    make  libfpu.a
    make[1]: Entering directory '/home/eecheng/Downloads/bochs-2.6.2/cpu/fpu'
    make[1]: 'libfpu.a' is up to date.
    make[1]: Leaving directory '/home/eecheng/Downloads/bochs-2.6.2/cpu/fpu'
    echo done
    done
    /bin/bash ./libtool --mode=link --tag CXX g++ -o bochs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES      -DBX_SHARE_PATH='"/usr/local/share/bochs"'  -export-dynamic logio.o main.o config.o load32bitOShack.o pc_system.o osdep.o plugin.o crc.o   \
        iodev/libiodev.a iodev/display/libdisplay.a iodev/hdimage/libhdimage.a    \
        bx_debug/libdebug.a cpu/libcpu.a cpu/cpudb/libcpudb.a \
        memory/libmemory.a gui/libgui.a \
        disasm/libdisasm.a   \
        cpu/fpu/libfpu.a \
        -lX11 -lXpm -lXrandr    \
        \
        \
        \
        \
        -lm -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype
    g++ -o bochs -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DBX_SHARE_PATH=\"/usr/local/share/bochs\" logio.o main.o config.o load32bitOShack.o pc_system.o osdep.o plugin.o crc.o -Wl,--export-dynamic  iodev/libiodev.a iodev/display/libdisplay.a iodev/hdimage/libhdimage.a bx_debug/libdebug.a cpu/libcpu.a cpu/cpudb/libcpudb.a memory/libmemory.a gui/libgui.a disasm/libdisasm.a cpu/fpu/libfpu.a -lX11 -lXpm -lXrandr -lm -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig /usr/lib/x86_64-linux-gnu/libfreetype.so -Wl,--rpath -Wl,/usr/lib/x86_64-linux-gnu -Wl,--rpath -Wl,/usr/lib/x86_64-linux-gnu
    /usr/bin/ld: gui/libgui.a(gtk_enh_dbg_osdep.o): undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
    //lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status
    Makefile:179: recipe for target 'bochs' failed

But I got error messages recipe for target 'bochs' failed:

Makefile 179: recipe for target 'bochs' failed
make: ***[bochs] error 1

I tried both create a bochs folder under Desktop or not.

Are there any suggestion? Thanks a lot!

jww
  • 97,681
  • 90
  • 411
  • 885
Steven
  • 811
  • 4
  • 23
  • hi, I just update some information. thanks – Steven Mar 28 '19 at 13:06
  • Hi, I update again, thanks – Steven Mar 28 '19 at 14:01
  • Here is your problem: *`libpthread.so.0: error adding symbols: DSO missing from command line`*. Add `-pthread` to your `CFLAGS` and `CXXFLAGS`. Autotools should be adding it for you. Maybe you should file a bug report against Bochs for not adding the flag. Also see [Significance of -pthread flag when compiling](https://stackoverflow.com/q/2127797/608639), [libpthread.so.0: error adding symbols: DSO missing from command line](https://stackoverflow.com/q/19901934/608639) and [Undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'](https://stackoverflow.com/q/34143265/608639). – jww Mar 28 '19 at 14:04
  • Here is your bug report: [-pthread missing from compile and link command](https://github.com/dariaphoebe/bochs/issues/1). I assume that is the repo you got the tar ball from. – jww Mar 28 '19 at 14:16
  • By the way, your `LDFLAGS` should include `-L/home/userName/Desktop/bochs/lib -Wl,-R,/home/userName/Desktop/bochs/lib -Wl,--enable-new-dtags`. Autotools does not add them for you. – jww Mar 28 '19 at 14:18
  • sorry, I have no idea about reference you gave, where I need to add -pthread to my CFLAGS? in my makefile? or some command? thanks. – Steven Mar 28 '19 at 14:29
  • I add `CFLAGS=-pthread` in head of makefile and then `make` again, but still fail – Steven Mar 28 '19 at 14:48

0 Answers0