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

It wasn't built on ArchLinux #81

Open
hamedsbt opened this issue Mar 14, 2024 · 7 comments
Open

It wasn't built on ArchLinux #81

hamedsbt opened this issue Mar 14, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@hamedsbt
Copy link

OS:
Linux user-pc 6.7.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 08 Mar 2024

[ 83%] Linking CXX executable dist/appanvil /usr/bin/ld: CMakeFiles/appanvil.dir/src/threads/command_caller.cc.o: warning: relocation against `_ZTVN8AppArmor4Tree8LinkRuleE' in read-only section `.text._ZN8AppArmor4Tree8LinkRuleC2ERKS1_[_ZN8AppArmor4Tree8LinkRuleC5ERKS1_]' /usr/bin/ld: CMakeFiles/appanvil.dir/src/threads/command_caller.cc.o: in function `CommandCaller::get_profiles(std::initializer_list<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > const&)': command_caller.cc:(.text+0x23ed): undefined reference to `AppArmor::Parser::Parser(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: command_caller.cc:(.text+0x2415): undefined reference to `AppArmor::Parser::getProfileList[abi:cxx11]() const' /usr/bin/ld: command_caller.cc:(.text+0x24a3): undefined reference to `AppArmor::Tree::ProfileRule::name[abi:cxx11]() const' /usr/bin/ld: CMakeFiles/appanvil.dir/src/threads/command_caller.cc.o: in function `AppArmor::Tree::RuleNode::~RuleNode()': command_caller.cc:(.text._ZN8AppArmor4Tree8RuleNodeD2Ev[_ZN8AppArmor4Tree8RuleNodeD5Ev]+0xf): undefined reference to `vtable for AppArmor::Tree::RuleNode' /usr/bin/ld: CMakeFiles/appanvil.dir/src/threads/command_caller.cc.o: in function `AppArmor::Tree::ProfileRule::~ProfileRule()': command_caller.cc:(.text._ZN8AppArmor4Tree11ProfileRuleD2Ev[_ZN8AppArmor4Tree11ProfileRuleD5Ev]+0xf): undefined reference to `vtable for AppArmor::Tree::ProfileRule' /usr/bin/ld: CMakeFiles/appanvil.dir/src/threads/command_caller.cc.o: in function `AppArmor::Tree::RuleNode::RuleNode(AppArmor::Tree::RuleNode const&)': command_caller.cc:(.text._ZN8AppArmor4Tree8RuleNodeC2ERKS1_[_ZN8AppArmor4Tree8RuleNodeC5ERKS1_]+0x27): undefined reference to `vtable for AppArmor::Tree::RuleNode' /usr/bin/ld: CMakeFiles/appanvil.dir/src/threads/command_caller.cc.o: in function `AppArmor::Tree::ProfileRule::ProfileRule(AppArmor::Tree::ProfileRule const&)': command_caller.cc:(.text._ZN8AppArmor4Tree11ProfileRuleC2ERKS1_[_ZN8AppArmor4Tree11ProfileRuleC5ERKS1_]+0x27): undefined reference to `vtable for AppArmor::Tree::ProfileRule' /usr/bin/ld: CMakeFiles/appanvil.dir/src/threads/command_caller.cc.o: in function `AppArmor::Tree::FileRule::FileRule(AppArmor::Tree::FileRule const&)': command_caller.cc:(.text._ZN8AppArmor4Tree8FileRuleC2ERKS1_[_ZN8AppArmor4Tree8FileRuleC5ERKS1_]+0x27): undefined reference to `vtable for AppArmor::Tree::FileRule' /usr/bin/ld: CMakeFiles/appanvil.dir/src/threads/command_caller.cc.o: in function `AppArmor::Tree::LinkRule::LinkRule(AppArmor::Tree::LinkRule const&)': command_caller.cc:(.text._ZN8AppArmor4Tree8LinkRuleC2ERKS1_[_ZN8AppArmor4Tree8LinkRuleC5ERKS1_]+0x27): undefined reference to `vtable for AppArmor::Tree::LinkRule' /usr/bin/ld: CMakeFiles/appanvil.dir/src/threads/command_caller.cc.o: in function `AppArmor::Tree::AbstractionRule::AbstractionRule(AppArmor::Tree::AbstractionRule const&)': command_caller.cc:(.text._ZN8AppArmor4Tree15AbstractionRuleC2ERKS1_[_ZN8AppArmor4Tree15AbstractionRuleC5ERKS1_]+0x27): undefined reference to `vtable for AppArmor::Tree::AbstractionRule' /usr/bin/ld: CMakeFiles/appanvil.dir/src/threads/command_caller.cc.o:(.data.rel.ro._ZTVN8AppArmor4Tree8RuleListE[_ZTVN8AppArmor4Tree8RuleListE]+0x20): undefined reference to `AppArmor::Tree::RuleNode::operator==(AppArmor::Tree::RuleNode const&) const' /usr/bin/ld: CMakeFiles/appanvil.dir/src/threads/command_caller.cc.o:(.data.rel.ro._ZTVN8AppArmor4Tree8RuleListE[_ZTVN8AppArmor4Tree8RuleListE]+0x28): undefined reference to `AppArmor::Tree::RuleNode::operator!=(AppArmor::Tree::RuleNode const&) const' /usr/bin/ld: CMakeFiles/appanvil.dir/src/threads/command_caller.cc.o:(.data.rel.ro._ZTVN8AppArmor4Tree8RuleListE[_ZTVN8AppArmor4Tree8RuleListE]+0x30): undefined reference to `AppArmor::Tree::RuleNode::operator std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >() const' /usr/bin/ld: CMakeFiles/appanvil.dir/src/threads/command_caller.cc.o:(.data.rel.ro._ZTIN8AppArmor4Tree8RuleListE[_ZTIN8AppArmor4Tree8RuleListE]+0x10): undefined reference to `typeinfo for AppArmor::Tree::RuleNode' /usr/bin/ld: CMakeFiles/appanvil.dir/src/tabs/controller/profile_modify_controller.cc.o: in function `ProfileModifyController::intialize_abstractions()': profile_modify_controller.cc:(.text+0x95): undefined reference to `AppArmor::Tree::ProfileRule::getAbstractions[abi:cxx11]() const' /usr/bin/ld: profile_modify_controller.cc:(.text+0x100): undefined reference to `AppArmor::Tree::AbstractionRule::getPath[abi:cxx11]() const' /usr/bin/ld: CMakeFiles/appanvil.dir/src/tabs/controller/profile_modify_controller.cc.o: in function `ProfileModifyController::intialize_file_rules()': profile_modify_controller.cc:(.text+0x2e3): undefined reference to `AppArmor::Tree::ProfileRule::getFileRules[abi:cxx11]() const' /usr/bin/ld: profile_modify_controller.cc:(.text+0x36a): undefined reference to `AppArmor::Tree::FileRule::getFilename[abi:cxx11]() const' /usr/bin/ld: profile_modify_controller.cc:(.text+0x383): undefined reference to `AppArmor::Tree::FileRule::getFilemode() const' /usr/bin/ld: profile_modify_controller.cc:(.text+0x39c): undefined reference to `AppArmor::Tree::RuleNode::getPrefix() const' /usr/bin/ld: profile_modify_controller.cc:(.text+0x439): undefined reference to `AppArmor::Tree::FileMode::getRead() const' /usr/bin/ld: profile_modify_controller.cc:(.text+0x477): undefined reference to `AppArmor::Tree::FileMode::getWrite() const' /usr/bin/ld: profile_modify_controller.cc:(.text+0x4b5): undefined reference to `AppArmor::Tree::FileMode::getLink() const' /usr/bin/ld: profile_modify_controller.cc:(.text+0x4f3): undefined reference to `AppArmor::Tree::FileMode::getLock() const' /usr/bin/ld: profile_modify_controller.cc:(.text+0x53b): undefined reference to `AppArmor::Tree::FileMode::getExecuteMode[abi:cxx11]() const' /usr/bin/ld: profile_modify_controller.cc:(.text+0x58c): undefined reference to `AppArmor::Tree::PrefixNode::operator std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >() const' /usr/bin/ld: CMakeFiles/appanvil.dir/src/tabs/controller/profile_modify_controller.cc.o: in function `ProfileModifyController::handle_profile_changed()': profile_modify_controller.cc:(.text+0x805): undefined reference to `AppArmor::Parser::getProfileList[abi:cxx11]() const' /usr/bin/ld: profile_modify_controller.cc:(.text+0x87e): undefined reference to `AppArmor::Tree::ProfileRule::name[abi:cxx11]() const' /usr/bin/ld: profile_modify_controller.cc:(.text+0x894): undefined reference to `AppArmor::Tree::ProfileRule::name[abi:cxx11]() const' /usr/bin/ld: CMakeFiles/appanvil.dir/src/tabs/controller/profile_modify_controller.cc.o: in function `ProfileModifyController::handle_file_rule_changed(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': profile_modify_controller.cc:(.text+0xaed): undefined reference to `AppArmor::Tree::FileRule::getFilename[abi:cxx11]() const' /usr/bin/ld: profile_modify_controller.cc:(.text+0xb11): undefined reference to `AppArmor::Tree::FileRule::getFilemode() const' /usr/bin/ld: profile_modify_controller.cc:(.text+0xb20): undefined reference to `AppArmor::Tree::FileMode::getRead() const' /usr/bin/ld: profile_modify_controller.cc:(.text+0xb35): undefined reference to `AppArmor::Tree::FileMode::getWrite() const' /usr/bin/ld: profile_modify_controller.cc:(.text+0xb4a): undefined reference to `AppArmor::Tree::FileMode::getAppend() const' /usr/bin/ld: profile_modify_controller.cc:(.text+0xb5f): undefined reference to `AppArmor::Tree::FileMode::getMemoryMap() const' /usr/bin/ld: profile_modify_controller.cc:(.text+0xb74): undefined reference to `AppArmor::Tree::FileMode::getLink() const' /usr/bin/ld: profile_modify_controller.cc:(.text+0xb89): undefined reference to `AppArmor::Tree::FileMode::getLock() const' /usr/bin/ld: profile_modify_controller.cc:(.text+0xcbf): undefined reference to `AppArmor::Tree::FileMode::FileMode(bool, bool, bool, bool, bool, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: profile_modify_controller.cc:(.text+0xcd2): undefined reference to `AppArmor::Tree::FileMode::empty() const' /usr/bin/ld: profile_modify_controller.cc:(.text+0xd23): undefined reference to `AppArmor::Tree::FileRule::getExecTarget[abi:cxx11]() const' /usr/bin/ld: profile_modify_controller.cc:(.text+0xd47): undefined reference to `AppArmor::Tree::FileRule::getFilename[abi:cxx11]() const' /usr/bin/ld: profile_modify_controller.cc:(.text+0xd80): undefined reference to `AppArmor::Tree::FileRule::FileRule(unsigned long, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, AppArmor::Tree::FileMode const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: profile_modify_controller.cc:(.text+0xfab): undefined reference to `AppArmor::Tree::FileMode::getExecuteMode[abi:cxx11]() const' /usr/bin/ld: CMakeFiles/appanvil.dir/src/tabs/controller/profile_modify_controller.cc.o: in function `ProfileModifyController::handle_edit_rule(AppArmor::Tree::FileRule&, AppArmor::Tree::FileRule const&)': profile_modify_controller.cc:(.text+0x114c): undefined reference to `AppArmor::Parser::editRule(AppArmor::Tree::ProfileRule&, AppArmor::Tree::FileRule&, AppArmor::Tree::FileRule const&, std::ostream&)' /usr/bin/ld: CMakeFiles/appanvil.dir/src/tabs/controller/profile_modify_controller.cc.o: in function `ProfileModifyController::handle_remove_rule(AppArmor::Tree::FileRule&)': profile_modify_controller.cc:(.text+0x11f7): undefined reference to `AppArmor::Tree::FileRule::getFilename[abi:cxx11]() const' /usr/bin/ld: profile_modify_controller.cc:(.text+0x1268): undefined reference to `void AppArmor::Parser::removeRule<AppArmor::Tree::FileRule>(AppArmor::Tree::ProfileRule&, AppArmor::Tree::FileRule&, std::ostream&)' /usr/bin/ld: CMakeFiles/appanvil.dir/src/tabs/controller/profile_modify_controller.cc.o: in function `ProfileModifyController::handle_cancel_called()': profile_modify_controller.cc:(.text+0x12e8): undefined reference to `AppArmor::Parser::cancelChanges()' /usr/bin/ld: CMakeFiles/appanvil.dir/src/tabs/controller/profile_modify_controller.cc.o: in function `ProfileModifyController::handle_apply_called()': profile_modify_controller.cc:(.text+0x131e): undefined reference to `AppArmor::Parser::saveChanges()' /usr/bin/ld: CMakeFiles/appanvil.dir/src/tabs/controller/profile_modify_controller.cc.o: in function `AppArmor::Tree::FileRule::~FileRule()': profile_modify_controller.cc:(.text._ZN8AppArmor4Tree8FileRuleD2Ev[_ZN8AppArmor4Tree8FileRuleD5Ev]+0xf): undefined reference to `vtable for AppArmor::Tree::FileRule' /usr/bin/ld: CMakeFiles/appanvil.dir/src/tabs/view/profiles.cc.o: in function `Profiles::find_path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': profiles.cc:(.text+0x1b0): undefined reference to `AppArmor::Parser::getPath[abi:cxx11]() const' /usr/bin/ld: CMakeFiles/appanvil.dir/src/tabs/view/profile_modify.cc.o: in function `ProfileModifyImpl<AppArmor::Parser>::ProfileModifyImpl(std::shared_ptr<AppArmor::Parser>, std::shared_ptr<AppArmor::Tree::ProfileRule> const&)': profile_modify.cc:(.text._ZN17ProfileModifyImplIN8AppArmor6ParserEEC2ESt10shared_ptrIS1_ERKS3_INS0_4Tree11ProfileRuleEE[_ZN17ProfileModifyImplIN8AppArmor6ParserEEC2ESt10shared_ptrIS1_ERKS3_INS0_4Tree11ProfileRuleEE]+0x71e): undefined reference to `AppArmor::Tree::ProfileRule::name[abi:cxx11]() const' /usr/bin/ld: CMakeFiles/appanvil.dir/src/tabs/view/profile_modify.cc.o: in function `ProfileModifyImpl<AppArmor::Parser>::ProfileModifyImpl(std::shared_ptr<AppArmor::Parser>, std::shared_ptr<AppArmor::Tree::ProfileRule> const&)': profile_modify.cc:(.text._ZN17ProfileModifyImplIN8AppArmor6ParserEEC1ESt10shared_ptrIS1_ERKS3_INS0_4Tree11ProfileRuleEE[_ZN17ProfileModifyImplIN8AppArmor6ParserEEC1ESt10shared_ptrIS1_ERKS3_INS0_4Tree11ProfileRuleEE]+0x71e): undefined reference to `AppArmor::Tree::ProfileRule::name[abi:cxx11]() const' /usr/bin/ld: CMakeFiles/appanvil.dir/src/tabs/view/profile_modify.cc.o: in function `ProfileModifyImpl<AppArmor::Parser>::handle_apply_visible()': profile_modify.cc:(.text._ZN17ProfileModifyImplIN8AppArmor6ParserEE20handle_apply_visibleEv[_ZN17ProfileModifyImplIN8AppArmor6ParserEE20handle_apply_visibleEv]+0x36): undefined reference to `AppArmor::Parser::hasChanges()' /usr/bin/ld: CMakeFiles/appanvil.dir/src/tabs/view/profile_modify.cc.o: in function `ProfileModifyImpl<AppArmor::Parser>::update_profile_text()': profile_modify.cc:(.text._ZN17ProfileModifyImplIN8AppArmor6ParserEE19update_profile_textEv[_ZN17ProfileModifyImplIN8AppArmor6ParserEE19update_profile_textEv]+0x3c): undefined reference to `AppArmor::Parser::operator std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >() const' /usr/bin/ld: CMakeFiles/appanvil.dir/src/tabs/view/profile_modify.cc.o: in function `ProfileModifyImpl<AppArmor::Parser>::handle_raw_profile_text_change()': profile_modify.cc:(.text._ZN17ProfileModifyImplIN8AppArmor6ParserEE30handle_raw_profile_text_changeEv[_ZN17ProfileModifyImplIN8AppArmor6ParserEE30handle_raw_profile_text_changeEv]+0x45): undefined reference to `AppArmor::Parser::operator std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >() const' /usr/bin/ld: CMakeFiles/appanvil.dir/src/tabs/view/profile_modify.cc.o: in function `ProfileModifyImpl<AppArmor::Parser>::apply_raw_profile_text_change()': profile_modify.cc:(.text._ZN17ProfileModifyImplIN8AppArmor6ParserEE29apply_raw_profile_text_changeEv[_ZN17ProfileModifyImplIN8AppArmor6ParserEE29apply_raw_profile_text_changeEv]+0xac): undefined reference to `AppArmor::Parser::updateFromString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: warning: creating DT_TEXTREL in a PIE collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/appanvil.dir/build.make:558: dist/appanvil] Error 1 make[1]: *** [CMakeFiles/Makefile2:148: CMakeFiles/appanvil.dir/all] Error 2 make: *** [Makefile:166: all] Error 2

