-
Notifications
You must be signed in to change notification settings - Fork 289
Open
Description
name: CXX build error on Fedora 40 - ‘strcpy’ is not a member of ‘std’; did you mean ‘strcpy’?
about: This error occurs in at least 2 places when attempting to build using cmake/make as described.
title: ''
labels: ''
assignees: MarioHewardt
Describe the bug
When following the build steps, cmake runs fine, but when I run make I get the following error:
Syscalls have been parsed and written to ../src/tracer/ebpf/syscalls.h
[ 14%] Built target run_getsyscalls
[ 16%] Building EBPF object procmonEBPFkern5.6-_core.o
[ 18%] Packing procmonEBPFkern5.6-_core.o into procmonEBPFkern5.6-_core.o.o
[ 20%] Building EBPF object procmonEBPFkern4.17-5.1.o
[ 22%] Packing procmonEBPFkern4.17-5.1.o into procmonEBPFkern4.17-5.1.o.o
[ 24%] Building EBPF object procmonEBPFkern4.17-5.1_core.o
[ 26%] Packing procmonEBPFkern4.17-5.1_core.o into procmonEBPFkern4.17-5.1_core.o.o
[ 28%] Building EBPF object procmonEBPFkern5.2.o
[ 30%] Packing procmonEBPFkern5.2.o into procmonEBPFkern5.2.o.o
[ 32%] Building EBPF object procmonEBPFkern5.2_core.o
[ 34%] Packing procmonEBPFkern5.2_core.o into procmonEBPFkern5.2_core.o.o
[ 36%] Building EBPF object procmonEBPFkern5.3-5.5.o
[ 38%] Packing procmonEBPFkern5.3-5.5.o into procmonEBPFkern5.3-5.5.o.o
[ 40%] Building EBPF object procmonEBPFkern5.3-5.5_core.o
[ 42%] Packing procmonEBPFkern5.3-5.5_core.o into procmonEBPFkern5.3-5.5_core.o.o
[ 44%] Building EBPF object procmonEBPFkern5.6-.o
[ 46%] Packing procmonEBPFkern5.6-.o into procmonEBPFkern5.6-.o.o
[ 48%] Building CXX object CMakeFiles/procmon.dir/src/procmon.cpp.o
In file included from /home/itsallmathematics/repos/ProcMon-for-Linux/src/configuration/../tracer/ebpf/ebpf_tracer_engine.h:25,
from /home/itsallmathematics/repos/ProcMon-for-Linux/src/configuration/procmon_configuration.h:34,
from /home/itsallmathematics/repos/ProcMon-for-Linux/src/procmon.cpp:21:
/home/itsallmathematics/repos/ProcMon-for-Linux/src/configuration/../tracer/ebpf/syscall_schema.h: In static member function ‘static std::vector<SyscallSchema> Utils::CollectSyscallSchema()’:
/home/itsallmathematics/repos/ProcMon-for-Linux/src/configuration/../tracer/ebpf/syscall_schema.h:85:26: error: ‘strcpy’ is not a member of ‘std’; did you mean ‘strcpy’?
85 | std::strcpy(schema.syscallName, syscall.name.c_str());
| ^~~~~~
In file included from /home/itsallmathematics/repos/ProcMon-for-Linux/src/configuration/../storage/../common/telemetry.h:21,
from /home/itsallmathematics/repos/ProcMon-for-Linux/src/configuration/../storage/storage_engine.h:24,
from /home/itsallmathematics/repos/ProcMon-for-Linux/src/configuration/../storage/mock_storage_engine.h:25,
from /home/itsallmathematics/repos/ProcMon-for-Linux/src/configuration/procmon_configuration.h:29:
/usr/include/string.h:141:14: note: ‘strcpy’ declared here
141 | extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
| ^~~~~~
/home/itsallmathematics/repos/ProcMon-for-Linux/src/configuration/../tracer/ebpf/syscall_schema.h:109:34: error: ‘strcpy’ is not a member of ‘std’; did you mean ‘strcpy’?
109 | std::strcpy(schema.argNames[argCount], argName.c_str());
| ^~~~~~
/usr/include/string.h:141:14: note: ‘strcpy’ declared here
141 | extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
| ^~~~~~
make[2]: *** [CMakeFiles/procmon.dir/build.make:156: CMakeFiles/procmon.dir/src/procmon.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:225: CMakeFiles/procmon.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
To Reproduce
- Follow the steps described in the BUILD.md file for Rocky Linux 9, but use DNF instead of yum as I'm on Fedora.
- mkdir build, cmake .., make
Sysmon version
Built from source
Distro/kernel version
Fedora 40, kernel 6.9.12-200.fc40.x86_64
Expected behavior
Successful build
Metadata
Metadata
Assignees
Labels
No labels