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

CMake Error: "install FILES given no DESTINATION!" #481

Closed
jzbor opened this issue Apr 6, 2021 · 14 comments
Closed

CMake Error: "install FILES given no DESTINATION!" #481

jzbor opened this issue Apr 6, 2021 · 14 comments
Labels
Milestone

Comments

@jzbor
Copy link

jzbor commented Apr 6, 2021

Describe the bug

I get the following error when installing (via aur):

CMake Error at CMakeLists.txt:84 (install):
  install FILES given no DESTINATION!

Logs

Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /home/jzbor/.cache/yay/touchegg/src/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make -f Makefile cmTC_caf5a/fast && /usr/bin/make  -f CMakeFiles/cmTC_caf5a.dir/build.make CMakeFiles/cmTC_caf5a.dir/build
make[1]: Entering directory '/home/jzbor/.cache/yay/touchegg/src/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_caf5a.dir/src.c.o
/usr/bin/cc -DCMAKE_HAVE_LIBC_PTHREAD  -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt  -o CMakeFiles/cmTC_caf5a.dir/src.c.o -c /home/jzbor/.cache/yay/touchegg/src/build/CMakeFiles/CMakeTmp/src.c
Linking C executable cmTC_caf5a
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_caf5a.dir/link.txt --verbose=1
/usr/bin/cc -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt  -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now  -rdynamic CMakeFiles/cmTC_caf5a.dir/src.c.o -o cmTC_caf5a
/usr/bin/ld: CMakeFiles/cmTC_caf5a.dir/src.c.o: in function `main':
src.c:(.text.startup+0x24): undefined reference to `pthread_create'
/usr/bin/ld: src.c:(.text.startup+0x2e): undefined reference to `pthread_detach'
/usr/bin/ld: src.c:(.text.startup+0x38): undefined reference to `pthread_cancel'
/usr/bin/ld: src.c:(.text.startup+0x44): undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_caf5a.dir/build.make:99: cmTC_caf5a] Error 1
make[1]: Leaving directory '/home/jzbor/.cache/yay/touchegg/src/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:127: cmTC_caf5a/fast] Error 2


Source file was:
#include <pthread.h>

static void* test_func(void* data)
{
  return data;
}

int main(void)
{
  pthread_t thread;
  pthread_create(&thread, NULL, test_func, NULL);
  pthread_detach(thread);
  pthread_cancel(thread);
  pthread_join(thread, NULL);
  pthread_atfork(NULL, NULL, NULL);
  pthread_exit(NULL);

  return 0;
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/jzbor/.cache/yay/touchegg/src/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make -f Makefile cmTC_ce0df/fast && /usr/bin/make  -f CMakeFiles/cmTC_ce0df.dir/build.make CMakeFiles/cmTC_ce0df.dir/build
make[1]: Entering directory '/home/jzbor/.cache/yay/touchegg/src/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_ce0df.dir/CheckFunctionExists.c.o
/usr/bin/cc   -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_ce0df.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.20/Modules/CheckFunctionExists.c
Linking C executable cmTC_ce0df
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_ce0df.dir/link.txt --verbose=1
/usr/bin/cc -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -DCHECK_FUNCTION_EXISTS=pthread_create -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now  -rdynamic CMakeFiles/cmTC_ce0df.dir/CheckFunctionExists.c.o -o cmTC_ce0df  -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_ce0df.dir/build.make:99: cmTC_ce0df] Error 1
make[1]: Leaving directory '/home/jzbor/.cache/yay/touchegg/src/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:127: cmTC_ce0df/fast] Error 2

Your environment

  • Version of Touchégg: The problem occured when updating to either touchegg or touchegg-git on the aur
  • Operating System: Artix linux
  • Desktop Environment: X11 + DWM
@JoseExposito
Copy link
Owner

Do you have base-devel installed? It is a weird error...

@jzbor
Copy link
Author

jzbor commented Apr 6, 2021

Yes I do. It does look pretty odd. Unfortunately I am not at all familiar with touchegg's build scripts, so I also couldn't figure out what the error is myself...

@jzbor
Copy link
Author

jzbor commented Apr 6, 2021

Ah I think the problem is with the added systemd service install, as Artix doesn't have systemd...

EDIT: ... so there is no $SYSTEMD_SERVICE_DIR to install to.

It would be nice if it would just ignore the systemd files if systemd is not available...

@JoseExposito
Copy link
Owner

Mmmm that's problematic because Touchégg needs systemd to run its daemon as part of the input group and have access to your touchpad/touchscreen.

It'd be possible to addapt the build, but that should be done in the Artix package by patching the CMake config. This is not something I can fix because it'll affect distros with systemd... And that is almost every "popular" distro.

So, I'm afraid I cannot fix it, but you or any other Artix user can package it for your distro.

@jzbor
Copy link
Author

jzbor commented Apr 15, 2021

@JoseExposito Would it be possible to add a (c)make flag or something to leave out the systemd part in order to make packaging it for non-systemd distros more trivial?

JoseExposito added a commit that referenced this issue Apr 16, 2021
Facilitate packaging Touchégg in non systemd Linux distributions by
adding a CMake flag to avoid installing systemd related files
@JoseExposito
Copy link
Owner

Of course: 0b21ca4

Let me know if you finally manage to package this without systemd so I can add it to the README 😄

@JoseExposito JoseExposito added this to the 2.0.10 milestone Apr 16, 2021
@jzbor
Copy link
Author

jzbor commented Apr 16, 2021

Thanks for your support! I have created an aur package: aur/touchegg-nosystemd. It seems to work very well so far. I really like touchegg, so not being able to use it without switching distro would have been very unfortunate. The solution right now is perfect!

@jzbor
Copy link
Author

jzbor commented Apr 16, 2021

Also I cheated a little with the versioning: I called it 2.0.9 but it uses the zip generated from the repo at the commit which added nosystemd support. I will change it when 2.0.10 drops. But I think for now it suffices as a solution, especially since there were no other changes apart from typos anyway since 2.0.9.

@JoseExposito
Copy link
Owner

Cool, added to the README:
dc235f2

@ConstantMan
Copy link

@jzbor Hey i have Arch but i wanted to try touchegg-nosystemd is there anyway to make them work or I must have another init program ?

@MashukeAlam
Copy link

It's not working as we are using Artix Linux with no SystemD....

@JoseExposito
Copy link
Owner

Hi @MashukeAlam

Have a look to https://aur.archlinux.org/packages/touchegg-nosystemd

It is packaged for your distro. I haven't tested it personally, but I hope it works for you.

@MashukeAlam
Copy link

Hi @MashukeAlam

Have a look to https://aur.archlinux.org/packages/touchegg-nosystemd

It is packaged for your distro. I haven't tested it personally, but I hope it works for you.

Yes! It does work.
💚
1.yay -S touchegg
2.Then select the 3rd option (which is nosystemd)
3. Run touchegg --daemon
4. Restart.
5. Install touche and voilà ur done.

@haarp
Copy link

haarp commented Aug 11, 2023

fwiw, I have created a Gentoo ebuild for Touchegg in which systemd is optional. I've been using it without systemd successfully for a few days now :)

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

No branches or pull requests

5 participants