[petsc-users] PetSc + MATLAB installation problem on Debian Squeeze

Barry Smith bsmith at mcs.anl.gov
Tue Dec 6 18:54:59 CST 2011


  Oren,

    This comes from MATLAB having different libraries with different versions and different OSes and not having a mechanism to determine up front what libraries exist and are needed to be linked against.
You need to first edit $PETSC_ARCH/conf/petscvariables and locate the line that contains -L/opt/MATLAB/R2011b/bin/glnxa64 -L/opt/MATLAB/R2011b/extern/lib/glnxa64 -leng -lmex -lmx -lmat -lut -licudata -licui18n -licuuc then
check in the directories /opt/MATLAB/R2011b/bin/glnxa64 and /opt/MATLAB/R2011b/extern/lib/glnxa64  for what libraries actually exist and remove from the list in petscvariables those that do not exist. Then try running make test again

   Please switch to petsc-maint at mcs.anl.gov for any additional emails needed on this thread of getting the MATLAB/PETSc stuff running.

   Barry


On Dec 6, 2011, at 5:08 PM, Oren Livne wrote:

> Dear All,
> 
> I'm trying to install PetSc with the MATLAB interface on Debian Squeeze 6.26. "make all test" fails on an ld error due to a MATLAB library. Running the MATLAB library seems to cause a seg fault even though matlab runs fine (7.13 / R2011b).
> 
> Could you kindly help? Output attached below.
> 
> Thanks so much,
> Oren
> 
> ------------------------------------------------------------------------------
> $ uname -a
> Linux vm-debian 2.6.32-5-amd64 #1 SMP Mon Oct 3 03:59:20 UTC 2011 x86_64 GNU/Linux
> 
> $ ./configure --with-shared-libraries --with-matlab-engine --with-matlab --download-f2cblaslapack --with-mpi=0
> ... OK
> 
> $ make all test
> ...
> libfast in: /home/oren/petsc-3.2-p5/tutorials/multiphysics
> Completed building libraries
> =========================================
> making shared libraries in /home/oren/petsc-3.2-p5/arch-linux2-c-debug/lib
> building libpetsc.so
> /usr/bin/ld: cannot find -licudata
> collect2: ld returned 1 exit status
> =========================================
> Now to check if the libraries are working do:
> make PETSC_DIR=/home/oren/petsc-3.2-p5 PETSC_ARCH=arch-linux2-c-debug test
> =========================================
> Running test examples to verify correct installation
> Using PETSC_DIR=/home/oren/petsc-3.2-p5 and PETSC_ARCH=arch-linux2-c-debug
> --------------Error detected during compile or link!-----------------------
> See http://www.mcs.anl.gov/petsc/petsc-2/documentation/faq.html
> gcc -o ex19.o -c -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g3 -I/home/oren/petsc-3.2-p5/include -I/home/oren/petsc-3.2-p5/arch-linux2-c-debug/include -I/opt/MATLAB/R2011b/extern/include -I/home/oren/petsc-3.2-p5/include/mpiuni -D__INSDIR__=src/snes/examples/tutorials/ ex19.c
> gcc -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g3  -o ex19  ex19.o -Wl,-rpath,/home/oren/petsc-3.2-p5/arch-linux2-c-debug/lib -L/home/oren/petsc-3.2-p5/arch-linux2-c-debug/lib  -lpetsc -lX11 -lpthread -Wl,-rpath,/opt/MATLAB/R2011b/sys/os/glnxa64:/opt/MATLAB/R2011b/bin/glnxa64:/opt/MATLAB/R2011b/extern/lib/glnxa64 -L/opt/MATLAB/R2011b/bin/glnxa64 -L/opt/MATLAB/R2011b/extern/lib/glnxa64 -leng -lmex -lmx -lmat -lut -licudata -licui18n -licuuc -Wl,-rpath,/home/oren/petsc-3.2-p5/arch-linux2-c-debug/lib -lf2clapack -lf2cblas -lm -lm -ldl
> /usr/bin/ld: cannot find -licudata
> collect2: ld returned 1 exit status
> make[3]: [ex19] Error 1 (ignored)
> /bin/rm -f ex19.o
> Completed test examples
> 
> $ /opt/MATLAB/R2011b/bin/glnxa64/libicudata.so.44
> Segmentation fault
> 
> $ /opt/MATLAB/R2011b/bin/glnxa64/libicudata.so.44.2
> Segmentation fault
> 
> 
> 



More information about the petsc-users mailing list