LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-24-2010, 02:55 AM   #1
LVsFINEST
Member
 
Registered: Aug 2006
Posts: 99

Rep: Reputation: 21
Dbyte_order_(big|little)_endian


I'm trying to compile hping3 on CentOS 5.5 X64 and getting the following:

Code:
[root@forge hping3-20051105]# ./configure --no-tcl
build byteorder.c...
create byteorder.h...
===> Found Tclsh in: /usr/bin/tclsh8.4
==> WARNING: no Tcl header files found!
--------------------------------------
system type: LINUX

LIBPCAP      : PCAP=-lpcap
PCAP_INCLUDE : 
MANPATH      : /usr/local/man
USE_TCL      : 
TCL_VER      : 
TCL_INC      : 
LIBTCL       : 
TCLSH        : /usr/bin/tclsh8.4

(to modify try configure --help)
--------------------------------------
creating Makefile...
creating dependences...
In file included from ars.h:20,
                 from apd.c:19:
bytesex.h:22:3: error: #error can not find the byte order for this architecture, fix bytesex.h
In file included from apd.c:19:
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 ars.c:24:
bytesex.h:22:3: error: #error can not find the byte order for this architecture, fix bytesex.h
In file included from ars.c:24:
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 arsglue.c:7:
bytesex.h:22:3: error: #error can not find the byte order for this architecture, fix bytesex.h
In file included from arsglue.c:7:
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 rapd.c:11:
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'
I've tried adding -DBYTE_ORDER_(BIG|LITTLE)_ENDIAN to the Makefile and it didn't help. I noticed it says "fix bytesex.h", so I tried adding it there too and that didn't help either. There's code in bytesex.h regarding BIG/LITTLE ENDIAN too:

Code:
#ifndef ARS_BYTESEX_H
#define ARS_BYTESEX_H

#if     defined(__i386__) \
        || defined(__alpha__) \
        || (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 */
Can anybody make sense of this? I've ran into compilation errors before with other software but nothing quite as kinky as this.
 
Old 08-25-2010, 10:48 AM   #2
Hidden Windshield
Member
 
Registered: Jul 2010
Distribution: Fedora
Posts: 68

Rep: Reputation: 27
The pipe symbol in parenthesis is a short way of saying "either-or". It's trying to tell you to add either "-DBYTE_ORDER_BIG_ENDIAN" or "-DBYTE_ORDER_LITTLE_ENDIAN" to the Makefile, depending on whether the machine you're trying to run this on is big-endian or little-endian. However, exactly where to add it can be a little tricky, since the Makefile will usually be regenerated from Makefile.in by configure, and it might need to be put in at several different places.

You're probably better off editing bytesex.h. Comment out the "# error" line, and add "#define BYTE_ORDER_BIG_ENDIAN" or "#define BYTE_ORDER_LITTLE_ENDIAN" just after it, again, depending on your architecture.
 
1 members found this post helpful.
Old 08-31-2010, 03:46 AM   #3
LVsFINEST
Member
 
Registered: Aug 2006
Posts: 99

Original Poster
Rep: Reputation: 21
Ahhhh, just like grep, I should have known that.

I added #define BYTE_ORDER_LITTLE_ENDIAN to bytesex.h after commenting out the error line and hping3 compiled successfully! I really appreciate the help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Big O, Big Omega, and Big Theta oulevon Programming 7 05-26-2010 07:18 AM
LXer: Why Big Compute and Big Storage will meet Big Pipe at the Last Mile LXer Syndicated Linux News 0 12-23-2007 01:20 PM
BIG BIG PROBLEM with nvidia driver for linux x86 basshead62887 Linux - Hardware 5 09-12-2007 12:33 AM
LXer: Big Blue's big green server transfer LXer Syndicated Linux News 0 08-02-2007 05:46 PM
LXer: Ibm VP Scott Handy on Big Blue's Big Plans for Open Source LXer Syndicated Linux News 0 04-07-2007 10:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration