Bug 274239 - lang/gnat12: Fix incorrect binutils dependencies and ldconfig paths
Summary: lang/gnat12: Fix incorrect binutils dependencies and ldconfig paths
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: Robert Clausecker
URL:
Keywords:
Depends on:
Blocks: 274243
  Show dependency treegraph
 
Reported: 2023-10-03 13:45 UTC by Nico Sonack
Modified: 2023-10-21 00:23 UTC (History)
3 users (show)

See Also:
fuz: maintainer-feedback+
fuz: merge-quarterly?


Attachments
Fix for lang/gnat12 (6.94 KB, patch)
2023-10-03 13:45 UTC, Nico Sonack
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nico Sonack 2023-10-03 13:45:55 UTC
Created attachment 245405 [details]
Fix for lang/gnat12

Binaries built by the gnat12 compiler that depended on the included libstdc++.so.6 were broken as no RUNPATH was set and USE_LDCONFIG wasn't setup properly.

I have tried getting gcc to set the correct RUNPATH but I failed, so instead I fixed USE_LDCONFIG. Maybe this is wrong, maybe not. I appreciate feedback :-)

Also, I had to move around the binutils dependency because gcc invokes the assembler but it was not in the RUN_DEPENDS and thus failed to assemble a simple object.

This is a follow-up for https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274238
Comment 1 Robert Clausecker freebsd_committer freebsd_triage 2023-10-17 04:18:56 UTC
maintainer timeout
Comment 2 Robert Clausecker freebsd_committer freebsd_triage 2023-10-17 04:19:30 UTC
Will MFH this patch as a bug fix.
Comment 3 Alastair Hogge 2023-10-18 04:38:48 UTC
Hi,

I noticed that Nico has included some much needed maintenance of the Makefile, there is still more work that can be done in this area. I have a patch that continues Nico's maintenance work, and clears most advice/warnings/errors from the various port tools. Shall I submit that patch here, or create another bug report for that? I have build tested with 12, 13, and 15 on amd64 only at the moment, however, I am building all new GNAT assets for amd64 and i386 for complete testing.
Comment 4 Robert Clausecker freebsd_committer freebsd_triage 2023-10-18 05:48:12 UTC
Please submit a new patch.  An edit to this one would require another wait for maintainer approval or timeout.
Comment 5 Alastair Hogge 2023-10-18 06:01:44 UTC
Easy, thanks.
Comment 6 commit-hook freebsd_committer freebsd_triage 2023-10-19 07:09:25 UTC
A commit in branch main references this bug:

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

commit 69e85930e200e0ee30f78119063bbd43abe2be3e
Author:     Nico Sonack <nsonack@herrhotzenplotz.de>
AuthorDate: 2023-10-01 16:57:46 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-10-19 07:07:28 +0000

    lang/gnat12: Add missing binutils RUN_DEPENDS and fix broken library search paths

    Any produce binary of the gnat12 Ada compiler that had dependencies
    on libstdc++ from this package would result in broken binaries
    because no RUNPATH and no ldconfig paths were set up such that the
    included libstdc++ would get found.

    While we're at it, add the missing binutils dependency because the
    compiler driver would find the GNU assembler that is hardcoded in
    the Makefile.

    PR:             274239
    Signed-off-by:  Nico Sonack <nsonack@herrhotzenplotz.de>
    Approved by:    thierry (maintainer timeout, two weeks)
    MFH:            2023Q4

 lang/gnat12/Makefile | 125 +++++++++++++++++++++++++++------------------------
 1 file changed, 66 insertions(+), 59 deletions(-)
Comment 7 commit-hook freebsd_committer freebsd_triage 2023-10-19 07:11:44 UTC
A commit in branch 2023Q4 references this bug:

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

commit 3422893f5e8dbab92b1010c5ca45b35116d241d5
Author:     Nico Sonack <nsonack@herrhotzenplotz.de>
AuthorDate: 2023-10-01 16:57:46 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-10-19 07:10:08 +0000

    lang/gnat12: Add missing binutils RUN_DEPENDS and fix broken library search paths

    Any produce binary of the gnat12 Ada compiler that had dependencies
    on libstdc++ from this package would result in broken binaries
    because no RUNPATH and no ldconfig paths were set up such that the
    included libstdc++ would get found.

    While we're at it, add the missing binutils dependency because the
    compiler driver would find the GNU assembler that is hardcoded in
    the Makefile.

    PR:             274239
    Signed-off-by:  Nico Sonack <nsonack@herrhotzenplotz.de>
    Approved by:    thierry (maintainer timeout, two weeks)
    MFH:            2023Q4

    (cherry picked from commit 69e85930e200e0ee30f78119063bbd43abe2be3e)

 lang/gnat12/Makefile | 125 +++++++++++++++++++++++++++------------------------
 1 file changed, 66 insertions(+), 59 deletions(-)
Comment 8 Robert Clausecker freebsd_committer freebsd_triage 2023-10-19 07:15:36 UTC
Thank you for your contribution.
Comment 9 Alastair Hogge 2023-10-21 00:23:30 UTC
(In reply to Robert Clausecker from comment #4)
Done, bug #274619.
Thanks.