Bug 276135 - devel/libgudev: fix build with clang 18
Summary: devel/libgudev: fix build with clang 18
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: freebsd-x11 (Nobody)
URL:
Keywords:
Depends on:
Blocks: 276104
  Show dependency treegraph
 
Reported: 2024-01-05 23:35 UTC by Dimitry Andric
Modified: 2024-01-06 08:48 UTC (History)
1 user (show)

See Also:
manu: maintainer-feedback+


Attachments
devel/libgudev: fix build with clang 18 (1.81 KB, patch)
2024-01-05 23:36 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2024-01-05 23:35:39 UTC
Clang 18 no longer accepts -export-dynamic, which is a linker option,
resulting in an error building devel/libgudev:

  cc  -o gudev/libgudev-1.0.so.0.3.0 gudev/libgudev-1.0.so.0.3.0.p/meson-generated_.._gudevenumtypes.c.o gudev/libgudev-1.0.so.0.3.0.p/gudevclient.c.o gudev/libgudev-1.0.so.0.3.0.p/gudevdevice.c.o gudev/libgudev-1.0.so.0.3.0.p/gudevenumerator.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -shared -fPIC -Wl,--start-group -Wl,-soname,libgudev-1.0.so.0 -fstack-protector-strong -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -Wl,-rpath,/usr/local/lib -Wl,-rpath-link,/usr/local/lib -export-dynamic -Wl,--version-script,/wrkdirs/share/dim/ports/devel/libgudev/work/libgudev-237/libgudev-1.0.sym /usr/local/lib/libglib-2.0.so /usr/local/lib/libintl.so /usr/local/lib/libgobject-2.0.so /usr/local/lib/libudev.so -Wl,--end-group
  cc: error: unknown argument: '-export-dynamic'

Fix this by using the correct spelling: -Wl,--export-dynamic.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2024-01-05 23:36:27 UTC
Created attachment 247471 [details]
devel/libgudev: fix build with clang 18
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-01-06 08:31:58 UTC
A commit in branch main references this bug:

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

commit b6807b43f161c18a6d7a5642f817e4bff858d33a
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-01-05 23:28:08 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-01-06 08:30:56 +0000

    devel/libgudev: fix build with clang 18

    Clang 18 no longer accepts -export-dynamic, which is a linker option,
    resulting in an error building devel/libgudev:

      cc  -o gudev/libgudev-1.0.so.0.3.0 gudev/libgudev-1.0.so.0.3.0.p/meson-generated_.._gudevenumtypes.c.o gudev/libgudev-1.0.so.0.3.0.p/gudevclient.c.o gudev/libgudev-1.0.so.0.3.0.p/gudevdevice.c.o gudev/libgudev-1.0.so.0.3.0.p/gudevenumerator.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -shared -fPIC -Wl,--start-group -Wl,-soname,libgudev-1.0.so.0 -fstack-protector-strong -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -Wl,-rpath,/usr/local/lib -Wl,-rpath-link,/usr/local/lib -export-dynamic -Wl,--version-script,/wrkdirs/share/dim/ports/devel/libgudev/work/libgudev-237/libgudev-1.0.sym /usr/local/lib/libglib-2.0.so /usr/local/lib/libintl.so /usr/local/lib/libgobject-2.0.so /usr/local/lib/libudev.so -Wl,--end-group
      cc: error: unknown argument: '-export-dynamic'

    Fix this by using the correct spelling, -Wl,--export-dynamic.

    PR:             276135
    Approved by:    x11 (manu)
    MFH:            2024Q1

 devel/libgudev/Makefile | 3 +++
 1 file changed, 3 insertions(+)
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-01-06 08:48:01 UTC
A commit in branch 2024Q1 references this bug:

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

commit 20160dd137a12889723772f4cc013fbf4d5b9af7
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-01-05 23:28:08 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-01-06 08:47:06 +0000

    devel/libgudev: fix build with clang 18

    Clang 18 no longer accepts -export-dynamic, which is a linker option,
    resulting in an error building devel/libgudev:

      cc  -o gudev/libgudev-1.0.so.0.3.0 gudev/libgudev-1.0.so.0.3.0.p/meson-generated_.._gudevenumtypes.c.o gudev/libgudev-1.0.so.0.3.0.p/gudevclient.c.o gudev/libgudev-1.0.so.0.3.0.p/gudevdevice.c.o gudev/libgudev-1.0.so.0.3.0.p/gudevenumerator.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -shared -fPIC -Wl,--start-group -Wl,-soname,libgudev-1.0.so.0 -fstack-protector-strong -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -Wl,-rpath,/usr/local/lib -Wl,-rpath-link,/usr/local/lib -export-dynamic -Wl,--version-script,/wrkdirs/share/dim/ports/devel/libgudev/work/libgudev-237/libgudev-1.0.sym /usr/local/lib/libglib-2.0.so /usr/local/lib/libintl.so /usr/local/lib/libgobject-2.0.so /usr/local/lib/libudev.so -Wl,--end-group
      cc: error: unknown argument: '-export-dynamic'

    Fix this by using the correct spelling, -Wl,--export-dynamic.

    PR:             276135
    Approved by:    x11 (manu)
    MFH:            2024Q1

    (cherry picked from commit b6807b43f161c18a6d7a5642f817e4bff858d33a)

 devel/libgudev/Makefile | 3 +++
 1 file changed, 3 insertions(+)