ports/184544: [PATCH] graphics/gpicview: fix build with clang as cc
Mark Atkinson
atkin901 at gmail.com
Fri Dec 6 15:50:00 UTC 2013
>Number: 184544
>Category: ports
>Synopsis: [PATCH] graphics/gpicview: fix build with clang as cc
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Dec 06 15:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Mark Atkinson
>Release: 11.0-CURRENT
>Organization:
>Environment:
FreeBSD 11.0-CURRENT #4 r258654M amd64
>Description:
If building gpicview with clang under 11.0-current with no CFLAGS defined in /etc/make.conf it will fail with:
cc -DHAVE_CONFIG_H -I. -I.. -D_THREAD_SAFE -I/usr/local/include -I/usr/local/include/gtk-2.0 -I/usr/local/include/gio-unix-2.0/ -I/usr/local/include/atk-1.0 -I/usr/local/include/cairo -I/usr/local/include/pixman-1 -D_THREAD_SAFE -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/libpng15 -I/usr/local/include/pango-1.0 -pthread -I/usr/local/include/glib-2.0 -I/usr/local/include/freetype2 -I/usr/local/include -I/usr/local/include/harfbuzz -I.. -DPACKAGE_DATA_DIR=\""/usr/local/share"\" -DPACKAGE_LOCALE_DIR=\""/usr/local/share/locale"\" -I/usr/local/include -O2 -pipe -march=native -fno-strict-aliasing -MT gpicview-image-view.o -MD -MP -MF .deps/gpicview-image-view.Tpo -c -o gpicview-image-view.o `test -f 'image-view.c' || echo './'`image-view.c
main-win.c:381:9: error: non-void function 'main_win_open' should return a value [-Wreturn-type]
return;
^
main-win.c:510:36: warning: if statement has empty body [-Wempty-body]
if( mw->animation_timeout );
^
main-win.c:510:36: note: put the semicolon on a separate line to silence this warning
1 warning and 1 error generated.
gmake[3]: *** [gpicview-main-win.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
mv -f .deps/gpicview-image-view.Tpo .deps/gpicview-image-view.Po
gmake[3]: Leaving directory `/usr/ports/graphics/gpicview/work/gpicview-0.2.4/src'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/usr/ports/graphics/gpicview/work/gpicview-0.2.4'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/usr/ports/graphics/gpicview/work/gpicview-0.2.4'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1
Stop.
make: stopped in /usr/ports/graphics/gpicview
>How-To-Repeat:
make in graphics/gpicview with clang as cc.
>Fix:
Apply attached patch and rebuild. Works with 11.0-current default clang as cc and USE_GCC=any.
Patch attached with submission follows:
Index: gpicview/Makefile
===================================================================
--- gpicview/Makefile (revision 335731)
+++ gpicview/Makefile (working copy)
@@ -16,7 +16,7 @@
INSTALLS_ICONS= yes
GNU_CONFIGURE= yes
-CPPFLAGS+= -I${LOCALBASE}/include
+CPPFLAGS+= -Wno-return-type -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
OPTIONS_DEFINE= NLS
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list