How To Compile

898 views
Skip to first unread message

Ronald Jeninga

unread,
Aug 6, 2013, 9:20:13 AM8/6/13
to sche...@googlegroups.com
Hi all,

in order to make it easier to compile the system, I did a step by step compilation on a CentOS 6.4 64-bit system.
It's so easy, I could almost make a script out of it:

Install required software for compilation first

  1. (root) yum update
    to get the newest system software
  2. (root) yum install git
  3. (root) yum groupinstall "Java Platform"
  4. (root) yum install gcc gcc-c++
  5. (root) yum install jflex
  6. (root) yum install glibc.i686
  7. (root) yum install make
  8. (root) yum install java-1.6.0-openjdk-devel java-1.7.0-openjdk-devel
  9. (root) yum install eclipse-swt

Now prepare for compilation

  1. (root) useradd schedulix -m -U -s /bin/bash
  2. (root) su - schedulix
  3. (schedulix) git clone https://github.com/schedulix/schedulix.git
  4. (schedulix) added to .bashrc:
    export SDMSHOME=/home/schedulix/schedulix
    export CLASSPATH=$CLASSPATH:/usr/share/java/jflex.jar
    export JAVAHOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64
    export SWTJAR=/usr/lib64/java/swt.jar

    Because it's a 64 bit system, some names differ from the names used in the documentation.
    This can also happen if you use another distribution (Ubuntu, SuSE, ...)

  5. (schedulix) . .bashrc

  6. (schedulix) cd schedulix/src

  7. (schedulix) make

That's all. That's fairly easy, isn't it?

Of course, if you use another distribution, yum might be called dpkg, rpm, yast or even something entirely different. The paths mentioned here can also differ.

Anyway I guess you get the picture.

Ronald


Ronald Jeninga

unread,
Aug 15, 2013, 1:55:43 PM8/15/13
to sche...@googlegroups.com
Hi all,

as promised, I repeated the compile on a debian distribution. I need to emphasize that I'm not a debian specialist. Therefore it's possible I did some unnecessary steps.


Install required software for compilation first


1. (root) apt-get install git
2. (root) apt-get install jflex
3. (root) apt-get install gcc
4. (root) apt-get install g++
5. (root) dpkg --add-architecture i386
6. (root) apt-get update
7. (root) apt-get install gcc-multilib
8. (root) apt-get install make
9. (root) apt-get install openjdk-6-jdk
10. (root) apt-get install libswt-gtk-3-java

Now prepare for compilation


1. (root) useradd schedulix -m -U -s /bin/bash
2. (root) su - schedulix
3. (schedulix) git clone https://github.com/schedulix/schedulix.git
4. (schedulix) added to .bashrc:
    export SDMSHOME=/home/schedulix/schedulix
    export CLASSPATH=$CLASSPATH:/usr/share/java/JFlex.jar
    export JAVAHOME=/usr/lib/jvm/java-6-openjdk-amd64
    export SWTJAR=/usr/share/java/swt.jar
5. (schedulix) . .bashrc
6. (schedulix) cd schedulix/src
7. (schedulix) make

Got a clean compile :-)

Best regards,

Ronald


Gino HereIam

unread,
Aug 16, 2013, 3:20:40 AM8/16/13
to sche...@googlegroups.com, ad...@fair-computer.de
Hi Ronald!

Thank you very much!

Hm, I don't get the difference between yours and my execution.
You added a new archtecture for the whole System.
And with gcc-mulitlib it is possible to compile for x64 and x86 I guess, right?
Why I didn't have any error after I installed this x86 lib and compiled with x64 GCC?

Yours:

5. (root) dpkg --add-architecture i386
6. (root) apt-get update
7. (root) apt-get install gcc-multilib

Mine:
when I only installed this package
apt-get install libc6-i386

and went to ../src and entered make, it also ran through.

Can you tell me the difference between yours and mine?

Ronald Jeninga

unread,
Aug 16, 2013, 3:43:08 AM8/16/13
to sche...@googlegroups.com, ad...@fair-computer.de
Hi Gino,

well, as I already stated in my recipe, I'm not a debian specialist and it's possible that I didn't choose an optimal solution (but it _is_ a solution!).
If you got a clean compile, everything's perfect.

You only need the 32bit libs to execute the jay executable, that's all. That's also the reason your procedure worked.

The next step will be getting the system to run. It's not complicated if you follow the instructions.
But before you submit jobs (e.g. any of the examples), be sure to have the jobservers started (start_example_jobservers.sh), else you'll get an error message which you probably won't understand.

Anyway, I'm happy you're successful so far.

Regards,

Ronald

Thembani Moitlhobogi

unread,
Jan 29, 2014, 6:33:17 AM1/29/14
to sche...@googlegroups.com
Hi Ronald,

Thank you for the brilliant post!
I followed your instructions on installation on a CentOS 6.4 64-bit system and came across these errors during schedulix compilation:

/home/schedulix/schedulix/src/de/independit/scheduler/jobserver/ProcessInfo.java:38: error: package com.sun.jna does not exist
import com.sun.jna.Pointer;
                  ^
/home/schedulix/schedulix/src/de/independit/scheduler/jobserver/W32API.java:35: error: package com.sun.jna.win32 does not exist
import com.sun.jna.win32.StdCallLibrary;
                        ^
