Hi Pedro

We are able to build the 32 bit contrail-vrouter-binary for powerpc
ubuntu.We changed the 64 bit atomic operation i.e *tbb::atomic<uint64_t>*
to 32 bit operation* tbb::atomic<uint32_t>* in the below files and we were
able to build successfully the contrail-vrouter-binary.

io_utils.h
db_table.h
db_table.cc


file contrail-vrouter-agent
contrail-vrouter-agent: ELF 32-bit MSB executable, PowerPC or cisco 4500,
version 1 (GNU/Linux), dynamically linked (uses shared libs), for GNU/Linux
2.6.32, BuildID[sha1]=0xcbe3ddf30b80430af4742f9efa2c897ec9b7ed57, with
unknown capability 0x41000000 = 0x11676e75, with unknown capability 0x10000
= 0x90401, not stripped

Thanks for your exteeemed support and help.


On Fri, Sep 4, 2015 at 11:15 AM, Pedro Marques <[email protected]> wrote:

> Navneet,
>
> If you want to generate 32bit binaries you will have to address the issue
> of atomic update of counters, which are typically 64 bit. That will cause
> you to have to create a wrapper that hides that difference… The kernel
> module also seems to have the assumption of a 64 bit atomic word.
>
> Often one can generate 64bit binaries on a 32bit compiler… some kernels
> can run both 32bit and 64bit binaries. I don’t know the exact situation for
> the kernel that you are running.
>
> As i mention before, i would assume that for a production deployment you
> do need a 64bit kernel in order to be able to address more than 4G memory.
> So it would seem to me that you don’t want to go down the path of trying to
> generate 32bit binaries.
>
>   Pedro.
>
> On Sep 3, 2015, at 9:45 PM, Navneet Singh <[email protected]>
> wrote:
>
> Pedro
>
> Can we compile it on 32-bit powerpc ubuntu system?
>
> On Thu, Sep 3, 2015 at 11:54 PM, abhishek jain <[email protected]>
> wrote:
>
>> Thanks Pedro for your help.
>>
>> We'll try to run 64 bit powerpc ubuntu.
>>
>> Regards
>> --Abhishek Jain
>>
>> sent from my sony Xperia smartphone
>> On Sep 3, 2015 11:33 PM, "Pedro Marques" <[email protected]> wrote:
>>
>>> Abhishek,
>>> Your gcc is a 32 bit binary. That probably means that it is defaulting
>>> to compile in 32bit mode.
>>> There are both 32 and 64 ubuntu distributions for powerpc as far as i
>>> can gather from google.
>>>
>>> Is this machine your target ? Can it run the 64 bit ubuntu image ?
>>>
>>> If you want to run it as a compute node, you will probably need to
>>> address more than 4G memory. So you will need a 64 bit kernel. It would be
>>> simpler to run a 64 bit userspace with that kernel.
>>>
>>>   Pedro.
>>>
>>> On Sep 3, 2015, at 10:25 AM, abhishek jain <[email protected]>
>>> wrote:
>>>
>>> Hi Pedro
>>>
>>> Below are the necessary details of the ubuntu 14.94 powerpc system ..
>>>
>>> file /usr/bin/g++-4.8
>>>
>>> /usr/bin/g++-4.8: ELF 32-bit MSB  executable, PowerPC or cisco 4500,
>>> version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux
>>> 2.6.32, BuildID[sha1]=8f69c8ddae20308b452dfbe093556aeb16c2a75f, stripped
>>>
>>>  uname -p
>>> ppc64
>>>
>>> We tried on another ubuntu 14.04 x86_64 system with 64 bit compiler and
>>> there we were able to built the contrail-vrouter-agent successfully.
>>>
>>>
>>>
>>> On Thu, Sep 3, 2015 at 10:14 PM, Pedro Marques <[email protected]>
>>> wrote:
>>>
>>>> Navneet,
>>>> Is this a 32 or 64 bit CPU ?
>>>>
>>>> It seems that src/io/io_utils.h contains a set of variables declared as:
>>>> tbb::atomic<uint64_t>
>>>>
>>>> This should be available on a 64 bit CPU. Does the compiler have a flag
>>>> to enable 64 bit mode ?
>>>>
>>>> I’m sure that there are several places where counters are used with the
>>>> assumption that we can do an atomic increment. We need to find a method to
>>>> do an atomic increment on a 64 bit value for this platform.
>>>>
>>>>   Pedro.
>>>>
>>>> On Sep 2, 2015, at 10:51 PM, Navneet Singh <[email protected]>
>>>> wrote:
>>>>
>>>> Hi Pedro
>>>>
>>>> We did fresh installation of complete code again with Ubuntu 14.04 and
>>>> the path /build/include/tbb is not present now. We are now getting
>>>> following error while building contrail-vrouter-agent
>>>>
>>>> scons contrail-vrouter-agent
>>>> scons: Reading SConscript files ...
>>>> scons: done reading SConscript files.
>>>> scons: Building targets ...
>>>> g++ -o build/debug/http/http_server.o -c -g -O0 -DDEBUG -Wall -Werror
>>>> -Wsign-compare -Wno-unused-local-typedefs -DLINUX -Icontroller/src
>>>> -Ibuild/include -Icontroller/lib -Ibuild/debug
>>>> controller/src/http/http_server.cc
>>>> In file included from /usr/include/tbb/tbb_profiling.h:105:0,
>>>>                  from /usr/include/tbb/mutex.h:41,
>>>>                  from controller/src/io/tcp_server.h:13,
>>>>                  from controller/src/http/http_server.h:13,
>>>>                  from controller/src/http/http_server.cc:5:
>>>> /usr/include/tbb/atomic.h: In instantiation of ‘struct
>>>> tbb::internal::atomic_impl<long long unsigned int>’:
>>>> /usr/include/tbb/atomic.h:413:8:   required from ‘struct
>>>> tbb::atomic<long long unsigned int>’
>>>> controller/src/io/io_utils.h:20:27:   required from here
>>>> /usr/include/tbb/atomic.h:228:34: error:
>>>> ‘tbb::internal::atomic_impl<T>::my_storage’ has incomplete type
>>>>      aligned_storage<T,sizeof(T)> my_storage;
>>>>                                   ^
>>>> /usr/include/tbb/atomic.h:101:8: error: declaration of ‘struct
>>>> tbb::internal::aligned_storage<long long unsigned int, 8u>’
>>>>  struct aligned_storage;
>>>>
>>>> We are having libttb-dev package installed in our system. Please gelp
>>>> us with this issue
>>>>
>>>> --
>>>> Thanks
>>>> Navneet
>>>>
>>>> On Wed, Sep 2, 2015 at 10:01 PM, abhishek jain <[email protected]>
>>>> wrote:
>>>>
>>>>> Hi pedro
>>>>>
>>>>> Initially we were using 13.10 powerpc ubuntu and when we upgraded the
>>>>> ubuntu version(using apt-get upgrade) and performed repo sync in addition
>>>>> to third party packages  installation,the build/Include/tbb path still
>>>>> existed.
>>>>>
>>>>> However we'll perform the fresh installation of the complete code
>>>>> again and let you know the results.
>>>>>
>>>>> sent from my sony experia smartphone
>>>>> On Sep 2, 2015 9:47 PM, "Pedro Marques" <[email protected]> wrote:
>>>>>
>>>>>> Abhishek,
>>>>>> In 14.04 you shouldn’t be using the tbb library that is downloaded
>>>>>> via the third-party scripts.
>>>>>> And build/include/tbb should not be present.
>>>>>>
>>>>>>   Pedro.
>>>>>>
>>>>>> On Sep 2, 2015, at 9:08 AM, abhishek jain <[email protected]>
>>>>>> wrote:
>>>>>>
>>>>>> Hi Pedro
>>>>>>
>>>>>> We upgraded the ubuntu 13.10 to 14.04 but still we are facing the
>>>>>> same issue.
>>>>>>
>>>>>> sent from my sony experia smartphone
>>>>>> On Sep 2, 2015 2:50 PM, "Navneet Singh" <[email protected]>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi All
>>>>>>>
>>>>>>> I just started working on opencontrail, and trying to compile
>>>>>>> vrouter on *PowerPC Ubuntu 13.10*
>>>>>>> I repo sync from
>>>>>>> *repo init -u [email protected]:Juniper/contrail-vnc *and fetch all
>>>>>>> packages from *fetch_packages.py*. Finally when i execute *scons
>>>>>>> contrail-vrouter-agent*. Following error shows up:
>>>>>>>
>>>>>>> scons contrail-vrouter-agent
>>>>>>> scons: Reading SConscript files ...
>>>>>>> scons: done reading SConscript files.
>>>>>>> scons: Building targets ...
>>>>>>> g++ -o build/debug/http/http_server.o -c -g -O0 -DDEBUG -Wall
>>>>>>> -Werror -Wsign-compare -Wno-unused-local-typedefs -DLINUX 
>>>>>>> -Icontroller/src
>>>>>>> -Ibuild/include -Icontroller/lib -Ibuild/debug
>>>>>>> controller/src/http/http_server.cc
>>>>>>> In file included from build/include/tbb/tbb_profiling.h:105:0,
>>>>>>>                  from build/include/tbb/mutex.h:41,
>>>>>>>                  from controller/src/io/tcp_server.h:13,
>>>>>>>                  from controller/src/http/http_server.h:13,
>>>>>>>                  from controller/src/http/http_server.cc:5:
>>>>>>> build/include/tbb/atomic.h: In instantiation of ‘struct
>>>>>>> tbb::internal::atomic_impl<long long unsigned int>’:
>>>>>>> build/include/tbb/atomic.h:339:8:   required from ‘struct
>>>>>>> tbb::atomic<long long unsigned int>’
>>>>>>> controller/src/io/io_utils.h:20:27:   required from here
>>>>>>> build/include/tbb/atomic.h:196:27: error:
>>>>>>> ‘tbb::internal::atomic_impl<T>::rep’ has incomplete type
>>>>>>>      atomic_rep<sizeof(T)> rep;
>>>>>>>                            ^
>>>>>>> build/include/tbb/atomic.h:75:8: error: declaration of ‘struct
>>>>>>> tbb::internal::atomic_rep<8u>’
>>>>>>>  struct atomic_rep;           // Primary template declared, but
>>>>>>> never defined.
>>>>>>>         ^
>>>>>>> In file included from build/include/boost/asio/io_service.hpp:25:0,
>>>>>>>                  from
>>>>>>> build/include/boost/asio/basic_io_object.hpp:19,
>>>>>>>                  from
>>>>>>> build/include/boost/asio/basic_socket_acceptor.hpp:19,
>>>>>>>                  from build/include/boost/asio/ip/tcp.hpp:19,
>>>>>>>                  from controller/src/io/tcp_server.h:10,
>>>>>>>                  from controller/src/http/http_server.h:13,
>>>>>>>                  from controller/src/http/http_server.cc:5:
>>>>>>> build/include/boost/system/error_code.hpp:214:36: error:
>>>>>>> ‘boost::system::posix_category’ defined but not used
>>>>>>> [-Werror=unused-variable]
>>>>>>>      static const error_category &  posix_category =
>>>>>>> generic_category();
>>>>>>>                                     ^
>>>>>>> build/include/boost/system/error_code.hpp:215:36: error:
>>>>>>> ‘boost::system::errno_ecat’ defined but not used 
>>>>>>> [-Werror=unused-variable]
>>>>>>>      static const error_category &  errno_ecat     =
>>>>>>> generic_category();
>>>>>>>                                     ^
>>>>>>> build/include/boost/system/error_code.hpp:216:36: error:
>>>>>>> ‘boost::system::native_ecat’ defined but not used 
>>>>>>> [-Werror=unused-variable]
>>>>>>>      static const error_category &  native_ecat    =
>>>>>>> system_category();
>>>>>>>                                     ^
>>>>>>> In file included from
>>>>>>> build/include/boost/asio/detail/impl/posix_mutex.ipp:24:0,
>>>>>>>                  from
>>>>>>> build/include/boost/asio/detail/posix_mutex.hpp:73,
>>>>>>>                  from build/include/boost/asio/detail/mutex.hpp:25,
>>>>>>>                  from
>>>>>>> build/include/boost/asio/detail/service_registry.hpp:20,
>>>>>>>                  from
>>>>>>> build/include/boost/asio/impl/io_service.hpp:19,
>>>>>>>                  from build/include/boost/asio/io_service.hpp:776,
>>>>>>>                  from
>>>>>>> build/include/boost/asio/basic_io_object.hpp:19,
>>>>>>>                  from
>>>>>>> build/include/boost/asio/basic_socket_acceptor.hpp:19,
>>>>>>>                  from build/include/boost/asio/ip/tcp.hpp:19,
>>>>>>>                  from controller/src/io/tcp_server.h:10,
>>>>>>>                  from controller/src/http/http_server.h:13,
>>>>>>>                  from controller/src/http/http_server.cc:5:
>>>>>>> build/include/boost/asio/error.hpp:244:45: error:
>>>>>>> ‘boost::asio::error::system_category’ defined but not used
>>>>>>> [-Werror=unused-variable]
>>>>>>>  static const boost::system::error_category& system_category
>>>>>>>                                              ^
>>>>>>> build/include/boost/asio/error.hpp:246:45: error:
>>>>>>> ‘boost::asio::error::netdb_category’ defined but not used
>>>>>>> [-Werror=unused-variable]
>>>>>>>  static const boost::system::error_category& netdb_category
>>>>>>>                                              ^
>>>>>>> build/include/boost/asio/error.hpp:248:45: error:
>>>>>>> ‘boost::asio::error::addrinfo_category’ defined but not used
>>>>>>> [-Werror=unused-variable]
>>>>>>>  static const boost::system::error_category& addrinfo_category
>>>>>>>                                              ^
>>>>>>> build/include/boost/asio/error.hpp:250:45: error:
>>>>>>> ‘boost::asio::error::misc_category’ defined but not used
>>>>>>> [-Werror=unused-variable]
>>>>>>>  static const boost::system::error_category& misc_category
>>>>>>>                                              ^
>>>>>>> cc1plus: all warnings being treated as errors
>>>>>>> scons: *** [build/debug/http/http_server.o] Error 1
>>>>>>> scons: building terminated because of errors.
>>>>>>>
>>>>>>>
>>>>>>> Please help with following vrouter issue
>>>>>>>
>>>>>>> --
>>>>>>> Thanks
>>>>>>> Navneet
>>>>>>>
>>>>>> _______________________________________________
>>>>>> 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

Reply via email to