WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Compiling pgAdmin -> wxGTK -> GTK+ not found  (Read 9296 times)

Offline virtualbox

  • Newbie
  • *
  • Posts: 21
Compiling pgAdmin -> wxGTK -> GTK+ not found
« on: February 21, 2014, 08:19:51 AM »
Hi,

I want to use pgAdmin in Tinycore, so I tried to compile it following the information in INSTALL file:

Code: [Select]
Installing pgAdmin from source
==============================

Linux, FreeBSD, Solaris and other unix variants
-----------------------------------------------

You will need:

- A modern development environment:

    - GTK 2.2 or above.
    - GNU automake 1.9 or above.
    - GNU autoconf 2.59 or above.
    - GNU gcc 3.4 or above.

- wxGTK 2.8.x from http://www.wxwidgets.org/
- libxml2 2.6.18 or above from http://www.xmlsoft.org/
- libxslt 1.1.x or above from http://www.xmlsoft.org/
- PostgreSQL 8.4 or above from http://www.postgresql.org/
- Sphinx 1.0 or above from http://sphinx.pocoo.org/

Building:

1) Install libxml2 and libxslt if they are not already present on your system,
   per the instructions included with them.
   
2) Install PostgreSQL per the instructions included. It is recommended that you
   build with OpenSSL support, using the --with-openssl configure option.
   
3) Unpack the wxGTK tarball to a convenient location, and build and install it
   as follows:
   
     cd /path/to/wxGTK/source/
     ./configure --with-gtk --enable-gtk2 --enable-unicode
     make
     sudo make install

     # Install wxWidgets contrib modules.
     cd contrib/
     make
     sudo make install

   A script is included in the pgAdmin source tarball
   (xtra/wx-build/build-wxgtk) which will build and install wxWidgets in each
   combination of shared/static/debug/release builds for you.
   
4) Unpack the pgAdmin tarball to a convenient location, and build and install it
   as follows:
   
     bash bootstrap # Required only if building from a GIT checkout
     ./configure
     make all
     sudo make install

   If any of the prerequisite components are installed in locations that the
   configure script cannot find, you may specify their locations on the command
   line. See the configure help (./configure --help) for details.

I installed all the required packages (compiletc.tcz, wxgtk-dev.tcz, libxml2-dev.tcz, libxslt.tcz etc). I have also installed and configured PostgreSQL.

So I tried to configure pgAdmin source as following:

