crouton: CRAS fails to compile

Please paste the output of the following command here: sudo edit-chroot -all
name: sid
encrypted: no
Entering /mnt/stateful_partition/crouton/chroots/sid...
crouton: version 1-20210907212903~master:9b281df5
release: sid
architecture: amd64
targets: kde-desktop
host: version 14092.77.0 (Official Build) stable-channel octopus 
kernel: Linux localhost 4.14.239-18064-g098890c16791 #1 SMP PREEMPT Sun Oct 3 21:51:12 PDT 2021 x86_64 GNU/Linux
freon: yes
Unmounting /mnt/stateful_partition/crouton/chroots/sid...

Please describe your issue:

After running sudo crouton -r sid -t kde-desktop, It errors out when compiling CRAS with this

Compiling CRAS (i386)...
In function 'wake_aud_thread',
    inlined from 'stop_aud_thread' at libcras/cras_client.c:1394:3:
libcras/cras_client.c:1378:14: error: 'rc' may be used uninitialized [-Werror=maybe-uninitialized]
 1378 |         rc = write(stream->wake_fds[1], &rc, 1);
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libcras/cras_client.c:45:
libcras/cras_client.c: In function 'stop_aud_thread':
/usr/include/unistd.h:367:16: note: in a call to 'write' declared with attribute 'access (read_only, 2, 3)' here
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
libcras/cras_client.c:1376:13: note: 'rc' declared here
 1376 |         int rc;
      |             ^~
In function 'write_message_to_server',
    inlined from 'cras_client_set_system_mute' at libcras/cras_client.c:2577:9:
libcras/cras_client.c:2160:28: error: 'write' reading 12 bytes from a region of size 8 [-Werror=stringop-overread]
 2160 |                 write_rc = write(client->server_fd, msg, msg->length);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libcras/cras_client.c:50:
libcras/cras_client.c: In function 'cras_client_set_system_mute':
../src/common/cras_messages.h:183:36: note: source object 'header' of size 8
  183 |         struct cras_server_message header;
      |                                    ^~~~~~
In file included from libcras/cras_client.c:45:
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
In function 'write_message_to_server',
    inlined from 'cras_client_set_system_volume' at libcras/cras_client.c:2566:9:
libcras/cras_client.c:2160:28: error: 'write' reading 12 bytes from a region of size 8 [-Werror=stringop-overread]
 2160 |                 write_rc = write(client->server_fd, msg, msg->length);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libcras/cras_client.c:50:
libcras/cras_client.c: In function 'cras_client_set_system_volume':
../src/common/cras_messages.h:170:36: note: source object 'header' of size 8
  170 |         struct cras_server_message header;
      |                                    ^~~~~~
In file included from libcras/cras_client.c:45:
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
In function 'write_message_to_server',
    inlined from 'cras_client_set_user_mute' at libcras/cras_client.c:2588:9:
libcras/cras_client.c:2160:28: error: 'write' reading 12 bytes from a region of size 8 [-Werror=stringop-overread]
 2160 |                 write_rc = write(client->server_fd, msg, msg->length);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libcras/cras_client.c:50:
libcras/cras_client.c: In function 'cras_client_set_user_mute':
../src/common/cras_messages.h:183:36: note: source object 'header' of size 8
  183 |         struct cras_server_message header;
      |                                    ^~~~~~
In file included from libcras/cras_client.c:45:
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
In function 'write_message_to_server',
    inlined from 'cras_client_set_system_mute_locked' at libcras/cras_client.c:2599:9:
libcras/cras_client.c:2160:28: error: 'write' reading 12 bytes from a region of size 8 [-Werror=stringop-overread]
 2160 |                 write_rc = write(client->server_fd, msg, msg->length);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libcras/cras_client.c:50:
libcras/cras_client.c: In function 'cras_client_set_system_mute_locked':
../src/common/cras_messages.h:183:36: note: source object 'header' of size 8
  183 |         struct cras_server_message header;
      |                                    ^~~~~~
In file included from libcras/cras_client.c:45:
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
In function 'write_message_to_server',
    inlined from 'cras_client_set_system_capture_mute' at libcras/cras_client.c:2610:9:
libcras/cras_client.c:2160:28: error: 'write' reading 12 bytes from a region of size 8 [-Werror=stringop-overread]
 2160 |                 write_rc = write(client->server_fd, msg, msg->length);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libcras/cras_client.c:50:
