Bug 234585 - devel/avr-gcc: /usr/local/libexec/gcc/avr/5.4.0/liblto_plugin.so: error loading plugin: Service unavailable collect2: error: ld returned 1 exit status
Summary: devel/avr-gcc: /usr/local/libexec/gcc/avr/5.4.0/liblto_plugin.so: error loadi...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Joerg Wunsch
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-02 23:28 UTC by Niko
Modified: 2019-03-03 20:18 UTC (History)
2 users (show)

See Also:
linimon: maintainer-feedback? (joerg)


Attachments
the irrelevant AVR CPP code (8.39 KB, text/plain)
2019-01-02 23:31 UTC, Niko
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Niko 2019-01-02 23:28:59 UTC
/usr/local/lib/gcc/avr/5.4.0/../../../../avr/bin/ld: /usr/local/libexec/gcc/avr/5.4.0/liblto_plugin.so: error loading plugin: Service unavailable
collect2: error: ld returned 1 exit status

libto_plugin.so shits the bed with arduino, arduino16, arduino18. Sketch compilations fail.

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.
Arduino: 1.0.6 (FreeBSD), Board: "Arduino Uno"
/usr/local/lib/gcc/avr/5.4.0/../../../../avr/bin/ld: /usr/local/libexec/gcc/avr/5.4.0/liblto_plugin.so: error loading plugin: Service unavailable
collect2: error: ld returned 1 exit status
Comment 1 Niko 2019-01-02 23:31:48 UTC
Created attachment 200732 [details]
the irrelevant AVR CPP code
Comment 2 Joerg Wunsch freebsd_committer 2019-03-03 20:18:28 UTC
Cannot reproduce that myself.

However, just got a hint from someone having a similar problem with the ARM toolchain. He updated and rebuilt the binutils port, and the problem was gone. The issue was that apparently, at some point in time, various binutils ports had been built with static linking, so the linker was then unable to dlopen() the LTO shared lib.

Bottom line, please see whether this problem vanishes after refreshing the avr-binutils installation.