Instaling shelXle on Ubuntu 10.04

A Qt GUI for SHELXL
Link: shelXle Homepage

Moderator: chuebsch

deonis

Instaling shelXle on Ubuntu 10.04

Post by deonis » 12 Nov 2011, 16:04

I found the installation of ShelXle is not trivial for Ubuntu 10.04. The deb package is not provided by default and I run into some issues while compiling it from source code. I decided to put the solution for this problem in here.

In order to install ShelXle on Ubuntu Linux you will need to install libqt on your system. After that, download the installation package for Suse from the developer web site: http://ewald.ac.chemie.uni-goettingen.d ... /index.php. Make sure to download the right version for your processor architecture (64, 32 bit). Extract the content of the "rpm" package to any directory in your home folder. For example: /home/User/shelxle/. Create the text file in your home directory with the following code:

#! /bin/bash
dir=`/usr/bin/dirname $0`/anyfolder/usr/bin
exec /usr/bin/env LD_LIBRARY_PATH=/usr/lib $dir/shelxle ${1+"$@"}

make it executable and run it. You should be able to use it normally... the same code will be available in the next release of LinXTL (2.6)

let me know if you have any problem

User avatar
chuebsch
300th member
Posts: 88
Joined: 10 Nov 2009, 18:56

Re: Instaling shelXle on Ubuntu 10.04

Post by chuebsch » 13 Nov 2011, 15:40

Hi deonis,

I do not understand why the steps you described should be necessary. Could you describe the issues you had while compiling the source in more detail may be I can help.

Christian

deonis

Re: Instaling shelXle on Ubuntu 10.04

Post by deonis » 13 Nov 2011, 19:37

Hi Christian,

Here is the output of the g++ compiler while attempting to build Shelxle on Ubuntu 10.04 86x64:

qmake -project
qmake
make

Code: Select all

g++ -c -pipe -g -Wall -W -O2 -D_REENTRANT  -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -I/usr/share/qt3/mkspecs/default -I. -I. -I/usr/include/qt3 -o chgl.o chgl.cpp
In file included from chgl.cpp:19:
chgl.h:22:21: error: QGLWidget: No such file or directory
In file included from chgl.h:24,
                 from chgl.cpp:19:
molecule.h:22:19: error: QString: No such file or directory
molecule.h:23:23: error: QStringList: No such file or directory
molecule.h:24:17: error: QList: No such file or directory
molecule.h:25:20: error: QtOpenGL: No such file or directory
molecule.h:26:18: error: QtCore: No such file or directory
molecule.h:39:21: error: QSettings: No such file or directory
chgl.cpp:20:17: error: QtGui: No such file or directory
In file included from chgl.h:24,
                 from chgl.cpp:19:
