yusefnapora / pixelbook-linux

257 stars 50 forks source link

Possible workaround to apparent gcc 9.2 bug. #32

Open earl-ducaine opened 4 years ago

earl-ducaine commented 4 years ago

gcc version 9.2.1 20191008 complains about:

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); | ~^~~~~~~~~~~~~ cc

The error seems to be spurious, (see https://github.com/openucx/ucx/issues/3119 for others having the issue). One workaround is to ensure that gcc 8 is installed and to tell ansible to use that, e.g.

export CC=/usr/local/bin/gcc-8; ./run-ansible.sh

psycik commented 4 years ago

export CC=/usr/bin/gcc-8; ./run-ansible.sh

Works.

ghost commented 4 years ago

I installed gcc-8 and tried running the command above but am still having issues.

EDIT: Running 'sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8' worked for me.