Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Eclipse 4.6 from eclipse overlay uses HOST libraries.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
xhakerek
n00b
n00b


Joined: 27 Oct 2008
Posts: 32
Location: Korolówka

PostPosted: Sat Jul 28, 2018 7:56 pm    Post subject: Eclipse 4.6 from eclipse overlay uses HOST libraries. Reply with quote

Hello,

It seems that there is something wrong with eclipse when used on Gentoo with avr toolchain.

I have installed the toolchain using crossdev and it works perfect from command line. The problems start when eclipse is used with it. It seems that for some reason the libraries are not searched properly and the toolchain ends up using HOST libbfd, this results in the following error message:
Fatal error: selected target format 'elf32-avr' unknown

$ LD_DEBUG="libs" eclipse-bin-4.6
7943: calling init: /usr/lib/libbfd-2.30.0.so
7943:
7943:
7943: initialize program: /usr/libexec/gcc/avr/as
7943:
7943:
7943: transferring control: /usr/libexec/gcc/avr/as
7943:
Assembler messages:
Fatal error: selected target format 'elf32-avr' unknown

This is obviously incorrect. I have to specify the same search path that avr-gcc invoked from the command line uses in order to get eclipse to work and compile C code for avr architecture:
$ LD_DEBUG="libs" avr-gcc workspace/gcc/abc 2>&1 | grep "search path"
8193: search path=/usr/lib64/binutils/avr/2.30/tls/x86_64/x86_64:/usr/lib64/binutils/avr/2.30/tls/x86_64:/usr/lib64/binutils/avr/2.30/tls/x86_64:/usr/lib64/binutils/avr/2.30/tls:/usr/lib64/binutils/avr/2.30/x86_64/x86_64:/usr/lib64/binutils/avr/2.30/x86_64:/usr/lib64/binutils/avr/2.30/x86_64:/usr/lib64/binutils/avr/2.30 (RUNPATH from file /usr/libexec/gcc/avr/ld)

When started with the same library search path, eclipse works fine:
$ LD_LIBRARY_PATH="usr/lib64/binutils/avr/2.30/tls/x86_64/x86_64:/usr/lib64/binutils/avr/2.30/tls/x86_64:/usr/lib64/binutils/avr/2.30/tls/x86_64:/usr/lib64/binutils/avr/2.30/tls:/usr/lib64/binutils/avr/2.30/x86_64/x86_64:/usr/lib64/binutils/avr/2.30/x86_64:/usr/lib64/binutils/avr/2.30/x86_64:/usr/lib64/binutils/avr/2.30" eclipse-bin-4.6

The above wasn't the case earlier, I have used eclipse with avr-eclipse plugin in the past. Can you help me understand what has changed since? Maybe it is some option I don't know about?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum