Skip to content

Build fails on macOS with GCC compiler, assembly errors #387

@laurynas-biveinis

Description

@laurynas-biveinis

With revision b0b42eb, macOS 11.2.3, brew-installed GCC 10:

$ mkdir build
$ cd build
$ cmake .. -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10
-- The C compiler identification is GNU 10.2.0
-- The CXX compiler identification is GNU 10.2.0
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/local/bin/gcc-10 - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/local/bin/g++-10 - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at CMakeLists.txt:16 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Configuring done
-- Generating done
-- Build files have been written to: /Users/laurynas/unodb/deepstate/build
$ make
[  2%] Building C object CMakeFiles/deepstate.dir/src/lib/DeepState.c.o
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/string.h:194,
                 from /Users/laurynas/unodb/deepstate/src/include/deepstate/DeepState.h:31,
                 from /Users/laurynas/unodb/deepstate/src/lib/DeepState.c:17:
/Users/laurynas/unodb/deepstate/src/lib/DeepState.c: In function 'DeepState_NewSwarmConfig':
/Users/laurynas/unodb/deepstate/src/lib/DeepState.c:421:3: warning: '__builtin_strncpy' specified bound depends on the length of the source argument [-Wstringop-overflow=]
  421 |   strncpy(new_config->file, file, buf_len);
      |   ^~~~~~~
/Users/laurynas/unodb/deepstate/src/lib/DeepState.c:419:20: note: length computed here
  419 |   size_t buf_len = strlen(file) + 1;
      |                    ^~~~~~~~~~~~
[  4%] Building C object CMakeFiles/deepstate.dir/src/lib/Log.c.o
[  6%] Building C object CMakeFiles/deepstate.dir/src/lib/Option.c.o
[  8%] Building C object CMakeFiles/deepstate.dir/src/lib/Stream.c.o
[ 10%] Linking C static library libdeepstate.a
[ 10%] Built target deepstate
[ 12%] Generating timestamp
running build
running build_py
creating build
creating build/lib
creating build/lib/deepstate
copying /Users/laurynas/unodb/deepstate/bin/deepstate/__init__.py -> build/lib/deepstate
creating build/lib/deepstate/core
copying /Users/laurynas/unodb/deepstate/bin/deepstate/core/symex.py -> build/lib/deepstate/core
copying /Users/laurynas/unodb/deepstate/bin/deepstate/core/__init__.py -> build/lib/deepstate/core
copying /Users/laurynas/unodb/deepstate/bin/deepstate/core/fuzz.py -> build/lib/deepstate/core
copying /Users/laurynas/unodb/deepstate/bin/deepstate/core/base.py -> build/lib/deepstate/core
creating build/lib/deepstate/executors
copying /Users/laurynas/unodb/deepstate/bin/deepstate/executors/__init__.py -> build/lib/deepstate/executors
creating build/lib/deepstate/executors/fuzz
copying /Users/laurynas/unodb/deepstate/bin/deepstate/executors/fuzz/__init__.py -> build/lib/deepstate/executors/fuzz
copying /Users/laurynas/unodb/deepstate/bin/deepstate/executors/fuzz/honggfuzz.py -> build/lib/deepstate/executors/fuzz
copying /Users/laurynas/unodb/deepstate/bin/deepstate/executors/fuzz/eclipser.py -> build/lib/deepstate/executors/fuzz
copying /Users/laurynas/unodb/deepstate/bin/deepstate/executors/fuzz/afl.py -> build/lib/deepstate/executors/fuzz
copying /Users/laurynas/unodb/deepstate/bin/deepstate/executors/fuzz/angora.py -> build/lib/deepstate/executors/fuzz
copying /Users/laurynas/unodb/deepstate/bin/deepstate/executors/fuzz/libfuzzer.py -> build/lib/deepstate/executors/fuzz
creating build/lib/deepstate/executors/symex
copying /Users/laurynas/unodb/deepstate/bin/deepstate/executors/symex/angr.py -> build/lib/deepstate/executors/symex
copying /Users/laurynas/unodb/deepstate/bin/deepstate/executors/symex/manticore.py -> build/lib/deepstate/executors/symex
copying /Users/laurynas/unodb/deepstate/bin/deepstate/executors/symex/__init__.py -> build/lib/deepstate/executors/symex
creating build/lib/deepstate/executors/auxiliary
copying /Users/laurynas/unodb/deepstate/bin/deepstate/executors/auxiliary/ensembler.py -> build/lib/deepstate/executors/auxiliary
copying /Users/laurynas/unodb/deepstate/bin/deepstate/executors/auxiliary/__init__.py -> build/lib/deepstate/executors/auxiliary
copying /Users/laurynas/unodb/deepstate/bin/deepstate/executors/auxiliary/reducer.py -> build/lib/deepstate/executors/auxiliary
[ 12%] Built target target
[ 14%] Building C object CMakeFiles/deepstate32.dir/src/lib/DeepState.c.o
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/string.h:194,
                 from /Users/laurynas/unodb/deepstate/src/include/deepstate/DeepState.h:31,
                 from /Users/laurynas/unodb/deepstate/src/lib/DeepState.c:17:
/Users/laurynas/unodb/deepstate/src/lib/DeepState.c: In function 'DeepState_NewSwarmConfig':
/Users/laurynas/unodb/deepstate/src/lib/DeepState.c:421:3: warning: '__builtin_strncpy' specified bound depends on the length of the source argument [-Wstringop-overflow=]
  421 |   strncpy(new_config->file, file, buf_len);
      |   ^~~~~~~
/Users/laurynas/unodb/deepstate/src/lib/DeepState.c:419:20: note: length computed here
  419 |   size_t buf_len = strlen(file) + 1;
      |                    ^~~~~~~~~~~~
/var/folders/t2/k0br2w_j78zdnf6gnz5b4xgr0000gn/T//cck3ANHH.s:76:2: error: instruction requires: Not 64-bit mode
        pushl   %esi
        ^
... too many similar errors to include here ...

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