/home/schedulix/schedulix/src/de/independit/scheduler/jobserver/W32API.java:39: error: cannot find symbol
public interface W32API extends StdCallLibrary, W32Errors
                                ^

I followed all the required steps you mentioned, is there something else i'm missing?
Thank you for the assistance.

Regards,
Thembani

Ronald Jeninga

unread,
Jan 29, 2014, 6:57:58 AM1/29/14
to sche...@googlegroups.com
Hi Thembani,

thank you for pointing this out. From the error message I deduct you're compiling schedulix 2.6. We made some changes to the jobservers there, which is still work in progress. Anyway, you're going to need the JNA library which can be obtained from https://github.com/twall/jna
Don't forget to set the JNAJAR environment variable. (Just like the SWTJAR variable).

Strictly speaking the jna.jar isn't needed on Linux systems, it's only used on Windows platforms. But we like to have the installations as equal as possible. It simplifies administration.

Hope this helps.

Regards,

Ronald

Thembani Moitlhobogi

unread,
Jan 29, 2014, 8:07:31 AM1/29/14
to sche...@googlegroups.com
Thank you Ronald,

Managed to compile successfully, now proceeding with the rest of the installation steps in the "installation_os_en-2.5.1.pdf" document from http://www.schedulix.org.

Thembani

Ronald Jeninga

unread,
Jan 29, 2014, 9:25:05 AM1/29/14
to sche...@googlegroups.com
You're welcome :-)

Just a note: you might run into a small problem with the example jobservers. The small C program that actually starts the user process is now called "jobexecutor".
I didn't fix the file $SDMSHOME/install/install_example_jobservers.sh to reflect this change yet. You'll have to change it yourself :

...
                'USEPATH' = 'true',
                'JOBEXECUTOR' = '$BICSUITEHOME/bin/jobserver',
                'DEFAULTWORKDIR' = '$HOMEDIR/tmp',
...


should be

...
                'USEPATH' = 'true',
                'JOBEXECUTOR' = '$BICSUITEHOME/bin/jobexecutor',
                'DEFAULTWORKDIR' = '$HOMEDIR/tmp',
...


(line 30 has changed).
If you already executed the script, no problem. Just change it and execute it again.
Alternatively you can copy or rename the jobexecutor binary.

Regards,

Ronald



Vishal Kadam

unread,
Dec 2, 2015, 2:28:59 AM12/2/15
to schedulix
Hi Ronald,

I get the following error when i execute the createjobserver :

[schedulix@xen-centos-6-64-4 schedulix]$ setup_example_jobservers.sh
-bash: setup_example_jobservers.sh: command not found

Regards,

Ronald Jeninga

unread,
Dec 2, 2015, 3:35:12 AM12/2/15
to schedulix
Hi Vishal,

since the script doesn't do too much (mkdir, chmod, test, pwd and sdmsh, which calls a sh and java), I think, there's something wrong with your PATH.

You could test where the error occurs by adding a "-x" after the shebang, like

#!/bin/bash -x

After trying it again, the output will show you where the script fails.

Regards,

Ronald

Panos Zotos

unread,
Feb 5, 2016, 7:40:47 PM2/5/16
to schedulix
hello i have execute all the steps on centos 6.4 with schedulix 2.6.1 and i take the following error
sdmspopup.class 96 times could please help?

Ronald Jeninga

unread,
Feb 6, 2016, 4:22:44 AM2/6/16
to sche...@googlegroups.com
Hi Panos,

though your description of the problem isn't very detailed (next time please include some of the error messages you get), I do have a suspicion.
I think something's wrong with the content of the SWTJAR environment variable. Does it really point to a file (or symlink)?

Just try:

ls -l $SWTJAR

if you get some valid output (showing some swt.jar file), that isn't the cause. If you get a "File Not Found", you'll have to find an swt.jar somewhere.
This might hide in the eclipse-swt package nowadays (and might have been removed from the libswt-gtk-3-java package).


Example from my computer here:

[ronald@cheetah lib]$ yum list | grep swt
eclipse-swt.x86_64            
         1:3.6.1-6.13.el6             @anaconda-CentOS-201311272149.x86_64/6.5
[ronald@cheetah lib]$ uname -a
Linux cheetah.topit.de 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
[ronald@cheetah lib]$ cat /etc/system-release
CentOS release 6.6 (Final)

and

[ronald@cheetah schedulix-master]$ rpm -ql eclipse-swt
... a lot of files ...
/usr/lib64/eclipse/plugins/
org.eclipse.swt.gtk.linux.x86_64_3.6.1.v3655c.jar
/usr/lib64/eclipse/plugins/
org.eclipse.swt_3.6.1.v3655c.jar
/usr/lib64/eclipse/swt-gtk-3.
6.1.jar
/usr/lib64/eclipse/swt-gtk.jar
/usr/lib64/eclipse/swt.jar
/usr/lib64/java/swt.jar

which shows that the original location of swt.jar has been changed after I wrote the recipe.

I hope this helps. If not, please try again (and provide a little bit more information).

Regards,

Ronald
Reply all
Reply to author
Forward
0 new messages