web-dev-qa-db-fra.com

Impossible de compiler / construire Dosbox-x / Dosbox dans Ubuntu 16.04

Comme pour "INSTALL", je pense avoir installé chaque libsdl requise par dosbox, mais ni Vanilla dosbox 0.74 ni cette fork ne veulent pas compiler. J'ai aussi essayé

apt-get build-dep dosbox

puisque dosbox est dans le dépôt officiel mais cela n’a pas aidé non plus.

Voici la sortie de ./configure

    ./configure
checking build system type... x86_64-unknown-linux-gnu
checking Host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make sets $(MAKE)... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for ranlib... ranlib
checking for sdl-config... /usr/bin/sdl-config
checking for SDL - version >= 1.2.0... yes
checking SDL version only being 1.2.X... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking size of unsigned char... 1
checking size of unsigned short... 2
checking size of unsigned int... 4
checking size of unsigned long... 8
checking size of unsigned long long... 8
checking size of int *... 8
checking for stdlib.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/socket.h... yes
checking for netinet/in.h... yes
checking for pwd.h... yes
checking checking for C++11 support... checking whether g++ accepts " -std=gnu++11 "... yes
checking whether gcc -E accepts " -std=gnu++11 "... yes
checking if environ can be included... yes
checking if environ can be linked... yes
checking if dirent includes d_type... yes
checking for powf in libm... yes
checking if compiler allows __attribute__... yes
checking if compiler allows __attribute__((always_inline)) ... no
checking if compiler allows __attribute__((fastcall)) ... no
checking if compiler allows __builtin_expect... yes
checking for ALSA CFLAGS...
checking for ALSA LDFLAGS...  -lasound -lm -ldl -lpthread
checking for libasound headers version >= 0.9.0... found.
checking for snd_ctl_open in -lasound... yes
checking whether byte ordering is bigendian... no
checking for avcodec_open2 in -lavcodec... no
checking avcodec/avcodec.h usability... no
checking avcodec/avcodec.h presence... no
checking for avcodec/avcodec.h... no
checking for main in -lGL... yes
checking for main in -lopengl32... no
checking GL/gl.h usability... yes
checking GL/gl.h presence... yes
checking for GL/gl.h... yes
checking whether opengl display output will be enabled... yes
checking for target cpu type... x86-64 bit compatible
checking whether x86 dynamic cpu core will be enabled... no
checking whether fpu emulation will be enabled... yes
checking whether to enable unaligned memory access... yes
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
checking for png_get_io_ptr in -lpng... yes
checking pcap.h usability... no
checking pcap.h presence... no
checking for pcap.h... no
checking for pcap_open_live in -lpcap... no
configure: WARNING: Can't find libpcap, NE2000 ethernet passthrough disabled
checking SDL_net.h usability... yes
checking SDL_net.h presence... yes
checking for SDL_net.h... yes
checking for SDLNet_Init in -lSDL_net... yes
checking for main in -lX11... yes
checking X11/XKBlib.h usability... yes
checking X11/XKBlib.h presence... yes
checking for X11/XKBlib.h... yes
checking for XKBlib support... yes
checking fluidsynth.h usability... no
checking fluidsynth.h presence... no
checking for fluidsynth.h... no
checking for new_fluid_synth in -lfluidsynth... no
configure: WARNING: fluidsynth MIDI synthesis not available
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking for mprotect... yes
checking for setpriority support... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/cpu/Makefile
config.status: creating src/cpu/core_full/Makefile
config.status: creating src/cpu/core_normal/Makefile
config.status: creating src/cpu/core_dyn_x86/Makefile
config.status: creating src/debug/Makefile
config.status: creating src/dos/Makefile
config.status: creating src/fpu/Makefile
config.status: creating src/gui/Makefile
config.status: creating src/hardware/Makefile
config.status: creating src/hardware/serialport/Makefile
config.status: creating src/hardware/reSID/Makefile
config.status: creating src/hardware/parport/Makefile
config.status: creating src/ints/Makefile
config.status: creating src/libs/Makefile
config.status: creating src/libs/zmbv/Makefile
config.status: creating src/libs/gui_tk/Makefile
config.status: creating src/libs/porttalk/Makefile
config.status: creating src/builtin/Makefile
config.status: creating src/misc/Makefile
config.status: creating src/Shell/Makefile
config.status: creating src/platform/Makefile
config.status: creating include/Makefile
config.status: creating config.h
config.status: executing depfiles commands

