Opened 5 years ago

Closed 4 years ago

#294 closed defect (fixed)

Linux binary fails to start with 0.33

Reported by: random Owned by:
Priority: major Milestone:
Component: downstream Version: 0.33
Keywords: Cc: explorer@…

Description

random@delly:~$ Desktop/padre-0.33-x86_32-linux-gnu-thread-multi 
run3(): undefined command at ORLite/Migrate.pm line 104
BEGIN failed--compilation aborted at Padre/DB.pm line 22.
Compilation failed in require at Padre.pm line 33.
BEGIN failed--compilation aborted at Padre.pm line 33.
Compilation failed in require at script/padre line 49.

System is Debian Squeeze 32bit

The actual root of the problem seems to be Probe::Perl->find_perl_interpreter() which fails to return the currently running perl when running under PAR. A trivial patch is to have ORLite::Migrate use a default perl interpreter of "perl" which then only requires the target platform to have one. A better approch is to fix up Probe::Perl to return wathever can be considered right for a binary PAR packed executable.

The same goes for 0.32 (also 32bit version)

Perl and WxPerl? versions:

This is perl, v5.10.0 built for i486-linux-gnu-thread-multi
Wx Version: 0.89 wxWidgets 2.8.7

Attachments (1)

ORLite-Migrate-0.02-patch-perl.diff (1.0 KB) - added by random 5 years ago.
Proposed quickfix for ORLite-Migrate when running under PAR and perl interpreter is not available in same location as on build machine

Download all attachments as: .zip

Change History (8)

Changed 5 years ago by random

Proposed quickfix for ORLite-Migrate when running under PAR and perl interpreter is not available in same location as on build machine

comment:1 Changed 5 years ago by random

This problem only occurs when the database requires an schema update with the migrate-X.pl scripts, which are currently run by forking a perl interpreter instead of doing this inline.

comment:2 Changed 5 years ago by explorer

  • Cc explorer@… added

The ORLite/Migrate message only is showed one time, because the perl interpreter path is saved at ~/.padre/config.db after the ORLite::Migrate patch. So, if you install a new Padre binary, you don't will see this bug because Probe::Perl will return the path written at config.db. BUT the problem will remain at Probe::Perl into a fresh install.

comment:3 Changed 5 years ago by explorer

After the patch, it show another bug:

explorer@portatil:~/Documents/Software> ./padre-0.33-x86_32-linux-gnu-thread-multi
Can't locate object method "select" via package "Padre::DB::HostConfig" at Padre/Config/Host.pm line 37.

comment:4 Changed 5 years ago by tsee

This is a more general issue. Various parts of the codebase want to use the currently running perl interpreter to run other stuff. Unfortunately, that's not currently possible in a PAR packaged executable.

To fix the underlying PAR issue, I think it would be necessary to patch the parl C code in the PAR::Packer distribution so that it can run external code. Naturally, there'd be security implications that I'm mostly unaware of, as usual. And it'd take some effort, too, I fear.

comment:5 Changed 5 years ago by szabgab

  • Component changed from editor to downstream

comment:6 Changed 5 years ago by random

This is actually already fixed downstream for debian at least (on 32bit and 64bit systems). So it can probably be closed.

comment:7 Changed 4 years ago by zenogantner

  • Resolution set to fixed
  • Status changed from new to closed

Close because of last comment. Re-open if the problem still exists.

Note: See TracTickets for help on using tickets.