libcras/cras_client.c: In function 'cras_client_set_system_capture_mute':
../src/common/cras_messages.h:183:36: note: source object 'header' of size 8
  183 |         struct cras_server_message header;
      |                                    ^~~~~~
In file included from libcras/cras_client.c:45:
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
In function 'write_message_to_server',
    inlined from 'cras_client_set_system_capture_mute_locked' at libcras/cras_client.c:2622:9:
libcras/cras_client.c:2160:28: error: 'write' reading 12 bytes from a region of size 8 [-Werror=stringop-overread]
 2160 |                 write_rc = write(client->server_fd, msg, msg->length);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libcras/cras_client.c:50:
libcras/cras_client.c: In function 'cras_client_set_system_capture_mute_locked':
../src/common/cras_messages.h:183:36: note: source object 'header' of size 8
  183 |         struct cras_server_message header;
      |                                    ^~~~~~
In file included from libcras/cras_client.c:45:
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
In function 'write_message_to_server',
    inlined from 'cras_client_set_node_attr' at libcras/cras_client.c:3114:9:
libcras/cras_client.c:2160:28: error: 'write' reading 24 bytes from a region of size 8 [-Werror=stringop-overread]
 2160 |                 write_rc = write(client->server_fd, msg, msg->length);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libcras/cras_client.c:50:
libcras/cras_client.c: In function 'cras_client_set_node_attr':
../src/common/cras_messages.h:225:36: note: source object 'header' of size 8
  225 |         struct cras_server_message header;
      |                                    ^~~~~~
In file included from libcras/cras_client.c:45:
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
In function 'write_message_to_server',
    inlined from 'cras_client_select_node' at libcras/cras_client.c:3127:9:
libcras/cras_client.c:2160:28: error: 'write' reading 20 bytes from a region of size 8 [-Werror=stringop-overread]
 2160 |                 write_rc = write(client->server_fd, msg, msg->length);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libcras/cras_client.c:50:
libcras/cras_client.c: In function 'cras_client_select_node':
../src/common/cras_messages.h:243:36: note: source object 'header' of size 8
  243 |         struct cras_server_message header;
      |                                    ^~~~~~
In file included from libcras/cras_client.c:45:
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
In function 'write_message_to_server',
    inlined from 'cras_client_add_active_node' at libcras/cras_client.c:3140:9:
libcras/cras_client.c:2160:28: error: 'write' reading 20 bytes from a region of size 8 [-Werror=stringop-overread]
 2160 |                 write_rc = write(client->server_fd, msg, msg->length);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libcras/cras_client.c:50:
libcras/cras_client.c: In function 'cras_client_add_active_node':
../src/common/cras_messages.h:259:36: note: source object 'header' of size 8
  259 |         struct cras_server_message header;
      |                                    ^~~~~~
In file included from libcras/cras_client.c:45:
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
In function 'write_message_to_server',
    inlined from 'cras_client_rm_active_node' at libcras/cras_client.c:3153:9:
libcras/cras_client.c:2160:28: error: 'write' reading 20 bytes from a region of size 8 [-Werror=stringop-overread]
 2160 |                 write_rc = write(client->server_fd, msg, msg->length);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libcras/cras_client.c:50:
libcras/cras_client.c: In function 'cras_client_rm_active_node':
../src/common/cras_messages.h:276:36: note: source object 'header' of size 8
  276 |         struct cras_server_message header;
      |                                    ^~~~~~
In file included from libcras/cras_client.c:45:
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
In function 'write_message_to_server',
    inlined from 'cras_client_set_node_volume' at libcras/cras_client.c:3424:9:
libcras/cras_client.c:2160:28: error: 'write' reading 24 bytes from a region of size 8 [-Werror=stringop-overread]
 2160 |                 write_rc = write(client->server_fd, msg, msg->length);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libcras/cras_client.c:50:
libcras/cras_client.c: In function 'cras_client_set_node_volume':
../src/common/cras_messages.h:225:36: note: source object 'header' of size 8
  225 |         struct cras_server_message header;
      |                                    ^~~~~~
In file included from libcras/cras_client.c:45:
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
In function 'write_message_to_server',
    inlined from 'cras_client_swap_node_left_right' at libcras/cras_client.c:3437:9:
libcras/cras_client.c:2160:28: error: 'write' reading 24 bytes from a region of size 8 [-Werror=stringop-overread]
 2160 |                 write_rc = write(client->server_fd, msg, msg->length);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libcras/cras_client.c:50:
