Compilation Error on Ubuntu - x84-32 bit

Asked by Paresh

Hi,

I am getting following compilation error. Request your help in resolving this issue.

Linux paresh-desktop 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 i686 GNU/Linux

I followed the step as mentioned at "How to install IMTAphy from launchpad.net" on http://www.lkn.ei.tum.de/personen/jan/imtaphy/

openwns-sdk$ ./playground.py install && ./playground.py install --flavour=opt

......

g++ -o .build/dbg/imtaphy/src/spatialChannel/m2135/M2135.os -c -g -O0 -fno-inline -m32 -fno-ipa-cp-clone -fopenmp -fPIC -DMKL=1 -I.include -I/usr/include/python2.6 -I/opt/intel/composer_xe_2011_sp1.7.256/mkl/include modules/phy/imtaphy/src/spatialChannel/m2135/M2135.cpp
In file included from /usr/include/c++/4.4/vector:65,
                 from .include/WNS/Backtrace.hpp:32,
                 from .include/WNS/Exception.hpp:32,
                 from .include/WNS/PowerRatio.hpp:33,
                 from .include/IMTAPHY/spatialChannel/SpatialChannelModelInterface.hpp:33,
                 from .include/IMTAPHY/spatialChannel/m2135/M2135.hpp:33,
                 from modules/phy/imtaphy/src/spatialChannel/m2135/M2135.cpp:30:
/usr/include/c++/4.4/bits/stl_vector.h: In member function 'void std::vector<_Tp, _Alloc>::_M_initialize_dispatch(_Integer, _Integer, std::__true_type) [with _Integer = int, _Tp = imtaphy::scm::m2135::Phases*, _Alloc = std::allocator<imtaphy::scm::m2135::Phases*>]':
/usr/include/c++/4.4/bits/stl_vector.h:303: instantiated from 'std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const _Alloc&) [with _InputIterator = int, _Tp = imtaphy::scm::m2135::Phases*, _Alloc = std::allocator<imtaphy::scm::m2135::Phases*>]'
modules/phy/imtaphy/src/spatialChannel/m2135/M2135.cpp:356: instantiated from 'void imtaphy::scm::m2135::M2135<PRECISION>::onWorldCreated(imtaphy::LinkManager*, imtaphy::lsparams::LSmap*, bool) [with PRECISION = double]'
modules/phy/imtaphy/src/spatialChannel/m2135/M2135.cpp:1150: instantiated from here
/usr/include/c++/4.4/bits/stl_vector.h:991: error: invalid conversion from 'int' to 'imtaphy::scm::m2135::Phases*'
/usr/include/c++/4.4/bits/stl_vector.h:991: error: initializing argument 2 of 'void std::vector<_Tp, _Alloc>::_M_fill_initialize(size_t, const _Tp&) [with _Tp = imtaphy::scm::m2135::Phases*, _Alloc = std::allocator<imtaphy::scm::m2135::Phases*>]'
scons: *** [.build/dbg/imtaphy/src/spatialChannel/m2135/M2135.os] Error 1
scons: building terminated because of errors.

Earlier i got compilation error and i changed the arch in ./modules/phy/imtaphy/SConscript from -m64 to -m32.

Question information

Language:
English Edit question
Status:
Solved
For:
IMTAphy Edit question
Assignee:
No assignee Edit question
Solved by:
Jan
Solved:
Last query:
Last reply:
Revision history for this message
Jan (jan-ellenbeck) said :
#1

IMTAphy has been developed and tested on 64 bit systems only. That's why the architecture (-m64) was set to 64 bits.
I've now added that piece of information to the requirements section on the web page, sorry.

It is certainly possible to make it run on 32 bit environments but I will not support that. For investigating big scenarios the available memory with 32 bit will not be enough anyway.

I recommend you use a 64 bit Linux version.

Cheers
Jan

Revision history for this message
Maciej Muehleisen (mue-comnets) said :
#2

You need the following additional changes for 32bit:

./modules/phy/imtaphy/SConscript:

externalLIBS.append('mkl_intel_lp64') # Interface Layer

change to

externalLIBS.append('mkl_intel') # Interface Layer

In imtaphy/src/spatialChannel/m2135/M2135.cpp to solve your compiler problem :

std::vector<Phases*> initialPhases(2, NULL);

change to

std::vector<Phases*> initialPhases(2, (Phases*)(NULL));

Still no guaranty it will create correct results if 64bit are assumed for some low-level operations.

Revision history for this message
Paresh (pareshspednekar) said :
#3

Thanks a lot Maciej for the solution. I have incorporated this changes and have compiled the code successfully.

Thanks and Regards,
Paresh

________________________________
 From: Maciej Muehleisen <email address hidden>
To: <email address hidden>
Sent: Tuesday, 24 January 2012 5:55 PM
Subject: Re: [Question #185473]: Compilation Error on Ubuntu - x84-32 bit

Your question #185473 on IMTAphy changed:
https://answers.launchpad.net/imtaphy/+question/185473

Maciej Muehleisen proposed the following answer:
You need the following additional changes for 32bit:

./modules/phy/imtaphy/SConscript:

externalLIBS.append('mkl_intel_lp64') # Interface Layer

change to

externalLIBS.append('mkl_intel') # Interface Layer

In imtaphy/src/spatialChannel/m2135/M2135.cpp to solve your compiler problem :

std::vector<Phases*> initialPhases(2, NULL);

change to

std::vector<Phases*> initialPhases(2, (Phases*)(NULL));

Still no guaranty it will create correct results if 64bit are assumed
for some low-level operations.

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/imtaphy/+question/185473/+confirm?answer_id=1

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/imtaphy/+question/185473

You received this question notification because you asked the question.

Revision history for this message
Best Jan (jan-ellenbeck) said :
#4

Hi Paresh,

the fix in imtaphy/src/spatialChannel/m2135/M2135.cpp is part of an update I released today. You can upgrade to that by running "playground.py upgrade" from the openwns-sdk directory.

Details of the update can be found here:
http://bazaar.launchpad.net/~jan-ellenbeck/imtaphy/trunk/revision/30

For 32 bit compilation, you should keep the fix in SConscript and be warned that I haven't tested it at 32 bit.

Could you please mark this question as answered/closed if your original problem has been solved?

Thanks
Jan

Revision history for this message
Paresh (pareshspednekar) said :
#5

Thanks Jan, that solved my question.