fulup-bzh / AlsaJsonGateway

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

MHD_start_daemon error when trying to install/build #19

Open GhoulWorlde opened 1 year ago

GhoulWorlde commented 1 year ago

Hi there, I'm on a fresh install of Pop OS 22.04 and I can't seem to run the final command for building in the readme. I've got an 18i20 that is detected by the OS and shows that audio is outputting through the settings and in easyeffects, but there's no audio coming through any of the outputs on the device (I've tried them all) alsamixer shows that it recognizes the device and all its IO, and correctly shows volumes being changed when I turn the knobs, but again, no actual audio coming through. Ive got a 2i2 that works perfectly fine out of the box so I know its not the hardware connected to the devices. The following is the message I receive when trying to build. Any help is appreciated. thx.

checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for wchar.h... yes
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether _XOPEN_SOURCE should be defined... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/home/chvrlie/AlsaJsonGateway/build-aux/missing: Unknown `--is-lightweight' option
Try `/home/chvrlie/AlsaJsonGateway/build-aux/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking whether make supports nested variables... yes
checking dependency style of gcc... gcc3
checking whether make supports nested variables... (cached) yes
checking for gcc... (cached) gcc
checking whether the compiler supports GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to enable C11 features... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking whether to enable Valgrind on the unit tests... checking for valgrind... no
yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for alsa... yes
checking for libmicrohttpd... yes
checking for json-c... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: executing depfiles commands
config.status: executing libtool commands

    Type 'make' to compile AlsaJsonGateway.

Making all in src
make[1]: Entering directory '/home/chvrlie/AlsaJsonGateway/src'
  CC       ajg_daemon-httpd-ajg.o
httpd-ajg.c: In function ‘httpdStart’:
httpd-ajg.c:456:13: error: passing argument 3 of ‘MHD_start_daemon’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  456 |             &newClient, NULL,       // Tcp Accept call back + extra attribute
      |             ^~~~~~~~~~
      |             |
      |             int (*)(void *, const struct sockaddr *, socklen_t) {aka int (*)(void *, const struct sockaddr *, unsigned int)}
In file included from httpd-ajg.c:39:
/usr/include/microhttpd.h:2700:44: note: expected ‘MHD_AcceptPolicyCallback’ {aka ‘enum MHD_Result (*)(void *, const struct sockaddr *, unsigned int)’} but argument is of type ‘int (*)(void *, const struct sockaddr *, socklen_t)’ {aka ‘int (*)(void *, const struct sockaddr *, unsigned int)’}
 2700 |                   MHD_AcceptPolicyCallback apc, void *apc_cls,
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
httpd-ajg.c:457:13: error: passing argument 5 of ‘MHD_start_daemon’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  457 |             &newRequest, session,  // Http Request Call back + extra attribute
      |             ^~~~~~~~~~~
      |             |
      |             int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **) {aka int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)}
In file included from httpd-ajg.c:39:
/usr/include/microhttpd.h:2701:45: note: expected ‘MHD_AccessHandlerCallback’ {aka ‘enum MHD_Result (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’} but argument is of type ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **)’ {aka ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’}
 2701 |                   MHD_AccessHandlerCallback dh, void *dh_cls,
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:527: ajg_daemon-httpd-ajg.o] Error 1
make[1]: Leaving directory '/home/chvrlie/AlsaJsonGateway/src'
make: *** [Makefile:400: all-recursive] Error 1
Making install in src
make[1]: Entering directory '/home/chvrlie/AlsaJsonGateway/src'
  CC       ajg_daemon-httpd-ajg.o
httpd-ajg.c: In function ‘httpdStart’:
httpd-ajg.c:456:13: error: passing argument 3 of ‘MHD_start_daemon’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  456 |             &newClient, NULL,       // Tcp Accept call back + extra attribute
      |             ^~~~~~~~~~
      |             |
      |             int (*)(void *, const struct sockaddr *, socklen_t) {aka int (*)(void *, const struct sockaddr *, unsigned int)}
In file included from httpd-ajg.c:39:
/usr/include/microhttpd.h:2700:44: note: expected ‘MHD_AcceptPolicyCallback’ {aka ‘enum MHD_Result (*)(void *, const struct sockaddr *, unsigned int)’} but argument is of type ‘int (*)(void *, const struct sockaddr *, socklen_t)’ {aka ‘int (*)(void *, const struct sockaddr *, unsigned int)’}
 2700 |                   MHD_AcceptPolicyCallback apc, void *apc_cls,
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
httpd-ajg.c:457:13: error: passing argument 5 of ‘MHD_start_daemon’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  457 |             &newRequest, session,  // Http Request Call back + extra attribute
      |             ^~~~~~~~~~~
      |             |
      |             int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **) {aka int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)}
In file included from httpd-ajg.c:39:
/usr/include/microhttpd.h:2701:45: note: expected ‘MHD_AccessHandlerCallback’ {aka ‘enum MHD_Result (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’} but argument is of type ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **)’ {aka ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’}
 2701 |                   MHD_AccessHandlerCallback dh, void *dh_cls,
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:527: ajg_daemon-httpd-ajg.o] Error 1
make[1]: Leaving directory '/home/chvrlie/AlsaJsonGateway/src'
make: *** [Makefile:400: install-recursive] Error 1
Paul-AAA commented 8 months ago

Hi, I have a very similar problem to the above. I am trying to install Alsa Jason Gateway on a new Kubuntu 22.04 installation so I can use my Scarlet8i8 with the Alsa Jason Mixer and the latest version of Ardour. I get the exact same compilation errors reported above. The software worked fine on an older Ubuntu distribution (Trusty Tahr). Any help appreciated. Paul