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 script won't find libuInputPlus and libevdevPlus for linking #27

Closed
depau opened this issue Oct 7, 2019 · 4 comments
Closed

Build script won't find libuInputPlus and libevdevPlus for linking #27

depau opened this issue Oct 7, 2019 · 4 comments

Comments

@depau
Copy link

depau commented Oct 7, 2019

Hi,
please see this comment reported on the Arch Linux AUR package:

https://aur.archlinux.org/packages/ydotool-git/#comment-710452

User reports the following linking issue, which I was able to reproduce in a clean Docker container:

[100%] Linking CXX executable ydotool_static
/usr/bin/ld: cannot find -luInputPlus
/usr/bin/ld: cannot find -levdevPlus
/usr/bin/ld: libydotool.a(Tool.cpp.o): in function `ydotool::Tool::ToolManager::TryDlOpen(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
Tool.cpp:(.text+0x20e): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: cannot find -luInputPlus
/usr/bin/ld: cannot find -levdevPlus
collect2: error: ld returned 1 exit status

I believe it's an issue with the build scripts, but I couldn't find anything weird.

See the following asciinema for an example of a container build: https://asciinema.org/a/yJKDNWfhzs83xGHGMDkX0Pp2L

It's pretty much this:

pacman -Syu base-devel git sudo
useradd -m -G wheel user
visudo
## (enable passwordless sudo for wheel users)
su - user
git clone https://aur.archlinux.org/yay-bin.git
cd yay-bin
makepkg
sudo pacman -U yay-bin*.pkg.*
yay -S ydotool-git
@svenschwermer
Copy link

It looks like, it's trying to statically link those libraries. At least for the AUR libraries, the static library files don't exist. That explains the error I guess:

[ 42%] Linking CXX executable ydotool_static
/usr/bin/cmake -E cmake_link_script CMakeFiles/ydotool_client_static.dir/link.txt --verbose=1
/usr/bin/c++  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -O3 -DNDEBUG  -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -rdynamic CMakeFiles/ydotool_client_static.dir/Client/ydotool.cpp.o  -o ydotool_static -L. libydotool.a -lboost_program_options -lpthread -luInputPlus -levdevPlus -static -ldl -lboost_program_options -luInputPlus -levdevPlus
/usr/bin/ld: cannot find -luInputPlus
/usr/bin/ld: cannot find -levdevPlus

@ReimuNotMoe
Copy link
Owner

This should be fixed in 710e77f

@depau
Copy link
Author

depau commented Oct 10, 2019

Hi, I tested it and now it builds.
Thank you :)

@depau depau closed this as completed Oct 10, 2019
@groszdaniel
Copy link

This is now broken again. I've tried to build it on openSUSE using cmake. In my case it's missing boost_program_options:
/usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: cannot find -lboost_program_options

The
set_target_properties(... PROPERTIES EXCLUDE_FROM_ALL TRUE)
line has gone missing from CMakeLists.txt. If I add it for all targets, it compiles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants