FreeBSD ports tree (read-only mirror)
Find a file
Dimitry Andric a1edd535d3 x11/libwacom: work around lld 13 no longer supporting symver tricks
Though x11/libwacom was not yet built during the exp-run for clang/llvm
13 (see bug 258209), due to some other dependencies not being available
yet, I noticed that it failed to build with clang 13, or more
specifically this is due to a behavior change in lld 13:

  ...
  [ 33% 10/30] cc  -o generate-hwdb generate-hwdb.p/tools_generate-hwdb.c.o -Wl,--as-needed -Wl,--no-undefined -fstack-protector-strong -O2 -pipe -g -fstack-protector-strong -fno-strict-aliasing '-Wl,-rpath,$ORIGIN/' -Wl,-rpath-link,/wrkdirs/share/dim/ports/x11/libwacom/work/libwacom-1.5/_build/ -Wl,--start-group libwacom.so.2.6.1 /usr/local/lib/libglib-2.0.so /usr/local/lib/libintl.so -Wl,--end-group
  [ 36% 11/30] /usr/local/bin/meson --internal exe --capture 65-libwacom.hwdb -- /wrkdirs/share/dim/ports/x11/libwacom/work/libwacom-1.5/_build/generate-hwdb
  FAILED: 65-libwacom.hwdb
  /usr/local/bin/meson --internal exe --capture 65-libwacom.hwdb -- /wrkdirs/share/dim/ports/x11/libwacom/work/libwacom-1.5/_build/generate-hwdb
  --- stderr ---

Unfortunately the meson build process doesn't really show you why it
failed, but it turns out that running the 'generate-hwdb' command
segfaults:

  Starting program: /wrkdirs/share/dim/ports/x11/libwacom/work/libwacom-1.5/_build/generate-hwdb

  Program received signal SIGSEGV, Segmentation fault.
  libwacom_add_match (device=device@entry=0x801031320, newmatch=0x0) at ../libwacom/libwacom.c:943
  943           device->matches[device->nmatches - 1] = libwacom_match_ref(newmatch);
  (gdb) bt
  #0  libwacom_add_match (device=device@entry=0x801031320, newmatch=0x0) at ../libwacom/libwacom.c:943
  #1  0x000000080024fc7d in libwacom_matchstr_to_match (device=device@entry=0x801031320, matchstr=<optimized out>) at ../libwacom/libwacom-database.c:207
  #2  0x000000080024e313 in libwacom_parse_tablet_keyfile (db=0x8010365a0, datadir=0x200b70 "/wrkdirs/share/dim/ports/x11/libwacom/work/libwacom-1.5/data", filename=<optimized out>) at ../libwacom/libwacom-database.c:652
  #3  load_tablet_files (db=0x8010365a0, datadir=0x200b70 "/wrkdirs/share/dim/ports/x11/libwacom/work/libwacom-1.5/data") at ../libwacom/libwacom-database.c:865
  #4  libwacom_database_new_for_path (datadir=0x200b70 "/wrkdirs/share/dim/ports/x11/libwacom/work/libwacom-1.5/data") at ../libwacom/libwacom-database.c:959
  #5  0x00000000002021b6 in main (argc=<optimized out>, argv=0x801036630) at ../tools/generate-hwdb.c:131

What happens is that an internal function 'libwacom_match_new' is
supposed to be called, which returns a new 'WacomMatch' object. But
instead, it calls a empty stub which returns NULL, resulting in this
segfault. The empty stub was added as a rather nasty upstream hack to
"Alias the accidentally exposed ABI into different functions", in
b9961dbe91:

> A special "trick" is used here to hide the ABI from new versions:
> Usually when defining multiple versioned symbols, one would define one as the
> default one with @@
>     .symver _foo1,foo@VERSION1
>     .symver _foo2,foo@@version2 <-- default one

> By leaving out the default one, ld doesn't know which one to link to and
> fails with an unresolved symbol. rtld however can still figure it out, so
> anything compiled will continue to work. This way we can make a symbol
> disappear from the library for new builds but have old builds continue to
> work with the new version.

Unfortunately this trick/hack does not work anymore with lld 13, since
https://github.com/llvm/llvm-project/commit/66d44304921, ("[ELF] Combine
foo@v1 and foo with the same versionId if both are defined "). The idea
behind the hack is to have the linker call the 'real' libwacom_match_new
function whenever it is called from inside the library itself, but any
external callers get the stubbed version which doesn't really do
anything.