libcras/cras_client.c: In function 'cras_client_swap_node_left_right':
../src/common/cras_messages.h:225:36: note: source object 'header' of size 8
  225 |         struct cras_server_message header;
      |                                    ^~~~~~
In file included from libcras/cras_client.c:45:
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
In function 'write_message_to_server',
    inlined from 'cras_client_set_node_capture_gain' at libcras/cras_client.c:3451:9:
libcras/cras_client.c:2160:28: error: 'write' reading 24 bytes from a region of size 8 [-Werror=stringop-overread]
 2160 |                 write_rc = write(client->server_fd, msg, msg->length);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libcras/cras_client.c:50:
libcras/cras_client.c: In function 'cras_client_set_node_capture_gain':
../src/common/cras_messages.h:225:36: note: source object 'header' of size 8
  225 |         struct cras_server_message header;
      |                                    ^~~~~~
In file included from libcras/cras_client.c:45:
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
In function 'write_message_to_server',
    inlined from 'cras_client_add_test_iodev' at libcras/cras_client.c:3460:9:
libcras/cras_client.c:2160:28: error: 'write' reading 12 bytes from a region of size 8 [-Werror=stringop-overread]
 2160 |                 write_rc = write(client->server_fd, msg, msg->length);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libcras/cras_client.c:50:
libcras/cras_client.c: In function 'cras_client_add_test_iodev':
../src/common/cras_messages.h:368:36: note: source object 'header' of size 8
  368 |         struct cras_server_message header;
      |                                    ^~~~~~
In file included from libcras/cras_client.c:45:
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
In function 'write_message_to_server',
    inlined from 'cras_client_get_hotword_models' at libcras/cras_client.c:3553:9:
libcras/cras_client.c:2160:28: error: 'write' reading 16 bytes from a region of size 8 [-Werror=stringop-overread]
 2160 |                 write_rc = write(client->server_fd, msg, msg->length);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libcras/cras_client.c:50:
libcras/cras_client.c: In function 'cras_client_get_hotword_models':
../src/common/cras_messages.h:412:36: note: source object 'header' of size 8
  412 |         struct cras_server_message header;
      |                                    ^~~~~~
In file included from libcras/cras_client.c:45:
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
In function 'write_message_to_server',
    inlined from 'cras_client_set_hotword_model' at libcras/cras_client.c:3563:9:
libcras/cras_client.c:2160:28: error: 'write' reading 28 bytes from a region of size 8 [-Werror=stringop-overread]
 2160 |                 write_rc = write(client->server_fd, msg, msg->length);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libcras/cras_client.c:50:
libcras/cras_client.c: In function 'cras_client_set_hotword_model':
../src/common/cras_messages.h:427:36: note: source object 'header' of size 8
  427 |         struct cras_server_message header;
      |                                    ^~~~~~
In file included from libcras/cras_client.c:45:
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
In function 'write_message_to_server',
    inlined from 'cras_client_set_bt_wbs_enabled' at libcras/cras_client.c:3621:9:
libcras/cras_client.c:2160:28: error: 'write' reading 12 bytes from a region of size 8 [-Werror=stringop-overread]
 2160 |                 write_rc = write(client->server_fd, msg, msg->length);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libcras/cras_client.c:50:
libcras/cras_client.c: In function 'cras_client_set_bt_wbs_enabled':
../src/common/cras_messages.h:472:36: note: source object 'header' of size 8
  472 |         struct cras_server_message header;
      |                                    ^~~~~~
In file included from libcras/cras_client.c:45:
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
In function 'write_message_to_server',
    inlined from 'cras_send_register_notification' at libcras/cras_client.c:3643:7,
    inlined from 'cras_client_set_output_volume_changed_callback' at libcras/cras_client.c:3656:9:
libcras/cras_client.c:2160:28: error: 'write' reading 16 bytes from a region of size 8 [-Werror=stringop-overread]
 2160 |                 write_rc = write(client->server_fd, msg, msg->length);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libcras/cras_client.c:50:
libcras/cras_client.c: In function 'cras_client_set_output_volume_changed_callback':
../src/common/cras_messages.h:485:36: note: source object 'header' of size 8
  485 |         struct cras_server_message header;
      |                                    ^~~~~~
