PgModeler compile

From gnewarchaeology wiki
Jump to: navigation, search
PgModeler > PgModeler compile



References

Requirements

  • GCC Development Tools 4.7 or above
  • Qt 5.x framework (5.1.x is recommended)
  • XML2 library
sudo aptitude install gcc-4.7 qt4-qmake libqt4-dev xml2 libpq5 libpq-dev pkg-config
  • PostgreSQL, of course

Pgkconfig check

The compilation script uses the pkgconfig tool to find the correct paths to PostgreSQL client library and XML2 library

pkg-config libxml-2.0 --cflags --libs
-I/usr/include/libxml2  -lxml2

OK.

pkg-config libpq --cflags --libs
Package libpq was not found in the pkg-config search path.
Perhaps you should add the directory containing `libpq.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libpq' found

Edit /usr/lib/i386-linux-gnu/pkgconfig/libpq.pc [3]

prefix=/usr
 libdir=${prefix}/lib
 includedir=${prefix}/include

 Name: LibPQ
 Version: 5.0.0
 Description: Library PQ
 Requires:
 Libs: -L${libdir} -lpq
 Cflags: -I${includedir}/postgresql
pkg-config libpq --cflags --libs
-I/usr/include/postgresql  -lpq

OK.

Clone the source code

cd /usr/local/src/
sudo wget https://github.com/pgmodeler/pgmodeler/archive/v0.7.2.tar.gz
sudo tar xzvf v0.7.2.tar.gz

Compile

cd pgmodeler-0.7.2/
sudo qmake pgmodeler.pro BINDIR+=/usr/local/bin/
Project MESSAGE: Warning: unknown QT: widgets
Project MESSAGE: Warning: unknown QT: printsupport
WARNING: pgmodeler_data.path is not defined: install target not created

WARNING: pgmodeler_doc.path is not defined: install target not created

Let's go on, anyway...

sudo make
cd libutils/ && make -f Makefile 
make[1]: Entering directory `/usr/local/src/pgmodeler-0.7.2/libutils'
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_WEBKIT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../../share/qt4/mkspecs/linux-g++ -I. -I../../../../include/qt4/QtCore -I../../../../include/qt4/QtNetwork -I../../../../include/qt4/QtGui -I../../../../include/qt4 -Isrc -I../libpgconnector/src -I../libparsers/src -I../libpgmodeler/src -I../libobjrenderer/src -I../libpgmodeler_ui/src -I../main/src -I/usr/X11R6/include -Imoc -I../../../../include/postgresql -I../../../../include/libxml2 -o obj/exception.o src/exception.cpp
In file included from src/exception.cpp:18:0:
src/exception.h:314:3: warning: identifier ‘nullptr’ is a keyword in C++11 [-Wc++0x-compat]
src/exception.h:314:108: error: ‘nullptr’ was not declared in this scope
src/exception.h:316:130: error: ‘nullptr’ was not declared in this scope
src/exception.h:318:110: error: ‘nullptr’ was not declared in this scope
[...]

OK, identifier ‘nullptr’ is a keyword in C++11 [4]

Check if Qt 5.3 is correctly setting the flags to use C++11 language keywords. I recommend you to compile using Qt 5.2.1 because pgModeler compilation wasn't test on this new version

Right, I installed Qt4 (qt4-qmake libqt4-dev)...

Debian packages?

Official?

External links