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

Error Building cras -> Pixelbook Speakers Undetected and Not Working #25

Closed
sirvalkyerie opened this issue Nov 6, 2019 · 1 comment
Closed

Comments

@sirvalkyerie
Copy link

Each time I try to run the ansible script everything runs fine besides the Build Cras step. I get this error repeatedly:

fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["make"], "delta": "0:00:00.502450", "end": "2019-11-05 18:56:48.429219", "msg": "non-zero return code", "rc": 2, "start": "2019-11-05 18:56:47.926769", "stderr": "server/cras_rclient.c: In function ‘cras_rclient_message_from_client’:\nserver/cras_rclient.c:628:6: error: taking address of packed member of ‘struct cras_config_global_remix’ may result in an unaligned pointer value [-Werror=address-of-packed-member]\n 628 | m->coefficient);\n | ~^~~~~~~~~~~~~\ncc1: all warnings being treated as errors\nmake[1]: *** [Makefile:5031: server/libcrasserver_la-cras_rclient.lo] Error 1\nmake: *** [Makefile:459: all-recursive] Error 1", "stderr_lines": ["server/cras_rclient.c: In function ‘cras_rclient_message_from_client’:", "server/cras_rclient.c:628:6: error: taking address of packed member of ‘struct cras_config_global_remix’ may result in an unaligned pointer value [-Werror=address-of-packed-member]", " 628 | m->coefficient);", " | ~^~~~~~~~~~~~~", "cc1: all warnings being treated as errors", "make[1]: *** [Makefile:5031: server/libcrasserver_la-cras_rclient.lo] Error 1", "make: *** [Makefile:459: all-recursive] Error 1"], "stdout": "Making all in src\nmake[1]: Entering directory '/opt/eve-linux-setup/adhd/cras/src'\n/bin/bash ../libtool --tag=CC --mode=compile gcc -DPACKAGE_NAME=\\\"cras\\\" -DPACKAGE_TARNAME=\\\"cras\\\" -DPACKAGE_VERSION=\\\"0.1\\\" -DPACKAGE_STRING=\\\"cras\\ 0.1\\\" -DPACKAGE_BUGREPORT=\\\"dgreid@chromium.org\\\" -DPACKAGE_URL=\\\"http://www.chromium.org/\\\" -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_LIBASOUND=1 -DALSA_PLUGIN_DIR=\\\"/usr/local/lib/alsa-lib\\\" -DCRAS_CONFIG_FILE_DIR=\\\"/usr/local/etc/cras\\\" -DCRAS_SOCKET_FILE_DIR=\\\"/var/run/cras\\\" -DHAVE_SSE42=1 -DHAVE_AVX=1 -DHAVE_AVX2=1 -DHAVE_FMA=1 -I. -O2 -Wall -Werror -Wno-error=cpp -I../src/common -I../src/dsp -I../src/server -I../src/server/config -I/usr/include/iniparser -MT server/libcrasserver_la-cras_rclient.lo -MD -MP -MF server/.deps/libcrasserver_la-cras_rclient.Tpo -c -o server/libcrasserver_la-cras_rclient.lo test -f 'server/cras_rclient.c' || echo './'server/cras_rclient.c\nlibtool: compile: gcc -DPACKAGE_NAME=\\\"cras\\\" -DPACKAGE_TARNAME=\\\"cras\\\" -DPACKAGE_VERSION=\\\"0.1\\\" \"-DPACKAGE_STRING=\\\"cras 0.1\\\"\" -DPACKAGE_BUGREPORT=\\\"dgreid@chromium.org\\\" -DPACKAGE_URL=\\\"http://www.chromium.org/\\\" -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_LIBASOUND=1 -DALSA_PLUGIN_DIR=\\\"/usr/local/lib/alsa-lib\\\" -DCRAS_CONFIG_FILE_DIR=\\\"/usr/local/etc/cras\\\" -DCRAS_SOCKET_FILE_DIR=\\\"/var/run/cras\\\" -DHAVE_SSE42=1 -DHAVE_AVX=1 -DHAVE_AVX2=1 -DHAVE_FMA=1 -I. -O2 -Wall -Werror -Wno-error=cpp -I../src/common -I../src/dsp -I../src/server -I../src/server/config -I/usr/include/iniparser -MT server/libcrasserver_la-cras_rclient.lo -MD -MP -MF server/.deps/libcrasserver_la-cras_rclient.Tpo -c server/cras_rclient.c -fPIC -DPIC -o server/.libs/libcrasserver_la-cras_rclient.o\nmake[1]: Leaving directory '/opt/eve-linux-setup/adhd/cras/src'", "stdout_lines": ["Making all in src", "make[1]: Entering directory '/opt/eve-linux-setup/adhd/cras/src'", "/bin/bash ../libtool --tag=CC --mode=compile gcc -DPACKAGE_NAME=\\\"cras\\\" -DPACKAGE_TARNAME=\\\"cras\\\" -DPACKAGE_VERSION=\\\"0.1\\\" -DPACKAGE_STRING=\\\"cras\\ 0.1\\\" -DPACKAGE_BUGREPORT=\\\"dgreid@chromium.org\\\" -DPACKAGE_URL=\\\"http://www.chromium.org/\\\" -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_LIBASOUND=1 -DALSA_PLUGIN_DIR=\\\"/usr/local/lib/alsa-lib\\\" -DCRAS_CONFIG_FILE_DIR=\\\"/usr/local/etc/cras\\\" -DCRAS_SOCKET_FILE_DIR=\\\"/var/run/cras\\\" -DHAVE_SSE42=1 -DHAVE_AVX=1 -DHAVE_AVX2=1 -DHAVE_FMA=1 -I. -O2 -Wall -Werror -Wno-error=cpp -I../src/common -I../src/dsp -I../src/server -I../src/server/config -I/usr/include/iniparser -MT server/libcrasserver_la-cras_rclient.lo -MD -MP -MF server/.deps/libcrasserver_la-cras_rclient.Tpo -c -o server/libcrasserver_la-cras_rclient.lo test -f 'server/cras_rclient.c' || echo './'server/cras_rclient.c", "libtool: compile: gcc -DPACKAGE_NAME=\\\"cras\\\" -DPACKAGE_TARNAME=\\\"cras\\\" -DPACKAGE_VERSION=\\\"0.1\\\" \"-DPACKAGE_STRING=\\\"cras 0.1\\\"\" -DPACKAGE_BUGREPORT=\\\"dgreid@chromium.org\\\" -DPACKAGE_URL=\\\"http://www.chromium.org/\\\" -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_LIBASOUND=1 -DALSA_PLUGIN_DIR=\\\"/usr/local/lib/alsa-lib\\\" -DCRAS_CONFIG_FILE_DIR=\\\"/usr/local/etc/cras\\\" -DCRAS_SOCKET_FILE_DIR=\\\"/var/run/cras\\\" -DHAVE_SSE42=1 -DHAVE_AVX=1 -DHAVE_AVX2=1 -DHAVE_FMA=1 -I. -O2 -Wall -Werror -Wno-error=cpp -I../src/common -I../src/dsp -I../src/server -I../src/server/config -I/usr/include/iniparser -MT server/libcrasserver_la-cras_rclient.lo -MD -MP -MF server/.deps/libcrasserver_la-cras_rclient.Tpo -c server/cras_rclient.c -fPIC -DPIC -o server/.libs/libcrasserver_la-cras_rclient.o", "make[1]: Leaving directory '/opt/eve-linux-setup/adhd/cras/src'"]}

Everything else runs fine and I have Ubuntu running flawlessly otherwise. The battery is even far better than I'd expected it to be. I've tried rooting around the internet to find a solution elsewhere but nothing works. I did find a fork from another user who had an edit to their playbook.yaml for the audio drivers but their script also does not work. Anyone else run into the same problem and figure out how to solve it?

@sirvalkyerie
Copy link
Author

Haha! So I spent actual days working on this but I literally just fixed it.

Go to /opt/eve-linux-setup/adhd/cras/src/makefile

And then remove all of the error flags for Werror / Wno / cpp

Just delete them from the text file. I spent forever trying to fix the error but once I just told the script not to treat those warnings as errors anymore it compiled fine and now I have completely working audio. (It did create an additional user profile called cras though for reasons I am unsure of)

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

1 participant