[Please, keep fenics-support in CC.]

On Tue, 27 Oct 2015 22:58:15 +0100
Juan Luis Cano <[email protected]> wrote:

> On Tue, Oct 27, 2015 at 6:10 PM, Jan Blechta
> <[email protected]> wrote:
> 
> > 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.
> >
> 
> Yes, it's the DOLFIN extension module.
> 
> 
> >
> > >
> > > 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
> >
> 
> Thanks! Now I see that DOLFIN_3RD_PARTY_LIBRARIES has the contents I
> would expect... or kind of. This is the output:
> 
> -- Found SWIG: /home/juanlu/.miniconda3/envs/fenics_test/bin/swig
> (found
> > version
> >  "3.0.7")
> > -- LIBS: /home/juanlu/.miniconda3/envs/fenics_test/lib/
> > libboost_filesystem.so/home/juanlu/.miniconda3/envs/fenics_test/lib/libboost_program_options.so/home/juanlu/.miniconda3/envs/fenics_test/lib/libboost_system.so/home/juanlu/.miniconda3/envs/fenics_test/lib/libboost_thread.so/home/juanlu/.miniconda3/envs/fenics_test/lib/libboost_iostreams.so/home/juanlu/.miniconda3/envs/fenics_test/lib/libboost_timer.so/home/juanlu/.miniconda3/envs/fenics_test/lib/libslepc.so/home/juanlu/.miniconda3/envs/fenics_test/lib/libpetsc.so/home/juanlu/.miniconda3/envs/fenics_test/lib/libcholmod.a/home/juanlu/.miniconda3/envs/fenics_test/lib/libamd.a/home/juanlu/.miniconda3/envs/fenics_test/lib/libcamd.a/home/juanlu/.miniconda3/envs/fenics_test/lib/libcolamd.a/home/juanlu/.miniconda3/envs/fenics_test/lib/libccolamd.a/home/juanlu/.miniconda3/envs/fenics_test/lib/libsuitesparseconfig.a/home/juanlu/.miniconda3/envs/fenics_test/lib/libgfortran.so/home/juanlu/.miniconda3/envs/fenics_test/lib/libz.so/home/juanlu/.miniconda3/envs/fenics_test/lib/libmpichcx
 
x.so/home/juanlu/.miniconda3/envs/fenics_test/lib/libQtGui.so/home/juanlu/.miniconda3/envs/fenics_test/lib/libQtCore.so
> > -- Configuring done
> > -- Generating done
> >
> 
> Which is right but... there are no whitespaces between the libraries.
> Is it possible that the system is taking it as a single path and
> therefore not finding anything? This is probably a really stupid
> question, FEniCS is my first experience with CMake.

I don't know. This is maybe just a bug in the CMake printing function.
I'd try to look into files

~/.instant/cache|error/<module_dir>/CMakeFiles/_dolfin_compile_code_<hash>.dir/flags.make
~/.instant/cache|error/<module_dir>/CMakeFiles/_dolfin_compile_code_<hash>.dir/link.txt

to figure out what's wrong with linking. Also compile.log contains at
the end issued c++ command you should check.

Maybe Johannes would have some advice how to debug this.

Jan

> 
> If the linking libraries are there, what else could be wrong?
> 
> Regards,
> 
> Juan Luis
> 
> 
> > 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