Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 685776 - net-misc/unison-2.51 USE=-ocamlopt strips bytecode from binaries
Summary: net-misc/unison-2.51 USE=-ocamlopt strips bytecode from binaries
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2019-05-13 03:49 UTC by spock128
Modified: 2024-06-20 21:01 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to disable stripping when not building native code (no-strip.patch,600 bytes, patch)
2019-05-13 03:49 UTC, spock128
Details | Diff
patch to disable stripping when not building native code (no-strip.patch,599 bytes, patch)
2019-05-13 04:02 UTC, spock128
Details | Diff
disable strip if !ocamlopt (unison-2.51.5.ebuild.patch,528 bytes, patch)
2023-03-18 06:24 UTC, spock128
Details | Diff
patch to disable stripping when not building native code (no-strip.patch,603 bytes, patch)
2023-03-18 06:25 UTC, spock128
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description spock128 2019-05-13 03:49:47 UTC
Created attachment 576256 [details, diff]
patch to disable stripping when not building native code

net-misc/unison with the -ocamlopt use flag seems to enable the -custom ocamlc flag in its build system.

According to the ocamlc man page, executables generated with -custom should not be stripped. Otherwise the bytecode will be removed and attempting to run unison will result in "No bytecode file specified." being displayed.

As a potential solution, I added this line to unison-2.51.2.ebuild

RESTRICT="!ocamlopt? ( strip )"

And also patched the unison Makefile to disable stripping (attachment).

The resulting (albeit unstripped) binary seems to work properly.
Comment 1 spock128 2019-05-13 04:02:12 UTC
Created attachment 576258 [details, diff]
patch to disable stripping when not building native code

ack flubbed the original patch
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-10-22 12:21:28 UTC
Is this still an issue?
Comment 3 spock128 2020-10-25 04:37:35 UTC
Recent unison ebuilds seem to address this issue.
Comment 5 spock128 2023-03-18 06:24:09 UTC
Created attachment 858151 [details, diff]
disable strip if !ocamlopt
Comment 6 spock128 2023-03-18 06:25:19 UTC
Created attachment 858153 [details, diff]
patch to disable stripping when not building native code

updated to work at -p1
Comment 7 spock128 2023-03-18 06:27:10 UTC
There appears to be a regression for unision-2.51.5, with the same fix. See patches for ebuild and source
Comment 8 Larry the Git Cow gentoo-dev 2024-06-20 21:01:16 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8251447a160931cbfcbb896fb0fa3e6ffe109f7

commit f8251447a160931cbfcbb896fb0fa3e6ffe109f7
Author:     Maciej Barć <xgqt@gentoo.org>
AuthorDate: 2024-06-20 20:19:26 +0000
Commit:     Maciej Barć <xgqt@gentoo.org>
CommitDate: 2024-06-20 21:01:10 +0000

    net-misc/unison: misc fixes
    
    Closes: https://bugs.gentoo.org/685776
    Closes: https://bugs.gentoo.org/928589
    Signed-off-by: Maciej Barć <xgqt@gentoo.org>

 ...nison-2.51.5.ebuild => unison-2.51.5-r1.ebuild} | 109 ++++++++++------
 net-misc/unison/unison-2.53.3-r1.ebuild            | 139 +++++++++++++++++++++
 net-misc/unison/unison-2.53.3.ebuild               |  99 ---------------
 3 files changed, 212 insertions(+), 135 deletions(-)