Et voici le résultat de make (ne montrant que les dernières lignes en raison de la contrainte du nombre de lettres)

    make
warn_unused_result [-Wunused-result]
        fread(&next_byte, sizeof(Bit8u), 1, tempfile); found_at_pos++;
                                                     ^
dos_keyboard_layout.cpp:813:54: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
         fread(&next_byte, sizeof(Bit8u), 1, tempfile);
                                                      ^
mv -f .deps/dos_keyboard_layout.Tpo .deps/dos_keyboard_layout.Po
g++ -DHAVE_CONFIG_H -I. -I../..  -I../../include -std=gnu++11   -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  -g -O2 -Wall -mmmx -msse -msse2 -D_FILE_OFFSET_BITS=64 -Wno-strict-aliasing  -std=gnu++11   -MT cdrom.o -MD -MP -MF .deps/cdrom.Tpo -c -o cdrom.o cdrom.cpp
mv -f .deps/cdrom.Tpo .deps/cdrom.Po
g++ -DHAVE_CONFIG_H -I. -I../..  -I../../include -std=gnu++11   -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  -g -O2 -Wall -mmmx -msse -msse2 -D_FILE_OFFSET_BITS=64 -Wno-strict-aliasing  -std=gnu++11   -MT cdrom_ioctl_win32.o -MD -MP -MF .deps/cdrom_ioctl_win32.Tpo -c -o cdrom_ioctl_win32.o cdrom_ioctl_win32.cpp
mv -f .deps/cdrom_ioctl_win32.Tpo .deps/cdrom_ioctl_win32.Po
g++ -DHAVE_CONFIG_H -I. -I../..  -I../../include -std=gnu++11   -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  -g -O2 -Wall -mmmx -msse -msse2 -D_FILE_OFFSET_BITS=64 -Wno-strict-aliasing  -std=gnu++11   -MT cdrom_aspi_win32.o -MD -MP -MF .deps/cdrom_aspi_win32.Tpo -c -o cdrom_aspi_win32.o cdrom_aspi_win32.cpp
mv -f .deps/cdrom_aspi_win32.Tpo .deps/cdrom_aspi_win32.Po
g++ -DHAVE_CONFIG_H -I. -I../..  -I../../include -std=gnu++11   -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  -g -O2 -Wall -mmmx -msse -msse2 -D_FILE_OFFSET_BITS=64 -Wno-strict-aliasing  -std=gnu++11   -MT cdrom_ioctl_linux.o -MD -MP -MF .deps/cdrom_ioctl_linux.Tpo -c -o cdrom_ioctl_linux.o cdrom_ioctl_linux.cpp
mv -f .deps/cdrom_ioctl_linux.Tpo .deps/cdrom_ioctl_linux.Po
g++ -DHAVE_CONFIG_H -I. -I../..  -I../../include -std=gnu++11   -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  -g -O2 -Wall -mmmx -msse -msse2 -D_FILE_OFFSET_BITS=64 -Wno-strict-aliasing  -std=gnu++11   -MT cdrom_image.o -MD -MP -MF .deps/cdrom_image.Tpo -c -o cdrom_image.o cdrom_image.cpp
mv -f .deps/cdrom_image.Tpo .deps/cdrom_image.Po
g++ -DHAVE_CONFIG_H -I. -I../..  -I../../include -std=gnu++11   -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  -g -O2 -Wall -mmmx -msse -msse2 -D_FILE_OFFSET_BITS=64 -Wno-strict-aliasing  -std=gnu++11   -MT cdrom_ioctl_os2.o -MD -MP -MF .deps/cdrom_ioctl_os2.Tpo -c -o cdrom_ioctl_os2.o cdrom_ioctl_os2.cpp
mv -f .deps/cdrom_ioctl_os2.Tpo .deps/cdrom_ioctl_os2.Po
rm -f libdos.a
ar cru libdos.a dos.o dos_devices.o dos_execute.o dos_files.o dos_ioctl.o dos_memory.o dos_misc.o dos_classes.o dos_programs.o dos_tables.o drives.o drive_virtual.o drive_local.o drive_cache.o drive_fat.o drive_iso.o dos_mscdex.o dos_keyboard_layout.o cdrom.o cdrom_ioctl_win32.o cdrom_aspi_win32.o cdrom_ioctl_linux.o cdrom_image.o cdrom_ioctl_os2.o
ar: `u' modifier ignored since `D' is the default (see `U')
ranlib libdos.a
make[3]: Leaving directory '/home/jacob/Desktop/dosbox-x/joncampbell123-dosbox-x-dbc9bd4/src/dos'
Making all in fpu
make[3]: Entering directory '/home/jacob/Desktop/dosbox-x/joncampbell123-dosbox-x-dbc9bd4/src/fpu'
g++ -DHAVE_CONFIG_H -I. -I../..  -I../../include -std=gnu++11   -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT  -g -O2 -Wall -mmmx -msse -msse2 -D_FILE_OFFSET_BITS=64 -Wno-strict-aliasing  -std=gnu++11   -MT fpu.o -MD -MP -MF .deps/fpu.Tpo -c -o fpu.o fpu.cpp
In file included from fpu.cpp:45:0:
fpu_instructions.h: In function ‘void FPU_FCOM(Bitu, Bitu)’:
fpu_instructions.h:394:27: error: ‘isinf’ was not declared in this scope
   if (isinf(fpu.regs[st].d) && isinf(fpu.regs[other].d)) {
                           ^
fpu_instructions.h:394:27: note: suggested alternative:
In file included from fpu_instructions.h:283:0,
                 from fpu.cpp:45:
/usr/include/c++/5/cmath:621:5: note:   ‘std::isinf’
     isinf(_Tp __x)
     ^
Makefile:336: recipe for target 'fpu.o' failed
make[3]: *** [fpu.o] Error 1
make[3]: Leaving directory '/home/jacob/Desktop/dosbox-x/joncampbell123-dosbox-x-dbc9bd4/src/fpu'
Makefile:431: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/jacob/Desktop/dosbox-x/joncampbell123-dosbox-x-dbc9bd4/src'
Makefile:368: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/jacob/Desktop/dosbox-x/joncampbell123-dosbox-x-dbc9bd4'
Makefile:308: recipe for target 'all' failed
make: *** [all] Error 2

Et enfin, voici le résultat de make of the Vanilla 0.74 dosbox qui ne m'intéresse pas vraiment car il est déjà disponible dans le dépôt officiel. Il ne veut pas non plus construire mais sa sortie est différente (ne montrant que les dernières lignes à cause de la contrainte du nombre de lettres)

cpu.cpp:1397:61: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 2 has type ‘Bitu {aka long unsigned int}’ [-Wformat=]
 E_Exit("RET from illegal descriptor type %X",desc.Type());  // or #GP(selec
                                                         ^
cpu.cpp: In function ‘bool CPU_LTR(Bitu)’:
cpu.cpp:1508:80: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 2 has type ‘Bitu {aka long unsigned int}’ [-Wformat=]
 if (!cpu_tss.SetSelector(selector)) E_Exit("LTR failed, selector=%X",selector);

Toute aide est la bienvenue!

1
zaxxxxx

Il avait besoin d'une solution simple: https://github.com/joncampbell123/dosbox-x/issues/209 , mais il a finalement été compilé.

0
zaxxxxx