[FieldTrip] [multivariate] MEX compiling for 32-bit MATLAB under 64-bit Linux: who helps?

Jen Whitman jenwhitman at gmail.com
Wed May 25 19:53:28 CEST 2011

As another ubuntu 64-bit user, I'd say your problem is with your matlab
install rather than with fieldtrip. You may have inadvertently specified
32-bit instead of 64-bit when you installed matlab. If you type "computer"
at the matlab prompt, it should say "GLNXA64". If not, I recommend redoing
the matlab installation and making sure you specify your OS as 64-bit. If
you still get error message about libstdc++.so, you may need to install that
library using the 'synaptic package manger' (in your system menu under
administration). A good resource for help if you have further difficulty may
be linuxquestions.org.

Best of luck!

On Wed, May 25, 2011 at 2:50 AM, Sander Maijers
<S.N.Maijers at student.ru.nl>wrote:

> Dear readers,
> I am running MATLAB R2011a 32-bit under Ubuntu Linux 10.10 64-bit (Linux
> thuisrekenaar 2.6.35-28-generic #50-Ubuntu SMP Fri Mar 18 18:42:20 UTC 2011
> x86_64 GNU/Linux).
> When I call "ft_timelockstatistics()" with "cfg.mva ={ft_mv_standardizer()
> ft_mv_svm()};"
> It fails:
> "selected 60 channels
> selected 351 time bins
> selected 1 frequency bins
> using "statistics_crossvalidate" for the statistical testing
> initializing random number generator with seed 1
> validating 1 dataset(s)
> input 1 consists of 439 examples and 21060 features
> output 1 consists of 439 examples and 1 features
> validating using 5-fold cross-validation
> using 5 folds for 1 datasets
> dataset 1: validating fold 1 of 5 using 351 training samples and 88 test
> samples Compiling tprod for first use
> /usr/bin/ld: skipping
> incompatible /usr/lib/gcc/x86_64-linux-gnu/4.3.5/libstdc++.so when
> searching for -lstdc++ /usr/bin/ld: skipping
> incompatible /usr/lib/gcc/x86_64-linux-gnu/4.3.5/libstdc++.a when searching
> for -lstdc++ /usr/bin/ld: skipping
> incompatible /usr/lib/gcc/x86_64-linux-gnu/4.3.5/libstdc++.so when
> searching for -lstdc++ /usr/bin/ld: skipping
> incompatible /usr/lib/gcc/x86_64-linux-gnu/4.3.5/libstdc++.a when searching
> for -lstdc++ /usr/bin/ld:
>        cannot find -lstdc++ collect2: ld returned 1 exit status
> mex: link of ' "tprod.mexglx"' failed.
> ??? Error using ==> tprod at 132 unable to compile MEX version of
> '/mnt/data1/0/9/data/software/UNIX/scientific/FieldTrip/bin/fieldtrip-read-only/multivariate/external/farquhar/tprod/tprod',
> please make sure your MEX compiler is set up correctly (try 'mex -setup')."
> I have followed the instructions on
> https://help.ubuntu.com/community/MATLAB#MEX functions to enable MEX
> compiling but it was not successful.
> -> Before I singlehandedly bring my operating system configuration into
> disarray, I would like to learn from you the following. Do you know of ways
> to use a gcc to compile code written for a 32-bit architecture ona 64-bit
> machine? Or if necessary another compiler that works under Linux?
> -> If such a thing is certainly impossible, are there ways to avoid MEX
> compiling? Or could someone provide precompiled MEX files that would suit my
> configuration?
> [*] I have installed the Ubuntu package "ia32-libs" (version
> 20090808ubuntu9.1)
> [*] It seems that the only thing I need is 32-bit binaries for libstdc++.
> Perhaps I can introduce these in some creative way, but I would like to
> check with you all first.
> I hope you are willing to help me. As a novice to FieldTrip and even
> MATLAB, I have encountered many obstacles but I am determined to surmount
> them.
> Kind regards,
> Sander Maijers (BA Linguistics student)
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110525/73547bbb/attachment-0002.html>

More information about the fieldtrip mailing list