Bug 276070 - lang/gcc12:links with devel/isl if installed
Summary: lang/gcc12:links with devel/isl if installed
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Lorenzo Salvadore
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-02 01:42 UTC by Ivan Rozhuk
Modified: 2025-03-12 14:33 UTC (History)
4 users (show)

See Also:


Attachments
Patch for gcc15-devel (which in concept should apply for gcc12 and others (884 bytes, patch)
2025-02-16 11:07 UTC, Gerald Pfeifer
gerald: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Rozhuk 2024-01-02 01:42:37 UTC
libisl.so.23 is used by gcc12, it does not exist in gcc12 Makefile.
Comment 1 Lorenzo Salvadore freebsd_committer freebsd_triage 2024-01-02 08:49:07 UTC
Could you please provide more details?

I see LIB_DEPENDS+= libisl.so:devel/isl on line 143, which is added only if the GRAPHITE option is on, consistent with what I read in
https://gcc.gnu.org/wiki/InstallingGCC .

Do you mean that gcc12 is linked with libisl.so even if the option is OFF if devel/isl is installed? Could you please provide some steps to reproduce what you observe?

Also please note that I am in the middle of a difficult update of GCC default version from 12 to 13 (and also in the middle of many other things), so I might need some time to address this bug report.

Thanks.
Comment 2 Ivan Rozhuk 2024-01-16 05:31:22 UTC
(In reply to Lorenzo Salvadore from comment #1)

GRAPHITE is off, but it links with lib.
Comment 3 Gerald Pfeifer freebsd_committer freebsd_triage 2025-02-14 22:58:48 UTC
I think I know how to fix this; let me see whether I can come up with 
a patch.
Comment 4 Gerald Pfeifer freebsd_committer freebsd_triage 2025-02-16 11:07:47 UTC
Created attachment 257572 [details]
Patch for gcc15-devel (which in concept should apply for gcc12 and others

Here we go! This passed my testing and verification of the output of
ldd .../libexec/gcc15/gcc/x86_64-portbld-freebsd13.4/15.0.1/cc1

Lorenzo, okay to push this and also push to other affected ports?
Comment 5 Lorenzo Salvadore freebsd_committer freebsd_triage 2025-02-17 09:36:49 UTC
I am going to test your patch as soon as possible.

I have a vague memory to have actually attempted to fix this bug, but failed for some reason. Your patch looks very logical, something that I might have already tested unsuccessfully, so I would like to test it more thoroughly.

However, I might have tested a slightly different version of your patch: I might have tested GRAPHITE_CONFIGURE_WITH=isl, which would add "--with-isl" when needed but not "--with-isl=${LOCALBASE}. This might be why my old test failed, and in that case your patch could work.
I will test this patch version too: if it worked, it would be better to use this more concise form.
See https://docs.freebsd.org/en/books/porters-handbook/makefiles/#makefile-options-syntax .
Comment 6 Lorenzo Salvadore freebsd_committer freebsd_triage 2025-02-21 15:14:37 UTC
Tests done.

Your patch does work, but removing the conditional block and replacing it with

GRAPHITE_LIB_DEPENDS= libisl.so:devel/isl
GRAPHITE_CONFIGURE_WITH= isl

also works.

I suggest then we use the option helpers, unless you have a specific reason for prefering the conditional block.
Comment 7 Gerald Pfeifer freebsd_committer freebsd_triage 2025-02-23 11:50:44 UTC
(In reply to Lorenzo Salvadore from comment #6)
> I suggest then we use the option helpers, unless you have a specific
> reason for prefering the conditional block.

My original approach was the minimal change and only changed anything
in the case that was broken before.

Based on your successful tests of the option helpers, happy to use these.

How would you like to proceed wrt. pushing this to the various ports?
Comment 8 Lorenzo Salvadore freebsd_committer freebsd_triage 2025-02-28 11:41:34 UTC
(In reply to Gerald Pfeifer from comment #7)

I will proceed as usual: I will merge the change into the -devel ports first, then in all production ports except GCC_DEFAULT, which I will fix last while adding other patches that I have postponed.
Comment 9 commit-hook freebsd_committer freebsd_triage 2025-03-04 07:49:25 UTC
A commit in branch main references this bug:

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

commit 585209d361cf41d96e3d41eb029413ecd8be7074
Author:     Lorenzo Salvadore <salvadore@FreeBSD.org>
AuthorDate: 2025-02-28 07:39:53 +0000
Commit:     Lorenzo Salvadore <salvadore@FreeBSD.org>
CommitDate: 2025-03-04 07:48:29 +0000

    lang/gcc12-devel: Update to 12.4.1.s20250227

    Also fix linking with libisl.so depending on GRAPHITE option, which is
    now implemented through options helpers.

    Co-authored-by: Gerald Pfeifer <gerald@FreeBSD.org>

    PR:             276070
    Reported by:    Ivan Rozhuk <rozhuk.im@gmail.com>

 lang/gcc12-devel/Makefile | 10 ++++------
 lang/gcc12-devel/distinfo |  6 +++---
 2 files changed, 7 insertions(+), 9 deletions(-)
Comment 10 commit-hook freebsd_committer freebsd_triage 2025-03-04 07:49:26 UTC
A commit in branch main references this bug:

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

commit 7ef9e119324c41ecfb7553ec4b5a4f0124d4ffea
Author:     Lorenzo Salvadore <salvadore@FreeBSD.org>
AuthorDate: 2025-03-02 12:33:20 +0000
Commit:     Lorenzo Salvadore <salvadore@FreeBSD.org>
CommitDate: 2025-03-04 07:48:30 +0000

    lang/gcc14-devel: Update to 14.2.1.s20250301

    Also fix linking with libisl.so depending on GRAPHITE option, which is
    now implemented through options helpers.

    Co-authored-by: Gerald Pfeifer <gerald@FreeBSD.org>

    PR:             276070
    Reported by:    Ivan Rozhuk <rozhuk.im@gmail.com>

 lang/gcc14-devel/Makefile | 10 ++++------
 lang/gcc14-devel/distinfo |  6 +++---
 2 files changed, 7 insertions(+), 9 deletions(-)
Comment 11 commit-hook freebsd_committer freebsd_triage 2025-03-04 07:49:27 UTC
A commit in branch main references this bug:

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

commit fabd751b2ed2a45b1ab24b38acdfd1f63b739fe4
Author:     Lorenzo Salvadore <salvadore@FreeBSD.org>
AuthorDate: 2025-03-01 13:46:57 +0000
Commit:     Lorenzo Salvadore <salvadore@FreeBSD.org>
CommitDate: 2025-03-04 07:48:29 +0000

    lang/gcc13-devel: Update to 13.3.1.s20250301

    Also fix linking with libisl.so depending on GRAPHITE option, which is
    now implemented through options helpers.

    Co-authored-by: Gerald Pfeifer <gerald@FreeBSD.org>

    PR:             276070
    Reported by:    Ivan Rozhuk <rozhuk.im@gmail.com>

 lang/gcc13-devel/Makefile | 10 ++++------
 lang/gcc13-devel/distinfo |  6 +++---
 2 files changed, 7 insertions(+), 9 deletions(-)
Comment 12 commit-hook freebsd_committer freebsd_triage 2025-03-04 07:49:28 UTC
A commit in branch main references this bug:

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

commit be5358aaf37709aa0be4fa60f4f188371c923b2c
Author:     Lorenzo Salvadore <salvadore@FreeBSD.org>
AuthorDate: 2025-03-03 12:30:22 +0000
Commit:     Lorenzo Salvadore <salvadore@FreeBSD.org>
CommitDate: 2025-03-04 07:48:30 +0000

    lang/gcc15-devel: Update to 15.0.1.s20250302

    Also fix linking with libisl.so depending on GRAPHITE option, which is
    now implemented through options helpers.

    Co-authored-by: Gerald Pfeifer <gerald@FreeBSD.org>

    PR:         276070
    Reported by:Ivan Rozhuk <rozhuk.im@gmail.com>

 lang/gcc15-devel/Makefile | 10 ++++------
 lang/gcc15-devel/distinfo |  6 +++---
 2 files changed, 7 insertions(+), 9 deletions(-)
Comment 13 commit-hook freebsd_committer freebsd_triage 2025-03-05 15:33:50 UTC
A commit in branch main references this bug:

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

commit 1846a7fe9b587894845d69a895510f37eb2f40d8
Author:     Lorenzo Salvadore <salvadore@FreeBSD.org>
AuthorDate: 2025-03-04 10:29:58 +0000
Commit:     Lorenzo Salvadore <salvadore@FreeBSD.org>
CommitDate: 2025-03-05 15:32:48 +0000

    lang/gcc12: Fix linking with libisl.so

    Fix linking with libisl.so depending on GRAPHITE option, which is
    now implemented through options helpers.

    Co-authored-by: Gerald Pfeifer <gerald@FreeBSD.org>

    PR:         276070
    Reported by:Ivan Rozhuk <rozhuk.im@gmail.com>

 lang/gcc12/Makefile | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
Comment 14 commit-hook freebsd_committer freebsd_triage 2025-03-05 15:33:51 UTC
A commit in branch main references this bug:

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

commit 930be0aa27c2e99af9337396842ac164ed708df3
Author:     Lorenzo Salvadore <salvadore@FreeBSD.org>
AuthorDate: 2025-03-04 14:00:48 +0000
Commit:     Lorenzo Salvadore <salvadore@FreeBSD.org>
CommitDate: 2025-03-05 15:32:58 +0000

    lang/gcc14: Fix linking with libisl.so

    Fix linking with libisl.so depending on GRAPHITE option, which is
    now implemented through options helpers.

    Co-authored-by: Gerald Pfeifer <gerald@FreeBSD.org>

    PR:         276070
    Reported by:Ivan Rozhuk <rozhuk.im@gmail.com>

 lang/gcc14/Makefile | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
Comment 15 commit-hook freebsd_committer freebsd_triage 2025-03-12 14:31:32 UTC
A commit in branch main references this bug:

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

commit 5d9d9b114e0e5df1ca806d9f00c1d86e7e7819e2
Author:     Lorenzo Salvadore <salvadore@FreeBSD.org>
AuthorDate: 2025-03-12 09:36:24 +0000
Commit:     Lorenzo Salvadore <salvadore@FreeBSD.org>
CommitDate: 2025-03-12 14:30:52 +0000

    lang/gcc13: Fix libisl.so linking

    Fix linking with libisl.so depending on GRAPHITE option, which is now
    implemented through options helpers.

    Co-authored-by: Gerald Pfeifer <gerald@FreeBSD.org>

    PR:             276070
    Reported by:    Ivan Rozhuk <rozhuk.im@gmail.com>

 lang/gcc13/Makefile | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
Comment 16 Lorenzo Salvadore freebsd_committer freebsd_triage 2025-03-12 14:33:10 UTC
All ports for supported GCC versions have been patched. Thanks!