Bug 258906 - devel/libcircllhist: Fix build on aarch64 (Broken LDFLAGS)
Summary: devel/libcircllhist: Fix build on aarch64 (Broken LDFLAGS)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Many People
Assignee: Mikael Urankar
URL: https://github.com/openhistogram/libc...
Keywords: easy, needs-qa
Depends on:
Blocks:
 
Reported: 2021-10-04 08:09 UTC by Robert Clausecker
Modified: 2021-10-08 13:12 UTC (History)
3 users (show)

See Also:
fuz: merge-quarterly?


Attachments
devel/libcircllhist: fix wrong LDFLAGS (1.69 KB, patch)
2021-10-04 08:09 UTC, Robert Clausecker
no flags Details | Diff
v0 (1.25 KB, patch)
2021-10-06 06:13 UTC, Mikael Urankar
no flags Details | Diff
devel/libcircllhist: update to g20211005 and unbreak LDFLAGS (5.68 KB, patch)
2021-10-06 14:28 UTC, Robert Clausecker
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Clausecker freebsd_committer freebsd_triage 2021-10-04 08:09:24 UTC
Created attachment 228419 [details]
devel/libcircllhist: fix wrong LDFLAGS

Upstream has a configure script with an invalid option -export-dynamic (should be -Wl,--export-dynamic or -Wl,-E).  This option causes spurious configure test failures, making the port not build on various architectures.

I have already reported this issue upstream:
https://github.com/openhistogram/libcircllhist/issues/67

Fix this bug and bump PORTREVISION.

Tested with Poudriere on armv7 arm64 FreeBSD 13.0-RELEASE.
Comment 1 Daniel Engberg freebsd_committer freebsd_triage 2021-10-05 00:25:54 UTC
I'd suggest to wait on upstream for review and commit then bump PORTVERSION (DISTVERSION).
Comment 2 Robert Clausecker freebsd_committer freebsd_triage 2021-10-05 07:12:23 UTC
(In reply to Daniel Engberg from comment #1)

I do not agree with this suggestion as it would mean that the port remains broken in quarterly.
Comment 3 Robert Clausecker freebsd_committer freebsd_triage 2021-10-05 14:46:34 UTC
(In reply to Daniel Engberg from comment #1)

Upstream has merged the fix.  I can prepare another patch for the main branch
updating the port.  Please also MFH the original patch so as to not cause a
version update in the quarterly branch.
Comment 4 Mikael Urankar freebsd_committer freebsd_triage 2021-10-06 06:13:36 UTC
Created attachment 228473 [details]
v0

(In reply to Robert Clausecker from comment #3)
Why do you need to bump portrev?

Are you ok with the attached patch?
Comment 5 Robert Clausecker freebsd_committer freebsd_triage 2021-10-06 08:53:58 UTC
(In reply to Mikael Urankar from comment #4)

Hi Mikael,

I've bumped PORTREVISION because the set of visible symbols of the library was defective due to the wrong option.  This is in addition to the configure test issue.

I'm currently in the process of following Daniel Engbert's advice and updating the library to the current git version.  Will upload a patch later today.  However, it would still be nice to use something like your patch for the quarterly branch.
Comment 6 Mikael Urankar freebsd_committer freebsd_triage 2021-10-06 11:06:35 UTC
(In reply to Robert Clausecker from comment #5)
readelf output is identical with or without this patch, am I missing something?
Comment 7 Robert Clausecker freebsd_committer freebsd_triage 2021-10-06 11:54:49 UTC
(In reply to Mikael Urankar from comment #6)

It is possible that you are not missing anything, but why not play it safe?  This option changes how the linker handles symbol visibility and if upstream provides it, it is likely that it does something.
Comment 8 Robert Clausecker freebsd_committer freebsd_triage 2021-10-06 14:28:35 UTC
Created attachment 228481 [details]
devel/libcircllhist: update to g20211005 and unbreak LDFLAGS

This new attachment fixes the PR by updating to an version of the code base where the problem has been fixed.  While we are at it:

 - take up maintainership of this unmaintained port
 - version has changed to APACHE20
 - upstream has moved, switch to new upstream
 - generate and install documentation
 - disable git-based version generation (tries to pick up the ports tree's git)
 - regenerate patch
 - make portlint and portclippy happy

Test suite not hooked up because it has LD_LIBRARY_PATH related problems and seems messy to fix.

Tested with Poudriere on i386 amd64 armv7 aarch64 FreeBSD 13.

I tried checking if sole reverse dependency www/envoy builds with the new version on amd64, but it does not seem to build for the unrelated error:

common/router/config_impl.cc:66:29: error: field of type 'const envoy::type::FractionalPercent' has protected constructor
    : initial_requests_(1), additional_request_chance_({}), hedge_on_per_try_timeout_(false) {}
                            ^
../api/envoy/type/percent.pb.h:332:12: note: declared protected here
  explicit FractionalPercent(::PROTOBUF_NAMESPACE_ID::Arena* arena);
           ^


A separate port for the Python bindings could be made but I decided not to.

Do not MFH as this is an update to a new version.  Instead, directly commit the original patch (attachment #228419 [details]) to the quarterly branch.
Comment 9 commit-hook freebsd_committer freebsd_triage 2021-10-08 12:28:47 UTC
A commit in branch main references this bug:

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

commit ef377af9f77ceebe66727ff620a3723d1748c46d
Author:     Robert Clausecker <fuz@fuz.su>
AuthorDate: 2021-10-08 12:24:31 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2021-10-08 12:27:58 +0000

    devel/libcircllhist: Update to g20211005 and unbreak LDFLAGS

     - take up maintainership of this unmaintained port
     - license has changed to APACHE20
     - upstream has moved, switch to new upstream
     - generate and install documentation
     - disable git-based version generation (tries to pick up the ports tree's git)
     - regenerate patch
     - make portlint and portclippy happy

    PR:             258906

 devel/libcircllhist/Makefile                       | 29 ++++++++++------
 devel/libcircllhist/distinfo                       |  6 ++--
 .../files/patch-buildtools_mkversion.sh (new)      | 11 ++++++
 devel/libcircllhist/files/patch-configure.ac       |  2 +-
 devel/libcircllhist/pkg-plist                      | 39 ++++++++++++++++++++++
 5 files changed, 73 insertions(+), 14 deletions(-)
Comment 10 commit-hook freebsd_committer freebsd_triage 2021-10-08 12:47:53 UTC
A commit in branch 2021Q4 references this bug:

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

commit f99078391254e241970cd881c2775ced5ecb8850
Author:     Robert Clausecker <fuz@fuz.su>
AuthorDate: 2021-10-08 12:24:31 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2021-10-08 12:47:11 +0000

    devel/libcircllhist: Update to g20211005 and unbreak LDFLAGS

     - take up maintainership of this unmaintained port
     - license has changed to APACHE20
     - upstream has moved, switch to new upstream
     - generate and install documentation
     - disable git-based version generation (tries to pick up the ports tree's git)
     - regenerate patch
     - make portlint and portclippy happy

    PR:             258906
    (cherry picked from commit ef377af9f77ceebe66727ff620a3723d1748c46d)

 devel/libcircllhist/Makefile                       | 29 ++++++++++------
 devel/libcircllhist/distinfo                       |  6 ++--
 .../files/patch-buildtools_mkversion.sh (new)      | 11 ++++++
 devel/libcircllhist/files/patch-configure.ac       |  2 +-
 devel/libcircllhist/pkg-plist                      | 39 ++++++++++++++++++++++
 5 files changed, 73 insertions(+), 14 deletions(-)