[x11-wm/fvwm2] Build failure with Clang

Dimitry Andric dim at FreeBSD.org
Sat Dec 27 15:38:06 UTC 2014


on 26 Dec 2014, at 21:38, A.J. 'Fonz' van Werven <freebsd at skysmurf.nl> wrote:
> 
> Before asking the maintainer and/or submitting a PR, perhaps someone here
> knows what's up with the following. Since I rebuilt several ports due to
> graphics/imlib having been deleted and graphics/png having been updated,
> now building x11-wm/fvwm2 with Clang fails with a linking error at
> FvwmGtk. But with lang/gcc48 it rather strangely builds just fine.
...
> clang  -Wall -Wno-implicit-int -O2 -pipe -fno-color-diagnostics -fstack-protector -fstack-protector -fno-strict-aliasing -I/usr/local/include -I/usr/local/include/libpng15 -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -fstack-protector -o FvwmGtk FvwmGtk.o gtkpixmapmenuitem.o dialog.o expand.o windowlist.o menu.o -L../../libs -L/usr/local/lib -lfvwm -lSM -lICE -lXext -lX11  -lm -L/usr/local/lib -L/usr/local/lib -lgtk -lgdk -lgmodule -lglib -lintl -lXi -lXext -lX11 -lm    -lfontconfig -L/usr/local/lib -lfreetype
> gtkpixmapmenuitem.o: In function `g_bit_nth_lsf':
> gtkpixmapmenuitem.c:(.text+0x0): multiple definition of `g_bit_nth_lsf'
> FvwmGtk.o:FvwmGtk.c:(.text+0x0): first defined here
> gtkpixmapmenuitem.o: In function `g_bit_nth_msf':
> gtkpixmapmenuitem.c:(.text+0x30): multiple definition of `g_bit_nth_msf'
> FvwmGtk.o:FvwmGtk.c:(.text+0x30): first defined here
> gtkpixmapmenuitem.o: In function `g_bit_storage':
> gtkpixmapmenuitem.c:(.text+0x60): multiple definition of `g_bit_storage'
> FvwmGtk.o:FvwmGtk.c:(.text+0x60): first defined here

I've tried building this port with various options enabled and disabled,
but I cannot reproduce your linking errors.  If I would have to guess, I
would say that either Fvwm or gtk headers are using inline functions,
and are counting on "gnu89" inline semantics.

If that is the case, you can try to add the following line to
x11-wm/fvwm2/Makefile:

USE_CSTD=	gnu89

Somewhere near the top should be fine.

-Dimitry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20141227/2e11d3d4/attachment.sig>


More information about the freebsd-ports mailing list