Kami-Rotschild writes

Hello I am having a little problem while running "make" on my Raspberry Pi 2.

`g -DHAVE_CONFIG_H -I. -I./sc2src -I. -DDEBUG -g -Wall -DDATADIR=\"/usr/share/sc2mpd\" -DCONFIGDIR=\"/usr/etc\" -DPACKAGE_VERSION=\"1.1.1\" -I/home/kami/GIT/openhome//ohNet/Build/Include/ -I/home/kami/GIT/openhome//ohNetGenerated/Build/Include/ -I/home/kami/GIT/openhome//ohTopology/build/Include/ -I/home/kami/GIT/openhome//ohSongcast/ -std=c11 -g -O2 -MT sc2src/sc2mpd-alsadirect.o -MD -MP -MF sc2src/.deps/sc2mpd-alsadirect.Tpo -c -o sc2src/sc2mpd-alsadirect.o `test -f sc2src/alsadirect.cpp || echo ./`sc2src/alsadirect.cpp sc2src/alsadirect.cpp: In function ‘bool fixToFloats(AudioMessage*, SRC_DATA&, size_t)’: sc2src/alsadirect.cpp:446:38: error: assignment of read-only location ‘(src_data.SRC_DATA::data_in + sizetype)(i * 4u)’ src_data.data_in[i] = *sp; sc2src/alsadirect.cpp:460:35: error: assignment of read-only location ‘(src_data.SRC_DATA::data_in + sizetype)(i * 4u)’ src_data.data_in[i] = o; sc2src/alsadirect.cpp:468:38: error: assignment of read-only location ‘(src_data.SRC_DATA::data_in + sizetype)(i * 4u)’ src_data.data_in[i] = *ip; sc2src/alsadirect.cpp: In function ‘bool stretch_buffer(AudioMessage, SRC_STATE*, SRC_DATA&, size_t&, Filter&)’: sc2src/alsadirect.cpp:605:39: error: invalid conversion from ‘const void*’ to ‘void*’ [-fpermissive] (float )realloc(src_data.data_in, needed_bytes); ~~~~~~~ In file included from /usr/include/c/6.2.1/cstdlib:75:0, from /usr/include/c/6.2.1/ext/string_conversions.h:41, from /usr/include/c/6.2.1/bits/basic_string.h:5402, from /usr/include/c/6.2.1/string:52, from /usr/include/c/6.2.1/bits/locale_classes.h:40, from /usr/include/c/6.2.1/bits/ios_base.h:41, from /usr/include/c/6.2.1/ios:42, from /usr/include/c/6.2.1/ostream:38, from /usr/include/c/6.2.1/iostream:39, from sc2src/alsadirect.cpp:34: /usr/include/stdlib.h:441:14: note: initializing argument 1 of ‘void realloc(void*, size_t)’ extern void realloc (void *ptr, size_t size) ~~~ sc2src/alsadirect.cpp: In function ‘void audioEater(void*)’: sc2src/alsadirect.cpp:749:19: error: invalid conversion from ‘const void*’ to ‘void*’ [-fpermissive] free(src_data.data_in); ~~~~~~~ In file included from /usr/include/c/6.2.1/cstdlib:75:0, from /usr/include/c/6.2.1/ext/string_conversions.h:41, from /usr/include/c/6.2.1/bits/basic_string.h:5402, from /usr/include/c/6.2.1/string:52, from /usr/include/c/6.2.1/bits/locale_classes.h:40, from /usr/include/c/6.2.1/bits/ios_base.h:41, from /usr/include/c/6.2.1/ios:42, from /usr/include/c/6.2.1/ostream:38, from /usr/include/c/6.2.1/iostream:39, from sc2src/alsadirect.cpp:34: /usr/include/stdlib.h:444:13: note: initializing argument 1 of ‘void free(void*)’ extern void free (void ptr) THROW; ^~~ make: ** [Makefile:768: sc2src/sc2mpd-alsadirect.o] Error 1 `

Could you please help me solving that issue?

Thanks a bunch!

medoc92 writes

not at home, cant help much but check that you have gcc 4.7 or newer

On Sat, 17 Dec 2016 03:20:57 -0800, Kami-Rotschild <notifications@github.com > wrote:

