This repository was archived by the owner on Jan 6, 2025. It is now read-only.
This repository was archived by the owner on Jan 6, 2025. It is now read-only.
Compilation Error #134
Open
Description
Hi, I am not able to compile the library because of -Wstrict-prototypes
. I could add the prototypes but just wanted to know if this is due to a newer version of clang. (or just skill issue ;-;)
I'm on Fedora 39 and here's the output for clang --version
❯ clang --version
clang version 17.0.6 (Fedora 17.0.6-2.fc39)
Target: x86_64-redhat-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
make output:
~/programming_stuff/repos_ext/syscall_intercept
❯ make
[ 0%] Built target check_whitespace
[ 0%] Building CXX object CMakeFiles/cpp_test.dir/src/cpp_compile_test.cc.o
[ 1%] Building C object CMakeFiles/cpp_test.dir/src/cpp_compile_mock.c.o
[ 2%] Linking CXX executable cpp_test
[ 2%] Built target cpp_test
[ 2%] Built target cstyle
[ 2%] Building C object CMakeFiles/syscall_intercept_base_c.dir/src/disasm_wrapper.c.o
/home/rakim/programming_stuff/repos_ext/syscall_intercept/repo/src/disasm_wrapper.c:66:14: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
66 | nop_vsnprintf()
| ^
| void
1 error generated.
make[2]: *** [CMakeFiles/syscall_intercept_base_c.dir/build.make:76: CMakeFiles/syscall_intercept_base_c.dir/src/disasm_wrapper.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:300: CMakeFiles/syscall_intercept_base_c.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
cmake output:
~/programming_stuff/repos_ext/syscall_intercept
❯ cmake repo -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang
CMake Deprecation Warning at CMakeLists.txt:32 (cmake_minimum_required):
Compatibility with CMake < 3.5 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.
-- The C compiler identification is Clang 17.0.6
-- The ASM compiler identification is Clang with GNU-like command-line
-- Found assembler: /usr/lib64/ccache/clang
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/lib64/ccache/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test HAS_WERROR
-- Performing Test HAS_WERROR - Success
-- Performing Test HAS_WALL
-- Performing Test HAS_WALL - Success
-- Performing Test HAS_WEXTRA
-- Performing Test HAS_WEXTRA - Success
-- Performing Test HAS_PEDANTIC
-- Performing Test HAS_PEDANTIC - Success
-- Performing Test HAS_NOMFI
-- Performing Test HAS_NOMFI - Success
-- Performing Test HAS_NO9099
-- Performing Test HAS_NO9099 - Failed
-- Performing Test LINKER_HAS_NOSTDLIB
-- Performing Test LINKER_HAS_NOSTDLIB - Success
-- Performing Test HAS_WLFATAL
-- Performing Test HAS_WLFATAL - Success
-- Performing Test HAS_NOUNUSEDARG
-- Performing Test HAS_NOUNUSEDARG - Success
-- Performing Test HAS_ARG_PIE
-- Performing Test HAS_ARG_PIE - Success
-- Performing Test HAS_ARG_NOPIE
-- Performing Test HAS_ARG_NOPIE - Success
-- Performing Test HAS_ARG_NO_PIE
-- Performing Test HAS_ARG_NO_PIE - Success
-- Performing Test HAS_GCC_ATTR_CONSTR
-- Performing Test HAS_GCC_ATTR_CONSTR - Success
-- Performing Test HAS_GCC_PRAGMA_SYSH
-- Performing Test HAS_GCC_PRAGMA_SYSH - Success
-- Looking for include file elf.h
-- Looking for include file elf.h - found
-- Looking for dladdr
-- Looking for dladdr - found
-- Looking for a CXX compiler
-- Looking for a CXX compiler - /usr/lib64/ccache/c++
-- The CXX compiler identification is GNU 13.2.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/lib64/ccache/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Perl: /usr/bin/perl (found version "5.38.2")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Configuring done (2.8s)
-- Generating done (0.1s)
-- Build files have been written to: /home/rakim/programming_stuff/repos_ext/syscall_intercept
Metadata
Metadata
Assignees
Labels
No labels