Bug 282382 - java/eclipse: Fix build: ld: error: unable to find library -lGLU
Summary: java/eclipse: Fix build: ld: error: unable to find library -lGLU
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: Vladimir Druzenko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-28 13:51 UTC by Norbert Grundmann
Modified: 2024-10-30 22:42 UTC (History)
1 user (show)

See Also:
vvd: merge-quarterly+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Norbert Grundmann 2024-10-28 13:51:21 UTC
I got 3 port build failures with:

[INFO]      [exec] cc -shared -fPIC  -L`pkg-config --variable=prefix gtk+-3.0`/lib -s -o libswt-glx-gtk-4966r5.so swt.o glx.o glx_structs.o glx_stats.o -lGL -lGLU -lm
[INFO]      [exec] gmake[1]: Leaving directory '/wrkdirs/usr/ports/java/eclipse/work/eclipse.platform.releng.aggregator-R4_33_maintenance/eclipse.platform.swt/binaries/org.eclipse.swt.gtk.freebsd.x86_64/target/natives-build-temp'
[INFO]      [exec] *** GTK3 Build failed, aborting further actions..
[INFO]      [exec] ld: error: unable to find library -lGLU
[INFO]      [exec] cc: error: linker command failed with exit code 1 (use -v to see invocation)
[INFO]      [exec] gmake[1]: *** [make_unix.mak:245: libswt-glx-gtk-4966r5.so] Error 1

The fix is in the port's Makefile for LIB_DEPENDS: add the line with libGLU:

-- snip --
LIB_DEPENDS=    libsecret-1.so:security/libsecret \
                libwebkit2gtk-4.0.so:www/webkit2-gtk3 \
                libGLU.so:graphics/libGLU
-- snip --

Cheers, Norbert
Comment 1 Vladimir Druzenko freebsd_committer freebsd_triage 2024-10-28 15:12:43 UTC
USE_GL=gl glu

Testing in poudriere.
Comment 2 Vladimir Druzenko freebsd_committer freebsd_triage 2024-10-29 15:58:56 UTC
Build fine with my patch.

But I can't understand how it build without errors in poudriere before? Some commit broke the build?
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-10-30 22:41:30 UTC
A commit in branch main references this bug:

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

commit 58566c547fc5d0c69277fc5b1049697a644c0b36
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-10-30 22:38:59 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-10-30 22:38:59 +0000

    java/eclipse: Fix build: ld: error: unable to find library -lGLU

    [INFO]      [exec] cc -shared -fPIC  -L`pkg-config --variable=prefix gtk+-3.0`/lib -s -o libswt-glx-gtk-4966r5.so swt.o glx.o glx_structs.o glx_stats.o -lGL -lGLU -lm
    [INFO]      [exec] gmake[1]: Leaving directory '/wrkdirs/usr/ports/java/eclipse/work/eclipse.platform.releng.aggregator-R4_33_maintenance/eclipse.platform.swt/binaries/org.eclipse.swt.gtk.freebsd.x86_64/target/natives-build-temp'
    [INFO]      [exec] *** GTK3 Build failed, aborting further actions..
    [INFO]      [exec] ld: error: unable to find library -lGLU
    [INFO]      [exec] cc: error: linker command failed with exit code 1 (use -v to see invocation)
    [INFO]      [exec] gmake[1]: *** [make_unix.mak:245: libswt-glx-gtk-4966r5.so] Error 1

    PR:             282382
    Approved by:    Norbert Grundmann <ngrundmann@gmx.de> (maintainer)
    MFH:            2024Q4

 java/eclipse/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-10-30 22:42:31 UTC
A commit in branch 2024Q4 references this bug:

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

commit adc026b8eeb487f8c2aac7436c761061fbc69c69
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-10-30 22:38:59 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-10-30 22:41:48 +0000

    java/eclipse: Fix build: ld: error: unable to find library -lGLU

    [INFO]      [exec] cc -shared -fPIC  -L`pkg-config --variable=prefix gtk+-3.0`/lib -s -o libswt-glx-gtk-4966r5.so swt.o glx.o glx_structs.o glx_stats.o -lGL -lGLU -lm
    [INFO]      [exec] gmake[1]: Leaving directory '/wrkdirs/usr/ports/java/eclipse/work/eclipse.platform.releng.aggregator-R4_33_maintenance/eclipse.platform.swt/binaries/org.eclipse.swt.gtk.freebsd.x86_64/target/natives-build-temp'
    [INFO]      [exec] *** GTK3 Build failed, aborting further actions..
    [INFO]      [exec] ld: error: unable to find library -lGLU
    [INFO]      [exec] cc: error: linker command failed with exit code 1 (use -v to see invocation)
    [INFO]      [exec] gmake[1]: *** [make_unix.mak:245: libswt-glx-gtk-4966r5.so] Error 1

    PR:             282382
    Approved by:    Norbert Grundmann <ngrundmann@gmx.de> (maintainer)
    MFH:            2024Q4

    (cherry picked from commit 58566c547fc5d0c69277fc5b1049697a644c0b36)

 java/eclipse/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 5 Vladimir Druzenko freebsd_committer freebsd_triage 2024-10-30 22:42:43 UTC
Thanks.