Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 303043

Summary: dev-embedded/arduino-1.0 version bump
Product: Gentoo Linux Reporter: Wojciech Porczyk <wojciech>
Component: New packagesAssignee: solar (RETIRED) <solar>
Status: RESOLVED FIXED    
Severity: normal CC: dev-embedded+disabled, dima, gentoo.cart9, gentoo, gruemel-monster, idl0r, jklawiter, jonescaseyb, luksan, miknix, nixphoeni, pcmoore, relson, remspoor, renatogallo, rose, stharward, torsten, widget
Priority: High Flags: nixphoeni: Bugday+
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://www.arduino.cc/en/Main/Software
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: dev-embedded/arduino-0018.ebuild
Makefile for compiling and uploading of sketches for ordinary Gentoo users
arduino-0018.ebuild with cores_Makefile-0018.patch
cores_Makefile-0018.patch
cleaned arduino-0018.ebuild
enhanced cores_Makefile-0018.patch for extern setting of PORT etc and to avoid the __cxa_pure_virtual error
new ebuild (and necessary files) for 0019
arduino-0022.ebuild
arduino-script-0022.patch
rxtx-2.2_pre2.ebuild required for arduino-0022
ChangeLog for rxtx-2.2_pre2
rxtx/files/lockfiled.xinetd for rxtx-2.2_pre2
rxtx/files/rxtx-2.2pre2-lfd.diff for rxtx-2.2_pre2
rxtx/files/rxtx-2.2pre2-nouts.diff
arduino-1.0.ebuild
arduino-script-1.0.patch
arduino-1.0.ebuild
Alternative arduino-1.0.ebuild
Patch to fix deprecated prog_char in Hardware/arduino/cores/arduino/Print.cpp
build.xml patch to use system libraries and avoid library mismatch error
Arduino patch - for use with paulj's ebuild

Description Wojciech Porczyk 2010-01-31 23:30:27 UTC
arduino-0018 was released on 2010.01.29

release notes: http://arduino.cc/en/Main/ReleaseNotes

since then 0017 is unsupported
Comment 1 Casey Jones 2010-02-01 23:07:57 UTC
There seems to be a problem with their .tgz file.
I simply renamed the arduino ebuild to 0018, and I got an error while unpacking.

Just using plain old tar on the .tgz gave the error:
gzip: stdin: not in gzip format
tar: Child returned status 1   
tar: Exiting with failure status due to previous errors

On their Google Code page, they have a 64-bit package which does extract.
http://code.google.com/p/arduino/downloads/list
Comment 2 Casey Jones 2010-02-01 23:19:37 UTC
Hmm... It looks like the .tgz file does actually extract now.