In file included from libcras/cras_client.c:45:
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
In function 'write_message_to_server',
    inlined from 'cras_send_register_notification' at libcras/cras_client.c:3643:7,
    inlined from 'cras_client_set_output_mute_changed_callback' at libcras/cras_client.c:3666:9:
libcras/cras_client.c:2160:28: error: 'write' reading 16 bytes from a region of size 8 [-Werror=stringop-overread]
 2160 |                 write_rc = write(client->server_fd, msg, msg->length);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libcras/cras_client.c:50:
libcras/cras_client.c: In function 'cras_client_set_output_mute_changed_callback':
../src/common/cras_messages.h:485:36: note: source object 'header' of size 8
  485 |         struct cras_server_message header;
      |                                    ^~~~~~
In file included from libcras/cras_client.c:45:
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
In function 'write_message_to_server',
    inlined from 'cras_send_register_notification' at libcras/cras_client.c:3643:7,
    inlined from 'cras_client_set_capture_gain_changed_callback' at libcras/cras_client.c:3677:9:
libcras/cras_client.c:2160:28: error: 'write' reading 16 bytes from a region of size 8 [-Werror=stringop-overread]
 2160 |                 write_rc = write(client->server_fd, msg, msg->length);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libcras/cras_client.c:50:
libcras/cras_client.c: In function 'cras_client_set_capture_gain_changed_callback':
../src/common/cras_messages.h:485:36: note: source object 'header' of size 8
  485 |         struct cras_server_message header;
      |                                    ^~~~~~
In file included from libcras/cras_client.c:45:
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
In function 'write_message_to_server',
    inlined from 'cras_send_register_notification' at libcras/cras_client.c:3643:7,
    inlined from 'cras_client_set_capture_mute_changed_callback' at libcras/cras_client.c:3688:9:
libcras/cras_client.c:2160:28: error: 'write' reading 16 bytes from a region of size 8 [-Werror=stringop-overread]
 2160 |                 write_rc = write(client->server_fd, msg, msg->length);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libcras/cras_client.c:50:
libcras/cras_client.c: In function 'cras_client_set_capture_mute_changed_callback':
../src/common/cras_messages.h:485:36: note: source object 'header' of size 8
  485 |         struct cras_server_message header;
      |                                    ^~~~~~
In file included from libcras/cras_client.c:45:
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
In function 'write_message_to_server',
    inlined from 'cras_send_register_notification' at libcras/cras_client.c:3643:7,
    inlined from 'cras_client_set_nodes_changed_callback' at libcras/cras_client.c:3698:9:
libcras/cras_client.c:2160:28: error: 'write' reading 16 bytes from a region of size 8 [-Werror=stringop-overread]
 2160 |                 write_rc = write(client->server_fd, msg, msg->length);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libcras/cras_client.c:50:
libcras/cras_client.c: In function 'cras_client_set_nodes_changed_callback':
../src/common/cras_messages.h:485:36: note: source object 'header' of size 8
  485 |         struct cras_server_message header;
      |                                    ^~~~~~
In file included from libcras/cras_client.c:45:
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
In function 'write_message_to_server',
    inlined from 'cras_send_register_notification' at libcras/cras_client.c:3643:7,
    inlined from 'cras_client_set_active_node_changed_callback' at libcras/cras_client.c:3708:9:
libcras/cras_client.c:2160:28: error: 'write' reading 16 bytes from a region of size 8 [-Werror=stringop-overread]
 2160 |                 write_rc = write(client->server_fd, msg, msg->length);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libcras/cras_client.c:50:
libcras/cras_client.c: In function 'cras_client_set_active_node_changed_callback':
../src/common/cras_messages.h:485:36: note: source object 'header' of size 8
  485 |         struct cras_server_message header;
      |                                    ^~~~~~
In file included from libcras/cras_client.c:45:
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
In function 'write_message_to_server',
    inlined from 'cras_send_register_notification' at libcras/cras_client.c:3643:7,
    inlined from 'cras_client_set_output_node_volume_changed_callback' at libcras/cras_client.c:3719:9:
libcras/cras_client.c:2160:28: error: 'write' reading 16 bytes from a region of size 8 [-Werror=stringop-overread]
 2160 |                 write_rc = write(client->server_fd, msg, msg->length);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libcras/cras_client.c:50:
libcras/cras_client.c: In function 'cras_client_set_output_node_volume_changed_callback':
../src/common/cras_messages.h:485:36: note: source object 'header' of size 8
  485 |         struct cras_server_message header;
      |                                    ^~~~~~
