OpenWrt Forum Archive

Topic: SDK not working with Ubuntu 17.04 and GCC 6.3 (PIE/PIC issue?)

The content of this topic has been archived on 30 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Using the latest lede-sdk-ramips-mt7620_gcc-5.4.0_musl.Linux-x86_64 snapshot, running make menuconfig gives me this error:

/usr/bin/ld: zconf.tab.o: relocation R_X86_64_32S against symbol `symbol_yes' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status

I believe it's due to some PIE/PIC change in GCC but I'm not sure. Any suggestions?

(Last edited by roger_ on 11 Feb 2017, 23:22)

Had similar problem afte last "git pull" and rebuilding working image.
Neded to do
cd /source
mv .config .config_keep
#Caution: next will kill a lot ! Check doku !
make distclean
mv .config_keep .config
./script/feeds update -a
./script/feeds install -a
make menuconfig
make

Thanks, that seems to work but I did have to restore staging_dir/ since it removed the toolchain.

I found a better fix: run "make clean" in scripts/config, then proceed as usual.

Seems like there are some incompatible binaries there that need to be rebuilt.


EDIT: fixed in LEDE trunk.

(Last edited by roger_ on 13 Feb 2017, 21:24)

The discussion might have continued from here.