Skip to content

Compile error on target BOCHS simulation #11

@rujma

Description

@rujma

Hello,
When manually building from scratch, the compilation fails with the following config flags:
BUILD_BOCHS
BUILD_ARM
BUILD_X86
CMAKE_AGPP_FLAGS=-D__NO_MATH_INLINES -D__STRICT_ANSI__

Here are the dependencies versions i'm using:

  • ac++: version 1.2
  • ag++: version 0.9
  • python: version 2.7
  • cmake: version 3.16
  • OS Ubuntu 20.04

LOGS:
$ cmake ..
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting build type to 'Release' as none was specified.
-- [FAIL*] Compiler: gcc + /usr/bin/ag++
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.17") found components: doxygen missing components: dot
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.53") found components: thread coroutine context
-- Found PROTOBUF: /usr/lib/x86_64-linux-gnu/libprotobuf.so
-- Using mysql_config: /usr/bin/mysql_config
-- Found MySQL: -I/usr/include/mysql, -L/usr/lib/x86_64-linux-gnu -lmysqlclient -lpthread -ldl -lz -lssl -lcrypto -lresolv -lm -lrt
-- Found libPCL: /usr/lib/x86_64-linux-gnu/libpcl.so
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.46") found components: thread regex system
-- Found libiberty: /usr/lib/x86_64-linux-gnu/libiberty.a
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11")
-- Found LibElf: /usr/lib/x86_64-linux-gnu/libelf.so
-- Found LibDwarf: /usr/lib/x86_64-linux-gnu/libdwarf.so
-- Using mysql_config: /usr/bin/mysql_config
-- Found MySQL: -I/usr/include/mysql, -L/usr/lib/x86_64-linux-gnu -lmysqlclient -lpthread -ldl -lz -lssl -lcrypto -lresolv -lm -lrt
-- [FAIL*] objdump binary -> /usr/bin/objdump
-- [FAIL*] Chosen experiment targets:
-- [FAIL*] Chosen plugin targets:
-- [FAIL*] Building Bochs variant ...
-- Found Threads: TRUE
-- Found SDL: /usr/lib/x86_64-linux-gnu/libSDLmain.a;/usr/lib/x86_64-linux-gnu/libSDL.so;-lpthread (found version "1.2.15")
-- Found ALSA: /usr/lib/x86_64-linux-gnu/libasound.so (found version "1.2.2")
-- Found Freetype: /usr/lib/x86_64-linux-gnu/libfreetype.so (found version "2.10.1")
-- Found GTK2_GTK: /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so
-- Found X11: /usr/include
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found Curses: /usr/lib/x86_64-linux-gnu/libcurses.so
-- Found wxWidgets: -L/usr/lib/x86_64-linux-gnu;-pthread;;;-lwx_gtk3u_xrc-3.0;-lwx_gtk3u_html-3.0;-lwx_gtk3u_qa-3.0;-lwx_gtk3u_adv-3.0;-lwx_gtk3u_core-3.0;-lwx_baseu_xml-3.0;-lwx_baseu_net-3.0;-lwx_baseu-3.0 (found version "3.0.4")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/rui/repos/fail/build

