I think I've narrowed the SWIG problem and it should be a matter of minutes
(famous last words) for you Marek, I just couldn't find the proper files to
test my idea. See below my notes and let me know if this deserves a new
JIRA or comment on the one you mentioned earlier.


Create the external/linux32/lib folders and external/linux32/share
Copy the external/linux64/share into external/linux32/share

Copy the static libs from /usr/lib/ to external/linux32/lib
/usr/lib/libapr-1.a
/usr/lib/libaprutil-1.a
*If not there just install apr tools and apr-utils from package manager or
download and compile

Unpack the libyaml file from external/src
Change line 5 of  CMakeLists.txt file
from:   set(LIB_TYPE SHARED)   to:   set(LIB_TYPE STATIC)
mkdir build
cmake ..
etc.

copy static libyaml-cpp.a file into linux32/lib and rename it to libyaml.a

download and build zlib and copy the static libz.a file to linux32/lib

install swig (cyrrently trying with version 1.3.36 in an attempt to match
the folder name in share (just in case). I had the same issues with version
2.0 but have to confirm it again.)

Currently fails:
make[2]: Entering directory
`/nupic_tmp_build/lang/py/bindings/engine_internal'
...
engine_internal_py.cpp:4455:22: error: redefinition of 'struct
swig::traits<unsigned int>'
engine_internal_py.cpp:4378:22: error: previous definition of 'struct
swig::traits<unsigned int>'
engine_internal_py.cpp:4459:23: error: redefinition of 'struct
swig::traits_asval<unsigned int>'
engine_internal_py.cpp:4382:23: error: previous definition of 'struct
swig::traits_asval<unsigned int>'
engine_internal_py.cpp:4465:23: error: redefinition of 'struct
swig::traits_from<unsigned int>'
engine_internal_py.cpp:4388:23: error: previous definition of 'struct
swig::traits_from<unsigned int>'

Heads Up :
I think that the problem has to do with the size_t that SWIG casts it into
"unsigned long" in 64 bit machines and "unsigned int" in 32 bit machines. I
assume that at some SWIG interface file you are defining the vector<size_t>
and then you also define the vector<unsigned int>. In 64 bit there are no
problems as they are different types, but in the 32 bit machines we have
redefinition of the vector<unsigned int>. (See more on this similar issue
of Gnuradio project for their explanation
http://gnuradio.org/redmine/issues/529 )

It took me some time looking for these definitions in the .i files but
without luck, however, I am sure you know exactly where these are to give
it a try.

This time difference is killing me :)

Cheers,
Georgios



On Wed, Aug 14, 2013 at 1:53 AM, Matthew Taylor <[email protected]> wrote:

> Thanks guys, please create a JIRA for this:
> https://issues.numenta.org/secure/CreateIssue!default.jspa
> ---------
> Matt Taylor
> OS Community Flag-Bearer
> Numenta
>
>
> On Tue, Aug 13, 2013 at 5:14 PM, Marek Otahal <[email protected]>
> wrote:
> > Thanks for confirmation Scott & Subutai.
> > Georgios, if you can help me with compiling on 32bit and testing, we can
> > give it a go..
> >
> >
> > On Wed, Aug 14, 2013 at 2:11 AM, Scott Purdy <[email protected]> wrote:
> >>
> >> I checked with Subutai and it sounds like we aren't aware of any reasons
> >> that 32 bit wouldn't work but aren't sure how hard it would be to get it
> >> working.  So feel free to continue trying to get it to work but we
> probably
> >> can't help much.
> >>
> >>
> >> On Tue, Aug 13, 2013 at 4:54 PM, Georgios Pierris <[email protected]>
> >> wrote:
> >>>
> >>> Cheers Scott and Marek.
> >>>
> >>> Would be nice to add 32 bit support given there are no hard
> requirements.
> >>>
> >>> In the meantime, or if not eventually resolved, would still be good to
> >>> update the dependencies on the Readme.md to reflect the 64 bit
> requirement.
> >>>
> >>> Cheers,
> >>> Georgios
> >>>
> >>>
> >>> On Wed, Aug 14, 2013 at 12:46 AM, Marek Otahal <[email protected]>
> >>> wrote:
> >>>>
> >>>> Hi Georgios,
> >>>>
> >>>>
> >>>> On Wed, Aug 14, 2013 at 1:38 AM, Scott Purdy <[email protected]>
> wrote:
> >>>>>
> >>>>> AFAIK we require 64 bit.  I believe this is necessary for our SWIG
> >>>>> interface between Python and C++ (including numpy objects) to work
> >>>>> correctly.
> >>>>
> >>>> Is it? Is it a problem of some API logic, or just missing libs?
> >>>> If it's only the libs, please see
> >>>> https://issues.numenta.org/browse/NPC-143
> >>>> and we can start rebuilding the libs and try to add linux32 support.
> >>>>
> >>>> Greetings, Mark
> >>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> On Tue, Aug 13, 2013 at 4:22 PM, Georgios Pierris <
> [email protected]>
> >>>>> wrote:
> >>>>>>
> >>>>>> Hello everyone,
> >>>>>>
> >>>>>> I was not hoping to introduce myself to the community with a
> building
> >>>>>> problem but there you go.
> >>>>>>
> >>>>>> Please also accept my apologies if this had to be a JIRA issue
> >>>>>> instead.
> >>>>>>
> >>>>>> I am trying to build nupic in Ubuntu 12.04 - 32 bit, Python 2.7, gcc
> >>>>>> 4.6.3 . Initially, it was failing to include the headers in apr-1/
> . I
> >>>>>> thought, I had to install them and also created a soft link because
> my
> >>>>>> libraries were in /usr/include/apr-1.0 .
> >>>>>>
> >>>>>> Then the build was failing on linking the htmtest with libyaml.a
> from
> >>>>>> the external/linux32/lib/libyaml.a . When I realized that there is
> no
> >>>>>> external/linux32 directory I got a bit worried.
> >>>>>>
> >>>>>> Nevertheless, I created one and statically built libyaml.a from the
> >>>>>> source you provide with nupic.
> >>>>>> Knowing I was not on the correct path, I compiled manually more
> >>>>>> libraries, e.g., libz, and copied them in the linux32/lib folder,
> and kept
> >>>>>> pushing it until I copied all the swig files from the linux64
> folder.
> >>>>>> I installed swig and ended up getting a common swig error about
> >>>>>> redefinition of swig::traits that some people say manually remove
> them, some
> >>>>>> other say it is version error.
> >>>>>>
> >>>>>> The question is, am I on the correct path and you think I should
> >>>>>> invest time on solving this issue and issues to come, or am I
> totally wrong
> >>>>>> and you do not support 32 bit Linux?
> >>>>>>
> >>>>>> I simply doubt that somebody forgot to stage the linux32 folder :)
> >>>>>>
> >>>>>> Regards,
> >>>>>> Georgios
> >>>>>>
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> Marek Otahal :o)
> >>>>
> >>>> _______________________________________________
> >>>> nupic mailing list
> >>>> [email protected]
> >>>> http://lists.numenta.org/mailman/listinfo/nupic_lists.numenta.org
> >>>>
> >>>
> >>>
> >>> _______________________________________________
> >>> nupic mailing list
> >>> [email protected]
> >>> http://lists.numenta.org/mailman/listinfo/nupic_lists.numenta.org
> >>>
> >>
> >>
> >> _______________________________________________
> >> nupic mailing list
> >> [email protected]
> >> http://lists.numenta.org/mailman/listinfo/nupic_lists.numenta.org
> >>
> >
> >
> >
> > --
> > Marek Otahal :o)
> >
> > _______________________________________________
> > nupic mailing list
> > [email protected]
> > http://lists.numenta.org/mailman/listinfo/nupic_lists.numenta.org
> >
>
> _______________________________________________
> nupic mailing list
> [email protected]
> http://lists.numenta.org/mailman/listinfo/nupic_lists.numenta.org
>
_______________________________________________
nupic mailing list
[email protected]
http://lists.numenta.org/mailman/listinfo/nupic_lists.numenta.org

Reply via email to