I2PC / xmippCore

Core functions for Xmipp and sharing with other packages (like Scipion)
GNU General Public License v3.0
4 stars 2 forks source link

SConsEnvironmentError: No module named compilation_db: #206

Open jpellman opened 2 months ago

jpellman commented 2 months ago

Hi,

I'm getting the following error when I attempt to compile xmippCore in an Ubuntu 20.04 environment with CUDA 11.4.3:

Compiling XmippCore--------
/usr/bin/scons:104: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources
scons: Reading SConscript files ...
SConsEnvironmentError: No module named compilation_db:
  File "/opt/scipion/xmipp-bundle/src/xmippCore/SConstruct", line 388:
    env.SConscript('SConscript', exports='env')
  File "/usr/lib/scons/SCons/Script/SConscript.py", line 597:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/usr/lib/scons/SCons/Script/SConscript.py", line 286:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "/opt/scipion/xmipp-bundle/src/xmippCore/SConscript", line 116:
    addLib('XmippCore',
  File "/opt/scipion/xmipp-bundle/src/xmippCore/SConscript", line 92:
    lib = env.AddCppLibrary(name, **kwargs)
  File "/usr/lib/scons/SCons/Environment.py", line 219:
    return self.method(*nargs, **kwargs)
  File "/opt/scipion/xmipp-bundle/src/xmippCore/SConstruct", line 216:
    env2.Tool('compilation_db')
  File "/usr/lib/scons/SCons/Environment.py", line 1809:
    tool = SCons.Tool.Tool(tool, toolpath, **kw)
  File "/usr/lib/scons/SCons/Tool/__init__.py", line 122:
    module = self._tool_module()
  File "/usr/lib/scons/SCons/Tool/__init__.py", line 221:
    raise SCons.Errors.SConsEnvironmentError(error_string)

This compilation happens as part of a broader procedure for installing Scipion. These are the instructions I was given to accomplish this:

1. Clone the repository with git clone https://github.com/I2PC/xmipp.git xmipp-bundle && cd xmipp-bundle
2. Run scipion3 run ./xmipp config
3. Edit xmipp.conf to remove the problematic compilation flags
4. Run scipion3 run ./xmipp
5. Link the installation to Scipion with scipion3 installp -p src/scipion-em-xmipp --devel"

This stack trace is thrown during step 4 of this process. I've attached a log that might have more info. I'm using a conda environment to run the installer and the following command was used to install dependencies:

apt-get install -y gcc-10 g++-10 libopenmpi-dev make scons libfftw3-dev libhdf5-dev python3-numpy python3-dev libtiff5-dev libsqlite3-dev default-jdk git cmake curl wget rsync 

Is there anything else I should be doing/installing to get this to compile?

compileLOG.txt

Many thanks, John Pellman