I think libwacom should have used a different approach here, but just
renaming those accidentally exposed internal functions to something
different. Then the tricks with .symver are completely unnecessary. Here
I added a patch that is as simple as possible, which adds #defines for
two affected functions in libwacomint.h, renaming then from
'libwacom_xxx' to 'libwacom_internal_xxx'. This does not affect the
corresponding exposed functions in the libwacom.so, and makes the
'generate-hwdb' command work OK again. I also ran the complete libwacom
test suite, including the deprecated functions test, and it works fine.

PR:		258463
Approved by:	zeising (maintainer)
MFH:		2021Q4
2021-10-02 12:58:25 +02:00
.hooks .hooks/prepare-commit-msg: Enhance commit-msg hook. 2021-06-04 13:57:25 +02:00
accessibility accessibility/orca: Update to 41.0 2021-09-29 10:38:16 -07:00
arabic editors/libreoffice: update to 7.2.1 release (+) 2021-09-17 04:14:10 +10:00
archivers archivers/upx: fix build with clang 13 2021-10-02 12:48:13 +02:00
astro cleanup: drop support for EOL FreeBSD 11.X 2021-09-30 23:23:30 +02:00
audio audio/musicpd: convert MANPAGES to target helpers 2021-10-02 04:19:41 +00:00
base cleanup: drop support for EOL FreeBSD 11.X 2021-09-30 23:23:30 +02:00
benchmarks */Makefile: Sort SUBDIRs 2021-09-27 23:55:49 +08:00
biology biology/ncbi-cxx-toolkit: Update 25.0.0 -> 25.2.0 2021-10-01 00:14:37 -07:00
cad *: Chase new major version (29) of editors/emacs-devel 2021-10-01 19:55:27 -03:00
chinese cleanup: drop support for EOL FreeBSD 11.X 2021-09-30 23:23:30 +02:00
comms cleanup: drop support for EOL FreeBSD 11.X 2021-09-30 23:23:30 +02:00
converters converters/p5-LaTeXML: Update to 0.8.6 2021-10-01 09:08:44 +08:00
databases databases/closql: Update to 1.2.0 2021-10-02 16:55:28 +09:00
deskutils deskutils/gnome-contacts: Update to 41.0 2021-09-30 20:45:47 -07:00
devel devel/forge-devel: Update to latest snapshot 2021-10-02 16:56:22 +09:00
dns cleanup: drop support for EOL FreeBSD 11.X 2021-09-30 23:23:30 +02:00
editors editors/with-editor: Update to 3.0.5 2021-10-02 16:55:48 +09:00
emulators emulators/wine: Merge the VULKAN option into VKD3D 2021-10-02 07:02:18 +00:00
finance cleanup: drop support for EOL FreeBSD 11.X 2021-09-30 23:23:30 +02:00
french cleanup: drop support for EOL FreeBSD 11.X 2021-09-30 23:23:30 +02:00
ftp ftp/sftpgo: Update to 2.1.2 2021-10-01 23:11:00 +00:00
games games/dxx-rebirth: update to 20210922 2021-10-01 12:57:18 +00:00
german german/mythes: Update to 2021.09.26 2021-09-28 03:48:14 +08:00
graphics graphics/mesa-devel: update to 21.2.b.3070 2021-10-02 00:53:39 +00:00
hebrew editors/libreoffice: update to 7.2.1 release (+) 2021-09-17 04:14:10 +10:00
hungarian */*mythes: Fix 72664fc2b4 2021-09-21 11:47:29 +08:00
irc *: Chase new major version (29) of editors/emacs-devel 2021-10-01 19:55:27 -03:00
japanese *: Chase new major version (29) of editors/emacs-devel 2021-10-01 19:55:27 -03:00
java java/openjdk17: enable on powerpc64 2021-09-30 22:19:01 +00:00
Keywords
korean editors/libreoffice: update to 7.2.1 release (+) 2021-09-17 04:14:10 +10:00
lang *: Chase new major version (29) of editors/emacs-devel 2021-10-01 19:55:27 -03:00
mail *: Chase new major version (29) of editors/emacs-devel 2021-10-01 19:55:27 -03:00
math *: Chase new major version (29) of editors/emacs-devel 2021-10-01 19:55:27 -03:00
misc misc/qt5ct: update to 1.5 2021-10-02 07:20:17 +02:00
Mk editors/emacs-devel: Update to 2021-10-01 commit, 30bbb57* 2021-10-01 19:52:49 -03:00
multimedia multimedia/ustreamer: Update 4.5 -> 4.6 2021-10-01 00:14:38 -07:00
net net/tramp: unbreak 2021-10-02 08:51:46 +00:00
net-im net-im/folks: Fix pkg-plist 2021-09-30 20:50:51 -07:00
net-mgmt cleanup: drop support for EOL FreeBSD 11.X 2021-09-30 23:23:30 +02:00
net-p2p cleanup: drop support for EOL FreeBSD 11.X 2021-09-30 23:23:30 +02:00
news news/inn-current: Update to 20210922 2021-09-24 13:25:16 -07:00
polish */*mythes: Fix 72664fc2b4 2021-09-21 11:47:29 +08:00
ports-mgmt ports-mgmt/pkg: update to 1.17.2 2021-09-21 10:23:31 +02:00
portuguese portuguese/hunspell: Update to 20210922 2021-09-27 23:56:23 +08:00
print *: Chase new major version (29) of editors/emacs-devel 2021-10-01 19:55:27 -03:00
russian */*mythes: Fix 72664fc2b4 2021-09-21 11:47:29 +08:00
science science/openems: fix build on powerpc64* 2021-10-01 14:39:19 +00:00
security *: Chase new major version (29) of editors/emacs-devel 2021-10-01 19:55:27 -03:00
shells shells/ohmyzsh: Update to 20210930 2021-10-01 23:47:52 +00:00
sysutils *: Chase new major version (29) of editors/emacs-devel 2021-10-01 19:55:27 -03:00
Templates Templates/BSD.local.dist: add share/icons 2021-09-27 11:33:18 +02:00
textproc *: Chase new major version (29) of editors/emacs-devel 2021-10-01 19:55:27 -03:00
Tools cleanup: drop support for EOL FreeBSD 11.X 2021-09-30 23:23:30 +02:00
ukrainian */*mythes: Fix 72664fc2b4 2021-09-21 11:47:29 +08:00
vietnamese editors/libreoffice: update to 7.2.1 release (+) 2021-09-17 04:14:10 +10:00
www www/nextcloud: Update to 22.2.0 2021-10-02 10:08:12 +00:00
x11 x11/libwacom: work around lld 13 no longer supporting symver tricks 2021-10-02 12:58:25 +02:00
x11-clocks KDE: Update KDE Gear to 21.08.1 2021-09-02 16:52:51 +02:00
x11-drivers cleanup: drop support for EOL FreeBSD 11.X 2021-09-30 23:23:30 +02:00
x11-fm x11-fm/mucommander: unbreak 2021-09-29 20:54:17 +09:00
x11-fonts x11-fonts/iosevka: Update to 10.3.0 2021-09-28 13:35:33 +02:00
x11-servers x11-servers/xorg-server: fix OPTIONs handling 2021-09-30 23:45:50 +02:00
x11-themes x11-themes/greybird-theme: Update to 3.22.15 2021-09-25 23:20:48 +02:00
x11-toolkits cleanup: drop support for EOL FreeBSD 11.X 2021-09-30 23:23:30 +02:00
x11-wm x11-wm/river: update to s20210930 2021-10-02 00:10:14 +00:00
.arcconfig
.gitignore
CHANGES net/openldap24-server: Make SASL permanent for OpenLDAP port. 2021-08-01 01:32:35 -07:00
CONTRIBUTING.md CONTRIBUTING.md: Adjust link to "submitting patches" instructions. 2021-05-15 13:36:25 +02:00
COPYRIGHT
GIDs textproc/opensearch: New port 2021-09-19 09:33:35 -10:00
Makefile Makefile: Force to rebase when using make update 2021-05-25 16:01:19 +00:00
MOVED MOVED: games/gemrb was resurrected 2021-10-02 08:55:15 +00:00
README
UIDs textproc/opensearch: New port 2021-09-19 09:33:35 -10:00
UPDATING UPDATING: Fix some typos 2021-09-26 17:05:57 +02:00

This is the FreeBSD Ports Collection.  For an easy to use
WEB-based interface to it, please see:

	https://www.FreeBSD.org/ports

For general information on the Ports Collection, please see the
FreeBSD Handbook ports section which is available from:

	https://docs.freebsd.org/en/books/handbook/ports/
		for the latest official version
	or:
	The ports(7) manual page (man ports).

These will explain how to use ports and packages.

If you would like to search for a port, you can do so easily by
saying (in /usr/ports):

	make search name="<name>"
	or:
	make search key="<keyword>"

which will generate a list of all ports matching <name> or <keyword>.
make search also supports wildcards, such as:

	make search name="gtk*"

For information about contributing to FreeBSD ports, please see the Porter's
Handbook, available at:

	https://docs.freebsd.org/en/books/porters-handbook/

NOTE:  This tree will GROW significantly in size during normal usage!
The distribution tar files can and do accumulate in /usr/ports/distfiles,
and the individual ports will also use up lots of space in their work
subdirectories unless you remember to "make clean" after you're done
building a given port.  /usr/ports/distfiles can also be periodically
cleaned without ill-effect.