a problem of compiling including direct solver

Asked by mingchun lin

Hi,sir:
 I compile escript on ubuntu18.04 with a created file 'ubuntu_options.py' referring to the question:

https://answers.launchpad.net/escript-finley/+question/695110

and the command:

scons -j8 options_file=scons/ubuntu_options.py

then the error is:

scons: Reading SConscript files ...
3.6.9 (default, Jan 26 2021, 15:33:00)
[GCC 8.4.0]
Using options in scons/ubuntu_options.py.
/bin/sh: 1: svnversion: not found
Checking whether the C++ compiler works... (cached) yes
Checking for C++ function gethostname()... (cached) yes
Checking for C++ header file byteswap.h... (cached) yes
Checking for C++ function SCbswap32()... (cached) yes
Checking for C++ header file sys/endian.h... (cached) no
Checking for C++ header file libkern/OSByteOrder.h... (cached) no
Checking for working complex std::acos()... (cached) yes
Checking for C++ header file Python.h... (cached) yes
Checking for C++ function Py_Exit()... (cached) yes
Checking for C++ library libboost-python3-py36... no
RuntimeError: Unable to link against ['libboost-python3-py36'] (paths: /usr/include, /usr/lib):
  File "/home/linmingchun/escript/src/SConstruct", line 513:
    env=checkBoost(env)
  File "/home/linmingchun/escript/src/site_scons/dependencies.py", line 266:
    boost_inc_path,boost_lib_path=findLibWithHeader(env, env['boost_libs'], 'boost/python.hpp', env['boost_prefix'], lang='c++')
  File "/home/linmingchun/escript/src/site_scons/site_init.py", line 84:
    raise RuntimeError('Unable to link against %s (paths: %s, %s)'%(libs,inc_path,lib_path))

----------------
the file 'ubuntu_options.py' includes:

escript_opts_version = 203

pythoncmd='/usr/bin/python3'

boost_libs='libboost-python3-py36'

openmp = 1

pythonlibname = 'python3.6m'
pythonlibpath = '/usr/lib/x86_64-linux-gnu/'
pythonincpath = '/usr/include/python3.6m'

umfpack = 1
umfpack_prefix = ['/usr/include/suitesparse','/usr/lib/x86_64-linux-gnu/']

-------------

I tried several ways (in question#695110) to compile, but I cannot handle with this.

Thank you!

Question information

Language:
English Edit question
Status:
Solved
For:
esys-escript Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Adam Ellery (aellery) said :
#1

Hi mingchun,

Could you please try running

scons -j4 options_file=scons/templates/bionic_py3_options.py

- Adam

Revision history for this message
mingchun lin (lin03) said :
#2

Hi Adam,

 I had already tried "scons -j4 options_file=scons/templates/bionic_py3_options.py", and it showed:

scons: Reading SConscript files ...
3.6.9 (default, Jan 26 2021, 15:33:00)
[GCC 8.4.0]
TypeError: a bytes-like object is required, not 'str':
  File "/home/linmingchun/escript/src/SConstruct", line 173:
    ENV = {'PATH': os.environ['PATH']})
  File "/usr/lib/scons/SCons/Environment.py", line 965:
    variables.Update(self)
  File "/usr/lib/scons/SCons/Variables/__init__.py", line 184:
    exec(contents, {}, values)
  File "<string>", line 48:

  File "<string>", line 48:

So, I tried the method that I mentioned above, and it doesn't work.

I still need an answer, thank you :)

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

Just a remark:

message:
/bin/sh: 1: svnversion: not found

solution:
sudo apt install subversion

Revision history for this message
mingchun lin (lin03) said :
#4

Thank you Manfred!

I tried to install subversion, then run "scons -j8 options_file=scons/ubuntu_options.py" again.

But it has the same error just without "/bin/sh: 1: svnversion: not found" that line..

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#5

For the command
"scons -j8 options_file=scons/ubuntu_options.py"
there is the message:
"Checking for C++ library libboost-python3-py36... no"

(in question https://answers.launchpad.net/escript-finley/+question/695110 it says
"Checking for C++ library libboost_python3-py36... (cached) yes")

What do you get when you change
boost_libs='libboost-python3-py36'
into
boost_libs='libboost_python3-py36'
inside the ubuntu_options.py file?

Revision history for this message
Adam Ellery (aellery) said :
#6

Hi Mingchun,

The esys-escript project moved to github late last year. You can safely ignore the "/bin/sh: 1: svnversion: not found" message during compilation. esys-escript will work correctly, even though you got this message.

I believe that the error "TypeError: a bytes-like object is required, not 'str':" has occurred because the newer version of python cannot read some old files.

Could you please copy this file to the escript directory
https://raw.githubusercontent.com/esys-escript/esys-escript.github.io/master/scons/templates/bionic_py3_options.py

and then run
scons -j8 options_files=bionic_py3_options.py

- Adam

Revision history for this message
mingchun lin (lin03) said :
#7

Hi Adam,

Actually, the file bionic_py3_options.py is the same as one in folder python_escript_5_6.1 that I download from site, and it doesn't work...

Manfred's suggestion has solved my problem.

Thank you all the same :D

Revision history for this message
mingchun lin (lin03) said :
#8

Thanks Manfred Hampl, that solved my question.