@hamedsbt hamedsbt added the bug Something isn't working label Mar 14, 2024
@jack-ullery
Copy link
Owner

Thank you for submitting the issue! When I get time, I'll see if I can build on that OS.

Were there any issues building and installing libappanvil? I suppose it's possible that a recent change there could have made it incompatible with the main branch here.

@hamedsbt
Copy link
Author

When I have time, I'll try to build libappanvill.

@gentoosys
Copy link

also can't compile on arch

/usr/src/debug/appanvil-git/AppAnvil/src/tabs/view/profile_modify.cc:67:(.text+0x19e6): undefined reference to AppArmor::Parser::updateFromString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /usr/bin/ld: /tmp/ccC08Xuk.ltrans4.ltrans.o: in function Profiles::handle_modify_profile_toggle()':
/usr/src/debug/appanvil-git/AppAnvil/src/tabs/view/profile_modify.cc:93:(.text+0x936c): undefined reference to AppArmor::Tree::ProfileRule::name[abi:cxx11]() const' /usr/bin/ld: /usr/src/debug/appanvil-git/AppAnvil/src/tabs/view/profile_modify.cc:43:(.text+0x978f): undefined reference to AppArmor::Parser::hasChanges()'
/usr/bin/ld: /tmp/ccC08Xuk.ltrans5.ltrans.o: in function void std::__cxx11::list<AppArmor::Tree::ProfileRule, std::allocator<AppArmor::Tree::ProfileRule> >::_M_assign_dispatch<std::_List_const_iterator<AppArmor::Tree::ProfileRule> >(std::_List_const_iterator<AppArmor::Tree::ProfileRule>, std::_List_const_iterator<AppArmor::Tree::ProfileRule>, std::__false_type) [clone .isra.0]': /usr/include/libappanvil/tree/ProfileRule.hh:10:(.text+0x545e): undefined reference to vtable for AppArmor::Tree::ProfileRule'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/appanvil.dir/build.make:558: dist/appanvil] Error 1
make[1]: *** [CMakeFiles/Makefile2:148: CMak

@jack-ullery
Copy link
Owner

Weirdly enough, when I tried to build on Manjaro, it compiled without error for each kernel version I tested.

These were the kernels I tested on:

  • 6.6.26-1-MANJARO
  • 6.7.0-1-rt6-MANJARO
  • 6.8.8-2-MANJARO

It's possible there is a difference between Arch and Manjaro that helped the build. Or maybe this is another issue, perhaps related to the CPU architecture (I tested on an x86_64 CPU).

For the sake of redundancy, here are the commands I ran:

cd ~/Documents
git clone https://github.com/jack-ullery/libappanvil.git
cd libappanvil
git submodule update --init --recursive --remote
cmake .
make && sudo make install

cd ~/Documents
git clone https://github.com/jack-ullery/AppAnvil.git
cd AppAnvil
cmake .
make -j16

@gentoosys
Copy link

@Yoake2000
Copy link

Tried compiling libappanvil from source then appanvil on Arch. Both compiled successfully. I initially used the aur libappanvil and appanvil would fail to compile with it. There's maybe something wrong with the PKGBUILD for libappanvil since it hasn't been updated since last year.

@jack-ullery
Copy link
Owner

I think you guys are right, I also wasn't able to get the PKGBUILD to work. Unfortunately, I wasn't the one to make those builds: appanvil-git, libappanvil-git, and have no control over them.

So maybe @JamesClarke7283 can help with that

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

4 participants