Bug 269960 - lang/mujs: libmujs.so does not have a SONAME
Summary: lang/mujs: libmujs.so does not have a SONAME
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Yuri Victorovich
URL: https://github.com/ccxvii/mujs/issues...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-04 14:05 UTC by Robert Clausecker
Modified: 2023-03-27 18:26 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (yuri)
fuz: merge-quarterly?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Clausecker freebsd_committer freebsd_triage 2023-03-04 14:05:28 UTC
I'm trying to write a port with

    LIB_DEPENDS=libmujs.so:lang/mujs

stage_qa complains:

    Error: /usr/local/bin/sioyek is linked to /usr/local/lib/libmujs.so which does not have a SONAME.  lang/mujs needs to be fixed.

Unfortunately I do not know how to fix this.
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2023-03-27 00:55:17 UTC
(In reply to Robert Clausecker from comment #0)

Hi Robert,

Since the project builds the shared library - they should add a SONAME to it.
This is really easy to do.
In the meantime the project works fine without a SONAME too.

Best,
Yuri
Comment 2 Robert Clausecker freebsd_committer freebsd_triage 2023-03-27 00:56:33 UTC
(In reply to Yuri Victorovich from comment #1)

Appears to work fine.

Without a SONAME, there will be problems when multiple versions of the shared object are present (e.g. during upgrades).  You can patch this locally by adding

    -Wl,-soname=...

to LDFLAGS.
Comment 3 Yuri Victorovich freebsd_committer freebsd_triage 2023-03-27 07:30:32 UTC
(In reply to Robert Clausecker from comment #2)

During upgrades one lib is replaced with another lib, so no multiple versions are present.

SONAME is mostly to distinguish between library versions, but MuJS is quite stable and is unlikely to cause any issues.


Yuri
Comment 4 Robert Clausecker freebsd_committer freebsd_triage 2023-03-27 11:29:03 UTC
(In reply to Yuri Victorovich from comment #3)

Briefly, there will be multiple versions of the same shared object.  I mean it's okay, you continue to deny the potential for problems, but the stage-qa warnings are quite clear in the shared objects must have a soname set, for precisely this reason.
Comment 5 Yuri Victorovich freebsd_committer freebsd_triage 2023-03-27 16:23:46 UTC
(In reply to Robert Clausecker from comment #4)

> Briefly, there will be multiple versions of the same shared object.

When?
Comment 6 Robert Clausecker freebsd_committer freebsd_triage 2023-03-27 16:25:30 UTC
(In reply to Yuri Victorovich from comment #5)

E.g. when a program having an old version of the library is still running and tries to dlopen() something that also pulls in the library.
Comment 7 Yuri Victorovich freebsd_committer freebsd_triage 2023-03-27 18:26:05 UTC
SONAME added.

Thanks for your report!
Comment 8 commit-hook freebsd_committer freebsd_triage 2023-03-27 18:26:53 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9275f87e84ae04f7dac34d926dde23ce9d76d8a2

commit 9275f87e84ae04f7dac34d926dde23ce9d76d8a2
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2023-03-27 15:02:03 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2023-03-27 18:25:49 +0000

    lang/mujs: Add SONAME to the shared library

    PR:             269960
    Reported by:    fuz@

 lang/mujs/Makefile             |  3 +++
 lang/mujs/files/patch-Makefile | 18 ++++++++++++++++++
 2 files changed, 21 insertions(+)