> Hello
> I am having a little problem while running "make" on my Raspberry Pi 2.
>
> `g++ -DHAVE_CONFIG_H -I. -I./sc2src  -I. -DDEBUG -g -Wall -DDATADIR=\"/usr/share/sc2mpd\" -DCONFIGDIR=\"/usr/etc\" -DPACKAGE_VERSION=\"1.1.1\" -I/home/kami/GIT/openhome//ohNet/Build/Include/ -I/home/kami/GIT/openhome//ohNetGenerated/Build/Include/ -I/home/kami/GIT/openhome//ohTopology/build/Include/ -I/home/kami/GIT/openhome//ohSongcast/    -std=c++11 -g -O2 -MT sc2src/sc2mpd-alsadirect.o -MD -MP -MF sc2src/.deps/sc2mpd-alsadirect.Tpo -c -o sc2src/sc2mpd-alsadirect.o `test -f 'sc2src/alsadirect.cpp' || echo './'`sc2src/alsadirect.cpp
> sc2src/alsadirect.cpp: In function ‘bool fixToFloats(AudioMessage*, SRC_DATA&, size_t)’:
> sc2src/alsadirect.cpp:446:38: error: assignment of read-only location ‘*(src_data.SRC_DATA::data_in + ((sizetype)(i * 4u)))’
>              src_data.data_in[i] = *sp++;
>                                       ^~
> sc2src/alsadirect.cpp:460:35: error: assignment of read-only location ‘*(src_data.SRC_DATA::data_in + ((sizetype)(i * 4u)))’
>              src_data.data_in[i] = o;
>                                    ^
> sc2src/alsadirect.cpp:468:38: error: assignment of read-only location ‘*(src_data.SRC_DATA::data_in + ((sizetype)(i * 4u)))’
>              src_data.data_in[i] = *ip++;
>                                       ^~
> sc2src/alsadirect.cpp: In function ‘bool stretch_buffer(AudioMessage*, SRC_STATE*, SRC_DATA&, size_t&, Filter&)’:
> sc2src/alsadirect.cpp:605:39: error: invalid conversion from ‘const void*’ to ‘void*’ [-fpermissive]
>              (float *)realloc(src_data.data_in, needed_bytes);
>                               ~~~~~~~~~^~~~~~~
> In file included from /usr/include/c++/6.2.1/cstdlib:75:0,
>                  from /usr/include/c++/6.2.1/ext/string_conversions.h:41,
>                  from /usr/include/c++/6.2.1/bits/basic_string.h:5402,
>                  from /usr/include/c++/6.2.1/string:52,
>                  from /usr/include/c++/6.2.1/bits/locale_classes.h:40,
>                  from /usr/include/c++/6.2.1/bits/ios_base.h:41,
>                  from /usr/include/c++/6.2.1/ios:42,
>                  from /usr/include/c++/6.2.1/ostream:38,
>                  from /usr/include/c++/6.2.1/iostream:39,
>                  from sc2src/alsadirect.cpp:34:
> /usr/include/stdlib.h:441:14: note:   initializing argument 1 of ‘void* realloc(void*, size_t)’
>  extern void *realloc (void *__ptr, size_t __size)
>               ^~~~~~~
> sc2src/alsadirect.cpp: In function ‘void* audioEater(void*)’:
> sc2src/alsadirect.cpp:749:19: error: invalid conversion from ‘const void*’ to ‘void*’ [-fpermissive]
>      free(src_data.data_in);
>           ~~~~~~~~~^~~~~~~
> In file included from /usr/include/c++/6.2.1/cstdlib:75:0,
>                  from /usr/include/c++/6.2.1/ext/string_conversions.h:41,
>                  from /usr/include/c++/6.2.1/bits/basic_string.h:5402,
>                  from /usr/include/c++/6.2.1/string:52,
>                  from /usr/include/c++/6.2.1/bits/locale_classes.h:40,
>                  from /usr/include/c++/6.2.1/bits/ios_base.h:41,
>                  from /usr/include/c++/6.2.1/ios:42,
>                  from /usr/include/c++/6.2.1/ostream:38,
>                  from /usr/include/c++/6.2.1/iostream:39,
>                  from sc2src/alsadirect.cpp:34:
> /usr/include/stdlib.h:444:13: note:   initializing argument 1 of ‘void free(void*)’
>  extern void free (void *__ptr) __THROW;
>              ^~~~
> make: *** [Makefile:768: sc2src/sc2mpd-alsadirect.o] Error 1
> `
>
> Could you please help me solving that issue?
>
> Thanks a bunch!
>
> --
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly or view it on GitHub:
> https://github.com/medoc92/sc2mpd/issues/5

Kami-Rotschild writes

Thanks for that hint. I got GCC 6.2.1 installed. Do both errors have to do with the compiler? On first sight, I thought that ALSA was involved too.

medoc92 writes

On Tue, 20 Dec 2016 04:56:16 -0800, Guido <notifications@github.com > wrote:

> Thanks for that hint. I got GCC 6.2.1 installed.
> Do both errors have to do with the compiler? On first sight, I thought that ALSA was involved too.

Not too sure of what is happening actually. Can’t take a better look before next week, or beginning of january possibly.

medoc92 writes

The problem appears to be caused by a change in the libsamplerate include file.