examples can't be run after I upgrade my ubuntu version

Asked by Jack Wang

Recently I upgrade my ubuntu to version 11.10, then I can't run the examples.

kinn@kinn-desktop:~$ cd YADE/bin
kinn@kinn-desktop:~/YADE/bin$ python yade-0.60.3 funnel.py
Welcome to Yade 0.60.3
Traceback (most recent call last):
  File "yade-0.60.3", line 105, in <module>
    import yade
  File "/home/kinn/YADE/lib/yade-0.60.3/py/yade/__init__.py", line 34, in <module>
    ctypes.cdll.LoadLibrary(libstdcxx)
  File "/usr/lib/python2.7/ctypes/__init__.py", line 431, in LoadLibrary
    return self._dlltype(name)
  File "/usr/lib/python2.7/ctypes/__init__.py", line 353, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /usr/lib/libstdc++.so.6: cannot open shared object file: No such file or directory

How to solve the problem.
Thanks
Jack

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jack Wang
Solved:
Last query:
Last reply:
Revision history for this message
Anton Gladky (gladky-anton) said :
#1

Did you recompile the source after upgrading?

Anton

Revision history for this message
Christian Jakob (jakob-ifgt) said :
#2

janaka kumara had the same problem after upgrading gcc. it seems, that
the library is no more in /usr/lib (see Question #174861)...
try this:

sudo ln -s /usr/lib/i386-linux-gnu/libstdc++.so.6 /usr/lib/libstdc++.so.6

if the same error message still occurs, then search for libstdc++.so.6
on your machine set the right path in the command above.

regards,

christian.

Revision history for this message
Jack Wang (songjiepy) said :
#3

Dear christian
 I do as what you have said.But another problem occurs.

kinn@kinn-desktop:~/YADE/bin$ python yade-0.60.3 funnel.py
Welcome to Yade 0.60.3
Traceback (most recent call last):
  File "yade-0.60.3", line 105, in <module>
    import yade
  File "/home/kinn/YADE/lib/yade-0.60.3/py/yade/__init__.py", line 58, in <module>
    import boot
ImportError: libboost_system.so.1.40.0: cannot open shared object file: No such file or directory

Then what should I do?
Thank you.

Revision history for this message
Jack Wang (songjiepy) said :
#4

Dear Anton
After upgrading I once try to recompile yade, but there were problems.

kinn@kinn-desktop:~/yade-0.60.3$ scons PREFIX=/home/kinn/YADE60 optimize=1 linkStrategy=monolithic features=python,opengl,openmp,log4cxx,gts,vtk,qt4
scons: Reading SConscript files ...
@@@ Using profile default (scons.profile-default) @@@
Yade version is `0.60.3' (0.60.3), installed files will be suffixed with `-0.60.3'.
All intermediary files will be in `/home/kinn/build-0.60.3/dbg'.
Mkdir("/home/kinn/build-0.60.3/dbg")
Checking whether c++ compiler "g++" works...yes
Finding libstdc++ library... (cached) /usr/lib/i386-linux-gnu/libstdc++.so.6
Checking for pthread_exit(NULL) in C library pthread... yes
Checking for Python development files... error
Checking for required python modules... (cached) all ok
Checking boost libraries... Failures: boost_program_options, boost_python
Checking for C++ header file boost/foreach.hpp... yes
Checking for C++ header file Eigen/Core... yes
Checking for C++ header file loki/NullType.h... yes

One of the essential libraries above was not found, unable to continue.

Check `/home/kinn/build-0.60.3/dbg/config.log' for possible causes, note that there are options that you may need to customize:

PREFIX: Install path prefix
    default: /usr/local
    actual: /home/kinn/YADE60

runtimePREFIX: Runtime path prefix; DO NOT USE, inteded for packaging only.
    default: None
    actual: /home/kinn/YADE60

variant: Build variant, will be suffixed to all files, along with version.
    default:
    actual:

debug: Enable debugging information (yes|no)
    default: 0
    actual: True

gprof: Enable profiling information for gprof (yes|no)
    default: 0
    actual: False

optimize: Turn on optimizations (-1, 0 or 1); negative value sets optimization based on debugging: not optimize with debugging and vice versa.
    default: -1
    actual: 1

exclude: Yade components that will not be built
    (all|none|comma-separated list of names)
    allowed names: gui extra common dem lattice snow
    default: none
    actual:

PGO: Whether to "gen"erate or "use" Profile-Guided Optimization (|gen|use)
    default:
    actual:

features: Optional features that are turned on
    (all|none|comma-separated list of names)
    allowed names: opengl log4cxx cgal openmp gts vtk python gl2ps devirt-functors qt4 never_use_this_one
    default: log4cxx,opengl,gts,openmp,vtk
    actual: gts log4cxx opengl openmp python qt4 vtk

jobs: Number of jobs to run at the same time (same as -j, but saved)
    default: 2
    actual: 2

buildPrefix: Where to create build-[version][variant] directory for intermediary files
    default: ..
    actual: ..

hotPlugins: Files (without the .cpp extension) that will be compiled separately even in the monolithic build (use for those that you modify frequently); comma-separated.
    default:
    actual:

chunkSize: Maximum files to compile in one translation unit when building plugins. (unlimited if <= 0, per-file linkage is used if 1)
    default: 7
    actual: 7

version: Yade version (if not specified, guess will be attempted)
    default: None
    actual: 0.60.3

realVersion: Revision (usually bzr revision); guessed automatically unless specified
    default: None
    actual: 0.60.3

CPPPATH: Additional paths for the C preprocessor (colon-separated)
    default: /usr/include/vtk-5.0:/usr/include/vtk-5.2:/usr/include/vtk-5.4:/usr/include/vtk-5.6:/usr/include/eigen2:/usr/include/vtk
    actual: /usr/include/vtk-5.0 /usr/include/vtk-5.2 /usr/include/vtk-5.4 /usr/include/vtk-5.6 /usr/include/eigen2 /usr/include/vtk /home/kinn/build-0.60.3/dbg/include /usr/include/python2.7

LIBPATH: Additional paths for the linker (colon-separated)
    default: None
    actual:

libstdcxx: Specify libstdc++ location by hand (opened dynamically at startup), usually not needed
    default: None
    actual: /usr/lib/i386-linux-gnu/libstdc++.so.6

QT4CXX: Specify a different compiler for files including qt4; this is necessary for older qt version (<=4.7) which don't compile with clang
    default: None
    actual: None

QT4DIR: Directory where Qt4 is installed
    default: /usr/share/qt4
    actual: /usr/share/qt4

PATH: Path (not imported automatically from the shell) (colon-separated)
    default: None
    actual: None

CXX: The c++ compiler
    default: g++
    actual: g++

CXXFLAGS: Additional compiler flags for compilation (like -march=core2).
    default: None
    actual:

march: Architecture to use with -march=... when optimizing
    default: native
    actual: native

mono: [experimental] Build only one shared library and make all other files (python objects, for instance) only be symlinks. (yes|no)
    default: 0
    actual: False

execCheck: Name of the main script that should be installed; if the current one differs, an erro is raised (do not use directly, only intended for --rebuild
    default: None
    actual: None

defThreads: Default number of OpenMP threads to run with, unless overridden with -j. Keep unset (negative) to default to using all cores.
    default: -1
    actual: -1

SHCCFLAGS: Additional compiler flags for linking (for plugins).
    default: None
    actual: -fPIC

QUAD_PRECISION: typedef Real as long double (=quad) (yes|no)
    default: 0
    actual: False

brief: Don't show commands being run, only what files are being compiled/linked/installed (yes|no)
    default: True
    actual: True

So where are the problems?
Thanks.

Revision history for this message
Anton Gladky (gladky-anton) said :
#5

The scons cannot find python dev-files.
If you use Ubuntu, I would recommend you to have a look at this 2 FAQs:

https://answers.launchpad.net/yade/+faq/1789
https://answers.launchpad.net/yade/+faq/1727

Otherwise, be sure you have installed all dependencies:
https://yade-dem.org/doc/installation.html

Anton

Revision history for this message
Jack Wang (songjiepy) said :
#6

Thank you, Anton.
Do you know what's the problem with #3 and how to solve it.

Revision history for this message
Anton Gladky (gladky-anton) said :
#7

I think, the boost version is changed, that is why you, probably, need
to recompile your yade with newer boost.

Anton

Revision history for this message
Jack Wang (songjiepy) said :
#8

Dear Anton
  I still can't solve my problem yet. When I recompile my yade , the same problem like #3 appears.
Would you tell me what to do,if possible, in detail.

Thank you again.

Revision history for this message
Jérôme Duriez (jduriez) said :
#9

Was your recompilation successful this time, or not (as in #4 ) ?

If not, re-give a look at Anton's answer #5

Revision history for this message
Jack Wang (songjiepy) said :
#10

Hi, jduriez
I recompile yade when the problem occurs the same as #4.

Revision history for this message
Jérôme Duriez (jduriez) said :
#11

So, if you get the same message as in #4, your compilation was not successful... Look at the message

"One of the essential libraries above was not found, unable to continue."

What was not found is python dev files :
"Checking for Python development files... error",
 and also probably some boost libraries :
"Checking boost libraries... Failures: boost_program_options, boost_python"

Re(?) look at the link Anton gave you :
https://yade-dem.org/doc/installation.html

An other solution for you is to install yade through packages, with two other links of Anton. Installation is normally simpler (but you won't have direct access to the c++ code which constitutes yade)

Revision history for this message
Jack Wang (songjiepy) said :
#12

Hi,
I can install the yade-daily through packages with the links of Anton successfully,but I want to install yade from source code.
So I install the external softwares which is listed at https://yade-dem.org/doc/installation.html. There is a problem:
There is no available software package "python-numeric",but it is quoted by other packages.
It maybe means the lacking package is deserted, or it only could be found in other distribution source.

Then I recompile the yade and the problem #4 still occurs.

So how to deal with it?
Thank you

Revision history for this message
Jérôme Duriez (jduriez) said :
#13

Ok, your problem is clear now : you miss the package python-numeric. Then (re) compilation can only fail... Your version of Ubuntu is "Oneiric", isn't it ? A quick search on the web seems to explain the reason : https://launchpad.net/ubuntu/oneiric/i386/python-numeric

But, for the solution, in fact I can not help you... Trying to download and use a deprecated version of this package ? Or replace the use of this package in yade by an other one ?

That might be a real question ?

Revision history for this message
Anton Gladky (gladky-anton) said :
#14

You need to use python-numpy for instead of python-numeric, I think.

Anton

Revision history for this message
Jack Wang (songjiepy) said :
#15

Thank you, Anton and jduriez.