svenxie / redis

Automatically exported from code.google.com/p/redis
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

report "sha1.c:78:2: error: #error "Undefined or invalid BYTE_ORDER"" while compling redis2.2.12 with "gcc -m64" option #646

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What version of Redis you are using, in what kind of Operating System?
redis-2.2.12

What is the problem you are experiencing?

sha1.c:78:2: error: #error "Undefined or invalid BYTE_ORDER"
sha1.c:91:2: error: #error "Endianness not defined!"
sha1.c: In function a€?SHA1Transforma€?:
sha1.c:131: warning: implicit declaration of function a€?blk0a€?
make: *** [sha1.o] Error 1

What steps will reproduce the problem?

$export CC="gcc -m64"

$cd redis-2.2.12/src
$make

./mkreleasehdr.sh: git: not found
./mkreleasehdr.sh: git: not found
MAKE hiredis
cd ../deps/hiredis && make static ARCH=""
make[1]: Entering directory `/home/demo/redis-2.2.12/deps/hiredis'
gcc -m64 -c -std=c99 -pedantic -O3 -fPIC -Wall -W -D__EXTENSIONS__ -D_XPG6    
-g -ggdb  net.c
gcc -m64 -c -std=c99 -pedantic -O3 -fPIC -Wall -W -D__EXTENSIONS__ -D_XPG6    
-g -ggdb  hiredis.c
gcc -m64 -c -std=c99 -pedantic -O3 -fPIC -Wall -W -D__EXTENSIONS__ -D_XPG6    
-g -ggdb  sds.c
gcc -m64 -c -std=c99 -pedantic -O3 -fPIC -Wall -W -D__EXTENSIONS__ -D_XPG6    
-g -ggdb  async.c
ar rcs libhiredis.a net.o hiredis.o sds.o async.o
make[1]: Leaving directory `/home/demo/redis-2.2.12/deps/hiredis'
MAKE linenoise
cd ../deps/linenoise && make ARCH=""
make[1]: Entering directory `/home/demo/redis-2.2.12/deps/linenoise'
gcc -m64  -c -Wall -W -Os -g linenoise.c
gcc -m64  -c -Wall -W -Os -g example.c
gcc -m64  -Wall -W -Os -g -o linenoise_example linenoise.o example.o
make[1]: Leaving directory `/home/demo/redis-2.2.12/deps/linenoise'
    CC ae.o
    CC anet.o
    CC redis-benchmark.o
    CC sds.o
    CC adlist.o
    CC zmalloc.o
MAKE hiredis
cd ../deps/hiredis && make static ARCH=""
make[1]: Entering directory `/home/demo/redis-2.2.12/deps/hiredis'
make[1]: Nothing to be done for `static'.
make[1]: Leaving directory `/home/demo/redis-2.2.12/deps/hiredis'
    LINK redis-benchmark
    CC redis-cli.o
    CC release.o
    LINK redis-cli
    CC redis-check-dump.o
    CC lzf_c.o
    CC lzf_d.o
    LINK redis-check-dump
    CC redis-check-aof.o
    LINK redis-check-aof
    CC dict.o
    CC redis.o
    CC pqsort.o
    CC zipmap.o
    CC sha1.o
sha1.c:78:2: error: #error "Undefined or invalid BYTE_ORDER"
sha1.c:91:2: error: #error "Endianness not defined!"
sha1.c: In function a€?SHA1Transforma€?:
sha1.c:131: warning: implicit declaration of function a€?blk0a€?
make: *** [sha1.o] Error 1

Do you have an INFO output? Please past it here.
please refer to previous section

If it is a crash, can you please paste the stack trace that you can find in the 
log file or on standard output? This is really useful for us!

Please provide any additional information below.
uname -a
SunOS vmsuncn17 5.10 Generic_142910-17 i86pc i386 i86pc Solaris

Release: 5.10
Kernel architecture: i86pc
Application architecture: i386
Hardware provider:
Domain:
Kernel version: SunOS 5.10 Generic_142910-17
 gcc -v
Using built-in specs.
Target: i386-pc-solaris2.10
Configured with: ../configure --with-as=/usr/ccs/bin/as 
--with-ld=/usr/ccs/bin/ld --enable-shared --enable-languages=c,c++ 
--prefix=/usr/local/gcc4
Thread model: posix
gcc version 4.4.3 (GCC)

 isainfo -v
64-bit amd64 applications
        pclmulqdq aes sse4.2 sse4.1 ssse3 popcnt tscp cx16 sse3 sse2 sse fxsr
        mmx cmov amd_sysc cx8 tsc fpu
32-bit i386 applications
        pclmulqdq aes sse4.2 sse4.1 ssse3 popcnt tscp cx16 sse3 sse2 sse fxsr
        mmx cmov sep cx8 tsc fpu

Original issue reported on code.google.com by wxd...@gmail.com on 25 Aug 2011 at 9:39