tud-zih-energy / FIRESTARTER

FIRESTARTER: A Processor Stress Test Utility. This repository contains the source code generator. Our releases (including the generated source code and precompiled binaries) are available at https://tu-dresden.de/zih/firestarter/.
GNU General Public License v3.0
115 stars 24 forks source link

Build error #49

Closed toni-klimaks closed 1 year ago

toni-klimaks commented 1 year ago

Hello. I wanted to try building "FIRESTARTER" for Linux, but I get errors when I try. My system is isolated from the internet, so I copy "Hwloc, cxxopts, json, nitro, asmjit" to FIRESTARTER/lib/Hwloc, lib/cxxopts, lib/json, lib/nitro, lib/asmjit. Then I try to build the package.

+ cmake -DCMAKE_SKIP_INSTALL_RPATH:BOOL=yes '-DCMAKE_C_FLAGS:STRING=-pipe -frecord-gcc-switches -Wall -g -O2' '-DCMAKE_CXX_FLAGS:STRING=-pipe -frecord-gcc-switches -Wall -g -O2' '-DCMAKE_Fortran_FLAGS:STRING=-pipe -frecord-gcc-switches -Wall -g -O2' -DCMAKE_INSTALL_PREFIX=/usr -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DLIB_DESTINATION=lib64 -DLIB_SUFFIX=64 -S . -B x86_64-linux -Wno-dev
-- The C compiler identification is GNU 10.3.1
-- The CXX compiler identification is GNU 10.3.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.33.7") 
-- No source directory is a git repository. Skipping submodule check.
CMake Error at lib/nitro/CMakeLists.txt:59 (add_library):
  add_library cannot create target "cxxopts" because another target with the
  same name already exists.  The existing target is an interface library
  created in source directory
  "/usr/src/RPM/BUILD/FIRESTARTER-2.0/lib/asmjit".  See documentation for
  policy CMP0002 for more details.

CMake Error at lib/nitro/CMakeLists.txt:60 (add_library):
  add_library cannot create ALIAS target "cxxopts::cxxopts" because another
  target with the same name already exists.

CMake Error at lib/json/CMakeLists.txt:59 (add_library):
  add_library cannot create target "cxxopts" because another target with the
  same name already exists.  The existing target is an interface library
  created in source directory
  "/usr/src/RPM/BUILD/FIRESTARTER-2.0/lib/asmjit".  See documentation for
  policy CMP0002 for more details.

CMake Error at lib/json/CMakeLists.txt:60 (add_library):
  add_library cannot create ALIAS target "cxxopts::cxxopts" because another
  target with the same name already exists.

-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE  
-- Configuring incomplete, errors occurred!
See also "/usr/src/RPM/BUILD/FIRESTARTER-2.0/x86_64-linux/CMakeFiles/CMakeOutput.log".
See also "/usr/src/RPM/BUILD/FIRESTARTER-2.0/x86_64-linux/CMakeFiles/CMakeError.log".
error: Bad exit status from /usr/src/tmp/rpm-tmp.44823 (%build)

RPM build errors:
    Bad exit status from /usr/src/tmp/rpm-tmp.44823 (%build)
Command exited with non-zero status 1
1.09user 0.82system 0:02.95elapsed 64%CPU (0avgtext+0avgdata 22192maxresident)k
185208inputs+71320outputs (137major+62992minor)pagefaults 0swaps
hsh-rebuild: rebuild of `pkg.tar' failed.

I'm new to Linux, still not well versed in the system and don't understand how to fix this?

add_library cannot create target "cxxopts" because another target with the
  same name already exists.  The existing target is an interface library
  created in source directory
  "/usr/src/RPM/BUILD/FIRESTARTER-2.0/lib/asmjit".  See documentation for
  policy CMP0002 for more details.

The documentation didn't help. :) The binary release "FIRESTARTER 2.0" works fine, I just want to understand how I can build it myself.

bmario commented 1 year ago

I think you copied the contents of asmjit into all of the folders FIRESTARTER/lib/Hwloc, lib/cxxopts, lib/json, lib/nitro, lib/asmjit.

toni-klimaks commented 1 year ago

Yes, I was extremely inattentive, I copied the lines in the script and forgot. Thank you, the program has been successfully built.