Optware / Optware-ng

279 stars 52 forks source link

libgcc_s.so.1 missing (again?) #282

Closed oisyn closed 6 years ago

oisyn commented 6 years ago

Hi,

I've been trying to upgrade the gcc version on my Synology nas (a DS412+ with x86 cpu) from 4.2.something to 7.2.0. I've upgraded to ipkg from optware-ng and have upgraded all the packages.

Unfortunately, it seems that gcc is unable to find libgcc_s.so.1. gcc won't start at all, g++ will start but will fail once you try to compile a program. I did manage to find those files in /usr/lib/ and /usr/lib32/, but these seem to be the wrong version.

root@nas:~# gcc
gcc: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory
root@nas:~# g++
g++: fatal error: no input files
compilation terminated.
root@nas:~# g++ test.cpp -o test.o
/opt/libexec/gcc/i686-buildroot-linux-gnu/7.2.0/cc1plus: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory
root@nas:~# locate libgcc_s.so.1
/usr/lib/libgcc_s.so.1
/usr/lib32/libgcc_s.so.1
root@nas:~# export LD_LIBRARY_PATH=/usr/lib32/
root@nas:~# gcc
gcc: fatal error: no input files
compilation terminated.
root@nas:~# g++ test.cpp -o test.o
/opt/libexec/gcc/i686-buildroot-linux-gnu/7.2.0/cc1plus: /usr/lib32/libgcc_s.so.1: version `GCC_7.0.0' not found (required by /opt/libexec/gcc/i686-buildroot-linux-gnu/7.2.0/cc1plus)
root@nas:~# ipkg files glibc-opt | grep libgcc
root@nas:~# ipkg files libc-dev | grep libgcc
/opt/lib/libgcc.a
/opt/lib/libgcc_s.so
root@nas:~#

I did manage to find similar issues here, where libgcc_s.so.1 was indeed missing from the packages, but that has been fixed at the time. Perhaps the same issue returned? https://github.com/Optware/Optware-ng/issues/133 https://github.com/Optware/Optware-ng/issues/41

alllexx88 commented 6 years ago

Hi,

libgcc_s.so.1 is part of glibc-opt package:

root@DiskStation:~# ipkg update
Downloading http://ipkg.nslu2-linux.org/optware-ng/buildroot-i686/Packages.gz.
Inflating http://ipkg.nslu2-linux.org/optware-ng/buildroot-i686/Packages.gz.
Updated list of available packages in /opt/lib/ipkg/lists/alllexx.
root@DiskStation:~# ipkg upgrade glibc-opt
root@DiskStation:~# ipkg files glibc-opt|grep libgcc
/opt/lib/libgcc_s.so.1
root@DiskStation:~# ipkg -force-reinstall install glibc-opt
Downloading http://ipkg.nslu2-linux.org/optware-ng/buildroot-i686/glibc-opt_2.25-1_i686.ipk.
Reinstalling glibc-opt (2.25-1) on /opt/.
Configuring glibc-opt.
root@DiskStation:~# ipkg files glibc-opt|grep libgcc
/opt/lib/libgcc_s.so.1

Maybe you can try to reinstall the package:

ipkg -force-reinstall install glibc-opt

Please let me know if this helps.

oisyn commented 6 years ago

Yes thank you that did the trick! I had tried reinstalling glibc-opt as ipkg files glibc-opt produced no output at all (even without grep libgcc) by removing it and adding it again, but perhaps I did something wrong.