Code: [Select]
tc@box:~/test/pgadmin3-1.18.1$ ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... config/install-sh -c -d
checking for gawk... gawk
...
checking libpq-fe.h presence... no
checking for libpq-fe.h... no
checking PostgreSQL in /usr/local... ok
checking for PQgetOutResult in -lpq... no
checking wxWidgets version... ok
checking wxWidgets in /usr/local... ok
checking libxml2 in /usr/local... ok
checking libxml2 version... ok
checking libxslt in /usr/local... ok
checking for ld used by GCC... /usr/local/bin/ld
checking if the linker (/usr/local/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking for libssl... no
checking for libgcrypt... no
configure: cannot find OpenSSL or Libgcrypt, try --with-libssl-prefix=PATH or --with-libgcrypt-prefix=PATH
checking for libz... yes
checking how to link with libz... -lz
checking non-blocking sockets style... O_NONBLOCK
checking for sphinx-build... no
checking for sphinx-build-2.7... no
checking for sphinx-build-2.6... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating branding/Makefile
config.status: creating i18n/Makefile
config.status: creating plugins.d/Makefile
config.status: creating pgadmin/Makefile
config.status: creating pkg/Makefile
config.status: creating pkg/debian/Makefile
config.status: creating pkg/mac/Makefile
config.status: creating pkg/mandrake/Makefile
config.status: creating pkg/redhat/Makefile
config.status: creating pkg/slackware/Makefile
config.status: creating pkg/src/Makefile
config.status: creating pkg/suse/Makefile
config.status: creating pkg/win32/Makefile
config.status: creating xtra/Makefile
config.status: creating xtra/png2c/Makefile
config.status: creating xtra/wx-build/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: creating pgadmin/include/libssh2/libssh2_config.h
config.status: pgadmin/include/libssh2/libssh2_config.h is unchanged
config.status: executing depfiles commands

PostgreSQL directory: /usr/local
PostgreSQL pg_config binary: /usr/local/bin/pg_config
PostgreSQL version: PostgreSQL 9.2.0

PostgreSQL PQconninfoParse support:     Present
PostgreSQL SSL support: Present

wxWidgets directory: /usr/local
wxWidgets wx-config binary: /usr/local/bin/wx-config
wxWidgets version: wxWidgets 2.8.12

libxml2 directory: /usr/local
libxml2 xml2-config binary: /usr/local/bin/xml2-config
libxml2 version: libxml2 2.9.0

libxslt directory: /usr/local
libxslt xslt-config binary: /usr/local/bin/xslt-config
libxslt version: libxslt 1.1.28

Building Database Designer: No

Building SSH Tunnel: No

Building a debug version of pgAdmin: No
Statically linking pgAdmin: No
Building a Mac OS X appbundle: No

sphinx-build executable:                <not found>

pgAdmin configuration is now complete. You can now compile and
install pgAdmin using 'make; make install'.

All seems fine at this point. But if I tried to build it, I get this:
Code: [Select]
tc@box:~/test/pgadmin3-1.18.1$ make all
make  all-recursive
make[1]: Entering directory `/home/tc/test/pgadmin3-1.18.1'
Making all in branding
make[2]: Entering directory `/home/tc/test/pgadmin3-1.18.1/branding'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/tc/test/pgadmin3-1.18.1/branding'
Making all in i18n
make[2]: Entering directory `/home/tc/test/pgadmin3-1.18.1/i18n'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/tc/test/pgadmin3-1.18.1/i18n'
Making all in plugins.d
make[2]: Entering directory `/home/tc/test/pgadmin3-1.18.1/plugins.d'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/tc/test/pgadmin3-1.18.1/plugins.d'
Making all in xtra
make[2]: Entering directory `/home/tc/test/pgadmin3-1.18.1/xtra'
Making all in wx-build
make[3]: Entering directory `/home/tc/test/pgadmin3-1.18.1/xtra/wx-build'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/tc/test/pgadmin3-1.18.1/xtra/wx-build'
make[3]: Entering directory `/home/tc/test/pgadmin3-1.18.1/xtra'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/home/tc/test/pgadmin3-1.18.1/xtra'
make[2]: Leaving directory `/home/tc/test/pgadmin3-1.18.1/xtra'
Making all in pgadmin
make[2]: Entering directory `/home/tc/test/pgadmin3-1.18.1/pgadmin'
make  all-am
make[3]: Entering directory `/home/tc/test/pgadmin3-1.18.1/pgadmin'
depbase=`echo pgAdmin3.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -DHAVE_CONFIG_H -I. -I.. -I../pgadmin/include/libssh2  -DDATA_DIR=\"/usr/local/pgadmin3/share/pgadmin3/\" -I../pgadmin/include   -I/usr/local/include -I/usr/local/include/postgresql/server -I/usr/local/include/postgresql -DPG_SSL -DHAVE_CONNINFO_PARSE -I/usr/local/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -DEMBED_XRC -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/include/libxml2  -O2 -MT pgAdmin3.o -MD -MP -MF $depbase.Tpo -c -o pgAdmin3.o pgAdmin3.cpp &&\
mv -f $depbase.Tpo $depbase.Po
In file included from ../pgadmin/include/pgAdmin3.h:28:0,
                 from pgAdmin3.cpp:13:
../pgadmin/include/ctl/ctlSQLBox.h:17:24: fatal error: wx/stc/stc.h: No such file or directory
compilation terminated.
make[3]: *** [pgAdmin3.o] Error 1
make[3]: Leaving directory `/home/tc/test/pgadmin3-1.18.1/pgadmin'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/tc/test/pgadmin3-1.18.1/pgadmin'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/tc/test/pgadmin3-1.18.1'
make: *** [all] Error 2

So I tried to find "stc.h", but I could not find it anywere. I thought that maybe the precompiled package wxgtk-dev.tcz is somehow not enough for my situation and I must compile it myself (maybe something to do with contrib modules mentioned in INSTALL file).

I downloaded wxGTK 2.8.12 source, untarred and tried to configure:
Code: [Select]
tc@box:~/test/wxWidgets-2.8.12$ ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
loading argument cache configarg.cache
checking for --enable-gui... yes
checking for --enable-monolithic... no
checking for --enable-plugins... no
checking for --without-subdirs... no
...
checking for --enable-tga... yes
checking for --enable-iff... no
checking for --enable-pnm... yes
checking for --enable-xpm... yes
checking for --enable-ico_cur... yes
checking for --enable-official_build... no
saving argument cache configarg.cache
checking for toolkit... gtk
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether we are using the Intel C compiler... no
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking whether gcc needs -traditional... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether we are using the Intel C++ compiler... no
checking whether we are using the Sun C++ compiler... no
checking for ranlib... ranlib
checking for ar... ar
checking for a BSD-compatible install... /usr/bin/install -c
checking for strip... strip
checking if make is GNU make... yes
checking whether ln -s works... yes
checking for strcasecmp() in string.h... yes
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for fnmatch.h... yes
checking for langinfo.h... yes
checking for malloc.h... yes
checking for unistd.h... (cached) yes
checking for wchar.h... yes
checking for sys/select.h... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for char... yes
checking size of char... 1
checking for short... yes
checking size of short... 2
checking for void *... yes
checking size of void *... 4
checking for int... yes
checking size of int... 4
checking for long... yes
checking size of long... 4
checking for size_t... yes
checking size of size_t... 4
checking for long long... yes
checking size of long long... 8
checking for wchar_t... yes
checking size of wchar_t... 4
checking for va_copy... yes
checking whether the compiler supports variadic macros... yes
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking if large file support is available... yes
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for fseeko... yes
checking whether byte ordering is bigendian... no
checking for iostream... yes
checking if C++ compiler supports bool... yes
checking if C++ compiler supports the explicit keyword... yes
checking whether the compiler supports const_cast<>... yes
checking whether the compiler supports reinterpret_cast<>... yes
checking whether the compiler supports static_cast<>... yes
checking for std::wstring in <string>... yes
checking for std::istream... yes
checking for std::ostream... yes
checking for libraries directory... lib
checking for glibc 2.1 or later... yes
checking for cos... no
checking for floor... no
checking if floating point functions link without -lm... no
checking for sin... yes
checking for ceil... yes
checking if floating point functions link with -lm... yes
checking for wcstoull... yes
checking for zlib.h >= 1.1.4... yes
checking for zlib.h... (cached) yes
checking for deflate in -lz... yes
checking for png.h > 0.90... yes
checking for png.h... (cached) yes
checking for png_sig_cmp in -lpng... yes
checking for jpeglib.h... yes
checking for jpeg_read_header in -ljpeg... yes
checking for tiffio.h... yes
checking for TIFFError in -ltiff... yes
checking for expat.h... yes
checking if expat.h is valid C++ header... yes
checking for XML_ParserCreate in -lexpat... yes
checking for mspack.h... no
checking for GTK+ version...
checking for pkg-config... /usr/local/bin/pkg-config
checking for GTK+ - version >= 2.0.0... no
*** Could not run GTK+ test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GTK+ is incorrectly installed.
configure: error:
The development files for GTK+ were not found. For GTK+ 2, please
ensure that pkg-config is in the path and that gtk+-2.0.pc is
installed. For GTK+ 1.2 please check that gtk-config is in the path,
and that the version is 1.2.3 or above. Also check that the
libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
--libs' are in the LD_LIBRARY_PATH or equivalent.

It could not find GTK+, but I have gtk2.tcz and gtk2-dev.tcz installed (also have the same for v3).

I searched the forum for similar problem and found this:
http://forum.tinycorelinux.net/index.php/topic,9315.msg50829.html#msg50829
..but I can't figure out the problem. Is it possible, that gtk2.tcz and gtk2-dev.tcz in repo are actually different versions?

Maybe someone could help me with this..

(Tinycore 5.2 32Bit / config.log attached)

Thanks in advance!


MORE INFO:
Code: [Select]
tc@box:~/test/wxWidgets-2.8.12$ pkg-config gtk+-2.0 --libs
-L/usr/local/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype
« Last Edit: February 21, 2014, 09:25:14 AM by virtualbox »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11705
Re: Compiling pgAdmin -> wxGTK -> GTK+ not found
« Reply #1 on: February 21, 2014, 10:41:35 AM »
Hi virtualbox
I don't see where you executed these steps listed in the directions:
Code: [Select]
3) Unpack the wxGTK tarball to a convenient location, and build and install it
   as follows:
   
     cd /path/to/wxGTK/source/
     ./configure --with-gtk --enable-gtk2 --enable-unicode
     make
     sudo make install

     # Install wxWidgets contrib modules.
     cd contrib/
     make
     sudo make install

