From fe5ccdf425a8c93fe49364052548c0d4bf092994 Mon Sep 17 00:00:00 2001 From: Horst Schirmeier Date: Wed, 6 Jan 2016 11:22:34 +0100 Subject: [PATCH] fixes for Debian 8 and newer AspectC++ versions - Debian 8 does not provide libsvga1-dev anymore, so Bochs cannot be built --with-svga (which is included in --with-all-libs). - The latest AspectC++ nightlies should work without any -D__NO_MATH_INLINES -D__STRICT_ANSI__ tricks. Change-Id: I56801a0735eb4922689dff812923d79faa94d26e --- CMakeLists.txt | 4 ++++ cmake/bochs.cmake | 4 ++-- doc/how-to-build.txt | 40 ++++++++++++++++++++++------------------ 3 files changed, 28 insertions(+), 20 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e564887..9e30273b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,10 @@ if("${CMAKE_VERSION}" VERSION_GREATER 2.8.3) # (makes cmake 2.8.4 and newer) cmake_policy(SET CMP0017 NEW) endif("${CMAKE_VERSION}" VERSION_GREATER 2.8.3) +if(NOT ("${CMAKE_VERSION}" VERSION_LESS 3.0)) # >= 3.0? + # don't overwrite PROJECT_VERSION when calling PROJECT() + cmake_policy(SET CMP0048 OLD) +endif() ENABLE_TESTING() PROJECT(Fail*) diff --git a/cmake/bochs.cmake b/cmake/bochs.cmake index fffbd65c..d04ad07a 100644 --- a/cmake/bochs.cmake +++ b/cmake/bochs.cmake @@ -71,12 +71,12 @@ if(BUILD_BOCHS) endif() # FIXME: some libraries still need to be located the "cmake way" - set(bochs_library_dependencies ${bochs_library_dependencies} -lfontconfig -lrt -lvgagl -pthread) + set(bochs_library_dependencies ${bochs_library_dependencies} -lfontconfig -lrt -pthread) set(bochs_src_dir ${PROJECT_SOURCE_DIR}/simulators/bochs) set(bochs_install_prefix ${bochs_src_dir}/install CACHE STRING "FailBochs installation path") - set(bochs_configure_params --enable-a20-pin --enable-x86-64 --enable-cpu-level=6 --enable-ne2000 --enable-acpi --enable-pci --enable-usb --enable-trace-cache --enable-fast-function-calls --enable-host-specific-asms --enable-disasm --enable-readline --enable-clgd54xx --enable-fpu --enable-vmx=2 --enable-monitor-mwait --enable-cdrom --enable-sb16=linux --enable-gdb-stub --disable-docbook --with-all-libs CACHE STRING "Bochs default configure parameters") + set(bochs_configure_params --enable-a20-pin --enable-x86-64 --enable-cpu-level=6 --enable-ne2000 --enable-acpi --enable-pci --enable-usb --enable-trace-cache --enable-fast-function-calls --enable-host-specific-asms --enable-disasm --enable-readline --enable-clgd54xx --enable-fpu --enable-vmx=2 --enable-monitor-mwait --enable-cdrom --enable-sb16=linux --enable-gdb-stub --disable-docbook --with-nogui --with-x11 --with-wx --with-sdl CACHE STRING "Bochs configure parameters") ## Bochs CXX args for calling make set(bochs_build_CXX CXX=${AGXX}\ -p\ ${PROJECT_SOURCE_DIR}/src\ -p\ ${PROJECT_SOURCE_DIR}/simulators\ -p\ ${PROJECT_SOURCE_DIR}/debuggers\ -p\ ${PROJECT_SOURCE_DIR}/tools\ -p\ ${PROJECT_BINARY_DIR}/src\ -I${PROJECT_SOURCE_DIR}/src/core\ -I${CMAKE_BINARY_DIR}/src/core\ ${CMAKE_AGPP_FLAGS}\ --Xcompiler) diff --git a/doc/how-to-build.txt b/doc/how-to-build.txt index 205f6020..10553c35 100644 --- a/doc/how-to-build.txt +++ b/doc/how-to-build.txt @@ -11,16 +11,18 @@ Required for Fail*: - libdwarf-dev - libelf-dev - protobuf-compiler - - cmake 2.8.2 (2.8.11 preferred) - - fontconfig1-dev + - cmake >=2.8.2 (2.8.11 preferred) + - libfontconfig1-dev - zlib1g-dev - binutils-dev, on newer systems libiberty-dev - - AspectC++ (ag++, ac++): AspectC++ 1.1 or newer is known to work and can be - obtained from ; nightlies can be downloaded from - . Make sure you use the 64-bit version if running - in a 64-bit environment. - * AspectC++ >1.2 (clang-based AspectC++): build with CMAKE_AGPP_FLAGS - "-D__NO_MATH_INLINES" or "--c_compiler clang++" + - AspectC++ (ag++, ac++): + * AspectC++ 1.1 or 1.2 as well as the clang-based >1.2 versions are known to + work and can be obtained from . Make sure you use + the 64-bit version if running in a 64-bit environment. + * In some environments, some AspectC++ versions have issues ingesting + specific system headers. Workaround: build with CMAKE_AGPP_FLAGS + "-D__NO_MATH_INLINES -D__STRICT_ANSI__" or "--c_compiler clang++" (the + latter requires the clang++ compiler). - optional: * LLVM 3.3 or 3.4 (needed for several importers in tools/import-trace) (compiles/links with 3.1 or 3.2, but fails to properly import information @@ -29,7 +31,8 @@ Required for Fail*: come built this way) - details below * a MySQL 5.0+ or MariaDB 5.1+ (MariaDB 5.5 recommended) server - - optional: cmake-curses-gui + * doxygen + * cmake-curses-gui @@ -37,7 +40,7 @@ Required for the Bochs simulator backend: ********************************************************************** - libpthread - Probably more, depending on, e.g., the GUI you configure (X11 -> - libsvga1-dev, libxrandr-dev) + libsdl1.2-dev, wx -> libwxgtk2.8-dev libwxbase2.8-dev) Required for the gem5 simulator backend: ********************************************************************** @@ -150,14 +153,15 @@ FailBochs: Bochs configuration features The autotools-based bochs is configured within the Fail* build run. The configuration flags can be set within the ccmake configuration (ccmake ${FAIL_DIR}/build) - Sufficient: - --enable-cpu-level=6;--enable-ne2000;--enable-trace-cache;--enable-gdb-stub;--disable-docbook - - More simulator features (FailBochs default configuration): - --enable-a20-pin;--enable-x86-64;--enable-cpu-level=6;--enable-ne2000;--enable-acpi;--enable-pci;--enable-usb;--enable-trace-cache;--enable-fast-function-calls;--enable-host-specific-asms;--enable-disasm;--enable-readline;--enable-clgd54xx;--enable-fpu;--enable-vmx=2;--enable-monitor-mwait;--enable-cdrom;--enable-sb16=linux;--enable-gdb-stub;--disable-docbook;--with-all-libs - Instead of --with-all-libs, you could use --with-nogui for "headless" experiments, - additionally removing lots of library dependencies (thus reducing startup overhead). - --with-x11 enables only the "x" (X11), --with-wx only the "wx" (wxWidgets) GUI. - Note that "wx" does not play well together with Fail*'s "restore" feature (FailBochs - will fall back to "x" if available, or die trying.) + --enable-cpu-level=6;--enable-ne2000;--enable-trace-cache;--enable-gdb-stub;--disable-docbook;--with-nogui + - More simulator features and GUIs (FailBochs default configuration): + --enable-a20-pin;--enable-x86-64;--enable-cpu-level=6;--enable-ne2000;--enable-acpi;--enable-pci;--enable-usb;--enable-trace-cache;--enable-fast-function-calls;--enable-host-specific-asms;--enable-disasm;--enable-readline;--enable-clgd54xx;--enable-fpu;--enable-vmx=2;--enable-monitor-mwait;--enable-cdrom;--enable-sb16=linux;--enable-gdb-stub;--disable-docbook;--with-nogui;--with-x11;--with-wx;--with-sdl + The --with-nogui flag suffices for for "headless" experiments, with the + advantage of removing lots of library dependencies (thus reducing startup + overhead). --with-x11 enables only the "x" (X11), --with-wx only the "wx" + (wxWidgets) GUI. Note that "wx" does not play well together with Fail*'s + "restore" feature (FailBochs will fall back to "x" if available, or die + trying.) Once you know everything works as it should, you may want to add the following flags before running larger campaigns: --disable-logging --disable-assert-checks