Welcome to Cadabra Q&A, where you can ask questions and receive answers from other members of the community.
0 votes

Dear community,

A few months ago I had to change to a computer running Linux Mint 18.x (after a long run with Debian).

I've wanted to install cadabra2, but no matter how I try the GTK notebook doesn't work. Until five minutes ago I thought cadabra2 was not working at all, but I noticed that the shell is working (although is not as fun as the notebook).

Questions:

  • Has anyone have the same problem? BTW, I've installed all the necessary dependencies (stated in the github page)

  • Is there a file with the log of the installation?

  • Could it be related with the fact that I have a custom texlive installation? FYI, I've changed the INSTALL_LATEX_DIR variable in the CMakeList.txt file to match the directory of my installation, and eliminate the packages related to texlive from CPACK_DEBIAN_PACKAGE_DEPENDS

  • Any other ideas to solve the problem?

Thank you very much!!!

in Installation trouble by (13.0k points)

1 Answer

+1 vote
 
Best answer

What does 'does not work' mean? Does the notebook window show up at all? Do you get errors when you start cadabra2-gtk from the terminal?

by (76.3k points)
selected by

Nothing happens! (see below)

oscar@euler ~/Software/git.src/cadabra2/build $ cadabra2-gtk 
cadabra-client: spawning server

(cadabra2-gtk:28750): glibmm-ERROR **: 
unhandled exception (type std::exception) in signal handler:
what: SnoopImpl::init: Cannot open database

Trace/breakpoint trap
oscar@euler ~/Software/git.src/cadabra2/build $ terminate called after throwing an instance of 'std::logic_error'
  what():  SnoopImpl::init: Cannot open database

However, the CLI works

oscar@euler ~/Software/git.src/cadabra2/build $ cadabra2
Cadabra 2.1.6 (build 1283.f5c535d dated 2017-08-18)
Copyright (C) 2001-2017  Kasper Peeters <kasper.peeters@phi-sci.com>
Using SymPy version 1.0
Info at http://cadabra.science/
Available under the terms of the GNU General Public License v3

> 

Can you check that the '.log ' subdirectory in your home directory is writeable by you, i.e. do

ls -lad ~/.log

and send me the output? Cadabra wants to write a Cadabra.sql and CadabraServer.sql file in there, and the error you copied indicates that that fails.

I only got this

oscar@euler ~ $ ls -lad .log
-rw-r--r-- 1 oscar oscar 3110 May 17 14:00 .log
oscar@euler ~ $ 

In case it could be useful: The only problem during the compilation was this

