Ticket #345 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

pbc_to_exe needs to be created as installable version aswell

Reported by: rg Owned by:
Priority: normal Milestone: 1.0
Component: core Version: trunk
Severity: medium Keywords: pbc_to_exe link install installable
Cc: allison Language:
Patch status: Platform: all

Description

Right now the build version of pbc_to_exe gets installed. The attached patch creates an installable version just as for the other binaries.

Attachments

instpbc2exe.patch Download (2.2 KB) - added by rg 6 years ago.
build installable_pbc_to_exe
instpbc2exe_r37077.patch Download (0.6 KB) - added by rg 6 years ago.
new patch for pcb2exe

Change History

Changed 6 years ago by rg

build installable_pbc_to_exe

follow-up: ↓ 2   Changed 6 years ago by fperrad

  • status changed from new to closed
  • resolution set to fixed

Patch doesn't work.

Fixed in r37072.

in reply to: ↑ 1   Changed 6 years ago by rg

  • status changed from closed to reopened
  • resolution fixed deleted

Replying to fperrad:

Patch doesn't work.

Well sorry for that, it was supposed to be applied pre 0.9.1.

Fixed in r37072.

Sorry again, but no, you didn't fix it. Using a copy is not correct. That's the same as what's been installed in the first place, i.e. a pbc_to_exe binary that's linked against the shared libraries in the build directory.

You really need an installable version, built with --install. I'm attaching a new patch against r37077.

Changed 6 years ago by rg

new patch for pcb2exe

follow-up: ↓ 4   Changed 6 years ago by fperrad

currently (ie r37072) with a simple copy, I can do this :

$ mkdir somewhere
$ perl tools/dev/mk_language_shell.pl Xyz somewhere/xyz
$ cd somewhere/xyz
$ perl Configure.pl
$ make all

Now, if I apply your way :

$ parrot pbc_to_exe.pbc pbc_to_exe.pbc --install
$ make install-dev

building the executable xyz fails with :

pbc_to_exe xyz.pbc
Unable to open filehandle
current instr.: '_config' pc -1 ((unknown file):-1)
called from Sub '_config' pc -1 ((unknown file):-1)
called from Sub '_config' pc 6 (library/config.pir:54)
called from Sub 'handle_args' pc 248 (tools\dev\pbc_to_exe.pir:146)
called from Sub 'main' pc 68 (tools\dev\pbc_to_exe.pir:30)

in reply to: ↑ 3   Changed 6 years ago by rg

Replying to fperrad:

currently (ie r37072) with a simple copy, I can do this : $ mkdir somewhere
$ perl tools/dev/mk_language_shell.pl Xyz somewhere/xyz
$ cd somewhere/xyz
$ perl Configure.pl
$ make all

Unfortunately, you're in trouble if you (re)move your build directory before the make.

Now, if I apply your way : $ parrot pbc_to_exe.pbc pbc_to_exe.pbc --install
$ make install-dev building the executable xyz fails with : pbc_to_exe xyz.pbc
Unable to open filehandle

[...]

Good catch. My investigation turned up you found a second dependency on the build directory. This one is for config.fpmc. The problem is in lines 51-52 of runtime/parrot/library/config.pir (which gets included in pbc_to_exe). That path does not work with an installed layout.

Can anyone point me to an example of how to adjust that path for an installed parrot?

Or alternatively, does pbc_to_exe have to load config.fpmc at all? Couldn't it get the values from its own interpreter conf_hash?

I'll keep looking, but I'd appreciate some pointers.

  Changed 6 years ago by fperrad

  • cc allison added

Since r37083, the error message contains the full path of config.fpmc.

We try to open @prefix@/runtime/parrot/include/config.fpmc.

And we couldn't build a path like @prefix@/lib/parrot/0.9.1-devel/include/config.fpmc, because we don't know at this time the version (it's a part of the content of config.fpmc).

A solution could be :

  • use @prefix@/config.fpmc as path
  • in build tree, build config.fpmc instead of runtime/parrot/include/config.fpmc, and not install it
  • install install_config.fpmc as @prefix@/config.fpmc

We could use the same convention as executable and rename install_config.fpmc to installable_config.fpmc

  Changed 6 years ago by fperrad

  • status changed from reopened to closed
  • resolution set to fixed

Fixed with r37090, r37091 & r37092.

Note: See TracTickets for help on using tickets.