avr-gcc-ar fails to run

Bug #1687340 reported by Mikko Rantanen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Raspbian
New
Undecided
Unassigned

Bug Description

Fresh raspbian lite (April 2017) with apt-get install gcc-avr (1:4.8.1+Atmel3.4.4-2).

```
pi@raspberrypi:~ $ avr-gcc-ar --help
avr-gcc-ar: Cannot find plugin 'liblto_plugin.so'
```

Based on strace, avr-gcc-ar finds the liblto_plugin.so but doesn't recognize it as it doesn't have execute access. Giving execute access to the library (which is behind a symlink) provides the following problem:

```
pi@raspberrypi:~ $ sudo chmod a+x /usr/lib/gcc/avr/4.8.1/liblto_plugin.so.0.0.0
pi@raspberrypi:~ $ avr-gcc-ar --help
sorry - this program has been built without plugin support
```

avr-gcc-ar attempts to execute avr-ar, which doesn't support the --plugin option.

Might be an upstream bug, but I don't have a pure raspbian jessie installation to test this with.

gcc works around the first issue by specifically passing R_OK to the find_a_file function responsible for locating the liblto. This was changed in 2013: https://github.com/gcc-mirror/gcc/commit/0dc1ebca5751c076a9ea07a7e6d6e8428bdbe73b - unfortunately this fix has gone in after 4.8.1 release based on the timestamps.

The second issue feels more a problem of the binutils/gcc compatibility in raspbian/jessie.

System: Linux raspberrypi 4.4.50+ #970 Mon Feb 20 19:12:50 GMT 2017 armv6l GNU/Linux
Libc package: 2.19-18+deb8u7

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.