Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails with gcc 12 #86

Open
lgbaldoni opened this issue May 28, 2022 · 0 comments
Open

Build fails with gcc 12 #86

lgbaldoni opened this issue May 28, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@lgbaldoni
Copy link

Using procmon 1.0.1 on openSUSE Tumbleweed, with the following cmake parameters:

/usr/bin/cmake /home/abuild/rpmbuild/BUILD/ProcMon-for-Linux-1.0.1/. '-GUnix Makefiles' -DCMAKE_INSTALL_PREFIX:PATH=/usr -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DCMAKE_INSTALL_LIBDIR:PATH=lib64 -DCMAKE_INSTALL_LIBEXECDIR=/usr/libexec -DCMAKE_BUILD_TYPE=RelWithDebInfo '-DCMAKE_C_FLAGS=-O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -DNDEBUG' '-DCMAKE_CXX_FLAGS=-O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -DNDEBUG' '-DCMAKE_Fortran_FLAGS=-O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -DNDEBUG' '-DCMAKE_EXE_LINKER_FLAGS=-flto=auto -Wl,--as-needed -Wl,--no-undefined -Wl,-z,now' '-DCMAKE_MODULE_LINKER_FLAGS=-flto=auto -Wl,--as-needed' '-DCMAKE_SHARED_LINKER_FLAGS=-flto=auto -Wl,--as-needed -Wl,--no-undefined -Wl,-z,now' -DLIB_SUFFIX=64 -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_STATIC_LIBS:BOOL=OFF -DCMAKE_COLOR_MAKEFILE:BOOL=OFF -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF -DCMAKE_MODULES_INSTALL_DIR=/usr/lib64/cmake/procmon

and this is where it fails:

[ 53%] Building CXX object src/tracer/CMakeFiles/tracer-static.dir/ebpf/raw_ebpf_event.cpp.o
cd /home/abuild/rpmbuild/BUILD/ProcMon-for-Linux-1.0.1/build/src/tracer && /usr/bin/c++  -I/home/abuild/rpmbuild/BUILD/ProcMon-for-Linux-1.0.1/build/src -I/usr/include/bcc/compat -I/usr/include/ncurses -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -DNDEBUG -g -fno-omit-frame-pointer -DELPP_THREAD_SAFE -D ELPP_DEFAULT_LOG_FILE='"/var/log/procmon.log"' -O2 -g -DNDEBUG -std=gnu++17 -MD -MT src/tracer/CMakeFiles/tracer-static.dir/ebpf/raw_ebpf_event.cpp.o -MF CMakeFiles/tracer-static.dir/ebpf/raw_ebpf_event.cpp.o.d -o CMakeFiles/tracer-static.dir/ebpf/raw_ebpf_event.cpp.o -c /home/abuild/rpmbuild/BUILD/ProcMon-for-Linux-1.0.1/src/tracer/ebpf/raw_ebpf_event.cpp
[ 57%] Building CXX object src/tracer/CMakeFiles/tracer-static.dir/ebpf/syscall_schema.cpp.o
cd /home/abuild/rpmbuild/BUILD/ProcMon-for-Linux-1.0.1/build/src/tracer && /usr/bin/c++  -I/home/abuild/rpmbuild/BUILD/ProcMon-for-Linux-1.0.1/build/src -I/usr/include/bcc/compat -I/usr/include/ncurses -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -DNDEBUG -g -fno-omit-frame-pointer -DELPP_THREAD_SAFE -D ELPP_DEFAULT_LOG_FILE='"/var/log/procmon.log"' -O2 -g -DNDEBUG -std=gnu++17 -MD -MT src/tracer/CMakeFiles/tracer-static.dir/ebpf/syscall_schema.cpp.o -MF CMakeFiles/tracer-static.dir/ebpf/syscall_schema.cpp.o.d -o CMakeFiles/tracer-static.dir/ebpf/syscall_schema.cpp.o -c /home/abuild/rpmbuild/BUILD/ProcMon-for-Linux-1.0.1/src/tracer/ebpf/syscall_schema.cpp
In file included from /home/abuild/rpmbuild/BUILD/ProcMon-for-Linux-1.0.1/src/tracer/ebpf/syscall_schema.cpp:4:
/home/abuild/rpmbuild/BUILD/ProcMon-for-Linux-1.0.1/src/tracer/ebpf/syscall_schema.h: In static member function 'static std::vector<SyscallSchema::SyscallSchema> SyscallSchema::Utils::CollectSyscallSchema()':
/home/abuild/rpmbuild/BUILD/ProcMon-for-Linux-1.0.1/src/tracer/ebpf/syscall_schema.h:100:26: error: 'strcpy' is not a member of 'std'
  100 |                     std::strcpy(schema.syscallName, match[2].str().c_str());
      |                          ^~~~~~
/home/abuild/rpmbuild/BUILD/ProcMon-for-Linux-1.0.1/src/tracer/ebpf/syscall_schema.h:124:34: error: 'strcpy' is not a member of 'std'
  124 |                             std::strcpy(schema.argNames[argCount], argName.c_str());
      |                                  ^~~~~~
make[2]: *** [src/tracer/CMakeFiles/tracer-static.dir/build.make:121: src/tracer/CMakeFiles/tracer-static.dir/ebpf/syscall_schema.cpp.o] Error 1

No error with gcc 11.

@MarioHewardt MarioHewardt self-assigned this Jun 1, 2022
@MarioHewardt MarioHewardt added the bug Something isn't working label Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants