Project

General

Profile

Bug #1700

Compilation failure on 32-bit Ubuntu 10.04/12.04

Added by Alex Afanasyev almost 6 years ago. Updated almost 3 years ago.

Status:
Abandoned
Priority:
Normal
Assignee:
-
Category:
Base
Target version:
Start date:
06/26/2014
Due date:
% Done:

0%

Estimated time:

Description

Updated libraries:

  • gcc (Ubuntu 4.8.1-2ubuntu1~10.04.1) 4.8.1
  • boost 1.55
  • libsqlite3-dev/lucid 3.6.22-1
  • libcrypto++-dev/lucid 5.6.0-5

Run:

./waf configure && ./waf build

Expectation: succeeds

Actual:

named-data/ndn-cxx$ ./waf
Waf: Entering directory `/groups/Hercules/NDN/named-data/ndn-cxx/build'
[ 1/68] subst: src/version.hpp.in -> build/src/version.hpp
[ 2/68] gchx: src/common-pch.hpp -> build/ndn-cxx.2.gch
[ 3/68] cxx: src/data.cpp -> build/src/data.cpp.2.o
In file included from /usr/include/cryptopp/filters.h:5:0,
                 from /usr/include/cryptopp/asn.h:4,
                 from ./../src/security/cryptopp.hpp:29,
                 from ./../src/common-pch.hpp:56,
                 from <command-line>:0:
/usr/include/cryptopp/secblock.h: In instantiation of ‘CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Align16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const void*) [with T = unsigned char; bool T_Align16 = false; CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer = unsigned char*; CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type = unsigned int]’:
/usr/include/cryptopp/secblock.h:283:25:   required from ‘CryptoPP::SecBlock<T, A>::SecBlock(CryptoPP::SecBlock<T, A>::size_type) [with T = unsigned char; A = CryptoPP::AllocatorWithCleanup<unsigned char>; CryptoPP::SecBlock<T, A>::size_type = unsigned int]’
/usr/include/cryptopp/algparam.h:17:2:   required from here
/usr/include/cryptopp/secblock.h:97:14: error: ‘CheckSize’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
   CheckSize(n);
              ^
/usr/include/cryptopp/secblock.h:97:14: note: declarations in dependent base ‘CryptoPP::AllocatorBase<unsigned char>’ are not found by unqualified lookup
/usr/include/cryptopp/secblock.h:97:14: note: use ‘this->CheckSize’ instead
/usr/include/cryptopp/secblock.h: In instantiation of ‘CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Align16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const void*) [with T = unsigned char; bool T_Align16 = true; CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer = unsigned char*; CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type = unsigned int]’:
/usr/include/cryptopp/secblock.h:283:25:   required from ‘CryptoPP::SecBlock<T, A>::SecBlock(CryptoPP::SecBlock<T, A>::size_type) [with T = unsigned char; A = CryptoPP::AllocatorWithCleanup<unsigned char, true>; CryptoPP::SecBlock<T, A>::size_type = unsigned int]’
/usr/include/cryptopp/modes.h:63:34:   required from here
/usr/include/cryptopp/secblock.h:97:14: error: ‘CheckSize’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
/usr/include/cryptopp/secblock.h:97:14: note: declarations in dependent base ‘CryptoPP::AllocatorBase<unsigned char>’ are not found by unqualified lookup
/usr/include/cryptopp/secblock.h:97:14: note: use ‘this->CheckSize’ instead
/usr/include/cryptopp/secblock.h: In instantiation of ‘CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Align16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const void*) [with T = unsigned int; bool T_Align16 = true; CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer = unsigned int*; CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type = unsigned int]’:
/usr/include/cryptopp/secblock.h:285:29:   required from ‘CryptoPP::SecBlock<T, A>::SecBlock(const CryptoPP::SecBlock<T, A>&) [with T = unsigned int; A = CryptoPP::AllocatorWithCleanup<unsigned int, true>]’
/usr/include/cryptopp/modarith.h:122:20:   required from here
/usr/include/cryptopp/secblock.h:97:14: error: ‘CheckSize’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
/usr/include/cryptopp/secblock.h:97:14: note: declarations in dependent base ‘CryptoPP::AllocatorBase<unsigned int>’ are not found by unqualified lookup
/usr/include/cryptopp/secblock.h:97:14: note: use ‘this->CheckSize’ instead
/usr/include/cryptopp/secblock.h: In instantiation of ‘CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Align16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const void*) [with T = unsigned int; bool T_Align16 = false; CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer = unsigned int*; CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type = unsigned int]’:
/usr/include/cryptopp/secblock.h:283:25:   required from ‘CryptoPP::SecBlock<T, A>::SecBlock(CryptoPP::SecBlock<T, A>::size_type) [with T = unsigned int; A = CryptoPP::AllocatorWithCleanup<unsigned int>; CryptoPP::SecBlock<T, A>::size_type = unsigned int]’
/usr/include/cryptopp/gf2n.h:48:4:   required from here
/usr/include/cryptopp/secblock.h:97:14: error: ‘CheckSize’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
/usr/include/cryptopp/secblock.h:97:14: note: declarations in dependent base ‘CryptoPP::AllocatorBase<unsigned int>’ are not found by unqualified lookup
/usr/include/cryptopp/secblock.h:97:14: note: use ‘this->CheckSize’ instead
cc1plus: warning: unrecognized command line option "-Wno-unneeded-internal-declaration" [enabled by default]

Waf: Leaving directory `/groups/Hercules/NDN/named-data/ndn-cxx/build'
Build failed
 -> task in 'ndn-cxx' failed (exit status 1):
    {task 166418444: cxx data.cpp -> data.cpp.2.o}
['/usr/bin/g++', '-std=c++03', '-pedantic', '-Wall', '-Wno-long-long', '-Wno-unneeded-internal-declaration', '-O2', '-g', '-fPIC', '-include', '/groups/Hercules/NDN/named-data/ndn-cxx/build/ndn-cxx.2', '-I/groups/Hercules/NDN/named-data/ndn-cxx/build', '-I/groups/Hercules/NDN/named-data/ndn-cxx', '-I/groups/Hercules/NDN/named-data/ndn-cxx/build/src', '-I/groups/Hercules/NDN/named-data/ndn-cxx/src', '-I/usr/include', '../src/data.cpp', '-c', '-o', '/groups/Hercules/NDN/named-data/ndn-cxx/build/src/data.cpp.2.o']
#1

Updated by Alex Afanasyev almost 6 years ago

I have successfully compiled ndn-cxx and NFD on this platform, but in a slightly different environment.

The only thing I compiled from source was boost. Other libraries were installed from the provided packages. However, there were several minor problems that will be fixed soon.

Note is that for some reason precompiled headers do not work with the gcc-4.4 bundled with 10.04. But this is not critical, as they can be disabled.

Here is the log of what I did:

sudo apt-get install libbz2-dev

wget http://downloads.sourceforge.net/project/boost/boost/1.55.0/boost_1_55_0.tar.bz2
tar jxf boost_1_55_0.tar.bz2
cd boost_1_55_0
./bootstrap.sh
sudo ./b2 --prefix=/usr/local install

...

sudo apt-get install libcrypto++-dev libsqlite3-dev libssl-dev


cd ndn-cxx
./waf configure --debug --without-pch


cd NFD
sudo aptitude install libpcap-dev pkg-config
./waf configure --debug --without-pch
#2

Updated by Junxiao Shi almost 6 years ago

  • Tracker changed from Task to Bug
#3

Updated by Marc Badrian almost 6 years ago

Alex,

Obaid tried to disable precompiled headers, but it didn't go through. Apparently it seems that 10.04 is not supported in this way. We have contacted emulab to work on adding a custom OS image using Ubuntu 12.04 with 32-bit support.

We will try to start from scratch and follow your steps above to see if that changes anything.

Thanks,

  • Marc
#4

Updated by Alex Afanasyev almost 6 years ago

So, was it with the latest code?

If you're using still the latest crypto++ 5.6.2, you need to use customized CXXFLAGS. The way I tried was with older version of crypto++.

#5

Updated by Junxiao Shi almost 6 years ago

Marc Badrian wrote:

We have contacted emulab to work on adding a custom OS image using Ubuntu 12.04 with 32-bit support.

On Emulab you may use UBUNTU-12-64-NFD on pc3000. NFD works fine with this template.

#6

Updated by Lan Wang almost 6 years ago

Junxiao: thank you for the information. Is this 64bit or 32bit? My understanding is that they want to use 32 bit because there are more 32 bit machines available. So this maximizes the possibility that there are enough nodes available for the experiment (our experiments involve 15 nodes).

#7

Updated by Junxiao Shi almost 6 years ago

Lan Wang wrote:

Is this 64bit or 32bit? My understanding is that they want to use 32 bit because there are more 32 bit machines available. So this maximizes the possibility that there are enough nodes available for the experiment (our experiments involve 15 nodes).

UBUNTU-12-64-NFD is a 64-bit image.

If you want 32-bit Emulab image, you may use FreeBSD 10.0. See #1507 for how to compile ndn-cxx on FreeBSD 10.0; NFD should be similar.

#8

Updated by Syed Amin almost 6 years ago

The steps mentioned by Alex did work, do we still consider this issue as a bug?

BTW, the emulab has Ubuntu 12 32bit version now (UBUNTU12-STD).

#9

Updated by Junxiao Shi almost 6 years ago

This is still a bug because ./waf configure doesn't work, and the specific configuration line isn't mentioned in any document.

#10

Updated by Alex Afanasyev over 5 years ago

  • Subject changed from Compilation failure on 32-bit Ubuntu 10.04 to Compilation failure on 32-bit Ubuntu 10.04/12.04

Similar problem was reproduced on 32-bit Ubuntu 12.04 with gcc-4.8 installed.

This is an issue with the old version of Crypto++ library version 5.6.1 not playing nice with the new compilers. In particular, if the following patch is applied on the system with Crypto++ 5.6.1 installed, the compilation should proceed without errors:

cd /usr/include/cryptopp
patch -p1

And then copy/paste the following

diff --git a/eccrypto.h b/eccrypto.h
index b359e03..8d7f70f 100644
--- a/eccrypto.h
+++ b/eccrypto.h
@@ -166,9 +166,9 @@ public:
        void Initialize(const EC &ec, const Element &G, const Integer &n, const Integer &x)
                {this->AccessGroupParameters().Initialize(ec, G, n); this->SetPrivateExponent(x);}
        void Initialize(RandomNumberGenerator &rng, const DL_GroupParameters_EC<EC> &params)
-               {GenerateRandom(rng, params);}
+               {this->GenerateRandom(rng, params);}
        void Initialize(RandomNumberGenerator &rng, const EC &ec, const Element &G, const Integer &n)
-               {GenerateRandom(rng, DL_GroupParameters_EC<EC>(ec, G, n));}
+               {this->GenerateRandom(rng, DL_GroupParameters_EC<EC>(ec, G, n));}

        // PKCS8PrivateKey
        void BERDecodePrivateKey(BufferedTransformation &bt, bool parametersPresent, size_t size);
diff --git a/secblock.h b/secblock.h
index 24b9fc0..40cce33 100644
--- a/secblock.h
+++ b/secblock.h
@@ -88,7 +88,7 @@ public:

        pointer allocate(size_type n, const void * = NULL)
        {
-               CheckSize(n);
+               this->CheckSize(n);
                if (n == 0)
                        return NULL;

I haven't tried, but I believe installing the latest version of Crypto++ (5.6.2) will also solve the problem.

#11

Updated by Alex Afanasyev almost 3 years ago

  • Status changed from New to Abandoned

Also available in: Atom PDF