Skip to content

Linker-related error: error adding symbols: file format not recognized #492

Description

@jvoisin

I'm trying to fuzz openmw with honggfuzz, but I'm getting a linker-related error:

jvoisin@ratigan 11:49 (master) ~/dev/openmw/build_hfuzz export CXX=hfuzz-clang++
jvoisin@ratigan 11:49 (master) ~/dev/openmw/build_hfuzz export CC=hfuzz-clang
jvoisin@ratigan 11:49 (master) ~/dev/openmw/build_hfuzz cmake ..
-- The C compiler identification is Clang 14.0.6
-- The CXX compiler identification is Clang 14.0.6
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /usr/local/bin/hfuzz-clang
-- Check for working C compiler: /usr/local/bin/hfuzz-clang - broken
CMake Error at /usr/share/cmake-3.25/Modules/CMakeTestCCompiler.cmake:70 (message):
  The C compiler

    "/usr/local/bin/hfuzz-clang"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/jvoisin/dev/openmw/build_hfuzz/CMakeFiles/CMakeScratch/TryCompile-J2xMSs
    
    Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_da7ff/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_da7ff.dir/build.make CMakeFiles/cmTC_da7ff.dir/build
    gmake[1]: Entering directory '/home/jvoisin/dev/openmw/build_hfuzz/CMakeFiles/CMakeScratch/TryCompile-J2xMSs'
    Building C object CMakeFiles/cmTC_da7ff.dir/testCCompiler.c.o
    /usr/local/bin/hfuzz-clang    -MD -MT CMakeFiles/cmTC_da7ff.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_da7ff.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_da7ff.dir/testCCompiler.c.o -c /home/jvoisin/dev/openmw/build_hfuzz/CMakeFiles/CMakeScratch/TryCompile-J2xMSs/testCCompiler.c
    Linking C executable cmTC_da7ff
    /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_da7ff.dir/link.txt --verbose=1
    /usr/local/bin/hfuzz-clang -rdynamic CMakeFiles/cmTC_da7ff.dir/testCCompiler.c.o -o cmTC_da7ff 
    /usr/bin/ld: /tmp/libhfcommon.621748.f66f9074484a01ac.a: error adding symbols: file format not recognized
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    gmake[1]: *** [CMakeFiles/cmTC_da7ff.dir/build.make:100: cmTC_da7ff] Error 1
    gmake[1]: Leaving directory '/home/jvoisin/dev/openmw/build_hfuzz/CMakeFiles/CMakeScratch/TryCompile-J2xMSs'
    gmake: *** [Makefile:127: cmTC_da7ff/fast] Error 2
    

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:28 (project)


-- Configuring incomplete, errors occurred!
See also "/home/jvoisin/dev/openmw/build_hfuzz/CMakeFiles/CMakeOutput.log".
See also "/home/jvoisin/dev/openmw/build_hfuzz/CMakeFiles/CMakeError.log".
jvoisin@ratigan 11:49 (master) ~/dev/openmw/build_hfuzz 

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