Build code with arm-linux-gcc-4.3.2 have endian error.

asked 2014-08-21 04:40:44 -0700

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

When I build code with the follow scons option:
scons CPU=arm OS=linux OE_BASE=/usr/local/arm/4.3.2/

I receive after few minutes the follow error message:

    [CXX]     /home/waner/work/AllJoyn/alljoyn-suite-14.06.00_beta-src/core/alljoyn/common/src/BufferedSink.cc  
[CXX]     /home/waner/work/AllJoyn/alljoyn-suite-14.06.00_beta-src/core/alljoyn/common/src/BufferedSource.cc  
[CXX]     /home/waner/work/AllJoyn/alljoyn-suite-14.06.00_beta-src/core/alljoyn/common/src/CertificateECC.cc

269:error: 'htobe32' was not declared in this scope
In member function 'virtual void qcc::CertificateType1::SetVersion(uint32_t)':
356:error: 'htobe32' was not declared in this scope
In member function 'void qcc::CertificateType1::SetValidity(const qcc::Certificate::ValidPeriod)':
374: error: 'htobe64' was not declared in this scope
In member function 'virtual void qcc::CertificateType2::SetVersion(uint32_t)': /home/waner/work/AllJoyn/alljoyn-suite-14.06.00_beta-src/core/alljoyn/common/src/CertificateECC.cc:
493: error: 'htobe32' was not declared in this scope
In member function 'void qcc::CertificateType2::SetValidity(const qcc::Certificate::ValidPeriod
511: error: 'htobe64' was not declared in this scope
scons: * [/home/waner/work/AllJoyn/alljoyn-suite-14.06.00_beta-src /core/alljoyn/common/build/linux/arm/debug/obj/CertificateECC.o] Error 1
scons: building terminated because of errors.

How can solve this problem? Which library is need?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-08-22 10:56:16 -0700

stevek gravatar image

The CPU=arm for OS=linux options for scons is a very old vestige from the earliest days of AllJoyn development. It has not been supported for years. It is something that needs to be removed.

If you wish to cross-compile Linux, I suggest using the OpenWrt platform: OS=openwrt CPU=openwrt. It's basically Linux but setup for cross compilation. Unfortunately, you will need to specify many parameters for the various tools:

TARGET_PATH - path to the cross-compiler tools
TARGET_CC - full name of the C compiler (e.g., mips-openwrt-linux-uclibc-gcc)
TARGET_CXX - full name of the C++ compiler
TARGET_LINK - full name of the linker (typically the same as the C compiler)
TARGET_AR - full name of the static library archiver
TARGET_RANLIB - full name of the ranlib tool
TARGET_CFLAGS - platform C flags
TARGET_CPPFLAGS - platform C++ flags
TARGET_LINKFLAGS - platform linker flags
STAGING_DIR - path the equivalent of the target root directory on the host
edit flag offensive delete publish link more


Does this means he still uses scons, just on a platform built by openwrt? If so, would that also mean that I could only effectively and easily build alljoyn on those platforms supported by OpenWRT (that aren't cross-compiled)?

borromeotlhs ( 2014-09-23 16:56:52 -0700 )edit

@borromeotlhs No. What this means is that on a desktop Linux system, such as Ubunutu, you would use the openwrt platform to cross-compile AllJoyn to your Linux based target platform. The openwrt platform is a generic Linux build configuration where each tool must be explicitly set. If you want a more detailed response on how to use the openwrt platform to build host side on non-x86 then I suggest making a new question.

stevek ( 2014-09-24 11:28:28 -0700 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2014-08-21 04:40:44 -0700

Seen: 548 times

Last updated: Aug 22 '14