Scanning dependencies of target texengine
[ 85%] Building CXX object frontend/common/CMakeFiles/texengine.dir/TeXEngine.cc.o
[ 86%] Building CXX object frontend/common/CMakeFiles/texengine.dir/lodepng.cc.o
[ 86%] Building CXX object frontend/common/CMakeFiles/texengine.dir/exec-stream.cc.o
In file included from /home/oscar/Software/git.src/cadabra2/frontend/common/exec-stream.cc:355:0:
/home/oscar/Software/git.src/cadabra2/frontend/common/posix/exec-stream-impl.cpp:30:23: warning: ‘exec_stream_t::impl_t’ has a field ‘exec_stream_t::impl_t::m_child_args’ whose type uses the anonymous namespace
 struct exec_stream_t::impl_t {
                       ^
/home/oscar/Software/git.src/cadabra2/frontend/common/posix/exec-stream-impl.cpp:30:23: warning: ‘exec_stream_t::impl_t’ has a field ‘exec_stream_t::impl_t::m_child_argp’ whose type uses the anonymous namespace
/home/oscar/Software/git.src/cadabra2/frontend/common/posix/exec-stream-impl.cpp:30:23: warning: ‘exec_stream_t::impl_t’ has a field ‘exec_stream_t::impl_t::m_in_pipe’ whose type uses the anonymous namespace
/home/oscar/Software/git.src/cadabra2/frontend/common/posix/exec-stream-impl.cpp:30:23: warning: ‘exec_stream_t::impl_t’ has a field ‘exec_stream_t::impl_t::m_out_pipe’ whose type uses the anonymous namespace
/home/oscar/Software/git.src/cadabra2/frontend/common/posix/exec-stream-impl.cpp:30:23: warning: ‘exec_stream_t::impl_t’ has a field ‘exec_stream_t::impl_t::m_err_pipe’ whose type uses the anonymous namespace
/home/oscar/Software/git.src/cadabra2/frontend/common/posix/exec-stream-impl.cpp:30:23: warning: ‘exec_stream_t::impl_t’ has a field ‘exec_stream_t::impl_t::m_thread’ whose type uses the anonymous namespace
/home/oscar/Software/git.src/cadabra2/frontend/common/posix/exec-stream-impl.cpp:30:23: warning: ‘exec_stream_t::impl_t’ has a field ‘exec_stream_t::impl_t::m_in_buffer’ whose type uses the anonymous namespace
/home/oscar/Software/git.src/cadabra2/frontend/common/posix/exec-stream-impl.cpp:30:23: warning: ‘exec_stream_t::impl_t’ has a field ‘exec_stream_t::impl_t::m_out_buffer’ whose type uses the anonymous namespace
/home/oscar/Software/git.src/cadabra2/frontend/common/posix/exec-stream-impl.cpp:30:23: warning: ‘exec_stream_t::impl_t’ has a field ‘exec_stream_t::impl_t::m_err_buffer’ whose type uses the anonymous namespace
/home/oscar/Software/git.src/cadabra2/frontend/common/posix/exec-stream-impl.cpp:30:23: warning: ‘exec_stream_t::impl_t’ has a field ‘exec_stream_t::impl_t::m_in’ whose type uses the anonymous namespace
/home/oscar/Software/git.src/cadabra2/frontend/common/posix/exec-stream-impl.cpp:30:23: warning: ‘exec_stream_t::impl_t’ has a field ‘exec_stream_t::impl_t::m_out’ whose type uses the anonymous namespace
/home/oscar/Software/git.src/cadabra2/frontend/common/posix/exec-stream-impl.cpp:30:23: warning: ‘exec_stream_t::impl_t’ has a field ‘exec_stream_t::impl_t::m_err’ whose type uses the anonymous namespace
In file included from /home/oscar/Software/git.src/cadabra2/frontend/common/exec-stream.cc:355:0:
/home/oscar/Software/git.src/cadabra2/frontend/common/posix/exec-stream-impl.cpp: In member function ‘void exec_stream_t::impl_t::start(const string&)’:
/home/oscar/Software/git.src/cadabra2/frontend/common/posix/exec-stream-impl.cpp:243:58: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
             write( status_pipe.w(), &len, sizeof( len ) );
                                                          ^
/home/oscar/Software/git.src/cadabra2/frontend/common/posix/exec-stream-impl.cpp:244:47: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
             write( status_pipe.w(), msg, len );
                                               ^
/home/oscar/Software/git.src/cadabra2/frontend/common/posix/exec-stream-impl.cpp:249:58: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
             write( status_pipe.w(), &len, sizeof( len ) );
                                                          ^
/home/oscar/Software/git.src/cadabra2/frontend/common/posix/exec-stream-impl.cpp:250:47: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
             write( status_pipe.w(), msg, len );
                                               ^
/home/oscar/Software/git.src/cadabra2/frontend/common/exec-stream.cc: In member function ‘virtual std::basic_streambuf<char>::int_type {anonymous}::exec_stream_buffer_t::underflow()’:
/home/oscar/Software/git.src/cadabra2/frontend/common/exec-stream.cc:277:9: warning: ‘no_more’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         if( no_more || read_size==0 ) { // there is no way for underflow to return something other than eof when 0 bytes are read
         ^
[ 86%] Linking CXX shared library libtexengine.so
[ 86%] Built target texengine

It's simpler: your '~/.log ' is a file, not a directory. Just

 mv ~/.log ~/.oldlog

and then try to start cadabra2-gtk again.

According to the Linux Filesystem Standard, ~/.log should be a directory in which apps can write their log files, not a single file. I don't know which program wrote that ~/.log file; perhaps viewing it sheds light on this.

I'll think of some way to make cadabra spit out a more useful error message when this happens.

Thank you Kasper! I didn't get your response until today.. :-S

It worked!

Dear Kasper.

To make the installation work I had to install texlive from the linux distribution repositories... it seems that the texhash compilation do not consider my personal TeX directory.

At the end, IT WORKED!

However, I'm getting (still) the warnings mentioned previously during the compilation process.

Best wishes, Oscar.

Those warnings are in external code (not written by me); you can ignore them, they are harmless.

...