[Debian GNUstep maintainers] Bug#919961: sope: FTBFS on sh4: PrintfFormatScanner.m:43:9: error: wrong type argument to unary exclamation mark

Yavor Doganov yavor at gnu.org
Mon Jan 21 00:12:21 GMT 2019


Source: sope
Version: 4.0.5-2
Severity: important
Tags: sid buster ftbfs patch
User: debian-superh at lists.debian.org
Usertags: sh4

Your package fails to build on sh4:

| Making all for subproject FoundationExt...
| cd .; \
| /usr/share/GNUstep/Makefiles/mkinstalldirs ./obj/FoundationExt.obj/
| [...]
| gcc PrintfFormatScanner.m -c \
|       -MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1 -fno-strict-aliasing -fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS -pthread -fPIC -DDEBUG -fno-omit-frame-pointer -Wall -DGSWARN -DGSDIAGNOSE -Wno-import -g -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -fgnu-runtime -O0 -g -frecord-gcc-switches -fconstant-string-class=NSConstantString -I. -I.. -I../../../sope-core/NGExtensions -I. -I/usr/local/include/GNUstep -I/usr/include/GNUstep \
|        -o obj/FoundationExt.obj/PrintfFormatScanner.m.o
| PrintfFormatScanner.m: In function '-[PrintfFormatScanner stringWithFormat:arguments:]':
| PrintfFormatScanner.m:43:9: error: wrong type argument to unary exclamation mark
|      if (!args)
|          ^
| make[8]: *** [/usr/share/GNUstep/Makefiles/rules.make:479: obj/FoundationExt.obj/PrintfFormatScanner.m.o] Error 1

On sh4, va_list is implemented as a struct, just like on arm* and
alpha.  I'd appreciate if you apply the attached trivial patch; it
would allow sogo to be built on sh4 and will help us achieve the goal
of having all GNUstep packages available on all architectures.

FWIW, I have tested it in a QEMU-based sh4 chroot on amd64; it
compiles fine but the build fails with:

|    dh_shlibdeps -a
| dh_shlibdeps: file -e apptype -e ascii -e encoding -e cdf -e compress -e tar debian/libsope1/usr/lib/libNGMime.so.4.9.3 returned exit code 1

However, other GNUstep library packages fail with exactly the same
error so it's probably something wrong with my setup or a bug
somewhere that might be fixed (the host is running stretch).
-------------- next part --------------
Description: Fix FTBFS on sh4.
Author: Yavor Doganov <yavor at gnu.org>
Forwarded: no
Last-Update: 2019-01-21
---

--- sope.orig/sope-gdl1/GDLAccess/EOSQLQualifier.m
+++ sope/sope-gdl1/GDLAccess/EOSQLQualifier.m
@@ -321,7 +321,7 @@
           back to an array (the EOQualifierEnumScannerHandler does that).
           Works on ix86, but *NOT* on iSeries or zServer !!
   */
-#if defined(__s390__) || defined(__arm__)  || defined(__aarch64__) || defined(__alpha__)
+#if defined(__s390__) || defined(__arm__)  || defined(__aarch64__) || defined(__alpha__) || defined(__sh__)
   qualifierString =
     [formatScanner performSelector:@selector(stringWithFormat:arguments:)
                    withObject:_qualifierFormat
--- sope.orig/sope-gdl1/GDLAccess/FoundationExt/PrintfFormatScanner.m
+++ sope/sope-gdl1/GDLAccess/FoundationExt/PrintfFormatScanner.m
@@ -36,10 +36,10 @@
     // possible to be NULL at all, but we're called with an array as
     // argument instead of a va_list in EOSQLQualifier and are thus
     // calling __va_copy on an array, which is something that really
-    // shouldn't be done. Checking whether args is NULL breaks on arm
-    // and alpha however, because a va_list isn't a pointer, so we
-    // don't do the check on arm and alpha.
-#if !defined(__arm__) && !defined(__aarch64__) && !defined(__alpha__)
+    // shouldn't be done. Checking whether args is NULL breaks on arm,
+    // alpha and sh4 however, because a va_list isn't a pointer, so we
+    // don't do the check on arm, alpha and sh4.
+#if !defined(__arm__) && !defined(__aarch64__) && !defined(__alpha__) && !defined(__sh__)
     if (!args)
       return format;
 #endif


More information about the pkg-GNUstep-maintainers mailing list