I just recently started getting an issue trying to update crouton. It can't seem to find some dependencies. Here's the relevant portion of the output:
Patching CRAS (volume control)...
patching file alsa_plugin/ctl_cras.c
Compiling CRAS (i386)...
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.7/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.7/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
collect2: error: ld returned 1 exit status
Failed to complete chroot setup.
Unmounting /mnt/stateful_partition/crouton/chroots/trusty...
Any suggestions?
Can you provide the output of croutonversion?
croutonversion
crouton: version 1-20140929212425~master:4b8c6ecf
release: trusty
architecture: amd64
targets: unity
host: version 5978.98.1 (Official Build) stable-channel peppy
That sounds good... I'll need the full update output, easiest is to run the update like this:
sudo sh -x ~/Downloads/crouton -n trusty -u | tee ~/Downloads/update.txt
That'll create a file name update.txt in your Downloads folder, that you can copy-paste into a gist (https://gist.github.com/)
Sorry (for the delay, and providing you with a wrong command). Can you run this one instead, then upload update.txt again:
sudo sh -x ~/Downloads/crouton -n trusty -u 2>&1 | tee ~/Downloads/update.txt
Thanks!
No problem. I was wondering how that little amount of information was going to help, but then brushed it off thinking you were some kind of magic man:
Can you provide the output of:
gcc -v
dpkg -S libgcc_s.so
Thanks!
I could reproduce by switching to gcc 4.7, using something like this:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 100
And fixing it again by switching to gcc-4.8.
What does this one say?
update-alternatives --list gcc
EDIT: So, you have 2 options:
sudo apt-get install gcc-4.7-multilibgcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.7.3-12ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --enable-objc-gc --with-cloog --enable-cloog-backend=ppl --disable-cloog-version-check --disable-ppl-version-check --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-12ubuntu1)
dpkg -S libgcc_s.so
lib32gcc-4.8-dev: /usr/lib/gcc/x86_64-linux-gnu/4.8/32/libgcc_s.so
libgcc1:i386: /lib/i386-linux-gnu/libgcc_s.so.1
libgcc-4.7-dev:amd64: /usr/lib/gcc/x86_64-linux-gnu/4.7/libgcc_s.so
lib32gcc1: /usr/lib32/libgcc_s.so.1
libgcc1:amd64: /lib/x86_64-linux-gnu/libgcc_s.so.1
libgcc-4.8-dev:amd64: /usr/lib/gcc/x86_64-linux-gnu/4.8/libgcc_s.so
libx32gcc1: /usr/libx32/libgcc_s.so.1
libx32gcc-4.8-dev: /usr/lib/gcc/x86_64-linux-gnu/4.8/x32/libgcc_s.so
update-alternatives --list gcc
update-alternatives: error: no alternatives for gcc
I'll see about getting gcc 4.8, and if I get stuck, I'll try gcc-4.7-multilib. Thanks for your help!
I was able to use gcc-4.8 to compile by following step 3 at the following link: http://ubuntuhandbook.org/index.php/2013/08/install-gcc-4-8-via-ppa-in-ubuntu-12-04-13-04/
Tried again and everything went smoothly. Thanks again, feel free to close this issue.
@ofuangka : sounds great.
FWIW I had the same problem with gcc-4.9 selected. Seems to work after using update-alternatives to revert to 4.8. Thanks!