In file included from libcras/cras_client.c:45:
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
In function 'write_message_to_server',
    inlined from 'cras_send_register_notification' at libcras/cras_client.c:3643:7,
    inlined from 'cras_client_set_node_left_right_swapped_changed_callback' at libcras/cras_client.c:3730:9:
libcras/cras_client.c:2160:28: error: 'write' reading 16 bytes from a region of size 8 [-Werror=stringop-overread]
 2160 |                 write_rc = write(client->server_fd, msg, msg->length);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libcras/cras_client.c:50:
libcras/cras_client.c: In function 'cras_client_set_node_left_right_swapped_changed_callback':
../src/common/cras_messages.h:485:36: note: source object 'header' of size 8
  485 |         struct cras_server_message header;
      |                                    ^~~~~~
In file included from libcras/cras_client.c:45:
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
In function 'write_message_to_server',
    inlined from 'cras_send_register_notification' at libcras/cras_client.c:3643:7,
    inlined from 'cras_client_set_input_node_gain_changed_callback' at libcras/cras_client.c:3742:9:
libcras/cras_client.c:2160:28: error: 'write' reading 16 bytes from a region of size 8 [-Werror=stringop-overread]
 2160 |                 write_rc = write(client->server_fd, msg, msg->length);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libcras/cras_client.c:50:
libcras/cras_client.c: In function 'cras_client_set_input_node_gain_changed_callback':
../src/common/cras_messages.h:485:36: note: source object 'header' of size 8
  485 |         struct cras_server_message header;
      |                                    ^~~~~~
In file included from libcras/cras_client.c:45:
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
In function 'write_message_to_server',
    inlined from 'cras_send_register_notification' at libcras/cras_client.c:3643:7,
    inlined from 'cras_client_set_num_active_streams_changed_callback' at libcras/cras_client.c:3753:9:
libcras/cras_client.c:2160:28: error: 'write' reading 16 bytes from a region of size 8 [-Werror=stringop-overread]
 2160 |                 write_rc = write(client->server_fd, msg, msg->length);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libcras/cras_client.c:50:
libcras/cras_client.c: In function 'cras_client_set_num_active_streams_changed_callback':
../src/common/cras_messages.h:485:36: note: source object 'header' of size 8
  485 |         struct cras_server_message header;
      |                                    ^~~~~~
In file included from libcras/cras_client.c:45:
/usr/include/unistd.h:367:16: note: in a call to function 'write' declared with attribute 'access (read_only, 2, 3)'
  367 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
cc1: all warnings being treated as errors
Failed to complete chroot setup.
Unmounting /mnt/stateful_partition/crouton/chroots/sid...

If known, describe the steps to reproduce the issue:

Download crouton from https://goo.gl/fd3zc Running these commands in a shell sudo install -Dt /usr/local/bin -m 755 ~/Downloads/crouton sudo crouton -r sid -t kde-desktop

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 23 (3 by maintainers)

Commits related to this issue

Most upvoted comments

I was having problems updating a chroot named sid, this is how I fixed it.

  1. Run sudo crouton -u -n sid to update the chroot normally until CRAS compile fails
  2. Run sudo chmod +w /usr/local/chroots/sid/prepare.sh
  3. Run sudo vi /usr/local/chroots/sid/prepare.sh to edit the setup script
  4. Apply this patch manually:
--- /prepare.sh
+++ /prepare.sh
@@ -498,6 +498,7 @@
         s/if\\ !\(.*\)/if [ -z "${\1}" ]; then/
         s/if\\ \([^!].*\)/if [ -n "${\1}" ]; then/
         s/endif/fi/
+        s/-Werror//g
     ' 'Makefile.am'
     echo '
         # buildsources: Build all source files for target

That is, go to line ~498ish and add the s/-Werror//g line as shown above, without the plus sign.

  1. Type:wq<enter> to save and exit
  2. Run sudo chmod -w /usr/local/chroots/sid/prepare.sh to prevent crouton from thinking it’s “invalid”
  3. Run sudo enter-chroot -n sid
  4. Answer Y to run the setup script. There will be compile warnings still, but the build should succeed, and the update should continue as normal.

However, you will need to reapply this fix every time you update. If you want a longer-lasting solution, you’ll need to extract crouton’s scripts. I haven’t tried it, but here’s a tutorial: https://github.com/dnschneid/crouton/issues/4450#issuecomment-870781102.