* * *

Author Topic: how can I make my applic. executable (Linux)  (Read 696 times)

fikkies

  • Newbie
  • Posts: 2
how can I make my applic. executable (Linux)
« on: July 11, 2018, 11:59:18 pm »
Hi.
I build an application (works fine) a few years ago and compiled it in Mint 18 32 bit.  I just installed Mint 19 64bit and want to start my applic. again.
But Mint 19 does not see myapplication as executable.
is the myapp 32bit version not working in 64bit?   can I change something to make it executable as a programma.  (the 32bit Mint 18 is still active and works fine with myapp)
It is the same myapp on the same disk/dir for both Mint versions.
(in application-rights- executing this file: allowed) but this has nothing to do with executing it as a programme.

frits

Handoko

  • Hero Member
  • *****
  • Posts: 2560
  • My goal: build my own game engine using Lazarus
Re: how can I make my applic. executable (Linux)
« Reply #1 on: July 12, 2018, 05:11:56 am »
Any 32bit application should run on 64bit too, but if it uses certain library it must also be installed on the new computer. Also you have too make sure the new environment fulfills the requirements of the application, it can be something like OpenGL driver, database engine, the existence of certain file or path, etc.

If the application was built using Lazarus/FPC and you still have the source code, then you can recompile it on the new computer. The first thing you should do is to make sure your Lazarus is working correctly. You can test it by write and compile a simple 'hello world' program.

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6496
Re: how can I make my applic. executable (Linux)
« Reply #2 on: July 12, 2018, 10:01:44 am »
try to do

ldd ./applicationname

in a terminal to see the library dependencies and if they are installed

Thaddy

  • Hero Member
  • *****
  • Posts: 6728
Re: how can I make my applic. executable (Linux)
« Reply #3 on: July 12, 2018, 10:27:42 am »
Any 32bit application should run on 64bit too,
This is not true for Linux, Handoko!. A 32 bit app will not run under 64 bit linux out of the box.
You need a multi-arch mode system for that:
Code: Bash  [Select]
  1. sudo apt-get install multiarch-support
This is seldom installed by default.
If your program has dependencies, you may need to install 32 bit versions of those dependencies as well.
See Marco's hint above.
Ada's daddy wrote this:"Fools are my theme, let satire be my song."

Handoko

  • Hero Member
  • *****
  • Posts: 2560
  • My goal: build my own game engine using Lazarus
Re: how can I make my applic. executable (Linux)
« Reply #4 on: July 12, 2018, 12:28:03 pm »
Any 32bit application should run on 64bit too,
This is not true for Linux, Handoko!. A 32 bit app will not run under 64 bit linux out of the box.
You need a multi-arch mode system for that:
Code: Bash  [Select]
  1. sudo apt-get install multiarch-support

Okay, my fault. I know sometimes we need to installed the extra things. I don't know what it is called, that why I said it may need the 'library'.

Thaddy

  • Hero Member
  • *****
  • Posts: 6728
Re: how can I make my applic. executable (Linux)
« Reply #5 on: July 12, 2018, 01:20:10 pm »
It is a bit more than a library. Has more to do with the kernel itself. And it is called multi-arch. Only available for 64 bit systems running on a 64bit CPU, of course.
https://wiki.debian.org/Multiarch
Ada's daddy wrote this:"Fools are my theme, let satire be my song."

zoimutante

  • New member
  • *
  • Posts: 31
Re: how can I make my applic. executable (Linux)
« Reply #6 on: July 18, 2018, 08:45:13 pm »
also try chmod +x on that executable, try to call it from a terminal emulator to see the erro message that will apear

Trenatos

  • Sr. Member
  • ****
  • Posts: 428
  • Software developer - Open source contributor
    • MarcusFernstrom.com
Re: how can I make my applic. executable (Linux)
« Reply #7 on: July 18, 2018, 09:37:10 pm »
The best solution is to compile for the target, it's easy with fpcupdeluxe to setup cross compilers for both OS and architecture (x86, x64, arm, etc.)

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus