gcc - Synology DSM6 - libc.so.6 - File format not recognized -


my final goal install nagios on synology diskstation ds1813+ dsm 6.0.1-7393 update 1. can't begin compiling package...

when try use gcc on synology diskstation following error message:

$ gcc hello.c -o hello.o /lib/libc.so.6: file not recognized: file format not recognized collect2: ld returned 1 exit status 

here's shell environment. have tried different ld_library_path settings, omitting doesn't make difference.

$ env term=xterm-256color shell=/bin/sh ssh_client=192.168.2.110 51079 22 oldpwd=/var/services/homes/egi ssh_tty=/dev/pts/7 lc_all=en_us.utf8 user=egi ld_library_path=/opt/lib: pager=more mail=/var/mail/egi path=/opt/sbin:/opt/bin:/sbin:/bin:/usr/sbin:/usr/bin pwd=/var/services/homes/egi/exer lang=en_us.utf8 ps1=[\u@\h \w]$  shlvl=1 home=/var/services/homes/egi terminfo=/usr/share/terminfo logname=shunyam ssh_connection=xxx.xxx.xxx.xxx 51079 yyy.yyy.yyy.yyy 22 pgdata=/var/services/pgsql cc=gcc _=/opt/bin/env 

the compiler has been installed ipkg , specs this:

$ gcc --verbose using built-in specs. target: i686-linux-gnu configured with: ../gcc-4.2.1/configure --build=i386-pc-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu --prefix=/opt --disable-nls --disable-static --with-as=/home/slug/optware/syno-i686/toolchain/gcc-4.2.1-glibc-2.3.6/i686-linux-gnu/bin/i686-linux-gnu-as --with-ld=/home/slug/optware/syno-i686/toolchain/gcc-4.2.1-glibc-2.3.6/i686-linux-gnu/bin/i686-linux-gnu-ld --enable-languages=c,c++ --disable-multilib thread model: posix gcc version 4.2.1 

the library causes problem returns information:

$ /lib/libc.so.6  gnu c library (crosstool-ng 1.20.0) stable release version 2.20-2014.11, roland mcgrath et al. copyright (c) 2014 free software foundation, inc. free software; see source copying conditions. there no warranty; not merchantability or fitness particular purpose. compiled gnu cc version 4.9.3 20150311 (prerelease). available extensions:     crypt add-on version 2.1 michael glad , others     gnu libidn simon josefsson     native posix threads library ulrich drepper et al     bind-8.2.3-t5b libc abis: unique ifunc bug reporting instructions, please see: <http://www.gnu.org/software/libc/bugs.html>. 

there linker script @ /opt/lib/libc.so:

$ cat /opt/lib/libc.so /* gnu ld script    use shared library, functions in    static library, try secondarily.  */ output_format(elf32-i386) group ( /lib/libc.so.6 /opt/lib/libc_nonshared.a ) 

the library can't broken, otherwise nothing work @ all.

alongside gcc other required packages have been installed ipkg.

weirdly enough seem person issue have found no relevant posts on google. synology's support told me not supporting installing command command line packages.

when first installed gcc on diskstation 2 years ago, working fine. have noticed problem few months ago (probably after dsm update).

has come across issue or has clue on how working again? thanks!

i had exact same problem. gcc use work , dsm 6.1 broke. think it's after switched 64-bit dsm 6.0 believe. question gave me answer wanted share here. changed /lib/libc.so.6 /lib32/libc.so.6 in file /opt/lib/libc.so.

$ cat /opt/lib/libc.so  /* gnu ld script    use shared library, functions in    static library, try secondarily.  */ output_format(elf32-i386) group ( /lib32/libc.so.6 /opt/lib/libc_nonshared.a ) 

after making change above optware gcc compiled test file without environment variables set expect on normal linux system.


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -