Closed liyan-ah closed 12 months ago
Which version of compiler are you using?
Which version of compiler are you using?
@Officeyutong
$ gcc --version
gcc (GCC) 12.3.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ g++ --version
g++ (GCC) 12.3.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ clang --version
clang version 16.0.6 (Red Hat 16.0.6-2.module_el8+588+6f71ce7b)
Target: x86_64-redhat-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Seems that I forget to link librt, thanks for your issue! I'll fix it soon
Which version of compiler are you using?
@Officeyutong
$ gcc --version gcc (GCC) 12.3.0 Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ g++ --version g++ (GCC) 12.3.0 Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ clang --version clang version 16.0.6 (Red Hat 16.0.6-2.module_el8+588+6f71ce7b) Target: x86_64-redhat-linux-gnu Thread model: posix InstalledDir: /usr/bin
Hey, could you please help me try https://github.com/Officeyutong/bpftime/tree/fix-issue-73 ?
@Officeyutong Still shm
related errors:
Consolidate compiler generated dependencies of target bpftimetool
gmake[3]: Leaving directory '/home/pdliyan/bpftime/build'
gmake[3]: Entering directory '/home/pdliyan/bpftime/build'
[ 98%] Building CXX object tools/bpftimetool/CMakeFiles/bpftimetool.dir/main.cpp.o
[ 98%] Linking CXX executable bpftimetool
../../runtime/libruntime.a(bpftime_shm_internal.cpp.o): In function `bpftime_remove_global_shm':
bpftime_shm_internal.cpp:(.text+0x4273): undefined reference to `shm_unlink'
../../runtime/libruntime.a(bpftime_shm_internal.cpp.o): In function `bpftime::bpftime_shm::bpftime_shm(char const*, bpftime::shm_open_type)':
bpftime_shm_internal.cpp:(.text+0xcf6d): undefined reference to `shm_unlink'
../../runtime/libruntime.a(bpftime_shm_internal.cpp.o): In function `boost::interprocess::shared_memory_object::shared_memory_object(boost::interprocess::open_only_t, char const*, boost::interprocess::mode_t)':
bpftime_shm_internal.cpp:(.text._ZN5boost12interprocess20shared_memory_objectC2ENS0_11open_only_tEPKcNS0_6mode_tE[_ZN5boost12interprocess20shared_memory_objectC5ENS0_11open_only_tEPKcNS0_6mode_tE]+0xa1): undefined reference to `shm_open'
../../runtime/libruntime.a(bpftime_shm_internal.cpp.o): In function `void boost::interprocess::ipcdetail::managed_open_or_create_impl<boost::interprocess::shared_memory_object, 16ul, true, false>::priv_open_or_create<char const*, boost::interprocess::ipcdetail::create_open_func<boost::interprocess::ipcdetail::basic_managed_memory_impl<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index, 16ul> > >(boost::interprocess::ipcdetail::create_enum_t, char const* const&, unsigned long, boost::interprocess::mode_t, void const*, boost::interprocess::permissions const&, boost::interprocess::ipcdetail::create_open_func<boost::interprocess::ipcdetail::basic_managed_memory_impl<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family, boost::interprocess::offset_ptr<void, long, unsigned long, 0ul>, 0ul>, boost::interprocess::iset_index, 16ul> >)':
bpftime_shm_internal.cpp:(.text._ZN5boost12interprocess9ipcdetail27managed_open_or_create_implINS0_20shared_memory_objectELm16ELb1ELb0EE19priv_open_or_createIPKcNS1_16create_open_funcINS1_25basic_managed_memory_implIcNS0_15rbtree_best_fitINS0_12mutex_familyENS0_10offset_ptrIvlmLm0EEELm0EEENS0_10iset_indexELm16EEEEEEEvNS1_13create_enum_tERKT_mNS0_6mode_tEPKvRKNS0_11permissionsET0_[_ZN5boost12interprocess9ipcdetail27managed_open_or_create_implINS0_20shared_memory_objectELm16ELb1ELb0EE19priv_open_or_createIPKcNS1_16create_open_funcINS1_25basic_managed_memory_implIcNS0_15rbtree_best_fitINS0_12mutex_familyENS0_10offset_ptrIvlmLm0EEELm0EEENS0_10iset_indexELm16EEEEEEEvNS1_13create_enum_tERKT_mNS0_6mode_tEPKvRKNS0_11permissionsET0_]+0x138): undefined reference to `shm_open'
bpftime_shm_internal.cpp:(.text._ZN5boost12interprocess9ipcdetail27managed_open_or_create_implINS0_20shared_memory_objectELm16ELb1ELb0EE19priv_open_or_createIPKcNS1_16create_open_funcINS1_25basic_managed_memory_implIcNS0_15rbtree_best_fitINS0_12mutex_familyENS0_10offset_ptrIvlmLm0EEELm0EEENS0_10iset_indexELm16EEEEEEEvNS1_13create_enum_tERKT_mNS0_6mode_tEPKvRKNS0_11permissionsET0_[_ZN5boost12interprocess9ipcdetail27managed_open_or_create_implINS0_20shared_memory_objectELm16ELb1ELb0EE19priv_open_or_createIPKcNS1_16create_open_funcINS1_25basic_managed_memory_implIcNS0_15rbtree_best_fitINS0_12mutex_familyENS0_10offset_ptrIvlmLm0EEELm0EEENS0_10iset_indexELm16EEEEEEEvNS1_13create_enum_tERKT_mNS0_6mode_tEPKvRKNS0_11permissionsET0_]+0x295): undefined reference to `shm_open'
bpftime_shm_internal.cpp:(.text._ZN5boost12interprocess9ipcdetail27managed_open_or_create_implINS0_20shared_memory_objectELm16ELb1ELb0EE19priv_open_or_createIPKcNS1_16create_open_funcINS1_25basic_managed_memory_implIcNS0_15rbtree_best_fitINS0_12mutex_familyENS0_10offset_ptrIvlmLm0EEELm0EEENS0_10iset_indexELm16EEEEEEEvNS1_13create_enum_tERKT_mNS0_6mode_tEPKvRKNS0_11permissionsET0_[_ZN5boost12interprocess9ipcdetail27managed_open_or_create_implINS0_20shared_memory_objectELm16ELb1ELb0EE19priv_open_or_createIPKcNS1_16create_open_funcINS1_25basic_managed_memory_implIcNS0_15rbtree_best_fitINS0_12mutex_familyENS0_10offset_ptrIvlmLm0EEELm0EEENS0_10iset_indexELm16EEEEEEEvNS1_13create_enum_tERKT_mNS0_6mode_tEPKvRKNS0_11permissionsET0_]+0x448): undefined reference to `shm_open'
collect2: error: ld returned 1 exit status
gmake[3]: *** [tools/bpftimetool/CMakeFiles/bpftimetool.dir/build.make:104: tools/bpftimetool/bpftimetool] Error 1
gmake[3]: Leaving directory '/home/pdliyan/bpftime/build'
gmake[2]: *** [CMakeFiles/Makefile2:868: tools/bpftimetool/CMakeFiles/bpftimetool.dir/all] Error 2
gmake[2]: Leaving directory '/home/pdliyan/bpftime/build'
gmake[1]: *** [Makefile:136: all] Error 2
gmake[1]: Leaving directory '/home/pdliyan/bpftime/build'
make: *** [Makefile:54: release] Error 2
Seems that tools/bpftimetool
missed librt
as well.
Same problem in runtime/unit-test
and runtime/test
.
Same problem in
runtime/unit-test
andruntime/test
.
I've linked librt at runtime
and bpftimetool
, could you please help me try again?
Same problem in
runtime/unit-test
andruntime/test
.I've linked librt at
runtime
andbpftimetool
, could you please help me try again?
@Officeyutong Those errors are reported with your pushes.
Besides, runtime/agent/CMakeLists.txt
need -lrt
.
Those are my local changes, hope it will help:
[pdliyan@134dc04b695e bpftime]$ git diff daemon/CMakeLists.txt
[pdliyan@134dc04b695e bpftime]$ git st .
On branch master
Your branch is up to date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
(commit or discard the untracked or modified content in submodules)
modified: bpftime-verifier/ebpf-verifier (modified content)
modified: runtime/agent/CMakeLists.txt
modified: runtime/test/CMakeLists.txt
modified: runtime/test/bpf/Makefile
modified: runtime/unit-test/CMakeLists.txt
modified: third_party/bpftool (modified content)
modified: tools/bpftimetool/CMakeLists.txt
no changes added to commit (use "git add" and/or "git commit -a")
Those are my local changes, hope it will help:
[pdliyan@134dc04b695e bpftime]$ git diff daemon/CMakeLists.txt [pdliyan@134dc04b695e bpftime]$ git st . On branch master Your branch is up to date with 'origin/master'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git restore <file>..." to discard changes in working directory) (commit or discard the untracked or modified content in submodules) modified: bpftime-verifier/ebpf-verifier (modified content) modified: runtime/agent/CMakeLists.txt modified: runtime/test/CMakeLists.txt modified: runtime/test/bpf/Makefile modified: runtime/unit-test/CMakeLists.txt modified: third_party/bpftool (modified content) modified: tools/bpftimetool/CMakeLists.txt no changes added to commit (use "git add" and/or "git commit -a")
I've updated CMakeLists in runtime/agent
, runtime/test
, runtime/unit-test
, tools/bpftimetool
Those are my local changes, hope it will help:
[pdliyan@134dc04b695e bpftime]$ git diff daemon/CMakeLists.txt [pdliyan@134dc04b695e bpftime]$ git st . On branch master Your branch is up to date with 'origin/master'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git restore <file>..." to discard changes in working directory) (commit or discard the untracked or modified content in submodules) modified: bpftime-verifier/ebpf-verifier (modified content) modified: runtime/agent/CMakeLists.txt modified: runtime/test/CMakeLists.txt modified: runtime/test/bpf/Makefile modified: runtime/unit-test/CMakeLists.txt modified: third_party/bpftool (modified content) modified: tools/bpftimetool/CMakeLists.txt no changes added to commit (use "git add" and/or "git commit -a")
I've updated CMakeLists in
runtime/agent
,runtime/test
,runtime/unit-test
,tools/bpftimetool
Works okay in my local environment.
Describe the bug
make release
reports error.To Reproduce
cd bpftime && make release
Expected behavior
Screenshots
Desktop (please complete the following information):
Additional context
Not familiar with
gmake
, have to send this bug report. With-lrt
flag, my local test code withshm_open
works okay.