fulup-bzh / AlsaJsonGateway

HTTP REST/JSON Gateway to ALSA mixer service for HTML5 UI
53 stars 5 forks source link

Configure fail #4

Closed fulup-bzh closed 8 years ago

fulup-bzh commented 8 years ago

Manu, autoconf does not work on OpenSuse checking whether gcc accepts -g... (cached) yes checking for gcc option to accept ISO C89... (cached) none needed checking whether to enable Valgrind on the unit tests... checking for valgrind... no yes ./configure: line 5127: syntax error near unexpected token 2.2' ./configure: line 5127:LT_PREREQ(2.2)'

Tarnyko commented 8 years ago

Hi @fulup-bzh, It failed because the "libtool' package was missing ; it is so often present on development systems that I tend to omit it, my bad.

Please retry with this new commit : https://github.com/fulup-bzh/AlsaJsonGateway/commit/d22c8608df18432bdbd75a13a0c0cd7597662738

It now mentions libtool in build instructions, and asks for it on the command line instead of printing an ugly error message.

fulup-bzh commented 8 years ago

Much beter but a small warning remains because of _GNU_SOURCE that was added in the include without being 1st checked.

:0:0: note: this is the location of the previous definition CC ajg_daemon-alsa-ajg.o In file included from alsa-ajg.c:29:0: ../include/local-def-ajg.h:23:0: warning: "_GNU_SOURCE" redefined [enabled by default] #define _GNU_SOURCE
Tarnyko commented 8 years ago

Yes, I saw this.

Original Makefile was setting "-Werror" for gcc (https://github.com/fulup-bzh/AlsaJsonGateway/blob/027826771df307a001c1050c5ebbb3baa9a85007/src/Makefile#L13), which made the build fail due to this warning becoming a hard error (I removed the parameter in new Makefile.am).

Not sure why it did not fail before. I guess a fix would be to do in the .h :

ifndef _GNU_SOURCE

#define _GNU_SOURCE

endif

But I was reluctant to patch the source at that time.

Tarnyko commented 8 years ago

Haha, got it ! It is because Autotools sets "-D_GNU_SOURCE=1" by itself when it detects gcc !

This should fix it, please try : https://github.com/fulup-bzh/AlsaJsonGateway/commit/31353f91972845b9f8c01f9479dd4fccd00f611c

fulup-bzh commented 8 years ago

This time it works.