Recent

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

fikkies

  • Newbie
  • Posts: 4
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: 5131
  • 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

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
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: 14205
  • Probably until I exterminate Putin.
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.
Specialize a type, not a var.

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • 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: 14205
  • Probably until I exterminate Putin.
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
Specialize a type, not a var.

zoimutante

  • New Member
  • *
  • Posts: 34
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

  • Hero Member
  • *****
  • Posts: 535
    • 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.)

 

TinyPortal © 2005-2018