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

No iniparser in debian #231

Closed
Freggels opened this issue Aug 13, 2018 · 19 comments
Closed

No iniparser in debian #231

Freggels opened this issue Aug 13, 2018 · 19 comments

Comments

@Freggels
Copy link

Freggels commented Aug 13, 2018

compiling cava with make gives the following error:

gcc -DPACKAGE_NAME=\"cava\" -DPACKAGE_TARNAME=\"cava\" 
DPACKAGE_VERSION=\"0.6.1-6-gcd13d92\" -DPACKAGE_STRING=\"cava\ 0.6.1-6-gcd13d92\" 
-DPACKAGE_BUGREPORT=\"karl@stavestrand.no\" -DPACKAGE_URL=\"\" -DPACKAGE=\"cava\" 
-DVERSION=\"0.6.1-6-gcd13d92\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 
-DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 
-DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_PTHREAD_H=1 -DHAVE_CURSES_H=1 -I. -I..  
-DPACKAGE=\"cava\" -DVERSION=\"0.6.1-6-gcd13d92\" -D_POSIX_SOURCE -D 
_POSIX_C_SOURCE=200809L -Iiniparser/src -DHAVE_ALLOCA_H -DALSA -DPULSE 
-D_GNU_SOURCE -D_DEFAULT_SOURCE -I/usr/include/ncursesw -DNCURSES -std=c99 -Wall 
-Wextra -Wno-unused-result -Wno-maybe-uninitialized  -g -O2 -MT cava-cava.o -MD -MP -MF 
.deps/cava-cava.Tpo -c -o cava-cava.o `test -f 'cava.c' || echo '../'`cava.c
../cava.c:66:23: fatal error: iniparser.h: No such file or directory
 #include <iniparser.h>
@karlstav
Copy link
Owner

hi @SHGuy1 , can you post the output of ./configure as well?

If iniparser is not installed it is supposed to use a bundled version of iniparser. The config script should handle this, but maybe something has gone wrong.

@karlstav
Copy link
Owner

closing due to inactivity

@arthurlutz
Copy link
Contributor

Same here...

And

$ sudo apt-get install libfftw3-dev libasound2-dev libncursesw5-dev libpulse-dev libtool automake iniparser
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package iniparser

@arthurlutz
Copy link
Contributor

@karlstav
Copy link
Owner

hi @arthurlutz , I recently removed the bundled version of iniparser, because i thought that it was available in the repos of all the major distros. But it seems that for debian it is only available from buster (10) and ubuntu from 18.04. So you must either upgrade your distro or build it from source:

https://github.com/ndevilla/iniparser

@karlstav karlstav reopened this Dec 16, 2019
@antiprism
Copy link
Contributor

antiprism commented Dec 16, 2019

Hi Karl

I am using MoodeAudio OS, which is based on Debian buster.

Regarding the Cava install instructions, there is no package called 'iniparser', the package is called 'libiniparser-dev' [Edit: correct link] : https://packages.debian.org/search?searchon=names&keywords=iniparser

Also, the libiniparser-dev package installs the iniparser header at '/usr/include/iniparser/iniparser.h', i.e. in an iniparser directory, and so the Cava configure script does not find it. I was able to build Cava by configuring with

CPPFLAGS=-I/usr/include/iniparser ./configure

Looking at the iniparser repository, it doesn't include an install option, and so I imagine that some people would find it difficult to build Cava against it without some extra instructions. This might also mean it is likeley to be installed differently when included in different OSs, in which case keeping the the iniparser library bundled with Cava might be a good idea.

Adrian.

@arthurlutz
Copy link
Contributor

Thanks @antiprism this solved it for me! Did a PR to update the docs.

@karlstav
Copy link
Owner

thanks @antiprism and @arthurlutz seems I was a bit trigger happy when wanting to get rid of the bundled iniparser. I will to some more testing on a debian/ubuntu environment as soon as I can get my hands on one.

@antiprism
Copy link
Contributor

I am reviewing instructions to install Cava on Volumio OS, which is based on Debian jessie and doesn't have an iniparser package.

Are you likely to restore the bundled iniparser? For now I have just provided instructions to build Cava at the last commit before the parser was removed
git checkout -b pre_iniparser_removal 3cc2f9f

karlstav added a commit that referenced this issue Dec 19, 2019
@karlstav
Copy link
Owner

Debian stretch LTS extends until June 2022 so I will keep the bundled version until then.

@antiprism
Copy link
Contributor

Great, thanks! Builds and runs on Volumio (Debian jessie) and Moode (Debian buster, with libiniparser-dev installed, but library not detected by a plain ./configure).

However, there seems to have been some change to Cava since 24 November 2019, as In both cases I am only seeing a peak in the low frequencies, while switching back to the version of a month ago there is a normal spectrum. I'll see if I can track down where the change occured.

@karlstav
Copy link
Owner

most likely this commit:

b680b60

you can always turn on monstercat in the config

or this:

4fd17de

if the highest peaks are in lower/higher frequencies depend very much on the type of music, you can always adjust the EQ in the config.

@antiprism
Copy link
Contributor

antiprism commented Dec 19, 2019

Thanks for the suggestions, it turned out to be the EQ commit. There appears to be an issue with the initialialistion of the default equalizer values. [Edit:] I am building on a Raspberry Pi, on a OS based on Raspbian.

Here is my config file that shows only a bass peak

[general]
framerate = 25
bars = 21

[smoothing]
monstercat = 1

[input]
method = alsa
source = plughw:Loopback,1

[output]
method = raw
data_format = binary
channels = mono
raw_target = /tmp/cava_fifo_25108
bit_format = 8bit

But if I add the following section then I get a normal spectrum

[eq]
1=1

Also, I got a warning when installing Cava for having two versions of libiniparser installed. You could avoid installing the version bundled with Cava by building it as a libtool convenience library

https://www.gnu.org/software/automake/manual/html_node/Libtool-Convenience-Libraries.html

@antiprism
Copy link
Contributor

antiprism commented Dec 19, 2019

In config.c
p->smcount = 64; //back to the default one
This should be set to 5, to match the new shorter default.

[Edit:] I guess, to avoid the issue in the future, this could be
p->smcount = sizeof(smoothDef)/sizeof(smoothDef[0]); //back to the default one

@karlstav
Copy link
Owner

thanks, can't believe I missed that!

@karlstav
Copy link
Owner

I got a warning when installing Cava for having two versions of libiniparser installed

but the bundled version should only be used when there is no system wide installation, or is this related to the inipraser library not detected by a plain ./configure in Buster?

However the libtool convenience library sounds like the way to go with the bundled version, then we will probably also get rid of this annoying thing:

Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.

@antiprism
Copy link
Contributor

Yes, I ran a plain ./configure on buster, and this then led to two versions of the iniparser shared library being installed.

karlstav added a commit that referenced this issue Dec 19, 2019
@karlstav
Copy link
Owner

@antiprism can you test the last commit?

@antiprism
Copy link
Contributor

Looks good. Builds and runs fine on buster. The "Libraries have been installed in:..." message is gone.

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