Revision history [back]

click to hide/show revision 1
initial version

Scons error 127 for OpenWrt

Hello,

Scons command line is the following:

scons V=1 ICE=off BR=on BT=off WS=off CPU=openwrt OS=openwrt BINDINGS="core,cpp" SERVICES="about,notification,controlpanel,config" VARIANT=release "TARGET_CFLAGS=-march=4181 -fPIC -mllsc" "TARGET_CC=mips-linux-gcc" "TARGET_CXX=mips-linux-g++" "TARGET_AR=mips-linux-ar" "TARGET_RANLIB=mips-linux-ranlib" "TARGET_LINK=mips-linux-gcc" "TARGET_CPPFLAGS=-I/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/include -I/home/full-package/rtl819x/toolchain/include/c++ -I/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/include/c++/mips-linux -I/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/include/c++/backward -I/home/full-package/rtl819x/users/hostapd-0.6.10/src" "TARGET_PATH=/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/bin" "TARGET_LINKFLAGS=-L/home/full-package/rtl819x/users/openssl-0.9.8i -L/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/lib/debug" "STAGING_DIR=/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225"

The output is:

scons: Reading SConscript files ... Building bindings: cpp, core Building services: notification, about, controlpanel, config GTEST_DIR not specified skipping common unit test build GTEST_DIR not specified skipping alljoyn_core unit test build GTEST_DIR not specified skipping About Service unit test build scons: done reading SConscript files. scons: Building targets ... mips-linux-g++ -o alljoyn_core/build/openwrt/openwrt/release/obj/AllJoynCrypto.o -c -std=c++0x -fno-exceptions -march=4181 -fPIC -mllsc -Wno-deprecated -DNDEBUG -DQCC_OS_GROUP_POSIX -DQCC_OS_LINUX -Ibuild/openwrt/openwrt/release/dist/cpp/inc -Ibuild/openwrt/openwrt/release/dist/c/inc -Ibuild/openwrt/openwrt/release/dist/cpp/inc/alljoyn -Icommon/inc -Ialljoyn_core/src alljoyn_core/src/AllJoynCrypto.cc scons: * [alljoyn_core/build/openwrt/openwrt/release/obj/AllJoynCrypto.o] Error 127 scons: building terminated because of errors.

There are no detailed diagnostics about error. It seems "TARGET_PATH" is not set. Also "-I/path" options from "TARGET_CPPFLAGS" also are not set. What is wrong in scons command line?

I tried to execute the same compiler command added path to compiler and include directories, compilation was successfull.

click to hide/show revision 2
No.2 Revision

Scons error 127 for OpenWrt

Hello,

Scons command line is the following:

scons V=1 ICE=off BR=on BT=off WS=off CPU=openwrt OS=openwrt BINDINGS="core,cpp" SERVICES="about,notification,controlpanel,config" VARIANT=release "TARGET_CFLAGS=-march=4181 -fPIC -mllsc" "TARGET_CC=mips-linux-gcc" "TARGET_CXX=mips-linux-g++" "TARGET_AR=mips-linux-ar" "TARGET_RANLIB=mips-linux-ranlib" "TARGET_LINK=mips-linux-gcc" "TARGET_CPPFLAGS=-I/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/include -I/home/full-package/rtl819x/toolchain/include/c++ -I/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/include/c++/mips-linux -I/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/include/c++/backward -I/home/full-package/rtl819x/users/hostapd-0.6.10/src" "TARGET_PATH=/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/bin" "TARGET_LINKFLAGS=-L/home/full-package/rtl819x/users/openssl-0.9.8i -L/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/lib/debug" "STAGING_DIR=/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225" 

"STAGING_DIR=/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225"

The output is:

scons: Reading SConscript files ...
Building bindings: cpp, core
Building services: notification, about, controlpanel, config
GTEST_DIR not specified skipping common unit test build
GTEST_DIR not specified skipping alljoyn_core unit test build
GTEST_DIR not specified skipping About Service unit test build
scons: done reading SConscript files.
scons: Building targets ...
mips-linux-g++ -o alljoyn_core/build/openwrt/openwrt/release/obj/AllJoynCrypto.o -c -std=c++0x -fno-exceptions -march=4181 -fPIC -mllsc -Wno-deprecated -DNDEBUG -DQCC_OS_GROUP_POSIX -DQCC_OS_LINUX -Ibuild/openwrt/openwrt/release/dist/cpp/inc -Ibuild/openwrt/openwrt/release/dist/c/inc -Ibuild/openwrt/openwrt/release/dist/cpp/inc/alljoyn -Icommon/inc -Ialljoyn_core/src alljoyn_core/src/AllJoynCrypto.cc
scons: * *** [alljoyn_core/build/openwrt/openwrt/release/obj/AllJoynCrypto.o] Error 127
scons: building terminated because of errors.

errors.

There are no detailed diagnostics about error. It seems "TARGET_PATH" is not set. Also "-I/path" options from "TARGET_CPPFLAGS" also are not set. What is wrong in scons command line?

I tried to execute the same compiler command added path to compiler and include directories, compilation was successfull.

click to hide/show revision 3
retagged

Scons error 127 for OpenWrt

Hello,

Scons command line is the following:

scons V=1 ICE=off BR=on BT=off WS=off CPU=openwrt OS=openwrt BINDINGS="core,cpp" SERVICES="about,notification,controlpanel,config" VARIANT=release "TARGET_CFLAGS=-march=4181 -fPIC -mllsc" "TARGET_CC=mips-linux-gcc" "TARGET_CXX=mips-linux-g++" "TARGET_AR=mips-linux-ar" "TARGET_RANLIB=mips-linux-ranlib" "TARGET_LINK=mips-linux-gcc" "TARGET_CPPFLAGS=-I/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/include -I/home/full-package/rtl819x/toolchain/include/c++ -I/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/include/c++/mips-linux -I/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/include/c++/backward -I/home/full-package/rtl819x/users/hostapd-0.6.10/src" "TARGET_PATH=/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/bin" "TARGET_LINKFLAGS=-L/home/full-package/rtl819x/users/openssl-0.9.8i -L/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/lib/debug" "STAGING_DIR=/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225"

The output is:

scons: Reading SConscript files ...
Building bindings: cpp, core
Building services: notification, about, controlpanel, config
GTEST_DIR not specified skipping common unit test build
GTEST_DIR not specified skipping alljoyn_core unit test build
GTEST_DIR not specified skipping About Service unit test build
scons: done reading SConscript files.
scons: Building targets ...
mips-linux-g++ -o alljoyn_core/build/openwrt/openwrt/release/obj/AllJoynCrypto.o -c -std=c++0x -fno-exceptions -march=4181 -fPIC -mllsc -Wno-deprecated -DNDEBUG -DQCC_OS_GROUP_POSIX -DQCC_OS_LINUX -Ibuild/openwrt/openwrt/release/dist/cpp/inc -Ibuild/openwrt/openwrt/release/dist/c/inc -Ibuild/openwrt/openwrt/release/dist/cpp/inc/alljoyn -Icommon/inc -Ialljoyn_core/src alljoyn_core/src/AllJoynCrypto.cc
scons: *** [alljoyn_core/build/openwrt/openwrt/release/obj/AllJoynCrypto.o] Error 127
scons: building terminated because of errors.

There are no detailed diagnostics about error. It seems "TARGET_PATH" is not set. Also "-I/path" options from "TARGET_CPPFLAGS" also are not set. What is wrong in scons command line?

I tried to execute the same compiler command added path to compiler and include directories, compilation was successfull.

Scons error 127 for OpenWrt

Hello,

Scons command line is the following:

scons V=1 ICE=off BR=on BT=off WS=off CPU=openwrt OS=openwrt BINDINGS="core,cpp" SERVICES="about,notification,controlpanel,config" VARIANT=release "TARGET_CFLAGS=-march=4181 -fPIC -mllsc" "TARGET_CC=mips-linux-gcc" "TARGET_CXX=mips-linux-g++" "TARGET_AR=mips-linux-ar" "TARGET_RANLIB=mips-linux-ranlib" "TARGET_LINK=mips-linux-gcc" "TARGET_CPPFLAGS=-I/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/include -I/home/full-package/rtl819x/toolchain/include/c++ -I/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/include/c++/mips-linux -I/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/include/c++/backward -I/home/full-package/rtl819x/users/hostapd-0.6.10/src" "TARGET_PATH=/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/bin" "TARGET_LINKFLAGS=-L/home/full-package/rtl819x/users/openssl-0.9.8i -L/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/lib/debug" "STAGING_DIR=/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225"

