Bug#617753: sunpinyin:FTBFS: sh4: ./config.h:125:3: error: #error can not detect the endianness!
Source: sunpinyin
Version: 2.0.3-1
Severity: wishlist
Tags: patch
User: debian-sh4@superh.org
Usertags: sh4
X-Debbugs-CC: debian-superh@lists.debian.org
Hi,
sunpinyin FTBFS on sh4.
http://buildd.debian-ports.org/fetch.php?pkg=sunpinyin&arch=sh4&ver=2.0.3-1&stamp=1299807591&file=log&as=raw
-----
scons: done reading SConscript files.
scons: Building targets ...
g++ -o src/portability.os -c -g -O2 -pipe -DHAVE_CONFIG_H
-DSUNPINYIN_DATA_DIR='"/usr/lib/sunpinyin/data"' -fPIC -I. -Isrc
-Isrc/slm -Isrc/slm/slmbuild -Isrc/slm/tslmendian -Isrc/slm/tools
-Isrc/slm/tslmpack -Isrc/slm/slmseg -Isrc/slm/thread
-Isrc/slm/slmprune -Isrc/slm/getWordFreq -Isrc/slm/slminfo
-Isrc/slm/mmseg -Isrc/slm/ids2ngram -Isrc/slm/tslminfo -Isrc/lexicon
-Isrc/ime-core -Isrc/pinyin src/portability.cpp
In file included from src/portability.cpp:39:
./config.h:125:3: error: #error can not detect the endianness!
scons: *** [src/portability.os] Error 1
scons: building terminated because of errors.
make: [install-stamp] Error 2 (ignored)
-----
SConstruct of sunpinyin does not support Renesas SuperH.
I made patch to support SH. Could you apply this patch?
Best regards,
Nobuhiro
--
Nobuhiro Iwamatsu
iwamatsu at {nigauri.org / debian.org}
GPG ID: 40AD1FA6
--- a/SConstruct 2011-03-11 11:38:51.000000000 +0900
+++ b/SConstruct 2011-03-11 12:02:05.000000000 +0900
@@ -230,7 +230,7 @@
|| defined(_POWER) || defined(__powerpc__) \
|| defined(__ppc__) || defined(__hpux) || defined(__hppa) \
|| defined(_MIPSEB) || defined(_POWER) \
- || defined(__s390__)
+ || defined(__s390__) || (defined(__sh__) && defined(__BIG_ENDIAN__))
# define WORDS_BIGENDIAN 1
#elif defined(__i386__) || defined(__i386) \
@@ -240,7 +240,8 @@
|| defined(__amd64__) || defined(_M_AMD64) \
|| defined(__x86_64) || defined(__x86_64__) \
|| defined(_M_X64) || defined(__bfin__) \
- || defined(__alpha__) || defined(__ARMEL__)
+ || defined(__alpha__) || defined(__ARMEL__) \
+ || (defined(__sh__) && defined(__LITTLE_ENDIAN__))
# undef WORDS_BIGENDIAN
#else
Reply to: