Really Open Source Information Gathering

How to compile the master


    Only available on GNU Linux distributions.

    step 1 : Prerequisites

    The sources are not available yet

    Mandatory Dependencies and package needed

    Some package are mandatory to compile and run the master :

    • build-essential
    • mysql-server ( see step 2 )
    • libmysqlclient16-dev
    sudo aptitude install build-essential mysql-server libmysqlclient16-dev

    Step 2 : Install Database.

    Netglub master use a mysql database. a file containing all the tables is available in the package.
    Location :


    The user that will be used must have all right in this database.

    In the following hint, we create a database named netglub with user netglub (password : netglub)

    bash~$ mysql -u (@MYSQL_USER_NAME (root)) -p(@MYSQL_PASSWORD)
    mysql> create database netglub;
    mysql> use netglub;
    mysql> create user "netglub"@"localhost";
    mysql> set password for "netglub"@"localhost" = password("netglub");
    mysql> GRANT ALL ON netglub.* TO "netglub"@"localhost";
    mysql> quit
    bash~$ mysql -u (@MYSQL_USER_NAME (root)) -p(@MYSQL_PASSWORD) netglub < (@Netglub_location)/trunk/master/tools/sql/netglub.sql
    Now the database is available.

    Step 3 : Qt framework install

    The master depend on Qt framework (version 4.6 at least).

    Actually, the latest release of Qt framework is the 4.6.3. The packages available on Ubuntu official repository being too old, two solutions may be used :

    First Solution: Install Qt SDK.

    You can download the 64bit version of Qt SDK at or download it from our local mirror (private link). netglub master can be used on a 32bit processor too, if you made this choose, you should dowload the Qt SDK 32bit version or dirrectly here (private link)

    The SDK take up more disk space than compiling Qt sources, but it contains a inary version of Qt libraries which avoid a complete compile. Furthermore, the compilation is trivial via graphical wizard.

    chmod +x qt-sdk-linux-x86_64-opensource-2010.03.bin 

    Second solution : Compiling Qt Sources

    the first solution is recomended

    This solution, more laborious, is to download the Qt source ( -4.6.3.tar.gz) and to make yourself compile it

    sudo aptitude install libxq11-dev libxext-dev 
    tar xf qt-everywhere-opensource-src-4.6.3.tar.gz 
    cd qt-everywhere-opensource-src-4.6.3 cd qt-everywhere-opensource-src-4.6.3
    ./configure -opensource -fast -nomake examples -nomake demos -qt-sql-mysql -plugin-sql-mysql
    sudo make install 
    To compile Qt in debug mode :

     ./configure -opensource -fast -nomake examples -nomake demos -debug -no-separate-debug-info 

    Getting mysql to work :

    The mysql plugins are not included in the sdk you may need some help to instal it :

    if you have compiled the sources, you may not need the following (if you installed the mysql plugins.)
    cd (@Qt)/qt/src/plugins/sqldrivers/mysql
    qmake (qmake is locate in the bin directory of qt)
    You may have some problems to detects mysql headers, if it's the case, you can force a path to this headers :
    qmake INCLUDEPATH+=(@mysql_headers_path) ex: qmake INCLUDEPATH+=/usr/include/mysql/
    then retry make.
    cp ../../../../plugins/sqldrivers/ 
      or cp (@Qt)/qt/plugins/sqldrivers/ 
    Now, Qt is installed, you can begin the master install.

    step 4 : install the master :

    you can now compile the master :

    cd (@netglub_location)/master

    to finish the instalation :

    cd tools
    sudo ./

    to launch the master :

    ./(@netglub_location)/master/tools/netglub_master start
    the master will automaticaly start at each boot.
    You can tip :
    sudo ./master -h
    for help
    If you want to change some configuration, you can change the file
    and launch again.

    236 Responses

    Is it possible that you forgot the qt directory in your source package? I already installed the Qt SDK, and I already compiled netglub, so I proceed directly to step 4 and I get this error:
    main.cpp: In function ‘int main(int, char**)’:
    main.cpp:276:32: error: ‘getpid’ was not declared in this scope
    make[1]: *** [../build/main.o] Error 1
    make[1]: Leaving directory `/tmp/netglub-1.0/master/src’
    make: *** [sub-src-master-pro-make_default-ordered] Error 2


  • Hello,

    On Kubuntu 13.04, I had a problem trying to compile the master :

    main.cpp:277:32: error: ‘getpid’ was not declared in this scope

    I had to add this line for it to work :

    I don’t know whether it comes from me or if it’s a kind of regression, due to the evolution of Ubuntu.

  • Leave a Reply