The output is:

scons: Reading SConscript files ...
Building bindings: cpp, core
Building services: notification, about, controlpanel, config
GTEST_DIR not specified skipping common unit test build
GTEST_DIR not specified skipping alljoyn_core unit test build
GTEST_DIR not specified skipping About Service unit test build
scons: done reading SConscript files.
scons: Building targets ...
mips-linux-g++ -o alljoyn_core/build/openwrt/openwrt/release/obj/AllJoynCrypto.o -c -std=c++0x -fno-exceptions -march=4181 -fPIC -mllsc -Wno-deprecated -DNDEBUG -DQCC_OS_GROUP_POSIX -DQCC_OS_LINUX -Ibuild/openwrt/openwrt/release/dist/cpp/inc -Ibuild/openwrt/openwrt/release/dist/c/inc -Ibuild/openwrt/openwrt/release/dist/cpp/inc/alljoyn -Icommon/inc -Ialljoyn_core/src alljoyn_core/src/AllJoynCrypto.cc
scons: *** [alljoyn_core/build/openwrt/openwrt/release/obj/AllJoynCrypto.o] Error 127
scons: building terminated because of errors.

There are no detailed diagnostics about error. It seems "TARGET_PATH" is not set. Also "-I/path" options from "TARGET_CPPFLAGS" also are not set. What is wrong in scons command line?

I tried to execute the same compiler command added path to compiler and include directories, compilation was successfull.

CPPPATH variable is used in openwrt script to set CPATH:

env['ENV']['CPATH']=':'.join(flags['CPPPATH'])

I added debug output in the script file: print flags

CPPPATH is empty even if I add it in the command line.

{'CPPFLAGS': [], 'FRAMEWORKPATH': [], 'LIBPATH': [], 'CXXFLAGS': [], 'LIBS': [], 'ASFLAGS': [], 'LINKFLAGS': [], 'RPATH': [], 'CPPDEFINES': [], 'FRAMEWORKS': [], 'CCFLAGS': ['-mllsc', '-fPIC', '-march=4181', '-mllsc', '-fPIC', '-march=4181'], 'CFLAGS': [], 'CPPPATH': []}

So I changed the script:

comment the line "env['ENV']['CPATH']=':'.join(flags['CPPPATH'])"

And set:

env['ENV']['CPATH']=':/full-package/rtl819x/users/openssl-0.9.8i:/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/include/c++/mips-linux:/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/include/c++:/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/include/c++/backward'

The code is compiling.

Maybe you can advice more convenient way to set CPATH? :)

Scons error 127 for OpenWrt

Hello,

Scons command line is the following:

scons V=1 ICE=off BR=on BT=off WS=off CPU=openwrt OS=openwrt BINDINGS="core,cpp" SERVICES="about,notification,controlpanel,config" VARIANT=release "TARGET_CFLAGS=-march=4181 -fPIC -mllsc" "TARGET_CC=mips-linux-gcc" "TARGET_CXX=mips-linux-g++" "TARGET_AR=mips-linux-ar" "TARGET_RANLIB=mips-linux-ranlib" "TARGET_LINK=mips-linux-gcc" "TARGET_CPPFLAGS=-I/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/include -I/home/full-package/rtl819x/toolchain/include/c++ -I/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/include/c++/mips-linux -I/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/include/c++/backward -I/home/full-package/rtl819x/users/hostapd-0.6.10/src" "TARGET_PATH=/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/bin" "TARGET_LINKFLAGS=-L/home/full-package/rtl819x/users/openssl-0.9.8i -L/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/lib/debug" "STAGING_DIR=/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225"

The output is:

