jarcode-foss / glava

GLava - OpenGL audio spectrum visualizer
GNU General Public License v3.0
1.17k stars 59 forks source link

meson.build:125:2: ERROR: C library 'lua' not found #132

Closed Aeres-u99 closed 5 years ago

Aeres-u99 commented 5 years ago

On ubuntu 18.04 (Elementary OS) the command meson build --prefix /usr gave the following error:

The Meson build system
Version: 0.49.2
Source dir: /home/akuma/new_configs/glava
Build dir: /home/akuma/new_configs/glava/build
Build type: native build
Project name: glava
Project version: v1.6.3-72-g5ff291f
Native C compiler: cc (gcc 7.4.0 "cc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0")
Build machine cpu family: x86_64
Build machine cpu: x86_64
Dependency threads found: YES 
Library pulse found: YES
Library pulse-simple found: YES
Library dl found: YES
Library m found: YES
Library X11 found: YES
Library Xext found: YES
Library Xrender found: YES
Program luac found: YES (/usr/bin/luac)
Program cp found: YES (/bin/cp)
Library X11 found: YES

meson.build:125:2: ERROR:  C library 'lua' not found
Aeres-u99 commented 5 years ago

This issue was fixed on ubuntu by replacing lua on line 125 with lua5.1 in meson.build

executable(
    'glava-config',
    install: true,
    sources: 'glava-config/entry.c',
    dependencies: [
      cc.find_library('X11'),
      cc.find_library('lua')
    ])
executable(
    'glava-config',
    install: true,
    sources: 'glava-config/entry.c',
    dependencies: [
      cc.find_library('X11'),
      cc.find_library('lua5.1')
    ])
jarcode-foss commented 5 years ago

This is because Lua is not ABI compatible between releases, even if they use strictly 5.1 features. I can hack the meson.build just to run on whatever happens to be present on the system (lua, lua5.1, lua5.2, lua5.3, luajit-5.1).

glava-config currently targets 5.3 but I wouldn't be surprised to see it work with 5.1 and LuaJIT.

That being said, glava-config is not in a complete state. Changes made to master should only be expected to be stable for glava, glava-cli, and glava-obs (to a degree). You can always just disable the Gtk+ configuration tool using -Ddisable-config=true.

Aeres-u99 commented 5 years ago

Indeed I wish we could use some sort of wildcard like * or something in meson.build, is there no better way? Trust me this issue gave me quite a good share of headache

jarcode-foss commented 5 years ago

@Aeres-u99 112e371 should fix this issue in a fairly clean way.

Indeed I wish we could use some sort of wildcard like * or something in meson.build

A wildcard match for a dependency would be a source of all sorts of breakages. I just wrote it to explicitly handle all valid Lua versions that can be used.

Aeres-u99 commented 5 years ago

New commit seems much better :D I guess it will work then! Thank you. I was thinking of including few example usage in documentations. Should I do that? (selfish reasons: It took 30ish minutes for me to figure out how to show multiple visualisers on screen, including examples might help)

jarcode-foss commented 5 years ago

@Aeres-u99 Once I release 2.0, there will be a Gtk+ configuration tool to make everything much clearer for the average user who doesn't really need to write out GLSL themselves.

2.0 will also include 'profiles' (just directories in .config/glava/profiles/) with entirely separate configuration roots so that you don't need to bother with multiple entry points. It also will have support for systemd user service generation without needing to muck with whatever methods people were previously using to autostart GLava.

Once that comes around I will revisit improving documentation -- although I'm not sure what is unclear in the docs. Part of the difficulty with configuration right now is just rooted in the GLSL format and having more options than most people care about (thus requiring them to sift through the *.glsl files to find what they want)

Aeres-u99 commented 5 years ago

I see indeed it sounds good. (I was just thinking about gtk based tool) I shall wait for it then, the part that is unclear in doc are as follows: 1) Direct installation instructions for ubuntu/ debian, now that there is a ppa for it as well. It should be included 2) Simpler key terms and direct commands with examples 3) Screenshots 4) A reference and discussion about how to acquire more shaders. (Probably with distinct links) As you said I think this all will be definitely sorted out later on once 2.0 is released. I am truly looking forward to systemd integration :D

jarcode-foss commented 5 years ago

@Aeres-u99

Direct installation instructions for ubuntu/ debian, now that there is a ppa for it as well. It should be included

I do not maintain the existing PPA(s) for glava and can't really verify that it's not broken (or even trusted) since I don't run a debian-based distribution, so the answer to this is no. Using most third-party PPAs is a pretty bad practice for security anyway.

I would be happy to include instructions for my own PPA, but that would have to come along some form of CI to automatically build tagged releases. It would be even better if GLava were accepted into Universe (and I have submitted a request), but there's a lot of tickets with needs-packaging in their backlog and I don't think it's going to be done anytime soon.

  1. Simpler key terms and direct commands with examples
  2. Screenshots

I assume you mean something like this: https://www.linuxuprising.com/2018/11/embed-audio-visualizer-on-your-linux.html

I'll admit I'm not the greatest at writing technical documentation targeting non-programmers, but I think with the configuration tool coming out those who aren't interested in interacting with the GLSL itself will just switch to using glava-config.

A reference and discussion about how to acquire more shaders.

There's a guide for writing shaders but unfortunately nobody actually has written anything other than @Aaahh's efforts to use GLava's code to render animated wallpapers using code from 2D samples on Shadertoy.

Shadertoy actually has some interesting audio visualizers that would benefit from GLava's superior audio pre-processing for smoother FFT input compared to the mangled data it is getting from the browser.

Unfortunately I can't really use much of the content from there since they do not classify as free software due to them being licensed under CC BY-NC-SA. Yes, I'm that kind of person, but this is also important for distributing GLava packages in many distributions.

Audio visualizers from Rainmeter suffer the same issue, making it difficult for me to do anything but write new ones myself from scratch.

Aeres-u99 commented 5 years ago

Ahh I see, now I see the troubles. I apologize for being a cry-baby and complaining xD. Is there some way I can help you out? let me know if you need help. I am not way good at programming but I can help with guidance. This is going to be fun ;) and yes I was referring to @Aaahh's efforts and am surprised thats the most of it **sighs. Nevertheless, I shall continue experimenting and see if there is something that could come in handy.

Thanks for your time :-)

jarcode-foss commented 5 years ago

@Aeres-u99 Testing new features and reporting bugs is always appreciated. In the coming weeks I will have builds that have glava-config enabled by default again so it will be valuable to have feedback on that.

Aeres-u99 commented 5 years ago

I see, sounds fun. looking forward to work on glava-config.