molecule.h:180: error: ‘QString’ does not name a type
molecule.h:181: error: ‘QString’ does not name a type
molecule.h:182: error: ‘QString’ does not name a type
molecule.h:195: error: ‘GLdouble’ does not name a type
molecule.h: In function ‘bool operator==(const MyAtom&, const MyAtom&)’:
molecule.h:198: error: ‘const struct MyAtom’ has no member named ‘Label’
molecule.h:198: error: ‘const struct MyAtom’ has no member named ‘Label’
molecule.h: In function ‘bool operator<(const MyAtom&, const MyAtom&)’:
molecule.h:201: error: ‘const struct MyAtom’ has no member named ‘Label’
molecule.h:201: error: ‘const struct MyAtom’ has no member named ‘Label’
molecule.h: At global scope:
molecule.h:219: error: ‘QString’ does not name a type
molecule.h:223: error: expected initializer before ‘<’ token
molecule.h:224: error: expected initializer before ‘<’ token
molecule.h:228: error: ISO C++ forbids declaration of ‘QList’ with no type
molecule.h:228: error: expected ‘;’ before ‘<’ token
molecule.h:229: error: ISO C++ forbids declaration of ‘QList’ with no type
molecule.h:229: error: expected ‘;’ before ‘<’ token
molecule.h:231: error: ‘QString’ does not name a type
molecule.h:247: error: ISO C++ forbids declaration of ‘QList’ with no type
molecule.h:247: error: expected ‘;’ before ‘<’ token
molecule.h:256: error: ‘GLfloat’ has not been declared
molecule.h:256: error: ‘GLfloat’ has not been declared
molecule.h:256: error: ‘GLfloat’ has not been declared
molecule.h:258: error: ‘QString’ does not name a type
molecule.h:259: error: ISO C++ forbids declaration of ‘QList’ with no type
molecule.h:259: error: expected ‘;’ before ‘<’ token
molecule.h:260: error: ISO C++ forbids declaration of ‘QList’ with no type
molecule.h:260: error: expected ‘;’ before ‘<’ token
molecule.h:261: error: ISO C++ forbids declaration of ‘QList’ with no type
molecule.h:261: error: expected ‘;’ before ‘<’ token
molecule.h:262: error: ISO C++ forbids declaration of ‘QList’ with no type
molecule.h:262: error: expected ‘;’ before ‘<’ token
molecule.h:263: error: ‘QStringList’ does not name a type
molecule.h:264: error: ISO C++ forbids declaration of ‘QList’ with no type
molecule.h:264: error: expected ‘;’ before ‘<’ token
molecule.h:265: error: ISO C++ forbids declaration of ‘QList’ with no type
molecule.h:265: error: expected ‘;’ before ‘<’ token
molecule.h:266: error: ISO C++ forbids declaration of ‘QList’ with no type
molecule.h:266: error: expected ‘;’ before ‘<’ token
molecule.h:269: error: ‘GLuint’ does not name a type
molecule.h:270: error: ‘GLuint’ does not name a type
molecule.h:274: error: ‘QColor’ does not name a type
molecule.h:277: error: ‘QColor’ does not name a type
molecule.h:278: error: ‘CEnvironment’ does not name a type
molecule.h:279: error: ‘Connection’ does not name a type
molecule.h:283: error: ‘CEnvironment’ has not been declared
molecule.h:284: error: ‘Connection’ has not been declared
molecule.h:286: error: ‘QString’ does not name a type
molecule.h:287: error: ‘Connection’ has not been declared
molecule.h:287: error: ‘CEnvironment’ has not been declared
molecule.h:289: error: ‘Connection’ does not name a type
molecule.h:290: error: ‘Connection’ does not name a type
molecule.h:291: error: ISO C++ forbids declaration of ‘QString’ with no type
molecule.h:291: error: expected ‘,’ or ‘...’ before ‘symmCard’
molecule.h:292: error: ISO C++ forbids declaration of ‘QString’ with no type
molecule.h:292: error: expected ‘,’ or ‘...’ before ‘symmCard’
molecule.h:295: error: ‘QString’ does not name a type
molecule.h:296: error: ‘QString’ does not name a type
molecule.h:297: error: ‘QString’ does not name a type
molecule.h:298: error: ‘QString’ does not name a type
molecule.h:299: error: ‘QString’ does not name a type
molecule.h:302: error: ‘QString’ has not been declared
molecule.h:303: error: ‘QString’ has not been declared
molecule.h:314: error: ‘QStringList’ has not been declared
molecule.h:323: error: ‘QStringList’ does not name a type
molecule.h:324: error: ‘QStringList’ does not name a type
molecule.h:325: error: ‘QString’ does not name a type
molecule.h:326: error: ISO C++ forbids declaration of ‘QSettings’ with no type
molecule.h:326: error: expected ‘;’ before ‘*’ token
molecule.h:327: error: ‘QString’ does not name a type
molecule.h:334: error: ‘Connection’ has not been declared
molecule.h:336: error: ‘GLfloat’ has not been declared
In file included from chgl.cpp:19:
chgl.h:37: error: expected class-name before ‘{’ token
chgl.h:38: error: ISO C++ forbids declaration of ‘Q_OBJECT’ with no type
chgl.h:39: error: expected ‘;’ before ‘public’
chgl.h:45: error: ‘QColor’ does not name a type
chgl.h:48: error: ‘QFont’ does not name a type
chgl.h:49: error: ISO C++ forbids declaration of ‘QTimer’ with no type
chgl.h:49: error: expected ‘;’ before ‘*’ token
chgl.h:50: error: ‘GLdouble’ does not name a type
chgl.h:51: error: ISO C++ forbids declaration of ‘QAction’ with no type
chgl.h:51: error: expected ‘;’ before ‘*’ token
chgl.h:69: error: ISO C++ forbids declaration of ‘QAction’ with no type
chgl.h:69: error: expected ‘;’ before ‘*’ token
chgl.h:71: error: ISO C++ forbids declaration of ‘QCheckBox’ with no type
chgl.h:71: error: expected ‘;’ before ‘*’ token
chgl.h:72: error: ISO C++ forbids declaration of ‘QToolButton’ with no type
chgl.h:72: error: expected ‘;’ before ‘*’ token
chgl.h:75: error: expected primary-expression before ‘void’
chgl.h:75: error: ISO C++ forbids declaration of ‘signals’ with no type
chgl.h:75: error: expected ‘;’ before ‘void’
chgl.h:76: error: ISO C++ forbids declaration of ‘QString’ with no type
chgl.h:76: error: expected ‘,’ or ‘...’ before ‘&’ token
chgl.h:82: error: expected ‘:’ before ‘slots’
chgl.h:83: error: expected primary-expression before ‘void’
chgl.h:83: error: ISO C++ forbids declaration of ‘slots’ with no type
chgl.h:83: error: expected ‘;’ before ‘void’
chgl.h:105: error: ISO C++ forbids declaration of ‘QString’ with no type
chgl.h:105: error: expected ‘,’ or ‘...’ before ‘&’ token
chgl.h:137: error: ‘QMouseEvent’ has not been declared
chgl.h:138: error: ‘QMouseEvent’ has not been declared
chgl.h:139: error: ‘QContextMenuEvent’ has not been declared
chgl.h:140: error: ‘QWheelEvent’ has not been declared
chgl.h:143: error: ‘GLuint’ does not name a type
chgl.h:155: error: ‘GLuint’ does not name a type
chgl.h:156: error: ‘GLfloat’ does not name a type
chgl.h:157: error: ‘GLint’ does not name a type
chgl.h:161: error: ‘QPoint’ does not name a type
chgl.h: In member function ‘void chGL::setTube(bool)’:
chgl.h:123: error: ‘updateGL’ was not declared in this scope
chgl.h: In member function ‘void chGL::unsetTube(bool)’:
chgl.h:124: error: ‘updateGL’ was not declared in this scope
chgl.cpp: In function ‘void glTranslateL(double, double, double)’:
chgl.cpp:41: error: ‘GL_MODELVIEW_MATRIX’ was not declared in this scope
chgl.cpp:41: error: ‘glGetDoublev’ was not declared in this scope
chgl.cpp:43: error: ‘glLoadMatrixd’ was not declared in this scope
chgl.cpp: In function ‘void glRotateL(double, double, double, double)’:
chgl.cpp:55: error: ‘GL_MODELVIEW_MATRIX’ was not declared in this scope
chgl.cpp:55: error: ‘glGetDoublev’ was not declared in this scope
chgl.cpp:74: error: ‘glLoadMatrixd’ was not declared in this scope
chgl.cpp: At global scope:
chgl.cpp:81: error: expected ‘)’ before ‘*’ token
chgl.cpp:182: error: variable or field ‘transform_point’ declared void
chgl.cpp:182: error: ‘GLdouble’ was not declared in this scope
chgl.cpp:182: error: expected primary-expression before ‘const’
chgl.cpp:182: error: expected primary-expression before ‘const’
chgl.cpp:196: error: ISO C++ forbids declaration of ‘GLdouble’ with no type
chgl.cpp:196: error: expected ‘,’ or ‘...’ before ‘model’
chgl.cpp: In function ‘bool posTo2D(V3, int)’:
chgl.cpp:199: error: expected ‘;’ before ‘in’
chgl.cpp:199: warning: statement has no effect
chgl.cpp:201: error: ‘in’ was not declared in this scope
chgl.cpp:205: error: ‘out’ was not declared in this scope
chgl.cpp:205: error: ‘model’ was not declared in this scope
chgl.cpp:205: error: ‘transform_point’ was not declared in this scope
chgl.cpp:206: error: ‘proj’ was not declared in this scope
chgl.cpp:214: error: ‘winx’ was not declared in this scope
chgl.cpp:214: error: ‘viewport’ was not declared in this scope
chgl.cpp:215: error: ‘winy’ was not declared in this scope
chgl.cpp: In member function ‘void chGL::changeEnviRange()’:
chgl.cpp:222: error: ‘QInputDialog’ has not been declared
chgl.cpp: At global scope:
chgl.cpp:226: error: variable or field ‘mousePressEvent’ declared void
chgl.cpp:226: error: ‘QMouseEvent’ was not declared in this scope
chgl.cpp:226: error: ‘event’ was not declared in this scope
In file included from /usr/include/c++/4.4/ios:40,
                 from /usr/include/c++/4.4/ostream:40,
                 from /usr/include/c++/4.4/iostream:40,
                 from chgl.cpp:1191:
/usr/include/c++/4.4/exception:35: error: expected declaration before end of line
make: *** [chgl.o] Error 1
It looks like Glut and the whole OpenGl binding for QT is not installed, but it is not the case... Any Ideas?

cheers

denis
Last edited by chuebsch on 16 Nov 2011, 17:02, edited 1 time in total.
Reason: Changed formating with [code]

User avatar
chuebsch
300th member
Posts: 88
Joined: 10 Nov 2009, 18:56

Re: Instaling shelXle on Ubuntu 10.04

Post by chuebsch » 13 Nov 2011, 20:01

Hi deonis,
I think this
deonis wrote: qmake -project
is the reason for the trouble.

Just do it like this:

Code: Select all

tar xvjf shelxle-1.0.*.tar.bz2
cd shelxle-1.0.*/
qmake
make
sudo cp -a shelxle /usr/bin/
sudo cp -a help /usr/share/shelxle
"qmake -project" writes a new shelxle-1.0.*.pro file instead of the existing shelXle.pro file which looks like that:

Code: Select all

# #####################################################################
# Automatically generated by qmake (2.01a) Thu Apr 29 16:30:58 2010
# #####################################################################
TEMPLATE = app
win32 { 
    TARGET = shelxle
    RC_FILE = shelxle.rc
}
unix:TARGET = shelxle
mac {
TARGET = shelxle
ICON = macshelx.icns
}
DEPENDPATH += .
INCLUDEPATH += .
QT += opengl
QT += network
QT += webkit
QMAKE_CXXFLAGS += -fopenmp
LIBS += -lfftw3f -fopenmp
# Input
HEADERS += window.h \
    chgl.h \
    highlighter.h \
    molecule.h \
    dragdropatomsdlg.h \
    codeeditor.h \
    eacDlg.h \
    shx_helper.h \
    qpeakview.h \
    psewidget.h \
    historywidget.h\
    fourxle.h\
    savehistorywidget.h
