Your message dated Fri, 11 Sep 2015 17:14:31 -0700
with message-id <[email protected]>
and subject line Re: freetype: FTBFS with clang instead of gcc
has caused the Debian Bug report #789492,
regarding freetype: FTBFS with clang instead of gcc
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
789492: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=789492
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: freetype
Version: 2.5.2
Severity: minor

Dear Maintainer,

Hello,

Using the rebuild infrastructure, your package fails to build with clang 
instead of gcc.

Full build log is available here:
http://clang.debian.net/logs/2015-03-25/freetype_2.5.2-4_unstable_clang.log

These errors are because some clang's warnig options which gcc doesn't have 
were turned to error by -Werror. I fix these by adding some things in 
debian/rules to deal with this situation. But there is a special one which I 
thought may be a mistake. So I modified a source code file, too.

Many Thanks,
Joseph

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.0.5-1-ARCH (SMP w/8 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: unable to detect
diff -u freetype-2.5.2/debian/patches-ft2demos/series freetype-2.5.2/debian/patches-ft2demos/series
--- freetype-2.5.2/debian/patches-ft2demos/series
+++ freetype-2.5.2/debian/patches-ft2demos/series
@@ -3,0 +4 @@
+ftcommon-null-pointer.patch
diff -u freetype-2.5.2/debian/rules freetype-2.5.2/debian/rules
--- freetype-2.5.2/debian/rules
+++ freetype-2.5.2/debian/rules
@@ -18,6 +18,10 @@
 endif
 export DEB_CFLAGS_MAINT_APPEND += $(shell dpkg-buildflags --get CPPFLAGS)
 
+ifeq ($(shell $(CC) --version | grep -c "clang version"),1)
+DEB_CFLAGS_MAINT_APPEND += -Wno-error=long-long -Wno-error=extended-offsetof -Wno-error=self-assign
+endif
+
 # always abort if there are any problems with the symbols file
 DPKG_GENSYMBOLS_CHECK_LEVEL = 4
 export DPKG_GENSYMBOLS_CHECK_LEVEL
only in patch2:
unchanged:
--- freetype-2.5.2.orig/debian/patches-ft2demos/ftcommon-null-pointer.patch
+++ freetype-2.5.2/debian/patches-ft2demos/ftcommon-null-pointer.patch
@@ -0,0 +1,13 @@
+Index: ft2demos-2.5.1.orig/src/ftcommon.c
+===================================================================
+--- ft2demos-2.5.1.orig/src/ftcommon.c
++++ ft2demos-2.5.1/src/ftcommon.c
+@@ -242,7 +242,7 @@
+         if ( has_extension )
+           memcpy( suffix, orig, 5 );
+         else
+-          suffix = '\0';
++          *suffix = '\0';
+       }
+ 
+       if ( (*aface)->charmaps )

--- End Message ---
--- Begin Message ---
The error given in this clang build log is:

In file included from builds/unix/ftsystem.c:21:
./builds/unix/ftconfig.h:532:5: error: 'long long' is an extension when C99 
mode is not enabled [-Werror,-Wlong-long]
    long long  ret, tmp;
    ^
./builds/unix/ftconfig.h:532:5: error: 'long long' is an extension when C99 
mode is not enabled [-Werror,-Wlong-long]
./builds/unix/ftconfig.h:535:13: error: 'long long' is an extension when C99 
mode is not enabled [-Werror,-Wlong-long]
    ret  = (long long)a * b;
            ^
3 errors generated.

C99 is 16 years old.  The current default standard used by gcc on Debian is
C11, which is 12 years *newer* than C99.  I don't think this is a bug in the
freetype package; I think this is a bug in your clang build environment, for
defaulting to a different (and apparently older) C standard than the one
used by the gcc toolchain.

I'm therefore closing this 'wontfix' based on the available information.

However, I see that your patch overrides more errors than just the 'long
long' error.  If you can provide explanation for why these other overrides
are needed (preferably with build logs), please feel free to reopen.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
[email protected]                                     [email protected]

Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply via email to