Hi Alexander, I have recently noticed problems linking with PETSc using the newest ubuntu (and the new suse), because of changed linker flags. Basically, we create a libpetscall.so that contains all petsc libraries and we link that .so into each executable. But the new gcc (or the configuration of it in ubuntu) ignores libraries linked into libpetscall.so.
Can you please try this patch for common/Make.global_options.in, ./reconfigure (important!), make debug and link again? On Wed, Jul 18, 2012 at 11:24 AM, Alexander Grayver <[email protected]> wrote: > Hello deal.II team, > > I've configured and compiled deal.II-7.2pre with PETSc-3.3-p2 like that: > > ./configure --disable-threads --with-petsc=/home/lib/petsc-3.3-p2 > --with-petsc-arch=mpich-gcc-double-debug-c-shared --enable-mpi > --with-metis=/home/lib/metis > > Then trying to compile any step gives me a lot of such errors: > > ============================ Linking step-1 > /home/lib/deal.II-dev/lib/libdeal_II.g.so: undefined reference to `VecSet' > /home/lib/deal.II-dev/lib/libdeal_II.g.so: undefined reference to > `MatAssemblyBegin' > /home/lib/deal.II-dev/lib/libdeal_II.g.so: undefined reference to `VecAYPX' > ... > > I did read FAQ and PETSc is in my LD_LIBRARY_PATH: > > user@user:~$ echo $LD_LIBRARY_PATH > /home/lib/petsc-3.3-p2/mpich-gcc-double-debug-c-shared/lib > > However I don't see any dependency on petsc in libdeal_II.g.so: > > user@user-VirtualBox:~$ ldd /home/lib/deal.II-dev/lib/libdeal_II.g.so > linux-vdso.so.1 => (0x00007fff54927000) > libmpich.so.3 => /usr/lib/libmpich.so.3 (0x00007fe4adf68000) > libmpl.so.1 => /usr/lib/libmpl.so.1 (0x00007fe4add63000) > libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 > (0x00007fe4adb45000) > libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 > (0x00007fe4ad92f000) > libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe4ad58e000) > /lib64/ld-linux-x86-64.so.2 (0x00007fe4b4964000) > librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fe4ad385000) > libcr.so.0 => /usr/lib/libcr.so.0 (0x00007fe4ad17b000) > libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fe4acf77000) > > Should not libpetsc.so be here? > And how to proceed with these errors? > > P.S. PETSc has been successfully compiled and tested > > Thanks. > > -- > Regards, > Alexander > > _______________________________________________ > dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii -- Timo Heister http://www.math.tamu.edu/~heister/
petsc_linkbug.patch
Description: Binary data
_______________________________________________ dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii
