Error Cannot Find The Byte Order For This Architecture
#1 SMP Fri Jul 20 01:55:29 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux [root@localhost hping3-20051105]# cat /etc/redhat-release CentOS release 6.3 (Final) Symptom: [root@localhost hping3-20051105]#./configure bytesex.h:22:3: error: #error can not find the byte order for this architecture, fix bytesex.h In file included from rapd.c:11: ars.h:190:2: error: #error "Please, edit Makefile and add -DBYTE_ORDER_(BIG|LITTLE)_ENDIAN" ars.h:254:2: error: #error "Please, edit Makefile and add -DBYTE_ORDER_(BIG|LITTLE)_ENDIAN" ars.h:323:2: error: #error "Please, edit Makefile and add -DBYTE_ORDER_(BIG|LITTLE)_ENDIAN" In file included from ars.h:20, from split.c:11: bytesex.h:22:3: error: #error can not find the byte order for this architecture, fix bytesex.h In file included from split.c:11: ars.h:190:2: error: #error "Please, edit Makefile and add -DBYTE_ORDER_(BIG|LITTLE)_ENDIAN" ars.h:254:2: error: #error "Please, edit Makefile and add -DBYTE_ORDER_(BIG|LITTLE)_ENDIAN" ars.h:323:2: error: #error "Please, edit Makefile and add -DBYTE_ORDER_(BIG|LITTLE)_ENDIAN" now you can try `make' To resolve: Since this was a x86_64 architecture, and it was not in the bytesex.h you just need to add in a line as below and ./configure again. [root@localhost hping3-20051105]# cat bytesex.h /* Original code from the Linux C library */ /* Copyright (C) 2000,2001 Salvatore Sanfilippo * This code is under the original GNU C library license (GPL) */ /* $Id: bytesex.h,v 1.1.1.1 2003/08/31 17:23:48 antirez Exp $ */ #ifndef ARS_BYTESEX_H #define ARS_BYTESEX_H #if defined(__i386__) \ || defined(__alpha__) \ || defined(__x86_64__) \ || (defined(__mips__) && (defined(MIPSEL) || defined (__MIPSEL__))) #define BYTE_ORDER_LITTLE_ENDIAN #elif defined(__mc68000__) \ || defined (__sparc__) \ || defined (__sparc) \ || defined (__PPC__) \ || defined (__BIG_ENDIAN__) \ || (defined(__mips__) && (defined(MIPSEB) || defined (__MIPSEB__))) #define BYTE_ORDER_BIG_ENDIAN #else # error can not find the byte order for this architecture, fix bytesex.h #endif #endif /* ARS_BYTESEX_H */ Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest Labels: System - Linux - Security Post a Comment Newer Post Older Post Home Su
Sign in Pricing Blog Support Search GitHub This repository Watch 26 Star 120 Fork 43 freebsd/poudriere Code Issues 98 Pull requests 16 Projects 0 Wiki Pulse Graphs Permalink Branch: master Switch branches/tags Branches Tags c_version dragonfly master port_new_packages release-3.1 test_fd_updates unionfs Nothing to show 3.1.14 3.1.13 3.1.12 3.1.11 3.1.10 3.1.9 3.1.8 3.1.7 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.1-rc3 3.1-rc2 3.1-rc1 3.0.19 3.0.18 3.0.17 3.0.16 3.0.15 3.0.14 3.0.13 3.0.12 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 http://antmeetspenguin.blogspot.com/2012/08/hping3-error-dbyteorderbiglittleendian.html 3.0.4 3.0.3 3.0.2 3.0.1 3.0 2.4.2 2.4.1 2.4 2.3.1 2.3 2.2 2.1.2 2.1.1 2.1.0 2.0.1 2.0.0 1.5.4 1.5.3 1.5.2 1.5.1 1.5.0 1.4.1 1.4 1.3.1 1.3 1.2 1.1 1.0 Nothing to show Find file Copy path poudriere/src/share/poudriere/processonelog.sh Fetching contributors… Cannot retrieve contributors at this time Raw Blame History executable file 162 lines (153 sloc) 14.3 KB #!/bin/sh # https://github.com/freebsd/poudriere/blob/master/src/share/poudriere/processonelog.sh $FreeBSD$ # # Read a single errorlogfile and output a reason. # # Originally factored out of portbuild's processonelog # XXX MCL note: not up-to-date with: # http://www.marcuscom.com:8080/cgi-bin/cvsweb.cgi/portstools/tinderbox/sql/values.{lp|pfp|pfr} filename=$1 if bzgrep -qE "(Error: mtree file ./etc/mtree/BSD.local.dist. is missing|error in pkg_delete|filesystem was touched prior to .make install|list of extra files and directories|list of files present before this port was installed|list of filesystem changes from before and after|Error: Files or directories left over|Error: Filesystem touched during build)" $1; then reason="mtree" elif bzgrep -qE "(Error: Filesystem touched during stage|Error: stage-qa failures)" $1; then reason="stage" # note: must run before the configure_error check elif bzgrep -qE "Configuration .* not supported" $1; then reason="arch" elif bzgrep -qE '(configure: error:|Script.*configure.*failed unexpectedly|script.*failed: here are the contents of)' $1; then if bzgrep -qE "configure: error: cpu .* not supported" $1; then reason="arch" elif bzgrep -qE "configure: error: [Pp]erl (5.* required|version too old)" $1; then reason="perl" elif bzgrep -q 'sem_wait: Invalid argument' $1; then reason="sem_wait" else reason="configure_error" fi elif bzgrep -q "invalid DSO for symbol" $1; then reason="missing_LDFL
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting http://stackoverflow.com/questions/2100331/c-macro-definition-to-determine-big-endian-or-little-endian-machine ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up C Macro definition to determine big endian or little endian machine? up vote 74 down vote favorite 49 Is there a one line macro definition to determine the endianness of the machine. I am using the following code error cannot but converting it to macro would be too long. unsigned char test_endian( void ) { int test_var = 1; unsigned char test_endian* = (unsigned char*)&test_var; return (test_endian[0] == NULL); } c++ c architecture macros endianness share|improve this question asked Jan 20 '10 at 9:43 manav m-n 4,13694684 2 Why not include the same code into a macro? –sharptooth Jan 20 '10 at 9:46 3 You can't portably determine endianness with the C preprocessor alone. You also want 0 instead of error cannot find NULL in your final test, and change one of the test_endian objects to something else :-). –Alok Singhal Jan 20 '10 at 9:48 2 Also why is a macro necessary? Inline function would do the same and is much safer. –sharptooth Jan 20 '10 at 9:49 9 @Sharptooth, a macro is appealing because its value may be known at compile time, meaning you could use your platform's endianness to control template instantiation, for example, or maybe even select different blocks of code with an #if directive. –Rob Kennedy Apr 8 '10 at 5:08 1 @DavidM.Syzdek The data format on the wire must be in a known, specified format (usually network order). You do not need to know the endianness of your platform to write to that specific format; you can write endian-agnostic code by writing one byte at a time (e.g. fputc((value >> 24) & 0xFF, fp), fputc((value >> 16) & 0xFF, fp) ...) –jamesdlin May 15 '14 at 0:30 | show 4 more comments 15 Answers 15 active oldest votes up vote 75 down vote accepted Code supporting arbitrary byte orders, ready to be put into a file called order32.h: #ifndef ORDER32_H #define ORDER32_H #include