Recent

Author Topic: I can't run application on different linux  (Read 3513 times)

boreas

  • New Member
  • *
  • Posts: 33
I can't run application on different linux
« on: January 10, 2018, 08:00:27 am »
I developed application on ubuntu 16.04.3 LTS 32bit. I tried run from compiled file on ubuntu mate raspberry pi. But i coudn't.  How can i do this.
Thank u

Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: I can't run application on different linux
« Reply #1 on: January 10, 2018, 08:04:01 am »
Without knowing what the dependencies are, we can not answer this.
Can you provide information what units you are using or better: provide a simple example?
I am on a pi every day, so I can test immediately.
Specialize a type, not a var.

boreas

  • New Member
  • *
  • Posts: 33
Re: I can't run application on different linux
« Reply #2 on: January 10, 2018, 08:19:31 am »
I use onyl a button and form.  GUI is GTK. I cant send app. to you if you want.

Thank u

dubst3pp4

  • Jr. Member
  • **
  • Posts: 86
  • Retro computing ~ GNU/Linux
    • me on Mastodon
Re: I can't run application on different linux
« Reply #3 on: January 10, 2018, 08:21:10 am »
Sounds like that you compiled the program for x86 architecture but try to run it on arm! Although both run Linux, you will have to cross-compile as the processor architecture is completely different!
Jabber: xmpp:marc.hanisch@member.fsf.org -- Support the Free Software Foundation: https://my.fsf.org/donate

boreas

  • New Member
  • *
  • Posts: 33
Re: I can't run application on different linux
« Reply #4 on: January 10, 2018, 08:30:09 am »
I didnt change any thing about processor. I use default conf.

balazsszekely

  • Guest
Re: I can't run application on different linux
« Reply #5 on: January 10, 2018, 08:51:35 am »
Quote
@boreas
I didnt change any thing about processor. I use default conf.
You don't have to. A binary created with Ubuntu will not run under raspberry as @dubst3pp4 already explained(different processor types). It's almost like running a windows exe in linux or vice versa. You have two solutions:
1. Compile the code under raspberry
2. Cross compile from ubuntu

Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: I can't run application on different linux
« Reply #6 on: January 10, 2018, 09:23:31 am »
[You don't have to. A binary created with Ubuntu will not run under raspberry as @dubst3pp4 already explained(different processor types). It's almost like running a windows exe in linux or vice versa. You have two solutions:
Ubuntu runs on Raspberry Pi.... https://wiki.ubuntu.com/ARM/RaspberryPi
What Getmem means you can not run an Ubuntu binary compiled for a X86_64 or i386 intel architecture on an arm architecture. You need a cross compiler for that or compile your code on the raspberry pi itself.
You can install fpc using this link for RPi3: https://www.freepascal.org/down/arm/linux-netherlands.var#linuxbig302eabihf and this link for RPi1/2 : ftp://freepascal.stack.nl/pub/mirrors/fpc/dist/3.0.4/arm-linux/fpc-3.0.4.arm-linux-eabihf-raspberry.tar

That is recommended, because a standard ubuntu/armhf will installl fpc 2.6.2 which is very old. The above packages will install a current release version (3.0.4)

Anyway: give us some code or the units you use and we will solve it. (written on a Raspberry Pi 3)

You may need to install GTK2 libraries on Ubuntu on your pi , btw, did you do that? It is no longer installed by default. Or are you simply running Raspbian?
The first package link runs on Ubuntu/Raspberry pi since Ubuntu only runs on RPi3 or newer Rpi2's (armv7a architecture)
« Last Edit: January 10, 2018, 09:34:17 am by Thaddy »
Specialize a type, not a var.

 

TinyPortal © 2005-2018