[Trilinos-Users] Building shared version of trilinos...

Luca Heltai luca.heltai at gmail.com
Thu Jul 24 08:15:49 MDT 2008


Dear all,

I've been trying all day to build a shared version of trilinos on a cluster
where I have access, and no matter what I do, i keep getting these errors:

========= CUT =======
Linking aztecoo as a shared library
changing directory to ../../aztecoo/src
g++ -shared -Wl,-soname,libaztecoo.so -o libaztecoo.so *.o
-L/data/heltai/libs/trilinos-8.0.7/all-mpi-debug/packages/PyTrilinos/shared
-L/home/heltai/libs/trilinos-8.0.7/all-mpi-debug/packages/aztecoo/src
-L/home/heltai/libs/trilinos-8.0.7/all-mpi-debug/packages/triutils/src
-ltriutils
-L/home/heltai/libs/trilinos-8.0.7/all-mpi-debug/packages/epetra/src
-L/home/heltai/libs/trilinos-8.0.7/all-mpi-debug/packages/teuchos/src
-L/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3 -L/usr/x86_64-suse-linux/lib
-L/usr/lib64 -L/lib64 -lepetra -fPIC -lteuchos -llapack -lcblas -lf77blas
-latlas -lfrtbegin -lg2c -lm
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld:
az_f_util.o: relocation R_X86_64_32 can not be used when making a shared
object; recompile with -fPIC
az_f_util.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
Traceback (most recent call last):
  File "../../../../packages/PyTrilinos/shared/setup.py", line 172, in ?
    main()
  File "../../../../packages/PyTrilinos/shared/setup.py", line 148, in main
    builder.buildShared()
  File "../util/SharedUtils.py", line 330, in buildShared
  File "../util/SharedUtils.py", line 97, in runCommand
RuntimeError: Exit status = 256
make[4]: *** [package] Error 1
make[4]: Leaving directory
`/data/heltai/libs/trilinos-8.0.7/all-mpi-debug/packages/PyTrilinos/shared'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory
`/data/heltai/libs/trilinos-8.0.7/all-mpi-debug/packages/PyTrilinos'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/data/heltai/libs/trilinos-8.0.7/all-mpi-debug/packages'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/data/heltai/libs/trilinos-8.0.7/all-mpi-debug'
make: *** [all] Error 2

The configure file I'm using is the following:


../configure \
  -C \
  --with-c-flags="-fPIC"\
  --with-cxx-flags="-fPIC"\
  CXXFLAGS="-fPIC"\
  CFLAGS="-fPIC"\
  LDFLAGS="-fPIC"\
  F77FLAGS="-fPIC"\
  --enable-shared \
  --with-gnumake \
  --disable-default-packages \
  --enable-teuchos-debug \
  --enable-nox \
  --enable-moocho \
  --prefix=/home/heltai/libs/trilinos-all-debug \
  --enable-epetra \
  --enable-epetraext \
  --enable-thyra \
  --enable-aztecoo \
  --enable-amesos \
  --enable-ifpack \
  --enable-ml \
  --enable-stratimikos \
  --enable-meros \
  --enable-pliris \
  --enable-sacado \
  --enable-anasazi


Where I added -fPIC to all possible compilers (this made it advance from
teuchos to atzecoo)...
The static library is built ok, but then the above error appear every time
the compile proceed in building the shared ones...

Any idea?

Thanks.

Luca.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://software.sandia.gov/mailman/private/trilinos-users/attachments/20080724/36dca4e2/attachment.html 


More information about the Trilinos-Users mailing list