Compile bochs on Msys/Mingw32

ht-lab <[email protected]> Fri, 2 Feb 2018 09:51:25 +0000
Newsgroups gmane.comp.emulators.bochs.devel
Organization ht-lab
Message-ID <[email protected]>
Hi All,

I am trying to compile Bochs 2.6.9 under Win10 Msys/MingW32 and are 
getting some build errors. The first one is:

/g++ -c  -I.. -I../.. -I./.. -I./../.. -I../../instrument/stubs 
-I./../../instrument/stubs -O3 -Wall -Wno-format -mno-ms-bitfields 
-DWIN32 -D_FILE_OFFSET_BITS=64  -D_LARGE_FILES    eth_win32.cc -o 
eth_win32.oeth_win32.cc:229:1: error: narrowing conversion of 
'2863311530' from 'unsigned int' to 'bpf_int32 {aka int}' inside { } 
[-Wnarrowing]//
// };//
// ^//
//makefile:112: recipe for target `eth_win32.o' failed//
//make[1]: *** [eth_win32.o] Error 1//
//make[1]: Leaving directory `D:/bochs-2.6.9/iodev/network'//
//makefile:320: recipe for target `iodev/network/libnetwork.a' failed//
//make: *** [iodev/network/libnetwork.a] Error 2/

I adding the -Wno-narrowing to the CFLAGS section which gets the build a 
lot further but then stops at:

g++ -o bximage -O3 -Wall -Wno-format -mno-ms-bitfields -Wno-narrowing 
-DWIN32 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES misc/bximage.o 
misc/hdimage.o misc/vmware3.o misc/vmware4.o misc/vpc-img.o misc/vbox.o
g++ -o bxhub -O3 -Wall -Wno-format -mno-ms-bitfields -Wno-narrowing 
-DWIN32 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES    misc/bxhub.o misc/netutil.o
misc/bxhub.o:bxhub.cc:(.text+0x24): undefined reference to 
`_imp__closesocket@4'
misc/bxhub.o:bxhub.cc:(.text+0x60): undefined reference to 
`_imp__WSACleanup@0'
misc/bxhub.o:bxhub.cc:(.text+0xd2): undefined reference to `_imp__ntohs@4'
misc/bxhub.o:bxhub.cc:(.text+0x3f7): undefined reference to `_imp__ntohs@4'
misc/bxhub.o:bxhub.cc:(.text+0x548): undefined reference to `_imp__ntohs@4'
misc/bxhub.o:bxhub.cc:(.text+0x685): undefined reference to 
`_imp__sendto@24'
misc/bxhub.o:bxhub.cc:(.text+0xa0c): undefined reference to `_imp__ntohs@4'
misc/bxhub.o:bxhub.cc:(.text.startup+0x50): undefined reference to 
`_imp__WSAStartup@8'
misc/bxhub.o:bxhub.cc:(.text.startup+0xaf): undefined reference to 
`_imp__socket@12'
misc/bxhub.o:bxhub.cc:(.text.startup+0xe8): undefined reference to 
`_imp__htonl@4'
misc/bxhub.o:bxhub.cc:(.text.startup+0x10c): undefined reference to 
`_imp__htons@4'
misc/bxhub.o:bxhub.cc:(.text.startup+0x140): undefined reference to 
`_imp__bind@12'
misc/bxhub.o:bxhub.cc:(.text.startup+0x15e): undefined reference to 
`_imp__ntohs@4'
misc/bxhub.o:bxhub.cc:(.text.startup+0x2c0): undefined reference to 
`_imp__select@20'
misc/bxhub.o:bxhub.cc:(.text.startup+0x2e6): undefined reference to 
`__WSAFDIsSet@8'
misc/bxhub.o:bxhub.cc:(.text.startup+0x3a6): undefined reference to 
`_imp__sendto@24'
misc/bxhub.o:bxhub.cc:(.text.startup+0x402): undefined reference to 
`_imp__recvfrom@24'
misc/bxhub.o:bxhub.cc:(.text.startup+0x4df): undefined reference to 
`_imp__sendto@24'
misc/bxhub.o:bxhub.cc:(.text.startup+0x6db): more undefined references 
to `_imp__sendto@24' follow
collect2.exe: error: ld returned 1 exit status
makefile:257: recipe for target `bxhub' failed
make: *** [bxhub] Error 1

My gcc is: gcc.exe (i686-posix-dwarf-rev1, Built by MinGW-W64 project) 
7.2.0, I use the default .conf.win32-cygwin file.

It looks like some network object is not being linked in but I am not 
sure which one, any ideas?

Thanks,
Hans.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
bochs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bochs-developers