Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide fully static binaries #25

Closed
facchinm opened this issue Jul 21, 2015 · 16 comments
Closed

Provide fully static binaries #25

facchinm opened this issue Jul 21, 2015 · 16 comments

Comments

@facchinm
Copy link
Member

arduino/Arduino#3548 and other issue are frequently caused by the binaries not being fully static.

Consider providing static binaries next time the programmers will be updated

@facchinm
Copy link
Member Author

facchinm commented Sep 9, 2015

Small update:

@ffissore
Copy link
Contributor

ffissore commented Sep 9, 2015

I missed this issue. We tried and we failed. -static on linux was introduced with c503eaa and reverted in cc809be because of #23

@facchinm
Copy link
Member Author

facchinm commented Sep 9, 2015

@bam80
Copy link

bam80 commented Nov 21, 2015

How it going? ARDUINO 1.6.6 is out and again - no static binaries..

@zoobab
Copy link

zoobab commented Jan 5, 2016

I am having the same problem running the Arduino software on Gentoo:

"/home/zoobab/Downloads/arduino-1.6.7/hardware/tools/avr/bin/avrdude: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory"

I will try to compile the arduino SDK with MUSL-Libc as GLIBC is a nightmare to produce static binaries. GLIBC guys deliberately broke that feature for GPL/political reasons.

@facchinm
Copy link
Member Author

facchinm commented Jan 5, 2016

Hi @zoobab ,
the problem you are experiencing is due to a newly compiled libncurses. Symlinking libtinfo to libncurses or installing some kind of libtinfo-compat package does the trick.
However, the next version of avrdude binary will be of course static to avoid this kind of problems.

@zoobab
Copy link

zoobab commented Jan 5, 2016

I know, I had to rebuild ncurses with tinfo support, so now at least I can upload some code to my arduino.

Will try to build a static toolchain now, will write here if I manage to build it.

@facchinm
Copy link
Member Author

facchinm commented Jan 5, 2016

No need for a static toolchain, only a static avrdude is needed.
If you want to compile using these scripts https://gist.github.com/facchinm/6c3feff432c62d6849fb and validate them it would be great!

@ShorTie8
Copy link

From my Googling, static is dead.
that is why ' -static ' doesn't work, or more like ignored any more.

@zoobab
Copy link

zoobab commented Jan 26, 2016

Not really, the "-static" is being broken on purpose by the GLIBC guys. I will check what I can do, even if it means using MUSL libc like I did for other projects where I needed a static binary.

@NicoHood
Copy link

NicoHood commented Jul 4, 2016

The question is (for me as packager), if we just can use the upstream avrdude etc or if this would cause too many problems. The same goes for java. However I still suggest to use static linkage as the ready to go zipfile should not rely on any dependencies.

@facchinm
Copy link
Member Author

@NicoHood
Copy link

@facchinm Since it is very close to the upstream avrdude, do you think in arch we just can use the upstream avrdude? Also what do you think of using a different avr-gcc? It might break a few programs possibly, but also it can make use of lto etc. I also found some libusb stuff, can we also get rid of this in the arduino build process if the host has those available?

@facchinm
Copy link
Member Author

Using non-bundled tools (in a transparent way) is a support nightmare; people should also know the tools version which is not directly obtainable by the UI.
But the linked avrdude (and all the toolchain from arduino/Arduino#5021) would solve these problem since:

  • binaries are almost static (libusb stuff/additional libraries are linked statically)
  • lto is enabled
  • the toolchains are Atmel's official

So I'd go for the bundled ones 😄

@NicoHood
Copy link

Thanks for explaining this. That's also what I was thinking.

Is the patch in the latest master build now? I am creating an arduino-git package, so I could remove the avrdude dep.

@cmaglie
Copy link
Member

cmaglie commented Jul 27, 2016

arduino/Arduino#5021 is now merged and released

@cmaglie cmaglie closed this as completed Jul 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants