With Single bb file I cannot execute both like compiling thrift alone to x8 and other stuffs to powerpc ??
Do I need to write two bitbake file , once to compile thrift to x86 and other bb file to compiles other stuffs to powerpc ?? Because I have tried all the changes you said and also additional stuffs, but even Im not not able to compile thrift alone for x86. Could somebody help me in this please.. Have anyone ported contrail source to other platform. Does this porting success foe anyone ?? If it so kindly help me.. With Thanx and Regards , Dineshkumar.P From: [email protected] To: [email protected]; [email protected] CC: [email protected] Subject: RE: [opencontrail-dev] compiler/cpp/thrift : exec format error Date: Tue, 1 Sep 2015 15:13:11 +0000 Thanks prabhjot, But already I have tried by exporting the variables in shell, replaced env variables and mentioned --host in SConscript. Since I'm compiling this with the help of bitbake file, what ever the changes may be, it is getting replaced with cross compilation env ie., powerpc. So, problem might be with bitbake file. If anyone aware of this let me know please. FYI below is my bb file, ############################################### DESCRIPTION = "Opencontrial" LICENSE = "Apache license" LIC_FILES_CHKSUM = "file://LICENSE;md5=fe8ceb0a1f20c7db22bbab5bb70067df" DEPENDS = "python-scons-native git python wget gcc patch make autoconf automake vim python-lxml unzip flex bison openssl protobuf tbb libipfix librdkafka" inherit autotools do_fetch() { cd ${WORKDIR}/contrail-2.20 repo init -u [email protected]:Juniper/contrail-vnc repo sync } do_compile() { python ${WORKDIR}/contrail-2.20/third_party/fetch_packages.py cd ${WORKDIR}/contrail-2.20/ scons contrail-vrouter-agent } ################################################ With Thanx and Regards , Dineshkumar.P From: [email protected] To: [email protected]; [email protected] CC: [email protected] Subject: Re: [opencontrail-dev] compiler/cpp/thrift : exec format error Date: Tue, 1 Sep 2015 07:25:30 +0000 Hi Dinesh, Overriding CC in env variable doesn’t set shell env variable, since third party code uses standard ./configure make build process it does not work for you Probably you have CC and other env variables exported in your shell as powerpc that’s why you see the observed behaviour You can try doing an export for CC variable before configure to make it work for you — Prabhjot From: Dev <[email protected]> on behalf of Dineshkumar parameswaran <[email protected]> Date: Tuesday, 1 September 2015 12:00 pm To: Pedro Marques <[email protected]> Cc: contrial_developers <[email protected]> Subject: Re: [opencontrail-dev] compiler/cpp/thrift : exec format error + I have replace the variable by below commands, env['CC'] = "x86_64-linux-gcc" env['AR'] = "x86_64-linux-ar" env['LD'] = "x86_64-linux-ld" env['OBJDUMP'] = "x86_64-linux-objdump" env['OBJCOPY'] = "x86_64-linux-objcopy" env['STRING'] = "x86_64-linux-string" env['CPP'] = "x86_64-linux-gcc" env['STRIP'] = "x86_64-linux-strip" env['RANLIB'] = "x86_64-linux-ranlib" env['CXX'] = "x86_64-linux-g++" also tried with env.Replace(CC = 'x86_64-linux-gcc').. Even though it is taking as powerpc. print env.Dump() - This outputs as x86 but while compiling it is taking as powerpc. I also have given --host as x86. Then where it is getting changed. Whether in configure file ?? or any other stuffs ?? With Thanx and Regards , Dineshkumar.P From: [email protected] To: [email protected] CC: [email protected]; [email protected] Subject: RE: [opencontrail-dev] compiler/cpp/thrift : exec format error Date: Tue, 1 Sep 2015 04:22:25 +0000 Thanks Pedro, I have replaced the env variable value from x86 to powerpc in SConscript of thrift. When I print the env value of CC, CXX, LD etc it is showing as x86 only.. But when I compile with bitbake command It is taking the compiler, linker and other stuffs as powerpc only.. I'm not sure where it is getting changed..! Again where that env variables are getting changed ? With Thanx and Regards , Dineshkumar.P From: [email protected] To: [email protected] CC: [email protected]; [email protected] Subject: Re: [opencontrail-dev] compiler/cpp/thrift : exec format error Date: Mon, 31 Aug 2015 15:53:53 +0000 Dinesh, The SConscript file that controls the compilation of the thirft libraries and compiler is in controller/lib/thirft/SConscript. You will need to modify the build process such that you compile thrift twice… once to generate the libraries for the target and once to generate the compiler that you run on the host. Pedro. On Aug 30, 2015, at 9:56 PM, Dineshkumar parameswaran <[email protected]> wrote: With Thanx and Regards , Dineshkumar.P From: [email protected] To: [email protected] Subject: RE: [opencontrail-dev] compiler/cpp/thrift : exec format error Date: Mon, 31 Aug 2015 04:56:30 +0000 Hi Pedro, In which file I need to change the configuration for thrift compiler. Since there is many SConscript file and Im new to this, i'm not sure with the right one. and only gcc, g++, randlib, ar,strip, ld from host is enough or anything else need to given ?? Kindly do the needful.. With Thanx and Regards , Dineshkumar.P From: [email protected] To: [email protected] Subject: RE: [opencontrail-dev] compiler/cpp/thrift : exec format error Date: Mon, 31 Aug 2015 04:55:02 +0000 Hi Pedro, In which file I need to change the configuration for thrift compiler. Since there is many SConscript file and Im new to this, i'm not sure with the right one. and only gcc, g++, randlib, ar,strip, ld from host is enough or anything else need to given ?? Kindly do the needful.. With Thanx and Regards , Dineshkumar.P From: [email protected] To: [email protected] CC: [email protected] Subject: Re: [opencontrail-dev] compiler/cpp/thrift : exec format error Date: Fri, 28 Aug 2015 16:06:16 +0000 Dinesh, The thrift IDL compiler needs to be built using the hosts’s compiler and linker. Pedro. On Aug 28, 2015, at 2:00 AM, Dineshkumar parameswaran <[email protected]> wrote: Hi All, I'm Compiling Contrail Source Code To powerPc platform. While Compiling I'm getting exec format error in thrift binary. I'm compiling this source code with yocto by writing bitbake file. Please find the log below | /bin/bash: ../../../compiler/cpp/thrift: cannot execute binary file: Exec format error | make[3]: *** [gen-cpp/DebugProtoTest_types.cpp] Error 126 | make[2]: *** [install-recursive] Error 1 | make[1]: *** [install-recursive] Error 1 | make: *** [install-recursive] Error 1 | scons: *** [build/third_party/thrift/config.status] Error 2 | scons: building terminated because of errors. What changes need to be done for rectifying this error ?? Can anyone help me in this ?? With Thanx and Regards , Dineshkumar.P _______________________________________________ Dev mailing list [email protected] http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org _______________________________________________ Dev mailing list [email protected] http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org
_______________________________________________ Dev mailing list [email protected] http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org
