You are not logged in.

#1 2017-05-21 22:18:12

Jaden71
Member
Registered: 2015-09-10
Posts: 2

Arduino IDE not compiling after latest update.

After checking my pacman log, I found this:
[2017-05-20 18:41] [ALPM] upgraded avr-gcc (6.3.0-1 -> 7.1.0-1)

Now, compiling anything through the Arduino IDE returns this error:

signal: segmentation fault (core dumped)
Error compiling for board Arduino/Genuino Uno.

Is this a bug (anything I can do to fix this) or should I just wait for software compatibility?

Thanks

Offline

#2 2017-05-22 05:48:01

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: Arduino IDE not compiling after latest update.

Did you check and google the backtrace?

I found this

Only "this"? Did you conduct a partial update?

Offline

#3 2017-05-22 22:42:32

The Loko
Member
From: Spain
Registered: 2014-07-23
Posts: 100

Re: Arduino IDE not compiling after latest update.

I have the same issue, added a bug report.

Offline

#4 2017-05-25 17:32:17

fusca
Member
Registered: 2008-01-16
Posts: 25

Re: Arduino IDE not compiling after latest update.

Hi... I have the same issue here. Well.. I recompiled the avr-gcc package with the latest gcc snapshot ftp://gcc.gnu.org/pub/gcc/snapshots/7-20170518/ and it worked!

Here is a part of my modified PKGBUILD:
....
pkgname=avr-gcc                                                                                                                                                                         
pkgver=7.1.0                                                                                                                                                                           
pkgrel=1                                                                                                                                                                               
_snapshot=7-20170518                                                                                                                                                                   
_islver=0.18                                                                                                                                                                           
pkgdesc='The GNU AVR Compiler Collection'                                                                                                                                               
arch=(i686 x86_64)                                                                                                                                                                     
license=(GPL LGPL FDL custom)                                                                                                                                                           
url='http://gcc.gnu.org/'                                                                                                                                                               
depends=(avr-binutils gcc-libs libmpc)                                                                                                                                                 
optdepends=('avr-libc: Standard C library for Atmel AVR development')                                                                                                                   
options=(!emptydirs !strip)                                                                                                                                                             
source=(#ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2                                                                                                         
        ftp://gcc.gnu.org/pub/gcc/snapshots/${_ … t}.tar.bz2                                                                                                       
        http://isl.gforge.inria.fr/isl-${_islver}.tar.bz2                                                                                                                               
       )                                                                                                                                                                               
sha512sums=('2d7dc5ff29a35bfa00a72406965daba330a1b5f68f6ddf6e120f37fc0480d2908ff0025c641a64f6de325f3d26143dc97f192016e63ebe08a5166ec53dab6be1'                                         
            '85d0b40f4dbf14cb99d17aa07048cdcab2dc3eb527d2fbb1e84c41b2de5f351025370e57448b63b2b8a8cf8a0843a089c3263f9baee1542d5c2e1cb37ed39d94')                                         
...


I hope I have helped

Offline

#5 2017-05-25 19:17:06

fusca
Member
Registered: 2008-01-16
Posts: 25

Re: Arduino IDE not compiling after latest update.

fusca wrote:

Hi... I have the same issue here. Well.. I recompiled the avr-gcc package with the latest gcc snapshot ftp://gcc.gnu.org/pub/gcc/snapshots/7-20170518/ and it worked! ...

Hi... sorry for my mistake. I tested again the package and it did't work. Please downgrade the avr-gcc to version 6.3.0. It will work fine.

Offline

#6 2017-06-01 05:39:53

trashguy
Member
Registered: 2017-06-01
Posts: 1

Re: Arduino IDE not compiling after latest update.

I can confirm downgrading to avr-gcc-6.3.0-1 will fix the issue. Thanks.

Offline

#7 2017-06-25 16:49:05

Meithan
Member
Registered: 2011-05-31
Posts: 3

Re: Arduino IDE not compiling after latest update.

I can also confirm that downgrading to avr-gcc-6.3.0-1 fixes the issue.

Tip: I don't know if it's recommended (newbie here), but one way to easily downgrade packages is to install downgrade from the AUR. Then it's just a "sudo downgrade <package_name>" and you'll get to choose from a list of available versions.

Offline

#8 2017-06-30 00:39:26

alfalfa
Member
Registered: 2017-06-30
Posts: 63
Website

Re: Arduino IDE not compiling after latest update.

I use arch on two computer, one has the bug but both are up to date.

The command "/usr/bin/avr-gcc-ar" gives "Segmentation fault (core dumped)" on the faulty one.
In the arduino IDE it fails to compile all modules: https://pastebin.com/raw/UiU1GxQV

Offline

#9 2017-07-06 08:54:40

forrest.koch
Member
Registered: 2015-12-26
Posts: 13

Re: Arduino IDE not compiling after latest update.

I had the same issue and managed to find a workaround that does not involve downgrading avr-gcc.  I haven't seen this described anywhere else so I figured I'd post it here.

Just a heads up to those passing by, this seems to fix arduino-builder as well as the arduino IDE

In the file platform.txt (for me the file is in /usr/share/arduino/hardware/archlinux-arduino/avr), change line 65:

recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"

to

recipe.ar.pattern="{compiler.path}ar" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"

Obviously it's probably a good idea to keep the original line as a comment so you can change it back.

As to why this actually works (just in case anyone is curious), there's currently a bug in gcc-ar which is causing the symptomatic seg fault (see https://gcc.gnu.org/ml/gcc-bugs/2017-05/msg01145.html).  However, gcc-ar is actually just a wrapper around ar, and the seg fault is occuring while gcc-ar is trying to find the ar binary to execute.

So this fix just supplies arduino-builder with a working ar command.

Offline

#10 2017-07-06 13:39:40

anatolik
Developer
Registered: 2012-09-27
Posts: 458

Re: Arduino IDE not compiling after latest update.

Or please try the latest avr-gcc-7.1.0-2 version from [testing]. It reverted upstream commit that causes the segfault.


Read it before posting http://www.catb.org/esr/faqs/smart-questions.html
Ruby gems repository done right https://bbs.archlinux.org/viewtopic.php?id=182729
Fast initramfs generator with security in mind https://wiki.archlinux.org/index.php/Booster

Offline

#11 2017-07-10 14:16:51

lamdacore
Member
Registered: 2009-11-05
Posts: 128

Re: Arduino IDE not compiling after latest update.

7.1.0-2 does indeed fix this. Thanks.

Offline

Board footer

Powered by FluxBB