scons: Reading SConscript files ...
Building bindings: cpp, core
Building services: notification, about, controlpanel, config
GTEST_DIR not specified skipping common unit test build
GTEST_DIR not specified skipping alljoyn_core unit test build
GTEST_DIR not specified skipping About Service unit test build
scons: done reading SConscript files.
scons: Building targets ...
mips-linux-g++ -o alljoyn_core/build/openwrt/openwrt/release/obj/AllJoynCrypto.o -c -std=c++0x -fno-exceptions -march=4181 -fPIC -mllsc -Wno-deprecated -DNDEBUG -DQCC_OS_GROUP_POSIX -DQCC_OS_LINUX -Ibuild/openwrt/openwrt/release/dist/cpp/inc -Ibuild/openwrt/openwrt/release/dist/c/inc -Ibuild/openwrt/openwrt/release/dist/cpp/inc/alljoyn -Icommon/inc -Ialljoyn_core/src alljoyn_core/src/AllJoynCrypto.cc
scons: *** [alljoyn_core/build/openwrt/openwrt/release/obj/AllJoynCrypto.o] Error 127
scons: building terminated because of errors.

There are no detailed diagnostics about error. It seems "TARGET_PATH" is not set. Also "-I/path" options from "TARGET_CPPFLAGS" also are not set. What is wrong in scons command line?

I tried to execute the same compiler command added path to compiler and include directories, compilation was successfull.

CPPPATH variable is used in openwrt script to set CPATH:

env['ENV']['CPATH']=':'.join(flags['CPPPATH'])

I added debug output in the script file: print flags

CPPPATH is empty even if I add it in the command line.

{'CPPFLAGS': [], 'FRAMEWORKPATH': [], 'LIBPATH': [], 'CXXFLAGS': [], 'LIBS': [], 'ASFLAGS': [], 'LINKFLAGS': [], 'RPATH': [], 'CPPDEFINES': [], 'FRAMEWORKS': [], 'CCFLAGS': ['-mllsc', '-fPIC', '-march=4181', '-mllsc', '-fPIC', '-march=4181'], 'CFLAGS': [], 'CPPPATH': []}

So I changed the script:

comment the line "env['ENV']['CPATH']=':'.join(flags['CPPPATH'])"

And set:

env['ENV']['CPATH']=':/full-package/rtl819x/users/openssl-0.9.8i:/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/include/c++/mips-linux:/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/include/c++:/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/include/c++/backward'

The code is compiling.

Maybe you can advice more convenient way to set CPATH? :)

{updated information]

Linker command line with error:

mips-linux-g++ -o alljoyn_core/build/openwrt/openwrt/release/obj/liballjoyn.so -shared common/build/openwrt/openwrt/release/obj/ASN1.os common/build/openwrt/openwrt/release/obj/BigNum.os common/build/openwrt/openwrt/release/obj/BufferedSink.os common/build/openwrt/openwrt/release/obj/BufferedSource.os common/build/openwrt/openwrt/release/obj/CertificateECC.os common/build/openwrt/openwrt/release/obj/Config.os common/build/openwrt/openwrt/release/obj/Crypto.os common/build/openwrt/openwrt/release/obj/CryptoECC.os common/build/openwrt/openwrt/release/obj/CryptoSRP.os common/build/openwrt/openwrt/release/obj/Debug.os common/build/openwrt/openwrt/release/obj/GUID.os common/build/openwrt/openwrt/release/obj/IODispatch.os common/build/openwrt/openwrt/release/obj/IPAddress.os common/build/openwrt/openwrt/release/obj/KeyBlob.os common/build/openwrt/openwrt/release/obj/Logger.os common/build/openwrt/openwrt/release/obj/Pipe.os common/build/openwrt/openwrt/release/obj/SLAPPacket.os common/build/openwrt/openwrt/release/obj/SLAPStream.os common/build/openwrt/openwrt/release/obj/SocketStream.os common/build/openwrt/openwrt/release/obj/Stream.os common/build/openwrt/openwrt/release/obj/StreamPump.os common/build/openwrt/openwrt/release/obj/String.os common/build/openwrt/openwrt/release/obj/StringSource.os common/build/openwrt/openwrt/release/obj/StringUtil.os common/build/openwrt/openwrt/release/obj/ThreadPool.os common/build/openwrt/openwrt/release/obj/Timer.os common/build/openwrt/openwrt/release/obj/Util.os common/build/openwrt/openwrt/release/obj/XmlElement.os common/build/openwrt/openwrt/release/obj/os/Environ.os common/build/openwrt/openwrt/release/obj/os/Event.os common/build/openwrt/openwrt/release/obj/os/FileStream.os common/build/openwrt/openwrt/release/obj/os/IfConfigDarwin.os common/build/openwrt/openwrt/release/obj/os/IfConfigLinux.os common/build/openwrt/openwrt/release/obj/os/Mutex.os common/build/openwrt/openwrt/release/obj/os/OSLogger.os common/build/openwrt/openwrt/release/obj/os/RWLock.os common/build/openwrt/openwrt/release/obj/os/Socket.os common/build/openwrt/openwrt/release/obj/os/SslSocket.os common/build/openwrt/openwrt/release/obj/os/Thread.os common/build/openwrt/openwrt/release/obj/os/UARTStreamDarwin.os common/build/openwrt/openwrt/release/obj/os/UARTStreamLinux.os common/build/openwrt/openwrt/release/obj/os/atomic.os common/build/openwrt/openwrt/release/obj/os/osUtil.os common/build/openwrt/openwrt/release/obj/os/time.os common/build/openwrt/openwrt/release/obj/crypto/CryptoAES.os common/build/openwrt/openwrt/release/obj/crypto/CryptoHash.os common/build/openwrt/openwrt/release/obj/crypto/CryptoRSA.os common/build/openwrt/openwrt/release/obj/crypto/CryptoRand.os common/build/openwrt/openwrt/release/obj/crypto/OpenSsl.os alljoyn_core/build/openwrt/openwrt/release/obj/AllJoynCrypto.os alljoyn_core/build/openwrt/openwrt/release/obj/AllJoynPeerObj.os alljoyn_core/build/openwrt/openwrt/release/obj/AllJoynStd.os alljoyn_core/build/openwrt/openwrt/release/obj/AuthMechLogon.os alljoyn_core/build/openwrt/openwrt/release/obj/AuthMechPIN.os alljoyn_core/build/openwrt/openwrt/release/obj/AuthMechRSA.os alljoyn_core/build/openwrt/openwrt/release/obj/AuthMechSRP.os alljoyn_core/build/openwrt/openwrt/release/obj/BusAttachment.os alljoyn_core/build/openwrt/openwrt/release/obj/BusEndpoint.os alljoyn_core/build/openwrt/openwrt/release/obj/BusObject.os alljoyn_core/build/openwrt/openwrt/release/obj/BusUtil.os alljoyn_core/build/openwrt/openwrt/release/obj/ClientRouter.os alljoyn_core/build/openwrt/openwrt/release/obj/ClientTransport.os alljoyn_core/build/openwrt/openwrt/release/obj/CompressionRules.os alljoyn_core/build/openwrt/openwrt/release/obj/CredentialAccessor.os alljoyn_core/build/openwrt/openwrt/release/obj/DBusCookieSHA1.os alljoyn_core/build/openwrt/openwrt/release/obj/DBusStd.os alljoyn_core/build/openwrt/openwrt/release/obj/EndpointAuth.os alljoyn_core/build/openwrt/openwrt/release/obj/InterfaceDescription.os alljoyn_core/build/openwrt/openwrt/release/obj/KeyExchanger.os alljoyn_core/build/openwrt/openwrt/release/obj/KeyStore.os alljoyn_core/build/openwrt/openwrt/release/obj/LocalTransport.os alljoyn_core/build/openwrt/openwrt/release/obj/Message.os alljoyn_core/build/openwrt/openwrt/release/obj/Message_Gen.os alljoyn_core/build/openwrt/openwrt/release/obj/Message_Parse.os alljoyn_core/build/openwrt/openwrt/release/obj/MethodTable.os alljoyn_core/build/openwrt/openwrt/release/obj/MsgArg.os alljoyn_core/build/openwrt/openwrt/release/obj/NullTransport.os alljoyn_core/build/openwrt/openwrt/release/obj/PasswordManager.os alljoyn_core/build/openwrt/openwrt/release/obj/PeerState.os alljoyn_core/build/openwrt/openwrt/release/obj/ProtectedAuthListener.os alljoyn_core/build/openwrt/openwrt/release/obj/ProxyBusObject.os alljoyn_core/build/openwrt/openwrt/release/obj/RemoteEndpoint.os alljoyn_core/build/openwrt/openwrt/release/obj/SASLEngine.os alljoyn_core/build/openwrt/openwrt/release/obj/SessionOpts.os alljoyn_core/build/openwrt/openwrt/release/obj/SignalTable.os alljoyn_core/build/openwrt/openwrt/release/obj/SignatureUtils.os alljoyn_core/build/openwrt/openwrt/release/obj/SimpleBusListener.os alljoyn_core/build/openwrt/openwrt/release/obj/Transport.os alljoyn_core/build/openwrt/openwrt/release/obj/TransportList.os alljoyn_core/build/openwrt/openwrt/release/obj/XmlHelper.os alljoyn_core/build/openwrt/openwrt/release/obj/Status.os alljoyn_core/build/openwrt/openwrt/release/obj/posix/ClientTransport.os alljoyn_core/build/openwrt/openwrt/release/obj/version.os -Lbuild/openwrt/openwrt/release/dist/cpp/lib -Lbuild/openwrt/openwrt/release/dist/c/lib -lm -ldl -lrt -lstdc++ -lpthread -lcrypto -lssl /full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/bin/../lib/gcc/mips-linux/4.4.5-1.5.5p2/../../../../mips-linux/bin/ld: cannot find -lcrypto collect2: ld returned 1 exit status scons: * [alljoyn_core/build/openwrt/openwrt/release/obj/liballjoyn.so] Error 1 scons: building terminated because of errors.

