Errors in my first build of SCRAM on Ubuntu 16.04

119 views
Skip to first unread message

D L

unread,
Jun 16, 2017, 9:25:37 AM6/16/17
to SCRAM Support and User Discussions


I have returned to experiments with SCRAM after upgrading my Ubuntu desktop to Ubuntu 16.04 (64bit).

I downloaded scram-develop and unzipped into
/home/dl/scram-develop

I walked through the list of SCRAM dependencies to install them using Synaptic Package Manager.

I opened a terminal in /home/dl/scram-develop folder and ran

python install.py --prefix=~/.local/share/scram


(Note: the .local/share/ folder is not referenced in SCRAM installation guide).

On first attempt at building I had errors but realised that I was using python3.

I adjusted the command to force use of python 2.7

python2.7 install.py --prefix=~/.local/share/scram


My next obstacle was finding a reference to ...

-- Could NOT find JeMalloc (missing: JEMALLOC_LIBRARY JEMALLOC_INCLUDE_DIR)

I found that libjemalloc-dev package was not listed in SCRAM dependencies and I installed that package.

...

Trying another build ...

python2
.7 install.py --prefix=~/.local/share/scram

There were two errors remaining to troubleshoot ..


-- Boost Date-Time location: /usr/lib/x86_64-linux-gnu/libboost_date_time.so
fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).


and ..

CMake Error at tests/CMakeLists.txt:9 (add_subdirectory):
add_subdirectory given source
"/home/dl/scram-develop/tests/googletest/googletest" which is not an
existing directory.


I found that the first error could be eliminated by running the command ...

git init

in the scram-develop folder

The return message was ...

Initialised empty Git repository in /home/dl/scram-develop/.git/

...

Trying another build ...

python2.7 install.py --prefix=~/.local/share/scram --clean-build



I am left with the last remaining error message to solve to get to a working build ...

CMake Error at tests/CMakeLists.txt:9 (add_subdirectory):
add_subdirectory given source
"/home/dl/scram-develop/tests/googletest/googletest" which is not an
existing directory.

...

Now there is a path /home/dl/scram-develop/tests/googletest/

But there is no sub-directory googletest.   Why /googletest/googletest/ ?

What is needed to complete the build?

...

Another puzzle when building. 
Why is there no Qt project file (*.pro) found in the gui source?
I thought that I could separately explore/build this gui using Qt Creator.
I can open the *.ui files in Qt Designer.
I have Qt 5.5.1 and 5.9.0 installed.

Thanks

DL

Olzhas Rakhimov

unread,
Jun 16, 2017, 3:12:03 PM6/16/17
to D L, SCRAM Support and User Discussions
Hello,

On Fri, Jun 16, 2017 at 6:25 AM, D L <dl6...@gmail.com> wrote:


I have returned to experiments with SCRAM after upgrading my Ubuntu desktop to Ubuntu 16.04 (64bit).

​Happy to hear that. I've been experimenting w/ GUI for this release.
 
I downloaded scram-develop and unzipped into
/home/dl/scram-develop

​You better use 'git' directly because there are git submodules that are not included into the ZIP archives.
Just do 'git clone --recursive https://github.com/rakhimov/scram',
and you are all set.
​This will also allow you to update the code in future easily.​
 

I walked through the list of SCRAM dependencies to install them using Synaptic Package Manager.

I opened a terminal in /home/dl/scram-develop folder and ran

python install.py --prefix=~/.local/share/scram


(Note: the .local/share/ folder is not referenced in SCRAM installation guide).

​This (and other lib/bin directories) will be created for you. The share directory is used for SCRAM data.
The installation directory, in this case, should be '--prefix=~/.local'.
 
On first attempt at building I had errors but realised that I was using python3.

I adjusted the command to force use of python 2.7

python2.7 install.py --prefix=~/.local/share/scram

​Strange, it must work with Python 3. Can you provide the error messages coming from the interpreter?​
 

My next obstacle was finding a reference to ...

-- Could NOT find JeMalloc (missing: JEMALLOC_LIBRARY JEMALLOC_INCLUDE_DIR)

I found that libjemalloc-dev package was not listed in SCRAM dependencies and I installed that package.

​This is an optional​
 
​alternative to TCMalloc. You don't need it. CMake doesn't halt with error if JEMalloc is missing,
so this should not stop your build.​

...

Trying another build ...

python2
.7 install.py --prefix=~/.local/share/scram

There were two errors remaining to troubleshoot ..


-- Boost Date-Time location: /usr/lib/x86_64-linux-gnu/libboost_date_time.so
fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

​This is strange. The git is optional for the build.​
 

and ..

CMake Error at tests/CMakeLists.txt:9 (add_subdirectory):
add_subdirectory given source
"/home/dl/scram-develop/tests/googletest/googletest" which is not an
existing directory.

​This is a submodule error as mentioned above.​

I found that the first error could be eliminated by running the command ...

git init

in the scram-develop folder

The return message was ...

Initialised empty Git repository in /home/dl/scram-develop/.git/

...

Trying another build ...

python2.7 install.py --prefix=~/.local/share/scram --clean-build



I am left with the last remaining error message to solve to get to a working build ...

CMake Error at tests/CMakeLists.txt:9 (add_subdirectory):
add_subdirectory given source
"/home/dl/scram-develop/tests/googletest/googletest" which is not an
existing directory.

...

Now there is a path /home/dl/scram-develop/tests/googletest/

But there is no sub-directory googletest.   Why /googletest/googletest/ ?

What is needed to complete the build?

...

Another puzzle when building. 
Why is there no Qt project file (*.pro) found in the gui source?
I thought that I could separately explore/build this gui using Qt Creator.
I can open the *.ui files in Qt Designer.
I have Qt 5.5.1 and 5.9.0 installed.

​This project is based on CMake, not qmake, so there's no (*.pro)​
 
​files.
Qt Creator supports CMakes. Just point it to the main CMakeLists.txt in src directory,
and you should be good to go.

​Happy hacking,
Olzhas​

D L

unread,
Jun 16, 2017, 3:45:11 PM6/16/17
to SCRAM Support and User Discussions


 Olzhas

Thank you for your insights.

I did make some progress before you replied.

I decided to edit scram-develop/CMakeLists.txt to set these options to OFF

option(WITH_TCMALLOC "Use TCMalloc if available (#1 preference)" OFF)

option(WITH_JEMALLOC "Use JEMalloc if available (#2 preference)" OFF)

option(BUILD_TESTS "Build the tests" OFF)

I could then build without errors.

But after build I see that the installation directory is .. for example ..

-- Installing: /home/dl/.local/share/scram/share/applications/scram-gui.desktop


So you are correct that the target installation path should be ~/.local.

Even so I was able to launch the scram-gui by navigating to that folder.


I will purge this first attempt at build.

On this next build I am not using python2.7 (Ubuntu default) but in fact python in miniconda3.


python install.py --prefix=~/.local



As you requested error logs this is the output I see (and why I tried python2.7 instead for my first test build).

================================================

python install.py --prefix=~/.local
-- The C compiler identification is unknown
CMake Error at CMakeLists.txt:14 (project):
No CMAKE_C_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.


-- Configuring incomplete, errors occurred!
See also "/home/dl/scram-develop/build/CMakeFiles/CMakeOutput.log".
See also "/home/dl/scram-develop/build/CMakeFiles/CMakeError.log".
Makefile:330: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Traceback (most recent call last):
File "install.py", line 156, in <module>
main()
File "install.py", line 153, in main
install_scram(args)
File "install.py", line 92, in install_scram
subprocess.check_call(make_cmd, cwd=args.build_dir, shell=(os.name == "nt"))
File "/home/dl/miniconda3/lib/python3.6/subprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make']' returned non-zero exit status 2.


================================================


As an added note before you get much further with GUI development can I suggest 
that you explore D3,js as framework for rendering dynamic failure trees.

You give an example of cppdependency using (static) graphviz.
But look at this example based on D3.js.


Meanwhile I have much catching up to do to explore SCRAM.


Olzhas Rakhimov

unread,
Jun 16, 2017, 4:01:09 PM6/16/17
to D L, SCRAM Support and User Discussions
​This looks like conda env issues. Somehow the compiler is missing from the environment as the CMake error suggests.​
 

As an added note before you get much further with GUI development can I suggest 
that you explore D3,js as framework for rendering dynamic failure trees.
​This looks interesting, but I'm not sure it applies to fault trees.​
 

You give an example of cppdependency using (static) graphviz.
But look at this example based on D3.js.


​The C++ dependency analysis is a subject on its own​ for my other project (https://github.com/rakhimov/cppdep),
and that deals with levelizations, cycles, minimal graphs,
which doesn't seem to be possible to explore on dependency wheels.

​Olzhas​

D L

unread,
Jun 16, 2017, 4:39:44 PM6/16/17
to SCRAM Support and User Discussions

​This looks interesting, but I'm not sure it applies to fault trees.​
  
 
Here is a quick example of tree layout in D3.js.


I envisage each node being expanded into a table (or cube) of attributes.


Olzhas Rakhimov

unread,
Jun 16, 2017, 4:52:33 PM6/16/17
to D L, SCRAM Support and User Discussions
​I see; so you can use D3 ​for arbitrary graphs.
This may be a solution or help for web-based UI. I wonder how Fuzzed approached this problem.

As for the Qt-based GUI,
it is not that hard to code custom graphs and dynamic actions on graphics objects,
so I don't think I'd use D3 in GUI.
Also, there's just as powerful Graphviz available for C/C++.
Reply all
Reply to author
Forward
0 new messages