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

Fails to build with iniparser 4.2 #560

Closed
nunotexbsd opened this issue Apr 29, 2024 · 3 comments
Closed

Fails to build with iniparser 4.2 #560

nunotexbsd opened this issue Apr 29, 2024 · 3 comments

Comments

@nunotexbsd
Copy link

nunotexbsd commented Apr 29, 2024

Describe the bug
Build failure with latest iniparser 4.2:

Full log:
cava-0.10.1_1.log

-<snip>
cc -DPACKAGE_NAME=\"cava\" -DPACKAGE_TARNAME=\"cava\" -DPACKAGE_VERSION=\"0.10.1\" -DPACKAGE_STRING=\"cava\ 0.10.1\" -DPACKAGE_BUGREPORT=\"[email protected]\" -DPACKAGE_URL=\"\" -DPACKAGE=\"cava\" -DVERSION=\"0
.10.1\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_DLFCN_H=1 -
DLT_OBJDIR=\".libs/\" -DHAVE_PTHREAD_H=1 -DHAVE_SYS_SOUNDCARD_H=1 -DHAVE_GL_GL_H=1 -DHAVE_GL=1 -DHAVE_CURSES_H=1 -I.  -DPACKAGE=\"cava\" -DVERSION=\"0.10.1\"  -D_POSIX_SOURCE -D_POSIX_C_SOURCE=200809L -D_XOPEN_SO
URCE_EXTENDED  -DFONTDIR=\"/usr/local/share/cava\" -DFONTFILE=\"cava.fnt\" -isystem /usr/local/include -DNDEBUG -DPULSE -DPORTAUDIO -DSNDIO -DOSS -D__BSD_VISIBLE -DJACK -I/usr/local/include -DSDL -DSDL_GLSL -I/us
r/local/include -DNCURSES -DCAVAFONT -I/usr/include/iniparser -std=c99 -Wall -Wextra -Wno-unused-result  -Wno-unknown-warning-option -Wno-maybe-uninitialized  -Wno-vla-parameter  -O2 -pipe  -fstack-protector-stro
ng -isystem /usr/local/include -fno-strict-aliasing -MT input/cava-sndio.o -MD -MP -MF input/.deps/cava-sndio.Tpo -c -o input/cava-sndio.o `test -f 'input/sndio.c' || echo './'`input/sndio.c
--- input/cava-common.o ---
mv -f input/.deps/cava-common.Tpo input/.deps/cava-common.Po
--- cava-config.o ---
config.c:408:24: warning: call to undeclared function 'getenv'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  408 |     char *configHome = getenv("XDG_CONFIG_HOME");
      |                        ^
config.c:408:11: error: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int' [-Wint-conversion]
  408 |     char *configHome = getenv("XDG_CONFIG_HOME");
      |           ^            ~~~~~~~~~~~~~~~~~~~~~~~~~
config.c:414:20: error: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion]
  414 |         configHome = getenv("HOME");
      |                    ^ ~~~~~~~~~~~~~~
config.c:481:24: warning: call to undeclared library function 'malloc' with type 'void *(unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  481 |     char *shaderPath = malloc(sizeof(char) * PATH_MAX);
      |                        ^
config.c:481:24: note: include the header <stdlib.h> or explicitly provide a declaration for 'malloc'
config.c:506:13: warning: call to undeclared library function 'free' with type 'void (void *)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  506 |             free(shaderFile);
      |             ^
config.c:506:13: note: include the header <stdlib.h> or explicitly provide a declaration for 'free'
config.c:667:31: warning: call to undeclared library function 'calloc' with type 'void *(unsigned long, unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  667 |         p->userEQ = (double *)calloc(p->userEQ_keys + 1, sizeof(double));
      |                               ^
config.c:667:31: note: include the header <stdlib.h> or explicitly provide a declaration for 'calloc'
4 warnings and 2 errors generated.

To Reproduce

poudriere build environment

Desktop (please complete the following information):

  • OS: FreeBSD
  • Version 14.0
  • Clang 16.0.6
@nunotexbsd nunotexbsd changed the title Fails to build with initparser 4.2 Fails to build with iniparser 4.2 Apr 29, 2024
@karlstav
Copy link
Owner

yes, looks like iniparser used to include stdlib.h in the header, but now it doesn't. So it actually just worked by chance before. I will take a look later.

freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this issue May 1, 2024
See also:	karlstav/cava#560
Approved by:	portmgr (blanket)
Fixes:		fb5161ef96 "devel/iniparser: Update to 4.2"
@funilrys
Copy link
Contributor

funilrys commented May 13, 2024

Hey @karlstav,

maintainer of cava's ArchLinux/AUR package here... Can you please release a new version so that I don't have to explicitly/manually takeover your patch ?

Stay safe & healthy!

cf: funilrys/aur-cava#15

@karlstav
Copy link
Owner

sure thing @funilrys,

I was waiting for feedback on #561 but I think it's ok.

0.10.2 out now!

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

3 participants