click to hide/show revision 6
No.6 Revision

Scons error 127 for OpenWrt

Hello,

Scons command line is the following:

scons V=1 ICE=off BR=on BT=off WS=off CPU=openwrt OS=openwrt BINDINGS="core,cpp" SERVICES="about,notification,controlpanel,config" VARIANT=release "TARGET_CFLAGS=-march=4181 -fPIC -mllsc" "TARGET_CC=mips-linux-gcc" "TARGET_CXX=mips-linux-g++" "TARGET_AR=mips-linux-ar" "TARGET_RANLIB=mips-linux-ranlib" "TARGET_LINK=mips-linux-gcc" "TARGET_CPPFLAGS=-I/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/include -I/home/full-package/rtl819x/toolchain/include/c++ -I/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/include/c++/mips-linux -I/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/include/c++/backward -I/home/full-package/rtl819x/users/hostapd-0.6.10/src" "TARGET_PATH=/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/bin" "TARGET_LINKFLAGS=-L/home/full-package/rtl819x/users/openssl-0.9.8i -L/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/lib/debug" "STAGING_DIR=/home/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225"

The output is:

scons: Reading SConscript files ...
Building bindings: cpp, core
Building services: notification, about, controlpanel, config
GTEST_DIR not specified skipping common unit test build
GTEST_DIR not specified skipping alljoyn_core unit test build
GTEST_DIR not specified skipping About Service unit test build
scons: done reading SConscript files.
scons: Building targets ...
mips-linux-g++ -o alljoyn_core/build/openwrt/openwrt/release/obj/AllJoynCrypto.o -c -std=c++0x -fno-exceptions -march=4181 -fPIC -mllsc -Wno-deprecated -DNDEBUG -DQCC_OS_GROUP_POSIX -DQCC_OS_LINUX -Ibuild/openwrt/openwrt/release/dist/cpp/inc -Ibuild/openwrt/openwrt/release/dist/c/inc -Ibuild/openwrt/openwrt/release/dist/cpp/inc/alljoyn -Icommon/inc -Ialljoyn_core/src alljoyn_core/src/AllJoynCrypto.cc
scons: *** [alljoyn_core/build/openwrt/openwrt/release/obj/AllJoynCrypto.o] Error 127
scons: building terminated because of errors.

There are no detailed diagnostics about error. It seems "TARGET_PATH" is not set. Also "-I/path" options from "TARGET_CPPFLAGS" also are not set. What is wrong in scons command line?

I tried to execute the same compiler command added path to compiler and include directories, compilation was successfull.

CPPPATH variable is used in openwrt script to set CPATH:

env['ENV']['CPATH']=':'.join(flags['CPPPATH'])

I added debug output in the script file: print flags

CPPPATH is empty even if I add it in the command line.

{'CPPFLAGS': [], 'FRAMEWORKPATH': [], 'LIBPATH': [], 'CXXFLAGS': [], 'LIBS': [], 'ASFLAGS': [], 'LINKFLAGS': [], 'RPATH': [], 'CPPDEFINES': [], 'FRAMEWORKS': [], 'CCFLAGS': ['-mllsc', '-fPIC', '-march=4181', '-mllsc', '-fPIC', '-march=4181'], 'CFLAGS': [], 'CPPPATH': []}

So I changed the script:

comment the line "env['ENV']['CPATH']=':'.join(flags['CPPPATH'])"

And set:

env['ENV']['CPATH']=':/full-package/rtl819x/users/openssl-0.9.8i:/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/include/c++/mips-linux:/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/include/c++:/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/include/c++/backward'

The code is compiling.

Maybe you can advice more convenient way to set CPATH? :)

{updated information]

Linker command line with error:

mips-linux-g++ -o alljoyn_core/build/openwrt/openwrt/release/obj/liballjoyn.so -shared common/build/openwrt/openwrt/release/obj/ASN1.os common/build/openwrt/openwrt/release/obj/BigNum.os common/build/openwrt/openwrt/release/obj/BufferedSink.os common/build/openwrt/openwrt/release/obj/BufferedSource.os common/build/openwrt/openwrt/release/obj/CertificateECC.os common/build/openwrt/openwrt/release/obj/Config.os common/build/openwrt/openwrt/release/obj/Crypto.os common/build/openwrt/openwrt/release/obj/CryptoECC.os common/build/openwrt/openwrt/release/obj/CryptoSRP.os common/build/openwrt/openwrt/release/obj/Debug.os common/build/openwrt/openwrt/release/obj/GUID.os common/build/openwrt/openwrt/release/obj/IODispatch.os common/build/openwrt/openwrt/release/obj/IPAddress.os common/build/openwrt/openwrt/release/obj/KeyBlob.os common/build/openwrt/openwrt/release/obj/Logger.os common/build/openwrt/openwrt/release/obj/Pipe.os common/build/openwrt/openwrt/release/obj/SLAPPacket.os common/build/openwrt/openwrt/release/obj/SLAPStream.os common/build/openwrt/openwrt/release/obj/SocketStream.os common/build/openwrt/openwrt/release/obj/Stream.os common/build/openwrt/openwrt/release/obj/StreamPump.os common/build/openwrt/openwrt/release/obj/String.os common/build/openwrt/openwrt/release/obj/StringSource.os common/build/openwrt/openwrt/release/obj/StringUtil.os common/build/openwrt/openwrt/release/obj/ThreadPool.os common/build/openwrt/openwrt/release/obj/Timer.os common/build/openwrt/openwrt/release/obj/Util.os common/build/openwrt/openwrt/release/obj/XmlElement.os common/build/openwrt/openwrt/release/obj/os/Environ.os common/build/openwrt/openwrt/release/obj/os/Event.os common/build/openwrt/openwrt/release/obj/os/FileStream.os common/build/openwrt/openwrt/release/obj/os/IfConfigDarwin.os common/build/openwrt/openwrt/release/obj/os/IfConfigLinux.os common/build/openwrt/openwrt/release/obj/os/Mutex.os common/build/openwrt/openwrt/release/obj/os/OSLogger.os common/build/openwrt/openwrt/release/obj/os/RWLock.os common/build/openwrt/openwrt/release/obj/os/Socket.os common/build/openwrt/openwrt/release/obj/os/SslSocket.os common/build/openwrt/openwrt/release/obj/os/Thread.os common/build/openwrt/openwrt/release/obj/os/UARTStreamDarwin.os common/build/openwrt/openwrt/release/obj/os/UARTStreamLinux.os common/build/openwrt/openwrt/release/obj/os/atomic.os common/build/openwrt/openwrt/release/obj/os/osUtil.os common/build/openwrt/openwrt/release/obj/os/time.os common/build/openwrt/openwrt/release/obj/crypto/CryptoAES.os common/build/openwrt/openwrt/release/obj/crypto/CryptoHash.os common/build/openwrt/openwrt/release/obj/crypto/CryptoRSA.os common/build/openwrt/openwrt/release/obj/crypto/CryptoRand.os common/build/openwrt/openwrt/release/obj/crypto/OpenSsl.os alljoyn_core/build/openwrt/openwrt/release/obj/AllJoynCrypto.os alljoyn_core/build/openwrt/openwrt/release/obj/AllJoynPeerObj.os alljoyn_core/build/openwrt/openwrt/release/obj/AllJoynStd.os alljoyn_core/build/openwrt/openwrt/release/obj/AuthMechLogon.os alljoyn_core/build/openwrt/openwrt/release/obj/AuthMechPIN.os alljoyn_core/build/openwrt/openwrt/release/obj/AuthMechRSA.os alljoyn_core/build/openwrt/openwrt/release/obj/AuthMechSRP.os alljoyn_core/build/openwrt/openwrt/release/obj/BusAttachment.os alljoyn_core/build/openwrt/openwrt/release/obj/BusEndpoint.os alljoyn_core/build/openwrt/openwrt/release/obj/BusObject.os alljoyn_core/build/openwrt/openwrt/release/obj/BusUtil.os alljoyn_core/build/openwrt/openwrt/release/obj/ClientRouter.os alljoyn_core/build/openwrt/openwrt/release/obj/ClientTransport.os alljoyn_core/build/openwrt/openwrt/release/obj/CompressionRules.os alljoyn_core/build/openwrt/openwrt/release/obj/CredentialAccessor.os alljoyn_core/build/openwrt/openwrt/release/obj/DBusCookieSHA1.os alljoyn_core/build/openwrt/openwrt/release/obj/DBusStd.os alljoyn_core/build/openwrt/openwrt/release/obj/EndpointAuth.os alljoyn_core/build/openwrt/openwrt/release/obj/InterfaceDescription.os alljoyn_core/build/openwrt/openwrt/release/obj/KeyExchanger.os alljoyn_core/build/openwrt/openwrt/release/obj/KeyStore.os alljoyn_core/build/openwrt/openwrt/release/obj/LocalTransport.os alljoyn_core/build/openwrt/openwrt/release/obj/Message.os alljoyn_core/build/openwrt/openwrt/release/obj/Message_Gen.os alljoyn_core/build/openwrt/openwrt/release/obj/Message_Parse.os alljoyn_core/build/openwrt/openwrt/release/obj/MethodTable.os alljoyn_core/build/openwrt/openwrt/release/obj/MsgArg.os alljoyn_core/build/openwrt/openwrt/release/obj/NullTransport.os alljoyn_core/build/openwrt/openwrt/release/obj/PasswordManager.os alljoyn_core/build/openwrt/openwrt/release/obj/PeerState.os alljoyn_core/build/openwrt/openwrt/release/obj/ProtectedAuthListener.os alljoyn_core/build/openwrt/openwrt/release/obj/ProxyBusObject.os alljoyn_core/build/openwrt/openwrt/release/obj/RemoteEndpoint.os alljoyn_core/build/openwrt/openwrt/release/obj/SASLEngine.os alljoyn_core/build/openwrt/openwrt/release/obj/SessionOpts.os alljoyn_core/build/openwrt/openwrt/release/obj/SignalTable.os alljoyn_core/build/openwrt/openwrt/release/obj/SignatureUtils.os alljoyn_core/build/openwrt/openwrt/release/obj/SimpleBusListener.os alljoyn_core/build/openwrt/openwrt/release/obj/Transport.os alljoyn_core/build/openwrt/openwrt/release/obj/TransportList.os alljoyn_core/build/openwrt/openwrt/release/obj/XmlHelper.os alljoyn_core/build/openwrt/openwrt/release/obj/Status.os alljoyn_core/build/openwrt/openwrt/release/obj/posix/ClientTransport.os alljoyn_core/build/openwrt/openwrt/release/obj/version.os -Lbuild/openwrt/openwrt/release/dist/cpp/lib -Lbuild/openwrt/openwrt/release/dist/c/lib -lm -ldl -lrt -lstdc++ -lpthread -lcrypto -lssl
/full-package/rtl819x/toolchain/rsdk-1.5.5-4181-EB-2.6.30-0.9.30.3-110225/bin/../lib/gcc/mips-linux/4.4.5-1.5.5p2/../../../../mips-linux/bin/ld: cannot find -lcrypto
collect2: ld returned 1 exit status
scons: * *** [alljoyn_core/build/openwrt/openwrt/release/obj/liballjoyn.so] Error 1
scons: building terminated because of errors.

errors.