$ make
[ 5%] Built target fail-protoc
Scanning dependencies of target libfailbochs_external-configure
[ 6%] Creating directories for 'libfailbochs_external'
[ 8%] No download step for 'libfailbochs_external'
[ 9%] No patch step for 'libfailbochs_external'
[ 11%] No update step for 'libfailbochs_external'
[ 12%] Performing configure step for 'libfailbochs_external'
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking if you are configuring for another platform... no
checking for standard CFLAGS on this platform...
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 for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether make sets $(MAKE)... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )
checking how to run the C preprocessor... gcc -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 dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for xlf95... no
checking for f95... no
checking for fort... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgfortran... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking for nagfor... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking for file... /usr/bin/file
checking if gcc static flag works... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... no
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking for shl_load... (cached) no
checking for shl_load in -ldld... (cached) no
checking for dlopen... (cached) no
checking for dlopen in -ldl... (cached) yes
checking whether a program can dlopen itself... (cached) yes
checking whether a statically linked program can dlopen itself... (cached) yes
appending configuration tag "F77" to libtool
checking for an ANSI C-conforming const... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking which extension is used for loadable modules... .so
checking which variable specifies run-time library path... LD_LIBRARY_PATH
checking for the default library search path... /lib /usr/lib
checking for objdir... .libs
checking whether libtool supports -dlopen/-dlpreopen... yes
checking for shl_load... (cached) no
checking for shl_load in -ldld... (cached) no
checking for dlopen in -ldl... (cached) yes
checking for dlerror... yes
checking for _ prefix in compiled symbols... no
checking whether deplibs are loaded by dlopen... yes
checking argz.h usability... yes
checking argz.h presence... yes
checking for argz.h... yes
checking for error_t... yes
checking for argz_append... yes
checking for argz_create_sep... yes
checking for argz_insert... yes
checking for argz_next... yes
checking for argz_stringify... yes
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for memory.h... (cached) yes
checking for stdlib.h... (cached) yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for unistd.h... (cached) yes
checking dl.h usability... no
checking dl.h presence... no
checking for dl.h... no
checking sys/dl.h usability... no
checking sys/dl.h presence... no
checking for sys/dl.h... no
checking dld.h usability... no
checking dld.h presence... no
checking for dld.h... no
checking mach-o/dyld.h usability... no
checking mach-o/dyld.h presence... no
checking for mach-o/dyld.h... no
checking for string.h... (cached) yes
checking for strchr... yes
checking for strrchr... yes
checking for memcpy... yes
checking for memmove... yes
checking for strcmp... yes
checking for closedir... yes
checking for opendir... yes
checking for readdir... yes
checking for X... libraries , headers
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking whether byte ordering is bigendian... no
checking for inline... inline
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 getenv... yes
checking for setenv... yes
checking for select... yes
checking for snprintf... yes
checking for vsnprintf... yes
checking for strtoull... yes
checking for strtouq... yes
checking for strdup... yes
checking for strrev... no
checking for stricmp... no
checking for strcasecmp... yes
checking for sleep... yes
checking for usleep... yes
checking for nanosleep... yes
checking for abort... yes
checking for gettimeofday... yes
checking for socklen_t... yes
checking for struct sockaddr_in.sin_len... no
checking for mkstemp... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking for timelocal... yes
checking for gmtime... yes
checking for mktime... yes
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking if large file support is available... yes
checking for cos... no
checking for floor... no
checking if math functions link without -lm... no
checking for sin... yes
checking for ceil... yes
checking if math functions link with -lm... yes
checking for struct timeval... yes
checking if compiler allows attribute... yes
checking for set... yes
checking for set.h... no
checking for map... yes
checking for map.h... no
checking for idle hack... no
checking for dlfcn.h... (cached) yes
checking for assert.h... (cached) yes
checking for plugins support... no
checking if compiler allows LL for 64-bit constants... yes
checking for A20 support... yes
checking for x86-64 support... yes
checking for SMP support... no
checking for cpu level... 6
checking for larger than 32 bit physical address emulation... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for gzopen in -lz... yes
checking for compressed hard disk image support... no
checking for NE2000 support... yes
checking for ACPI support... yes
checking for i440FX PCI support... yes
checking for PCI host device mapping support... no
checking for limited USB UHCI support... yes
checking for limited USB OHCI support... no
checking for PCI pseudo NIC support... no
checking net/bpf.h usability... no
checking net/bpf.h presence... no
checking for net/bpf.h... no
checking netpacket/packet.h usability... yes
checking netpacket/packet.h presence... yes
checking for netpacket/packet.h... yes
checking for net/if.h... yes
checking for linux/netlink.h... yes
checking for net/if_tun.h... no
checking for linux/if_tun.h... yes
checking for X2APIC support... no
checking for repeated IO and mem copy speedups... no
checking for instruction trace cache support... yes
checking for gcc fast function calls optimization... yes
checking for host specific inline assembly accelerations... yes
checking support for configurable MSR registers... yes
checking show IPS... no
checking for use of .cpp as suffix... no
checking for Bochs internal debugger support... no
checking for disassembler support... yes
checking enable Bochs internal debugger GUI... no
checking for ALL optimizations enabled... no
checking whether user wants readline... yes
checking whether to use readline... no
checking readline/history.h usability... no
checking readline/history.h presence... no
checking for readline/history.h... no
checking for instrumentation support... no
checking enable logging... yes
checking enable assert checks... no
checking for raw serial support... no
checking for VESA BIOS extensions... yes
checking for CLGD54XX emulation... yes
checking for FPU emulation... yes
checking for VMX support... 2
checking for 3DNow! support... no
checking for alignment check support... yes
checking for misaligned SSE support... no
checking for MONITOR/MWAIT instructions support (experimental)... yes
checking for x86 debugger support... no
checking IOKit/storage/IOCDMedia.h usability... no
checking IOKit/storage/IOCDMedia.h presence... no
checking for IOKit/storage/IOCDMedia.h... no
checking for CDROM support... yes
checking alsa/asoundlib.h usability... yes
checking alsa/asoundlib.h presence... yes
checking for alsa/asoundlib.h... yes
checking for Sound Blaster 16 support... linux
checking for standard PC gameport support... yes
checking for gdb stub enable... yes
checking for I/O Interface to the debugger... no
checking for docbook2html... not_found
checking whether to build docbook documentation... no
checking for wx-config... wx-config
checking for wxWidgets configuration script... wx-config
checking for wxWidgets library version... 3.0.4
configure: WARNING: Bochs for wxWidgets cannot be compiled here, disabling it
checking for default gui on this platform... x11
checking whether user wants XPM support... yes
checking X11/xpm.h usability... no
checking X11/xpm.h presence... no
checking for X11/xpm.h... no
checking for display libraries... X11 sdl nogui
checking for wget... wget
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for cc_r... gcc
checking for MMX support (deprecated)... no
checking for SSE support (deprecated)... no
checking for SSE extensions support (deprecated)... no
checking for POPCNT support (deprecated)... no
checking for MOVBE support (deprecated)... no
checking for AES support (deprecated)... no
checking for XSAVE support (deprecated)... no
checking for SEP support (deprecated)... no
checking for APIC support (deprecated)... no
checking whether to ignore bad MSR references (deprecated)... no
checking for long mode 1G pages support (deprecated)... no
checking for PAE support (deprecated)... no
checking for MTRR/PAT support (deprecated)... no
checking for LARGE PAGES (PSE) support (deprecated)... no
checking for GLOBAL PAGES (PGE) support (deprecated)... no
checking for DAZ support (deprecated)... no
checking for VME support (deprecated)... no
checking for gzip... /usr/bin/gzip
checking for tar... /usr/bin/tar
configure: creating ./config.status
config.status: creating Makefile
config.status: creating iodev/Makefile
config.status: creating bx_debug/Makefile
config.status: creating bios/Makefile
config.status: creating cpu/Makefile
config.status: creating memory/Makefile
config.status: creating gui/Makefile
config.status: creating disasm/Makefile
config.status: creating instrument/stubs/Makefile
config.status: creating misc/Makefile
config.status: creating fpu/Makefile
config.status: creating doc/docbook/Makefile
config.status: creating build/linux/bochs-dlx
config.status: creating bxversion.h
config.status: creating bxversion.rc
config.status: creating build/macosx/Info.plist
config.status: creating build/win32/nsis/Makefile
config.status: creating build/win32/nsis/bochs.nsi
config.status: creating host/linux/pcidev/Makefile
config.status: creating config.h
config.status: creating ltdlconf.h
[ 12%] Built target libfailbochs_external-configure
Scanning dependencies of target fail-comm
[ 13%] Building CXX object src/core/comm/CMakeFiles/fail-comm.dir/FailControlMessage.pb.cc.o
/usr/include/x86_64-linux-gnu/bits/statx.h:30: error: unexpected token `(' in conditional
/usr/include/x86_64-linux-gnu/bits/statx.h:30: error: Invalid token '"' in preprocessor expression
error: Execution failed: "/usr/bin/ac++" --config "/tmp/agxx_pcfg3cMXvz" -D "_FILE_OFFSET_BITS=64" -I "/home/rui/repos/fail/simulators/bochs/instrument/stubs" -I "/home/rui/repos/fail/simulators/bochs" -I "/home/rui/repos/fail/build/src/core" -I "/home/rui/repos/fail/build/src/core/comm" -I "/home/rui/repos/fail/src/core" -p "/home/rui/repos/fail/src" -p "/home/rui/repos/fail/simulators" -p "/home/rui/repos/fail/debuggers" -p "/home/rui/repos/fail/tools" -p "/home/rui/repos/fail/build/src" -D "__NO_MATH_INLINES" -D "STRICT_ANSI" -c "/home/rui/repos/fail/build/src/core/comm/FailControlMessage.pb.cc" -o "/tmp/FailControlMessage.pb.cc_agxx_H86F2H"
make[2]: *** [src/core/comm/CMakeFiles/fail-comm.dir/build.make:91: src/core/comm/CMakeFiles/fail-comm.dir/FailControlMessage.pb.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:526: src/core/comm/CMakeFiles/fail-comm.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions