TRIQS / triqs_0.x

DEPRECATED -- This is the repository of the older versions of TRIQS
Other
11 stars 9 forks source link

Incorrect installation of shared libraries #20

Closed krivenko closed 12 years ago

krivenko commented 12 years ago

I have compiled and installed TRIQS successfully (git master) following the user manual page. However there is an implicit issue with the installation. When the SHARED_LIBS option is enabled, python modules in the resulting installation are linked against libLocalGreenFunction_c.so and libtriqs.so residing in the build directory. The problem gets partially solved by switching on Install_dev option, because then libtriqs.so is installed into ${CMAKE_INSTALL_PREFIX}/lib. I guess this behavior was introduced with the static linking in mind, because it indeed makes sense to install the static library only to develop TRIQS itself. Nevertheless, both those shared libraries must be installed into ${CMAKE_INSTALL_PREFIX}/lib and properly linked to make it possible to create binary distributions of TRIQS.

krivenko commented 12 years ago

Steps to reproduce the problem: 1) Compile and install TRIQS as described in the manual (with SHARED_LIBS=ON). 2) Go to ${CMAKE_INSTALL_PREFIX} and make clean. 3) Invoke ${CMAKE_INSTALL_PREFIX}/INSTALL_DIR/bin/pytriqs 4) In the Python shell run an example about Green's functions. The import statement from pytriqs.Base.GF_Local import GFBloc_ImFreq should fail.

mferrero commented 12 years ago

@krivenko: Can you check that the above commit solves the problem and close the ticket if so?

krivenko commented 12 years ago

@mferrero: Yes, now the installation is complete and works well. Thanks a lot!

krivenko commented 12 years ago

Sorry, but there is another issue, perhaps caused by your commit fc11ffb

Hamiltonian with Eps0 term  : 
 2.5 C^(up,1)C(up,1)C^(down,1)C(down,1) + C^(up,1)C(up,1) + C^(down,1)C(down,1) 
Inv Fourier done
Traceback (most recent call last):
  File "./Jernej.py", line 37, in <module>
    S.Solve()
  File "/usr/lib64/python2.7/site-packages/pytriqs/Solvers/HybridizationExpansion/__init__.py", line 296, in Solve
    C_Module.MC_solve(self.__dict__ ) # C++ solver
TypeError: No registered converter was able to produce a C++ rvalue of type GF_C<GF_Bloc_ImTime> from this Python object of type GF
mferrero commented 12 years ago

How can I reproduce this error? Is it during the make test?

krivenko commented 12 years ago

How can I reproduce this error? Is it during the make test?

Try to run, for example, the script from #17.