ZephyrusBling icon indicating copy to clipboard operation
ZephyrusBling copied to clipboard

Building on Ubuntu libmsgsl-dev does not satisfy cmake

Open guysoft opened this issue 5 years ago • 7 comments

Hey, trying to figure out how to resolve build dependencies on Ubuntu.

Stuck with libmsgsl-dev. How would I install that outside AUR and with cmake?

So far I resolved the deps with:

apt-get libdbus-cpp-dev libfmt-dev libmsgsl-dev

And placing CLI11.hpp in /usr/include Then editing CMakeLists.txt to include:

-find_package(CLI11 REQUIRED)
+include_directories(/usr/include/)

And also built and installed sdbus-cpp following the instructions on their website (and used checkinstall for good measure)

I added libmsgsl-dev which is Microsoft Guidelines Support Library (GSL). But it does not seem to be recognized, so I also changed this:

-find_package(Microsoft.GSL REQUIRED)
+include_directories(/usr/include/gsl)

But it still gives:

CMake Error at CMakeLists.txt:60 (add_executable):
  Target "zephyrusblingd" links to target "Microsoft.GSL::GSL" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?

guysoft avatar Aug 23 '20 17:08 guysoft

Hey guysoft,

I was able to make it compile by building Microsoft GSL from source. You can clone from this link, the building process is pretty straightforward: https://github.com/microsoft/GSL

However, I have another issue when trying to run the app:

me@zephyrus:~$ zephyrusbling --text "Test" --fx translate:0,20,0:3,-25,0
[org.meumeu.bling.CreateTextError] execve failed: No such file or directory

Do you have any idea on how to make it work?

Thank you

Sydneyaja avatar Aug 31 '20 20:08 Sydneyaja

I'm getting the same error as @Sydneyaja

Tried running daemons as sudo, no effect

DaavisGit avatar Sep 07 '20 17:09 DaavisGit

However, I have another issue when trying to run the app:

me@zephyrus:~$ zephyrusbling --text "Test" --fx translate:0,20,0:3,-25,0
[org.meumeu.bling.CreateTextError] execve failed: No such file or directory

Do you have any idea on how to make it work?

Thank you

Do you have imagemagick installed? It's used at runtime to render the text, that must be why execve fails.

I added libmsgsl-dev which is Microsoft Guidelines Support Library (GSL). But it does not seem to be recognized, so I also changed this:

-find_package(Microsoft.GSL REQUIRED)
+include_directories(/usr/include/gsl)

But it still gives:

CMake Error at CMakeLists.txt:60 (add_executable):
  Target "zephyrusblingd" links to target "Microsoft.GSL::GSL" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?

If you use GSL with include_directories instead of find_package, you should also remove it from target_link_libraries here

Meumeu avatar Sep 10 '20 09:09 Meumeu

I already found that I had to install imagemagick. Thanks for the tip.

I can display images easy but for text it returns [org.meumeu.bling.CreateTextError] Cannot load from memory: Image not of any known type, or corrupt

Its fine tho, I coded a workaround to use tmp file like so: image

DaavisGit avatar Sep 10 '20 09:09 DaavisGit

Created a fork here: https://github.com/DaavisGit/ZephyrusBling

DaavisGit avatar Sep 10 '20 09:09 DaavisGit

Ubuntu 20.04 LTS (or earlier) libmsgsl-dev package does not have the corresponding CMake files. For later versions of ubuntu, they are included.

SimonMarynissen avatar May 05 '21 11:05 SimonMarynissen

Ok, Confirmed current GSL build works fine. You need to build and install both GSL and CLI11. Once I do that I also reach:

 [org.meumeu.bling.CreateTextError] Cannot load from memory: Image not of any known type, or corrupt

guysoft avatar May 09 '21 20:05 guysoft