problem with dolfin installation

Asked by Murtazo Nazarov

Hi,

 I am facing to the following error when I compile dolfin

 /usr/bin/ld: cannot find -lboost_program_options
 collect2: ld returned 1 exit status
 scons: *** [dolfin/libdolfin.so.0.9.5] Error 1
 scons: building terminated because of errors.
 dolfin/libdolfin.so.0.9.5 failed: Error 1
 Failure with exit status: 2
 Exit message: There was a problem building dolfin.

 However, I have lboost_program_options:

 murtazo@na50:~/local/FEniCS$ ls -l /usr/lib/libboost_program_options-*
 lrwxrwxrwx 1 root root 35 Dec 12 01:35
 /usr/lib/libboost_program_options-gcc-mt.a ->
 libboost_program_options-gcc41-mt.a
 -rw-r--r-- 1 root root 599610 Oct 8 12:44
 /usr/lib/libboost_program_options-mt.a
 lrwxrwxrwx 1 root root 37 Dec 12 01:16
 /usr/lib/libboost_program_options-mt.so ->
 libboost_program_options-mt.so.1.38.0
 -rw-r--r-- 1 root root 268808 Oct 8 12:44
 /usr/lib/libboost_program_options-mt.so.1.38.0
 murtazo@na50:~/local/FEniCS$

 murtazo@na50:~/local/FEniCS$ dpkg -l|grep boost
 ii libboost-date-time1.38-dev
 1.38.0-6ubuntu6 set of date-time
 libraries based on generic
 ii libboost-date-time1.38.0
 1.38.0-6ubuntu6 set of date-time
 libraries based on generic
 ii libboost-dev
 1.38.1 Boost C++ Libraries
 development files (defau
 rc libboost-filesystem1.34.1
 1.34.1-16ubuntu1 filesystem
 operations (portable paths, itera
 ii libboost-filesystem1.38-dev
 1.38.0-6ubuntu6 filesystem
 operations (portable paths, itera
 ii libboost-filesystem1.38.0
 1.38.0-6ubuntu6 filesystem
 operations (portable paths, itera
 ii libboost-graph1.38-dev
 1.38.0-6ubuntu6 generic graph
 components and algorithms in C
 ii libboost-graph1.38.0
 1.38.0-6ubuntu6 generic graph
 components and algorithms in C
 ii libboost-iostreams1.38-dev
 1.38.0-6ubuntu6 Boost.Iostreams
 Library development files
 ii libboost-iostreams1.38.0
 1.38.0-6ubuntu6 Boost.Iostreams
 Library
 ii libboost-math1.38-dev
 1.38.0-6ubuntu6 Boost.Math Library
 development files
 ii libboost-math1.38.0
 1.38.0-6ubuntu6 Boost.Math Library
 ii libboost-program-options-dev
 1.38.1 program options
 library for C++ (default ver
 rc libboost-program-options1.34.1
 1.34.1-16ubuntu1 program options
 library for C++
 rc libboost-program-options1.35.0
 1.35.0-8ubuntu5 program options
 library for C++
 ii libboost-program-options1.38-dev
 1.38.0-6ubuntu6 program options
 library for C++
 ii libboost-program-options1.38.0
 1.38.0-6ubuntu6 program options
 library for C++
 ii libboost-program-options1.40.0
 1.40.0-2ubuntu2 program options
 library for C++
 rc libboost-python1.35.0
 1.35.0-8ubuntu5 Boost.Python Library
 ii libboost-python1.38-dev
 1.38.0-6ubuntu6 Boost.Python
 Library development files
 ii libboost-python1.38.0
 1.38.0-6ubuntu6 Boost.Python Library
 rc libboost-python1.40.0
 1.40.0-2ubuntu2 Boost.Python Library
 rc libboost-regex1.34.1
 1.34.1-16ubuntu1 regular expression
 library for C++
 ii libboost-regex1.38-dev
 1.38.0-6ubuntu6 regular expression
 library for C++
 ii libboost-regex1.38.0
 1.38.0-6ubuntu6 regular expression
 library for C++
 rc libboost-serialization1.34.1
 1.34.1-16ubuntu1 serialization
 library for C++
 ii libboost-serialization1.38-dev
 1.38.0-6ubuntu6 serialization
 library for C++
 ii libboost-serialization1.38.0
 1.38.0-6ubuntu6 serialization
 library for C++
 rc libboost-signals1.34.1
 1.34.1-16ubuntu1 managed signals and
 slots library for C++
 ii libboost-signals1.38-dev
 1.38.0-6ubuntu6 managed signals and
 slots library for C++
 ii libboost-signals1.38.0
 1.38.0-6ubuntu6 managed signals and
 slots library for C++
 ii libboost-system1.38-dev
 1.38.0-6ubuntu6 Operating system
 (e.g. diagnostics support)
 ii libboost-system1.38.0
 1.38.0-6ubuntu6 Operating system
 (e.g. diagnostics support)
 ii libboost-test1.38-dev
 1.38.0-6ubuntu6 components for
 writing and executing test su
 ii libboost-test1.38.0
 1.38.0-6ubuntu6 components for
 writing and executing test su
 rc libboost-thread1.34.1
 1.34.1-16ubuntu1 portable C++
 multi-threading
 ii libboost-thread1.38-dev
 1.38.0-6ubuntu6 portable C++
 multi-threading
 ii libboost-thread1.38.0
 1.38.0-6ubuntu6 portable C++
 multi-threading
 ii libboost-wave1.38-dev
 1.38.0-6ubuntu6 C99/C++
 preprocessor library
 ii libboost-wave1.38.0
 1.38.0-6ubuntu6 C99/C++
 preprocessor library
 ii libboost1.38-dev
 1.38.0-6ubuntu6 Boost C++ Libraries
 development files
 ii libboost1.38-doc
 1.38.0-6ubuntu6 Boost.org libraries
 documentation
 murtazo@na50:~/local/FEniCS$

 Can you see what could be a problem?

 Thanks a lot,
 murtazo

Question information

Language:
English Edit question
Status:
Answered
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
Andre Massing (massing) said :
#1

Hi,

Murtazo Nazarov wrote:
> New question #93975 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/93975
>
> Hi,
>
> I am facing to the following error when I compile dolfin
>
> /usr/bin/ld: cannot find -lboost_program_options
> collect2: ld returned 1 exit status
> scons: *** [dolfin/libdolfin.so.0.9.5] Error 1
> scons: building terminated because of errors.
> dolfin/libdolfin.so.0.9.5 failed: Error 1
> Failure with exit status: 2
> Exit message: There was a problem building dolfin.
>
>
> However, I have lboost_program_options:
>
> murtazo@na50:~/local/FEniCS$ ls -l /usr/lib/libboost_program_options-*
> lrwxrwxrwx 1 root root 35 Dec 12 01:35
> /usr/lib/libboost_program_options-gcc-mt.a ->
> libboost_program_options-gcc41-mt.a
> -rw-r--r-- 1 root root 599610 Oct 8 12:44
> /usr/lib/libboost_program_options-mt.a
> lrwxrwxrwx 1 root root 37 Dec 12 01:16
> /usr/lib/libboost_program_options-mt.so ->
> libboost_program_options-mt.so.1.38.0
> -rw-r--r-- 1 root root 268808 Oct 8 12:44
> /usr/lib/libboost_program_options-mt.so.1.38.0
> murtazo@na50:~/local/FEniCS$

I had a similar error a while ago. The name of the
boost_programm_options shared library has changed in ubuntu from the
old name -lboost_program_options to -lboost_program_options-<SOMETHING>.
The solution was to search for old package-config files generated by
DOLFINS's scons, which caches also the link flags, erase them and
regenerate them via scons.
"locate *boost*.pc" might be useful to find them (or the find command).
HTH,
Andre

>
>
> murtazo@na50:~/local/FEniCS$ dpkg -l|grep boost
> ii libboost-date-time1.38-dev
> 1.38.0-6ubuntu6 set of date-time
> libraries based on generic
> ii libboost-date-time1.38.0
> 1.38.0-6ubuntu6 set of date-time
> libraries based on generic
> ii libboost-dev
> 1.38.1 Boost C++ Libraries
> development files (defau
> rc libboost-filesystem1.34.1
> 1.34.1-16ubuntu1 filesystem
> operations (portable paths, itera
> ii libboost-filesystem1.38-dev
> 1.38.0-6ubuntu6 filesystem
> operations (portable paths, itera
> ii libboost-filesystem1.38.0
> 1.38.0-6ubuntu6 filesystem
> operations (portable paths, itera
> ii libboost-graph1.38-dev
> 1.38.0-6ubuntu6 generic graph
> components and algorithms in C
> ii libboost-graph1.38.0
> 1.38.0-6ubuntu6 generic graph
> components and algorithms in C
> ii libboost-iostreams1.38-dev
> 1.38.0-6ubuntu6 Boost.Iostreams
> Library development files
> ii libboost-iostreams1.38.0
> 1.38.0-6ubuntu6 Boost.Iostreams
> Library
> ii libboost-math1.38-dev
> 1.38.0-6ubuntu6 Boost.Math Library
> development files
> ii libboost-math1.38.0
> 1.38.0-6ubuntu6 Boost.Math Library
> ii libboost-program-options-dev
> 1.38.1 program options
> library for C++ (default ver
> rc libboost-program-options1.34.1
> 1.34.1-16ubuntu1 program options
> library for C++
> rc libboost-program-options1.35.0
> 1.35.0-8ubuntu5 program options
> library for C++
> ii libboost-program-options1.38-dev
> 1.38.0-6ubuntu6 program options
> library for C++
> ii libboost-program-options1.38.0
> 1.38.0-6ubuntu6 program options
> library for C++
> ii libboost-program-options1.40.0
> 1.40.0-2ubuntu2 program options
> library for C++
> rc libboost-python1.35.0
> 1.35.0-8ubuntu5 Boost.Python Library
> ii libboost-python1.38-dev
> 1.38.0-6ubuntu6 Boost.Python
> Library development files
> ii libboost-python1.38.0
> 1.38.0-6ubuntu6 Boost.Python Library
> rc libboost-python1.40.0
> 1.40.0-2ubuntu2 Boost.Python Library
> rc libboost-regex1.34.1
> 1.34.1-16ubuntu1 regular expression
> library for C++
> ii libboost-regex1.38-dev
> 1.38.0-6ubuntu6 regular expression
> library for C++
> ii libboost-regex1.38.0
> 1.38.0-6ubuntu6 regular expression
> library for C++
> rc libboost-serialization1.34.1
> 1.34.1-16ubuntu1 serialization
> library for C++
> ii libboost-serialization1.38-dev
> 1.38.0-6ubuntu6 serialization
> library for C++
> ii libboost-serialization1.38.0
> 1.38.0-6ubuntu6 serialization
> library for C++
> rc libboost-signals1.34.1
> 1.34.1-16ubuntu1 managed signals and
> slots library for C++
> ii libboost-signals1.38-dev
> 1.38.0-6ubuntu6 managed signals and
> slots library for C++
> ii libboost-signals1.38.0
> 1.38.0-6ubuntu6 managed signals and
> slots library for C++
> ii libboost-system1.38-dev
> 1.38.0-6ubuntu6 Operating system
> (e.g. diagnostics support)
> ii libboost-system1.38.0
> 1.38.0-6ubuntu6 Operating system
> (e.g. diagnostics support)
> ii libboost-test1.38-dev
> 1.38.0-6ubuntu6 components for
> writing and executing test su
> ii libboost-test1.38.0
> 1.38.0-6ubuntu6 components for
> writing and executing test su
> rc libboost-thread1.34.1
> 1.34.1-16ubuntu1 portable C++
> multi-threading
> ii libboost-thread1.38-dev
> 1.38.0-6ubuntu6 portable C++
> multi-threading
> ii libboost-thread1.38.0
> 1.38.0-6ubuntu6 portable C++
> multi-threading
> ii libboost-wave1.38-dev
> 1.38.0-6ubuntu6 C99/C++
> preprocessor library
> ii libboost-wave1.38.0
> 1.38.0-6ubuntu6 C99/C++
> preprocessor library
> ii libboost1.38-dev
> 1.38.0-6ubuntu6 Boost C++ Libraries
> development files
> ii libboost1.38-doc
> 1.38.0-6ubuntu6 Boost.org libraries
> documentation
> murtazo@na50:~/local/FEniCS$
>
>
> Can you see what could be a problem?
>
> Thanks a lot,
> murtazo
>
>
> You received this question notification because you are a member of
> DOLFIN Team, which is an answer contact for DOLFIN.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dolfin
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~dolfin
> More help : https://help.launchpad.net/ListHelp

Revision history for this message
Murtazo Nazarov (murtazo) said :
#2

Hi,

I tried what you said, I did

>scons -c
>rm scons/pkgconfig/*

then configured and compiled again using dorsal, the same problem is still there.

Revision history for this message
Andre Massing (massing) said :
#3

Hi,

Murtazo Nazarov wrote:
> Question #93975 on DOLFIN changed:
> https://answers.launchpad.net/dolfin/+question/93975
>
> Status: Answered => Open
>
> Murtazo Nazarov is still having a problem:
>
> Hi,
>
> I tried what you said, I did
>
>> scons -c
>> rm scons/pkgconfig/*

If you run scons -c, does it regenerate the pkgconfig file for boost
program_options ? If not, it takes a somewhere existing pc file as default.
You might also want to check older installation paths of DOLFIN.
"locate boost_program_options.pc" or
"locate *boost*program*.pc"
should help to find any old pc files lying around, assuming that your
file location database is up-to-date.

>
> then configured and compiled again using dorsal, the same problem is
> still there.
>

Revision history for this message
Murtazo Nazarov (murtazo) said :
#4

Thanks Andre Massing, that solved my question.

Revision history for this message
Nuno Lopes (ndlopes) said :
#5

Hi!
I had the same problem in Karmic Koala.
I've solved the problem by removing all libboost versions <1.38,
with the exception of libboost-program-options1.38 libboost-test1.38 and libboost-signal1.38 that are required by some kde or gnome stuff
Then I've installed all 1.40 versions.
Note that the libboost*-dev that I have are only from 1.40 versions.
I've also removed old boost.pc files.

Hope it helps.
N.Lopes

Revision history for this message
Murtazo Nazarov (murtazo) said :
#6

Hi,

It seems I can compile and run the demos, but I cannot rebuild ulf form files:

murtazo@na50:~/local/FEniCS/dolfin/demo/pde/poisson/cpp$ ffc -l dolfin Poisson.ufl
This is FFC, the FEniCS Form Compiler, version 0.7.1.
For further information, visit http://www.fenics.org/ffc/.

An exception occured during evaluation of form file.
To help you find the location of the error, a temporary script
'Poisson_debug.py'
has been created and will now be executed with debug output enabled:
Traceback (most recent call last):
  File "/home/murtazo/local/FEniCS/build/bin/ffc", line 167, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/home/murtazo/local/FEniCS/build/bin/ffc", line 138, in main
    ufd = load_ufl_file(filename)
  File "/home/murtazo/local/FEniCS/build/lib/python2.6/site-packages/ufl/algorithms/formfiles.py", line 92, in load_ufl_file
    m = __import__(basename)
  File "/home/murtazo/local/FEniCS/dolfin/demo/pde/poisson/cpp/Poisson_debug.py", line 19, in <module>
    f = Function(element)
NameError: name 'Function' is not defined
murtazo@na50:~/local/FEniCS/dolfin/demo/pde/poisson/cpp$ python --version
Python 2.6.4

Does anyone experienced this error or any ideas?

murtazo

Revision history for this message
Nuno Lopes (ndlopes) said :
#7

Yes!
I've solved the problem using the dev version of dolfin and the stable version of ffc.
See
https://answers.launchpad.net/dorsal/+question/93756

Hope it helps again :D

Can you help with this problem?

Provide an answer of your own, or ask Murtazo Nazarov for more information if necessary.

To post a message you must log in.