Bug 1593408 - ocamlify does not work
Summary: ocamlify does not work
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: ocamlify
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Andy Li
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-20 18:33 UTC by Richard W.M. Jones
Modified: 2018-06-25 07:53 UTC (History)
1 user (show)

Fixed In Version: ocamlify-0.0.2-4.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-25 03:17:30 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2018-06-20 18:33:50 UTC
Description of problem:

$ ocamlify -help
Fatal error: the file '/usr/bin/ocamlify' is not a bytecode executable file

The fundamental problem is that you're building ocamlify as
a bytecode binary which is contrary to Fedora guidelines for
OCaml programs.  It should be built as a native program.

However I looked at the weird build system used by this package
and I couldn't make head nor tail of it, so I've no idea how
to actually build it properly.

Version-Release number of selected component (if applicable):

ocamlify-0.0.2-3.fc29.x86_64

How reproducible:

100%

Steps to Reproduce:
1. Install ocamlify.
2. Try to run ocamlify.

Comment 1 Andy Li 2018-06-21 09:07:40 UTC
I do not object compiling ocamlify to native program. But I guess the "correct" fix is to detect OCaml bytecode executable file and do not strip them. Right now all the Fedora supported architectures happen to be OCaml native targets, but I think it is also possible to have OCaml bytecode-only architectures in the future. After all, the `%ocaml_native_compiler` RPM macro is maintained for that possibility, right?

Comment 2 Richard W.M. Jones 2018-06-21 10:06:27 UTC
This isn't the right fix.  The right fix is to compile the
native version on architectures which support that (which right
now is all of them):

https://fedoraproject.org/wiki/Packaging:OCaml#Providing_best_possible_binaries

The (currently theoretical) exception is for bytecode-only
architectures, where you have to use a workaround for
stripping:

https://fedoraproject.org/wiki/Packaging:OCaml#Stripping_binaries

But note this second is *not* a fix for this bug.

Comment 3 Richard W.M. Jones 2018-06-25 07:53:35 UTC
The fix looks good, thanks.


Note You need to log in before you can comment on or make changes to this bug.