I downloaded it twice, and I got errors both time, but the third time it worked.
Comment 3 solar (RETIRED) gentoo-dev 2010-02-01 23:33:22 UTC
(In reply to comment #1)
> There seems to be a problem with their .tgz file.

The download URL has changed. All our patches have to be reworked as well. 
The new SRC_URI will need to be http://arduino.googlecode.com/files/${P}.tgz
Comment 4 Cyrill Helg 2010-03-11 07:27:15 UTC
Is there any progress on this? What needs to be done?
Comment 5 Joe Sapp (RETIRED) gentoo-dev 2010-03-31 16:45:07 UTC
See comment #3.
Comment 6 Florian Manschwetus 2010-04-20 07:31:06 UTC
Still no progress, here?
Comment 7 Tori 2010-05-12 15:19:24 UTC
Created attachment 231229 [details]
dev-embedded/arduino-0018.ebuild

Fixes the URL change and removes Makefile patching (no longer needed).

mv files/arduino-script-0017.patch files/arduino-script-0018.patch

(and works at least for me)
Comment 8 Stephen Bridges 2010-06-28 21:35:01 UTC
> (and works at least for me)

Working here on ~amd64, although I don't think the arduino executable is in $PATH any more. 
Comment 9 Christian Ruppert (idl0r) gentoo-dev 2010-07-02 20:03:40 UTC
I don't have many details yet..
What I just tried was:
Removing the Makefile patch.
Remove pkg_postinst().
Use the 0017 script patch.
Fix SRC_URI to the new location.

Works so far..

Also a einfo about ldscripts would be good like (example) "Don't forget to 'ln -s /usr/lib64/binutils/avr/2.20.1/ldscripts /usr/avr/lib/ldscripts'"
Comment 10 Juergen Rose 2010-07-31 16:53:58 UTC
If I try this arduino-0018.ebuild I get first the warning:

>>> Install arduino-0018 into /var/tmp/portage/dev-embedded/arduino-0018/image/ category dev-embedded
chmod: cannot access `/var/tmp/portage/dev-embedded/arduino-0018/image//usr/share/arduino-0018/hardware/libraries': No such file or directory


and if I then try to verify the example sketch Digital->Blink, I still get as with arduino-0017:

Error Compiling:

unknown MCU 'atmega328p' specified

Known MCU names:

   avr2

   at90s2313
...

/usr/share/arduino-0018/hardware/arduino/cores/arduino/wiring_shift.c:1: Fehler: MCU »atmega328p« nur für Assemblierung unterstützt

Comment 11 Juergen Rose 2010-08-03 07:00:07 UTC
After installing the toolchain with:
USE="-openmp"  crossdev -t avr -s4 -S --g 4.3.3 --without-headers

the issue with "unknown MCU 'atmega328p' specified"
disappeared.

(I forget the --g 4.3.3 option during my last install).
Comment 12 Juergen Rose 2010-08-04 13:24:23 UTC
The arduino-0018.tgz archive comes without an Makefile in arduino-0018/hardware/arduino/cores/arduino directory. The Makefiles for arduino-0018 which I found in the WEB :

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1265576847
http://leepike.wordpress.com/makefile/

are not well designed for Gentoo. The Makefile tries to write the object files into or below the install directory, which is not good, if you call 'make' as ordinary user and if arduino is installed by gentoo under /usr/share/arduino-00XX. Whereas a ordinary user has no problems to use the arduino-ide. Has anybody a Makefile for arduino to compile and upload sketches as an ordinary user under gentoo.
Comment 13 Juergen Rose 2010-08-04 15:14:48 UTC
Created attachment 241411 [details]
Makefile for compiling and uploading of sketches for ordinary Gentoo users

I hope it is useful for someone
Comment 14 Roc Vallès 2010-08-04 21:09:33 UTC
(In reply to comment #13)
> Created an attachment (id=241411) [details]
> Makefile for compiling and uploading of sketches for ordinary Gentoo users
> 
> I hope it is useful for someone
> 
Yes, that saved me doing it myself.

If that makefile is made into a patch, then I don't think there's any reason to use the obsolete version in portage anymore.
Comment 15 solar (RETIRED) gentoo-dev 2010-08-05 01:41:51 UTC
Oh this is assigned to me vs me being on the CC: 
Sorry guys but I thought another maintainer took this package over.

Any developer is free to take over this package (hint idl0r). It's recommended to not have to depend on java-ide just to be able to upload a sketch (ala Makefile).
Comment 16 Juergen Rose 2010-08-05 12:58:24 UTC
Created attachment 241509 [details]
arduino-0018.ebuild with cores_Makefile-0018.patch
Comment 17 Juergen Rose 2010-08-05 12:58:56 UTC
Created attachment 241511 [details]
cores_Makefile-0018.patch
Comment 18 Juergen Rose 2010-08-06 12:36:13 UTC
Created attachment 241625 [details]
cleaned arduino-0018.ebuild
Comment 19 Juergen Rose 2010-08-06 12:38:36 UTC
Created attachment 241627 [details]
enhanced cores_Makefile-0018.patch for extern setting of PORT etc and to avoid the __cxa_pure_virtual error
Comment 20 Juergen Rose 2010-08-06 12:39:11 UTC
Comment on attachment 241511 [details]
cores_Makefile-0018.patch

obsolet
Comment 21 Stephen Bridges 2010-08-07 15:50:54 UTC
Tried 0018-r1 to have a go at the Makefile.

The location of the Makefile is actually in /usr/share/arduino-0018/hardware/arduino/cores/arduino/Makefile, slightly different to what's printed.

Trying the Makefile:

Warnings from gcc 4.3.3
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus: warning: command line option "-std=gnu99" is valid for C/ObjC but not for C++

CXX invocation uses CINCS not CXXINCS, but it's not used anyway?
LIBRARIES path is now $INSTALL_DIR/libraries.  Not that it matters, I can't work out how to use libraries via any Makefile I've seen for the arduino.
If the Makefile says depend on avrdude 5.8, can this be in the ebuild?  Same for "dev-perl/Device-SerialPort"?

Out of interest does this Makefile allow multi-file compilation or am I using it wrong?
Comment 22 Roc Vallès 2010-08-16 12:03:35 UTC
0019 almost there:
http://code.google.com/p/arduino/downloads/list

Perhaps we should target the RC.
Comment 23 Roc Vallès 2010-09-05 00:24:56 UTC
(In reply to comment #22)
> 0019 almost there:
> http://code.google.com/p/arduino/downloads/list
> 
> Perhaps we should target the RC.
> 
And 0019 is actually there.

We're very outdated with 0017.
Comment 24 Soren Harward 2010-09-25 03:04:37 UTC
Created attachment 248579 [details]
new ebuild (and necessary files) for 0019
Comment 25 Roc Vallès 2010-09-26 07:52:28 UTC
(In reply to comment #24)
> Created an attachment (id=248579) [details]
> new ebuild (and necessary files) for 0019
> 

Built this and been using it for a while. Seems to be fine.

Please merge.
Comment 26 Dmitry Dzhus 2010-09-28 20:23:45 UTC
(In reply to comment #24)
> Created an attachment (id=248579) [details]
> new ebuild (and necessary files) for 0019
> 

Builds and works fine for me.
Comment 27 Shawn Rutledge 2010-10-07 22:32:36 UTC
They are up to 0021 now, but I noticed that the tarballs seem to be double-gzipped.  You can gunzip it once, rename it back to tar.gz, and then tar zxvf normally.

Needing to symlink the ldscripts should maybe be a bug for crossdev.

I updated this page with more up-to-date notes on how to manually install, until the version bump gets done:

http://www.arduino.cc/playground/Linux/Gentoo
Comment 28 Shawn Rutledge 2010-10-07 22:44:04 UTC
(In reply to comment #27)
> Needing to symlink the ldscripts should maybe be a bug for crossdev.

http://bugs.gentoo.org/show_bug.cgi?id=340114
Comment 29 Roc Vallès 2010-10-15 06:06:21 UTC
0021 already available

See: https://bugs.gentoo.org/show_bug.cgi?id=339788
Comment 30 Soren Harward 2010-10-23 19:30:43 UTC
Since there are a bunch of outstanding bugs for Arduino-related ebuilds that
haven't yet made it into the main portage tree, I've created an overlay that
brings them all together for more convenient testing and updating:

git://gitorious.org/gentoo-arduino/arduino.git

I'll try to keep up with new Arduino-related ebuilds and add them as I can, but
anyone who files a bug here with an ebuild related to Arduino development is
welcome to add me to the CC list, or email the ebuild to me directly.
Comment 31 Jeroen Roovers (RETIRED) gentoo-dev 2011-05-17 10:38:23 UTC
*** Bug 367407 has been marked as a duplicate of this bug. ***
Comment 32 Jeroen Roovers (RETIRED) gentoo-dev 2011-05-17 10:38:36 UTC
*** Bug 339788 has been marked as a duplicate of this bug. ***
Comment 33 Jeroen Roovers (RETIRED) gentoo-dev 2011-05-17 10:38:54 UTC
*** Bug 347349 has been marked as a duplicate of this bug. ***
Comment 34 Juergen Rose 2011-05-20 17:38:45 UTC
Created attachment 274123 [details]
arduino-0022.ebuild
Comment 35 Juergen Rose 2011-05-20 17:40:21 UTC
Created attachment 274125 [details, diff]
arduino-script-0022.patch
Comment 36 Juergen Rose 2011-05-20 17:48:34 UTC
Created attachment 274127 [details]
rxtx-2.2_pre2.ebuild required for arduino-0022
Comment 37 Juergen Rose 2011-05-20 17:50:38 UTC
Created attachment 274129 [details]
ChangeLog for rxtx-2.2_pre2
Comment 38 Juergen Rose 2011-05-20 17:52:00 UTC
Created attachment 274131 [details]
rxtx/files/lockfiled.xinetd for rxtx-2.2_pre2
Comment 39 Juergen Rose 2011-05-20 17:52:52 UTC
Created attachment 274133 [details, diff]
rxtx/files/rxtx-2.2pre2-lfd.diff for rxtx-2.2_pre2
Comment 40 Juergen Rose 2011-05-20 17:53:24 UTC
Created attachment 274135 [details, diff]
rxtx/files/rxtx-2.2pre2-nouts.diff
Comment 41 Juergen Rose 2011-05-20 17:54:39 UTC
I attached some files, which were necessary for me to emerge arduino-0022.
Comment 42 renato gallo 2011-07-20 08:56:14 UTC
can this be in portage main tree any soon ?
Comment 43 Lukas Sandström 2011-07-20 13:05:38 UTC
(In reply to comment #42)
> can this be in portage main tree any soon ?

You can get all the needed ebuilds and patches from the overlay at git://gitorious.org/~luksan/gentoo-arduino/luksans-arduino.git while you're waiting for this to hit gentoo-x86
Comment 44 Juergen Rose 2011-07-23 12:10:10 UTC
To comment 43, how can I add this overlay to my overlays? It seems me that it is not possible with layman.
Comment 45 Lukas Sandström 2011-07-23 12:35:29 UTC
(In reply to comment #44)
> To comment 43, how can I add this overlay to my overlays? It seems me that it
> is not possible with layman.

run "git clone git://gitorious.org/~luksan/gentoo-arduino/luksans-arduino.git", this will create a new directory called luksans-arduino. Then add the full path to that directory to your PORTDIR_OVERLAY variable in /etc/make.conf.

To update the overlay, cd into the directory and run "git pull".
Comment 46 Florian Manschwetus 2011-09-28 11:38:27 UTC
I have trouble with arduino-0022 eeprom library, here. No matter using arduino or eclipse.

I use cross-dev libc and gcc

../src/fan_control.cpp:605: undefined reference to `EEPROM'
../src/fan_control.cpp:605: undefined reference to `EEPROM'
../src/fan_control.cpp:605: undefined reference to `EEPROMClass::read(int)'
../src/fan_control.cpp:605: undefined reference to `EEPROMClass::read(int)'
../src/fan_control.cpp:605: undefined reference to `EEPROM'
../src/fan_control.cpp:605: undefined reference to `EEPROM'
../src/fan_control.cpp:605: undefined reference to `EEPROMClass::write(int, unsigned char)'
../src/fan_control.cpp:605: undefined reference to `EEPROMClass::write(int, unsigned char)'

When adding eeprom lib stuff to project it becomes:
./libs/EEPROM/EEPROM.o: In function `EEPROMClass::write(int, unsigned char)':
../libs/EEPROM/EEPROM.cpp:47: undefined reference to `__eerd_byte_m328p'
../libs/EEPROM/EEPROM.cpp:47: undefined reference to `__eewr_byte_m328p'
Comment 47 ScytheMan 2011-11-25 22:34:38 UTC
ARDUINO 0023 - 2011.11.09

* Added .inf files for R3 boards.
* Updated to optiboot 4.4.
* Included combined firmwares for ATmega16U2.
Comment 48 Lukas Sandström 2011-11-26 15:39:12 UTC
I pushed out an updated ebuild for arduino-0023. Check it out at https://gitorious.org/~luksan/gentoo-arduino/luksans-arduino
Comment 49 ScytheMan 2011-12-01 10:38:56 UTC
arduino-1.0 released.
Comment 50 Tim Harder gentoo-dev 2011-12-07 07:25:57 UTC
*** Bug 393469 has been marked as a duplicate of this bug. ***
Comment 51 renato gallo 2011-12-07 10:34:58 UTC
it should be possible to add a "teensy" use flag in case anyone wants to add
support to the teensy board (using the official teensy addon) automatically.

documentation :

http://www.pjrc.com/store/teensypp.html
http://www.pjrc.com/teensy/teensyduino.html
Comment 52 Jess Haas 2012-01-03 17:47:07 UTC
Here is an updated arduino-1.0 ebuild.

Crossdev is currently broken for building avr toolchains. I updated the instructions on getting it working here: http://en.gentoo-wiki.com/wiki/Crossdev#AVR_Architecture

Funtoo users see here for additional necessary steps: http://forums.funtoo.org/viewtopic.php?pid=5342

I would love to add a teensy use flag but as far as I know currently the only way to install teensyduino is a graphical installer. I emailed the author to see about getting it in some other form.
Comment 53 Jess Haas 2012-01-03 17:50:44 UTC
Created attachment 297829 [details]
arduino-1.0.ebuild
Comment 54 Jess Haas 2012-01-03 17:51:41 UTC
Created attachment 297831 [details, diff]
arduino-script-1.0.patch
Comment 55 ScytheMan 2012-01-04 00:22:26 UTC
fails for me:
>>> Install arduino-1.0 into /var/tmp/portage/dev-embedded/arduino-1.0/image/ category dev-embedded
!!! dodoc: readme.txt does not exist
dodoc failed
 * ERROR: dev-embedded/arduino-1.0 failed (install phase):
 *   dodoc failed

what does this comment mean? 
"# jednak to selhava v ebuildu, vsecko je jinde, druhak se mi nezda ze by ide neco kompilovalo napoprve"
Comment 56 Jess Haas 2012-01-04 00:54:41 UTC
Created attachment 297861 [details]
arduino-1.0.ebuild
Comment 57 Jess Haas 2012-01-04 00:56:56 UTC
Woops, guess I didn't double check it before posting as that stuff slipped in from an ebuild for an older arduino version I was copying from. I have cleaned up the ebuild and removed the problem. I have no idea what that says. Should all be good to go now.
Comment 58 Juergen Rose 2012-01-04 13:04:54 UTC
I have created an local arduino overlay /usr/local/portage/dev-embedded/arduino with the arduino-1.0.ebuild. How can I avoid that 'emerge arduino' tries to install arduino-0017 from /usr/portage/dev-embedded/arduino ?
Comment 59 ScytheMan 2012-01-04 15:30:09 UTC
echo ">=dev-embedded/arduino-0015-r1" >> /etc/portage/package.mask
Comment 60 Jess Haas 2012-01-04 20:17:14 UTC
Portage obviously doesn't know that 1.0 is newer than 0017. Is there a proper way to deal with the change in version number scheme or are the older ebuilds just going to have to be removed or masked?
Comment 61 renato gallo 2012-01-13 13:27:26 UTC
everything compiles for the uno but when i switch to the teensy (I installed teensyduino) i have this coming out:


collect2: ld terminated with signal 11 [Segmentation fault]


if i switch back to the uno everything compiles.....


help
Comment 62 Jess Haas 2012-01-13 19:04:42 UTC
Teensyduino isn't currently supported since it requires running a graphical installer. That said it is working fine for me. Only problem I had was that the teensy loader is dynamically linked against an older version of libpng. That error looks more like a problem a problem with your avr toolchain. Feel free to email me directly with the full output and what if any patches you have installed to get the toolchain working. Its not really relevant here.
Comment 63 Paul Jewell 2012-01-23 22:03:43 UTC
Hi Jess - I have been working on an ebuild for arduino-1.0 without realising you have done it! Anyway, I did come across an issue with version 1 in hardware/arduino/cores/arduino/Print.cpp which I patched along the way. For completeness, I will upload my version of the ebuild, and the patches. I would be interested in your comments!
Comment 64 Paul Jewell 2012-01-23 22:06:06 UTC
Created attachment 299675 [details]
Alternative arduino-1.0.ebuild
Comment 65 Paul Jewell 2012-01-23 22:07:23 UTC
Created attachment 299677 [details, diff]
Patch to fix deprecated prog_char in Hardware/arduino/cores/arduino/Print.cpp
Comment 66 Paul Jewell 2012-01-23 22:07:59 UTC
Created attachment 299679 [details, diff]
build.xml patch to use system libraries and avoid library mismatch error
Comment 67 Paul Jewell 2012-01-23 22:08:29 UTC
Created attachment 299681 [details, diff]
Arduino patch - for use with paulj's ebuild
Comment 68 Paul Jewell 2012-01-23 22:12:25 UTC
Sorry - I should have been clearer - my ebuild compiles the source rather than installing the binary. I felt it was more gentoo :)
Comment 69 Angelo Arrifano (RETIRED) gentoo-dev 2012-02-10 00:27:44 UTC
(In reply to comment #56)
> Created attachment 297861 [details]
> arduino-1.0.ebuild

Looks very good, I modified it a little to comply with QA and pushed it into the tree. Thanks!

(In reply to comment #68)
> Sorry - I should have been clearer - my ebuild compiles the source rather than
> installing the binary. I felt it was more gentoo :)

Thanks for your effort but I don't think it is worth it. Feel free to convince me otherwise :) I'm using your "prog_char" patch though.
Comment 70 Paul Jewell 2012-02-20 21:35:43 UTC
(In reply to comment #69)
> (In reply to comment #56)
> > Created attachment 297861 [details]
> > arduino-1.0.ebuild
> 
> Looks very good, I modified it a little to comply with QA and pushed it into
> the tree. Thanks!
> 
> (In reply to comment #68)
> > Sorry - I should have been clearer - my ebuild compiles the source rather than
> > installing the binary. I felt it was more gentoo :)
> 
> Thanks for your effort but I don't think it is worth it. Feel free to convince
> me otherwise :) I'm using your "prog_char" patch though.

Glad to have contributed something! Good to see it in the main portage tree (although I haven't yet changed over from mine :))