SOURCES += main.cpp \
    window.cpp \
    molecule.cpp \
    chgl.cpp \
    highlighter.cpp \
    codeeditor.cpp \
    eacDlg.cpp \
    qpeakview.cpp \
    psewidget.cpp \
    historywidget.cpp \
    dragdropatomsdlg.cpp \
    fourxle.cpp \
    savehistorywidget.cpp
RESOURCES += icons.qrc
OTHER_FILES += shelxle.rc
I hope this helps you with your issues, please let me know if there are some more.
Christian

deonis

Re: Instaling shelXle on Ubuntu 10.04

Post by deonis » 13 Nov 2011, 20:53

I tried that at first. This way of compilation was described on Shelxle web page. Unfortunately it does not work. My guess is that Ubuntu 10.04 86x64 has a problem with the QT-dev libraries. I will try the same thing on 32 bit system tomorrow. Nice program BTW. I was looking for something like that for a while. Thank you for your help...

cheers

Denis

User avatar
chuebsch
300th member
Posts: 88
Joined: 10 Nov 2009, 18:56

Re: Instaling shelXle on Ubuntu 10.04

Post by chuebsch » 14 Nov 2011, 03:50

Hm,

maybe you have installed qt3.dev libraries then qmake, in the description above, should be replaced by qmake-4 or qmake-4.7. (just tab after typing qmake to see the which versions of qmake are available)

Christian

deonis

Re: Instaling shelXle on Ubuntu 10.04

Post by deonis » 14 Nov 2011, 11:46

Bingo !!! It worked! You were right I had two qmake installed and apparently, when I was typing qmake it was using qmake-q3 instead of qmake-q4. Now with the following commands "qmake-q4" and "make" the program builds without any problem. What are the rules for distributing the compiled version?. Should I give it to you or can I distribute elsewhere ? Also we can package it to "deb". Thanks for your help !!!!

Denis

User avatar
chuebsch
300th member
Posts: 88
Joined: 10 Nov 2009, 18:56

Re: Instaling shelXle on Ubuntu 10.04

Post by chuebsch » 13 Jan 2012, 19:36

The Debichem-Team will support ShelXle

pool

I acknowledge this very much.

:D :D :D :D

Return to “shelXle”