Pages: [1]   Go Down
Author Topic: Problem compile blink file in linux  (Read 3195 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello, I want to install and running blink example in my computer(linux ubuntu 12.10).  I Downloaded "Arduino Due" software from https://github.com/downloads/arduino/Arduino/arduino-1.5.1-linux32.tgz. extract this file, run arduino as usual and tried to open blink example in File->example->basic->blink.  After that I selected board Tool->Board->arduino Due (Programming Port). I tried to compile using  Sketch->Verify/Compile(Ctrl-R) but not succeeded with error message is "Cannot run program  ../arduinoDue/hardware/tools/g++_arm_none_eabi/bin/arm-none-eabi-gcc: error=2, No such file or directory". Then I tried to solve this error with renamed file  from arm-none-eabi-gcc-4.4.1 to arm-none-eabi-gcc  because no file arm-none-eabi-gcc  in directory "../arduinoDue/hardware/tools/g++_arm_none_eabi/bin/". After that  I compiled again but still error with error message.
"Cannot run program  ../arduinoDue/hardware/tools/g++_arm_none_eabi/bin/arm-none-eabi-ar: error=2, No such file or directory"  and also no filename arm-none-eabi-ar in that directory.

Please help me to solve that problem
Logged

Ayer, Massachusetts, USA
Offline Offline
Edison Member
*
Karma: 53
Posts: 1835
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

This is usually a sign that you don't have the proper libraries (or dynamic linker) loaded.  Given you are using ubuntu, which normally does not install the 32-bit libraries, I suspect you need to poke around and load the 32-bit dynamic linker and all of the shared libraries used by the arm-gcc commands.
Logged

Dallas, TX USA
Offline Offline
Faraday Member
**
Karma: 63
Posts: 2649
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I can't get the IDE to come up on ubuntu 10.10
IDE 1.5 works fine but 1.5.1 gets an exception:
Quote
TargetPlatform: constructor start, name: sam
TargetPlatform: constructor start, name: avr
TargetPlatform: constructor start, name: variants
TargetPlatform: constructor start, name: cores
TargetPlatform: constructor start, name: bootloaders
TargetPlatform: constructor start, name: cores
TargetPlatform: constructor start, name: bootloaders
Exception in thread "main" java.lang.IllegalStateException: Menu has no enabled items
   at processing.app.Base.selectFirstEnabledMenuItem(Base.java:1331)
   at processing.app.Base.rebuildBoardsMenu(Base.java:1252)
   at processing.app.Editor.buildToolsMenu(Editor.java:690)
   at processing.app.Editor.buildMenuBar(Editor.java:483)
   at processing.app.Editor.<init>(Editor.java:212)
   at processing.app.Base.handleOpen(Base.java:705)
   at processing.app.Base.handleOpen(Base.java:670)
   at processing.app.Base.handleNew(Base.java:568)
   at processing.app.Base.<init>(Base.java:308)
   at processing.app.Base.main(Base.java:201)

I guess I'll have to go start digging into the java code.

--- bill
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is usually a sign that you don't have the proper libraries (or dynamic linker) loaded.  Given you are using ubuntu, which normally does not install the 32-bit libraries, I suspect you need to poke around and load the 32-bit dynamic linker and all of the shared libraries used by the arm-gcc commands.

Thank you for your answer. I am sorry I don't know about dynamic linker and shared library file in linux but I tried install arm-gcc with this command sudo apt-get install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi, but the problem still exist. please guide me to solve my problem .
Thank you
Logged

Ayer, Massachusetts, USA
Offline Offline
Edison Member
*
Karma: 53
Posts: 1835
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The problem is the Arduino IDE is using its own version of the ARM compiler.  If you find the directory the IDE has installed the compiler, and rename the directory to something else, it will then use the arm compiler you installed via app-get (or whatever they call the installation tool on ubutuno).  Or you have to install the 32-bit libraries.  Ask on a ubuntu group where they are.
Logged

Dallas, TX USA
Offline Offline
Faraday Member
**
Karma: 63
Posts: 2649
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is usually a sign that you don't have the proper libraries (or dynamic linker) loaded.  Given you are using ubuntu, which normally does not install the 32-bit libraries, I suspect you need to poke around and load the 32-bit dynamic linker and all of the shared libraries used by the arm-gcc commands.

I didn't have to do any of that for the 1.5 release. It "just worked". (on Ubuntu 10.10)
1.5.1. also "Just worked" on Mint 13 which is based on Ubuntu 12.04

grandrik, from what I've experienced, everything needed is included in the Arduino IDE tar image.
I'd go uninstall the ARM packages you added.
Do you have any weird characters in your file/directory names like spaces? (That is bad)
When the IDE called g++ it didn't use relative paths for me. It used full path names to the tools.
Can you post the debug compile lines that you get when you try to compile the code?



Still trying to get 1.5.1 to come up on Ubuntu 10.10
I think there may an issue with using multiple/different versions of the IDE on the
same machine (which I do. I have 20 different versions of the Arduino IDE on my Ubuntu 10.10 machine)
because all the IDEs share the same user configuration files.
(I've run into these types of issues before)
I modified 1.5 on my Ubuntu 10.10 for pic32 support to allow me to use Arduino 1.5
with chipkit boards (works great BTW), but if I leave the Uno32 board (chipkit board)
selected  and then try to bring up a stock 1.5 the 1.5 also crashes.
So there is some issue in the IDE in that if it sees a board type being used that is not part of the
supported boards in the tree, it crashes.
Although I even removed the preferences.txt file and had it create a new one, and still
had the same problem.

I think my issue has nothing to do with the issue grandrik is having.


--- bill
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

grandrik, from what I've experienced, everything needed is included in the Arduino IDE tar image.
I'd go uninstall the ARM packages you added.
Do you have any weird characters in your file/directory names like spaces? (That is bad)
When the IDE called g++ it didn't use relative paths for me. It used full path names to the tools.
Can you post the debug compile lines that you get when you try to compile the code?
--- bill

Thank you for your answer,
I don't have any weird character in my file like space. Based your experience that succeed install arduino due in your linux then I try extract arduino to another computer using ubuntu 12.04. I am getting surprised that Arduino 1.5.1  can  compile blink file with succeed in that computer. I back to my computer with ubuntu 12.10(quantal) extract again with another software and there is something interesting.
When i extract with nautilus program, I got 6,118 items, totalling 379.6 MB. when I extract with command "tar zxvf arduino-1.5.1-linux32.tgz", I got   6,133 items, totalling 379.6 MB. So Total of item is different.
After I extract with "tar zxvf", I run Arduino 1.5.1, opened blink file, compiled  then succeeded. smiley

I also already tried to remove package  gcc-arm-linux-gnueabi g++-arm-linux-gnueabi in my computer based your information before. then Arduino Due still work normally and can compile and upload blink file.

Thank you, My problem Solved
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everibody,
from Majorica,
I use Debian Linux 64bit, downloaded Arduino IDE 1.5 version to use with new and amazing arduino DUE,
IDE runs very fine, but do not compile sketch 'blink', from samples/basic section files menu.

IDE report next error, as the same related on the previous posts:

/home/jaume/arduino-1.5.1/hardware/tools/g++_arm_none_eabi/bin/arm-none-eabi-g++ -c -g -Os -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf -mcpu=cortex-m3 -DF_CPU=84000000L -DARDUINO=151 -D__SAM3X8E__ -mthumb -DUSB_PID=0x003e -DUSB_VID=0x2341 -DUSBCON -I/home/jaume/arduino-1.5.1/hardware/arduino/sam/system/libsam -I/home/jaume/arduino-1.5.1/hardware/arduino/sam/system/CMSIS/CMSIS/Include/ -I/home/jaume/arduino-1.5.1/hardware/arduino/sam/system/CMSIS/Device/ATMEL/ -I/home/jaume/arduino-1.5.1/hardware/arduino/sam/cores/arduino -I/home/jaume/arduino-1.5.1/hardware/arduino/sam/variants/arduino_due_x /tmp/build8825843267773978504.tmp/Blink.cpp -o /tmp/build8825843267773978504.tmp/Blink.cpp.o [/color]
bash: arm-none-eabi-g++: No existe el fichero o el directorio
[/color][/b]


So, in english, "File does not exist".
When I try run the program 'arm-non-eabi-g++' directly from the content directory, echoes the same error, and, yet, File Exist!!!!

I try same strategic approach from previous post, but I do not have success!!!

Any other trick or suggestion!!
I think about the installer program (software used to make the 'tgz' file) omit some library or configuration file. May be the 'arm-non-eabi-g++' make a call to another file (library or exec.) that's missing, but the error message only report 'file not found'.

So, thanks on advance for the help!!!

Jaume.

Edited on dec, 26, 2012.
After hours of investigation about "multiarch", I'm installed many software packages referred to ia32-libs. Rebooting computer the problem is absent. Arduino IDE 1.5 for DUE board compile fine without problems.
So I can't tell what is the solution, only can say the installation 'multiarch' software has been the solution.
Really the Arduino 1.5 package for linux 64bit is 32 bit. The 'file not found' error refers to a 32 bits library. The tool 'eu-readelf -a'  reveals a call to library  'libc.so.6' dispatch from 'arm-non-eabi-g++', first stage compiler. Machine type is 80386, it's not a 64 bit machine type.

Here is a list section echoed by command 'eu-readlf -a':
root@debianAMD64i7:/home/jaume/Descargas/arduino-1.5.1/hardware/tools/g++_arm_none_eabi/bin# eu-readelf -a arm-none-eabi-g++
Encabezamiento ELF:
  Mágico:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
  Clase:                             ELF32
  Datos:                             2's complement, little endian
  Versión ident:                     1 (actual)
  OS/ABI:                            UNIX - System V
  Versión ABI:                       0
  Tipo:                              EXEC (Fichero ejecutable)
  Máquina:                           Intel 80386
  Versión:                           1 (actual)
  Dirección de punto de entrada:               0x80493b0
.
.
.
Segmento dinámico contiene entradas 25:
 Dirección: 0x0807abac  Compensación: 0x031bac  Enlace a sección: [ 5] '.dynstr'
  Tipo              Valor
  NEEDED            Biblioteca compartida: [libc.so.6]
.
.
.


Thanks for previous posts!!
« Last Edit: December 26, 2012, 01:22:51 pm by kanmen » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello again,
I dowloaded IDE 1.5 for Windows, and connect Arduino Due, 'blink' program compile and run properly.
I think is a Debian Linux AMD64 question.

Happy christmas!!
Logged

USA
Offline Offline
Sr. Member
****
Karma: 13
Posts: 360
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Installing the package, "ia32-libs" fixed this problem on my Ubuntu 12.10 64-bit system.  Apparently, the files referenced by this error message are 32-bit executables, and won't run on a 64-bit system without help. 

For my setup, Michael Meissner was right when he said, "... you don't have the proper libraries ..." 
Logged

Pages: [1]   Go Up
Jump to: