On Tue, 27 Oct 2015 09:59:47 +0100
Juan Luis Cano <[email protected]> wrote:

> Hello,
> 
> Thanks Jan for your response. I have seen that DOLFINConfig.cmake
> does not define the libraries I need, while dolfin-config.cmake does
> (despite being deprecated). However, even if i change "DOLFIN" by
> "dolfin" or just replace one file with the other I still get the same
> result.

Just to be sure, are we speaking here about DOLFIN extension module,
not FFC module? Otherwise UFCConfig.cmake would be the file to be
considered.

> 
> I have tried injecting a 'MESSAGE (STATUS "LIBS" 
> ${DOLFIN_3RD_PARTY_LIBRARIES} )' in codegeneration.py:write_cmakefile
> to debug the code generation but the output is not shown by FEniCS.

I believe you should find CMake stdout in
~/.instant/cache|error/<module_dir>/compile.log or whereever is your
INSTANT_CACHE|ERROR_DIR

Jan

> 
> Juan Luis
> 
> On 2015-10-26 15:12, Jan Blechta wrote:
> > DOLFIN and FFC instructs Instant to find DOLFIN and UFC cmake
> > package respectively. This boils down to the call
> > instant/codegeneration.py:write_cmakefile(..., 'DOLFIN', ...) or
> > instant/codegeneration.py:write_cmakefile(..., 'UFC', ...)
> >
> > Make sure both DOLFINConfig.cmake and UFCConfig.cmake contain the
> > correct linking information.
> >
> > Jan
> >
> >
> > On Sun, 25 Oct 2015 11:31:01 +0100
> > Juan Luis Cano <[email protected]> wrote:
> >
> >> Hello all,
> >>
> >> While making changes to my conda recipes for FEniCS I found that
> >> instant is not finding the correct libraries to link against, or
> >> choosing the wrong ones, despite the ones used for compiling
> >> DOLFIN[1].
> >>
> >> In short, as I commented in the corresponding GitHub issue, DOLFIN
> >> is linked against the correct libraries, which are the ones
> >> available inside the conda environment:
> >>
> >>> |$ ldd
> >>> ~/.miniconda3/envs/fenics_test/lib/python2.7/site-packages/dolfin/cpp/_common.so
> >>> | grep boost ldd: warning: you do not have execution permission
> >>> for
> >>> `/home/juanlu/.miniconda3/envs/fenics_test/lib/python2.7/site-packages/dolfin/cpp/_common.so'
> >>> libboost_filesystem.so.1.57.0
> >>> => 
> >>> /home/juanlu/.miniconda3/envs/fenics_test/lib/python2.7/site-packages/dolfin/cpp/../../../../libboost_filesystem.so.1.57.0
> >>> (0x00007f3998095000) libboost_program_options.so.1.57.0
> >>> => 
> >>> /home/juanlu/.miniconda3/envs/fenics_test/lib/python2.7/site-packages/dolfin/cpp/../../../../libboost_program_options.so.1.57.0
> >>> (0x00007f3997e30000) libboost_system.so.1.57.0
> >>> => 
> >>> /home/juanlu/.miniconda3/envs/fenics_test/lib/python2.7/site-packages/dolfin/cpp/../../../../libboost_system.so.1.57.0
> >>> (0x00007f3997c2c000) libboost_thread.so.1.57.0
> >>> => 
> >>> /home/juanlu/.miniconda3/envs/fenics_test/lib/python2.7/site-packages/dolfin/cpp/../../../../libboost_thread.so.1.57.0
> >>> (0x00007f3997a08000) libboost_iostreams.so.1.57.0
> >>> => 
> >>> /home/juanlu/.miniconda3/envs/fenics_test/lib/python2.7/site-packages/dolfin/cpp/../../../../libboost_iostreams.so.1.57.0
> >>> (0x00007f39977df000) libboost_timer.so.1.57.0
> >>> => 
> >>> /home/juanlu/.miniconda3/envs/fenics_test/lib/python2.7/site-packages/dolfin/cpp/../../../../libboost_timer.so.1.57.0
> >>> (0x00007f39975db000) libboost_chrono.so.1.57.0
> >>> => 
> >>> /home/juanlu/.miniconda3/envs/fenics_test/lib/python2.7/site-packages/dolfin/cpp/../../../.././libboost_chrono.so.1.57.0
> >>> (0x00007f39922bc000) |
> >> But whenever instant jit-compiles a module, it's either not able to
> >> find them:
> >>
> >>> |$ |||ldd
> >>> ~/.instant/cache/dolfin_compile_code_XXX/_dolfin_compile_code_XXX.so
> >>> | grep boost| libboost_filesystem.so.1.57.0 => not found
> >>> libboost_program_options.so.1.57.0 => not found
> >>> libboost_system.so.1.57.0 => not found libboost_thread.so.1.57.0
> >>> => not found libboost_iostreams.so.1.57.0 => not found
> >>> libboost_timer.so.1.57.0 => not found libboost_chrono.so.1.57.0 =>
> >>> not found |
> >> Or, if they are system-wide available, it uses those:
> >>
> >>> |$ ldd
> >>> ~/.instant/cache/dolfin_compile_code_XXX/_dolfin_compile_code_XXX.so
> >>> | grep boost libboost_filesystem.so.1.58.0 =>
> >>> /usr/lib/libboost_filesystem.so.1.58.0 (0x00007f2dc0b44000)
> >>> libboost_program_options.so.1.58.0 =>
> >>> /usr/lib/libboost_program_options.so.1.58.0 (0x00007f2dc08c6000)
> >>> libboost_system.so.1.58.0 => /usr/lib/libboost_system.so.1.58.0
> >>> (0x00007f2dc06c2000) libboost_thread.so.1.58.0 =>
> >>> /usr/lib/libboost_thread.so.1.58.0 (0x00007f2dc049a000)
> >>> libboost_iostreams.so.1.58.0
> >>> => /usr/lib/libboost_iostreams.so.1.58.0 (0x00007f2dc0282000)
> >>> libboost_timer.so.1.58.0 => /usr/lib/libboost_timer.so.1.58.0
> >>> (0x00007f2dc007d000) libboost_chrono.so.1.58.0
> >>> => /usr/lib/libboost_chrono.so.1.58.0 (0x00007f2dbce55000)|
> >> (notice the version mismatch)
> >>
> >> The funny thing is that when those libraries are not found I am
> >> able to properly run demo_poisson.py for instance, but when it
> >> picks those from the system it leads to GLIBCXX mismatch errors[2].
> >>
> >> I tried to patch instant to see if hardwiring
> >> ~/.miniconda3/envs/fenics_test/lib/ to library_dirs (see original
> >> at [3]) would make the trick, but it didn't.
> >>
> >> I am a bit lost now since, at the time of building instant, there's
> >> no information on which libraries I'm using to link DOLFIN, and I
> >> don't see a way of forcing a search directory for the libraries. I
> >> would need some help for debugging this, or some hint of what am I
> >> doing wrong.
> >>
> >> Thanks in advance, best,
> >>
> >> Juan Luis Cano
> >>
> >> [1]:
> >> https://github.com/Juanlu001/fenics-recipes/issues/35#issuecomment-150803221
> >> [2]:
> >> https://github.com/Juanlu001/fenics-recipes/issues/24#issuecomment-148916949
> >> [3]:
> >> https://github.com/FEniCS/instant/blob/b47459e76393a90ab4167054bfb4ce3cc2d8dd88/instant/build.py#L229

_______________________________________________
fenics-support mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics-support

Reply via email to