According to Google what you are missing comes from the  contrib  directory.

Offline AmatCoder

  • Full Member
  • ***
  • Posts: 179
    • AmatCoder Projects
Re: Compiling pgAdmin -> wxGTK -> GTK+ not found
« Reply #2 on: February 21, 2014, 11:59:06 AM »
[...]
It could not find GTK+, but I have gtk2.tcz and gtk2-dev.tcz installed (also have the same for v3).

I searched the forum for similar problem and found this:
http://forum.tinycorelinux.net/index.php/topic,9315.msg50829.html#msg50829
..but I can't figure out the problem. Is it possible, that gtk2.tcz and gtk2-dev.tcz in repo are actually different versions?

Maybe someone could help me with this..

You must load libGL-dev.tcz (Indeed, it should be a dependency of cairo-dev.tcz)

Offline virtualbox

  • Newbie
  • *
  • Posts: 21
Re: Compiling pgAdmin -> wxGTK -> GTK+ not found
« Reply #3 on: February 21, 2014, 01:29:53 PM »
Thanks for helping me out!

Hi virtualbox
I don't see where you executed these steps listed in the directions:
Code: [Select]
3) Unpack the wxGTK tarball to a convenient location, and build and install it
   as follows:
   
     cd /path/to/wxGTK/source/
     ./configure --with-gtk --enable-gtk2 --enable-unicode
     make
     sudo make install

     # Install wxWidgets contrib modules.
     cd contrib/
     make
     sudo make install

According to Google what you are missing comes from the  contrib  directory.
At first I didn't make these steps, because I found wxGTK 2.8.12 from 5.x repo (wxgtk-dev.tcz) as prebuilt package. I hoped to save some time with this, but seems that this package doesn't contain this contrib stuff.

[...]
It could not find GTK+, but I have gtk2.tcz and gtk2-dev.tcz installed (also have the same for v3).

I searched the forum for similar problem and found this:
http://forum.tinycorelinux.net/index.php/topic,9315.msg50829.html#msg50829
..but I can't figure out the problem. Is it possible, that gtk2.tcz and gtk2-dev.tcz in repo are actually different versions?

Maybe someone could help me with this..

You must load libGL-dev.tcz (Indeed, it should be a dependency of cairo-dev.tcz)
Yes, it worked! AmatCoder how did you figured it out (so I can resolve these kind of problems in the future)? By the error message or have you faced this before?

Offline AmatCoder

  • Full Member
  • ***
  • Posts: 179
    • AmatCoder Projects
Re: Compiling pgAdmin -> wxGTK -> GTK+ not found
« Reply #4 on: February 22, 2014, 09:49:13 AM »
At first I didn't make these steps, because I found wxGTK 2.8.12 from 5.x repo (wxgtk-dev.tcz) as prebuilt package. I hoped to save some time with this, but seems that this package doesn't contain this contrib stuff.

wxgtk.tcz should contain contrib modules. I guess you can request a rebuild of package to include them.
(I made last build of wxgtk on TC4.x and I made same mistake: I forgot to include the contrib stuff  :-[)

Quote
Yes, it worked! AmatCoder how did you figured it out (so I can resolve these kind of problems in the future)? By the error message or have you faced this before?

When pkg-config does not found some header, you must check for missing .pc files with 'pkg-config --cflags gtk+-2.0'

Offline virtualbox

  • Newbie
  • *
  • Posts: 21
Re: Compiling pgAdmin -> wxGTK -> GTK+ not found
« Reply #5 on: February 27, 2014, 04:09:41 AM »
Thanks!