Thread: Howto Make?

Howto Make?

From
howard@mu.edu.ph
Date:
anyone,

Im trying to compile pgadmin3 on wxGTK framework. Mind if you could inform me
the compile/build procedure?

BTW, I am using a wxGTK and wxGTK-devel rpms from www.freshrpms.net.

Thanks.

Howard.


Sulat @MU v.2.2 (Fresh)
.......................................................................................
An extended module for MUWeb4 Project of Howard R. Bagcat
Powered by GNU General Public License softwares.

http://my.mu.edu.ph - a personalized portal is soon to come.



Re: Howto Make?

From
"Dave Page"
Date:

> -----Original Message-----
> From: howard@mu.edu.ph [mailto:howard@mu.edu.ph]
> Sent: 02 June 2003 22:29
> To: pgadmin-hackers@postgresql.org
> Subject: [pgadmin-hackers] Howto Make?
>
>
> anyone,
>
> Im trying to compile pgadmin3 on wxGTK framework. Mind if you
> could inform me the compile/build procedure?
>
> BTW, I am using a wxGTK and wxGTK-devel rpms from www.freshrpms.net.

Some old instructions that should work:

wxWindows 2.4.0. Download from www.wxwindows.org, compile and install.

PostgreSQL 7.3.x. Download 7.3.3 from
www.postgresql.org/mirrors-ftp.html if required. Compile and install (no
need to initdb or start the postmaster if you have another server).

In the wxWindows/contrib/src directory, you should find stc and xrc
directories. Compile and build libstc and libwxxrc from these (should
just need a make; make install in each directory).

Finally, grab the pgAdmin source tarball from
http://snake.pgadmin.org/pgadmin3-src-20030528.tar.gz. Unpack it, and
run the configure script. You may need to specify
--with-pgsql=/path/to/pgsql and/or --with-wx=/path/to/wxwindows. Now
make; make install.

Note that the build system is still fairly new - in particular the
install target is fairly untested. If it complains that it can't load
XRC files, it should find them if they are in ui/common relative to the
location of the executable.


Note that if you want to run CVS code, you need an up-to-date versions
of automake/autoconf. You will need to run 'sh bootstrap' before
configure.

Regards, Dave.

Re: Howto Make?

From
Jean-Michel POURE
Date:
On Monday 02 June 2003 23:28, howard@mu.edu.ph wrote:
> Im trying to compile pgadmin3 on wxGTK framework. Mind if you could inform
> me the compile/build procedure?

I sent you an RPM by email. What platform are you using?
Cheers, Jean-Michel


Re: Howto Make?

From
Jean-Michel POURE
Date:
On Wednesday 11 June 2003 14:03, howard@mu.edu.ph wrote:
> BTW, I installed, via rpm, the pre-packaged gtk2-devel and all the required
> devel's from RH9 disk2 and I compiled wxGTK from wxwindows.org. Was it good
> source? I mean are there any patches? I was not able to catch the
> pgadmin-hackers discussion about making RH9 the build platform for
> wxGTK+pgAdmin.

Dear Howard,

The rpms from http://snake.pgadmin.org are static builds including wxWindows
and debug information. If you are end-user, it is recommanded to install RPM
binaries.

If you plan to contribute code, pgAdmin3 requires wxWindows from CVS version >
20030607. Use a recent GNU/Linux distro because GTK2.2 is needed.

In case of problem, do not hesitate to get back to us on the list.

1) Please install from source with the following options:
./configure --with-gtk --enable-gtk2 --enable-unicode --disable-shared
--enable-debug
make
make install
ldconfig

2) Install stc
cd contrib/src/stc
make
make install
ldconfig

3) Install xrc
cd ../xrc
make
make install
ldconfig

4) Download and install pgAdmin
sh bootstrap
./configure --enable-unicode --enable-gtk2 --enable-debug
make all
make install

Cheers,
Jean-Michel


Re: Howto Make?

From
"Dave Page"
Date:

> -----Original Message-----
> From: Jean-Michel POURE [mailto:jm.poure@freesurf.fr]
> Sent: 11 June 2003 09:16
> To: howard@mu.edu.ph
> Cc: pgadmin-hackers@postgresql.org
> Subject: Re: [pgadmin-hackers] Howto Make?
>
>
> If you plan to contribute code, pgAdmin3 requires wxWindows
> from CVS version >
> 20030607. Use a recent GNU/Linux distro because GTK2.2 is needed.

Please use that exact version so we all see the same bugs :-)

> In case of problem, do not hesitate to get back to us on the list.
>
> 1) Please install from source with the following options:
> ./configure --with-gtk --enable-gtk2 --enable-unicode
> --disable-shared
> --enable-debug
> make
> make install
> ldconfig

The --disable-shared seems a little redundant unless I've misunderstood
it's meaning. pgAdmin only builds with dynamic libraries at the moment
(as implied by the ldconfig you do at the end of each step).

Regards, Dave.

Re: Howto Make?

From
Jean-Michel POURE
Date:
On Wednesday 11 June 2003 10:20, Dave Page wrote:
> The --disable-shared seems a little redundant unless I've misunderstood
> it's meaning. pgAdmin only builds with dynamic libraries at the moment
> (as implied by the ldconfig you do at the end of each step).

Thanks, ldconfig is not needed.  My RPM snapshots are build staticly in order
to require little dependencies. Therefore, I only use the static version of
wxGTK.

But you can set up the same environment with dynamic libraries.

Cheers,
Jean-Michel


Re: Howto Make?

From
"Dave Page"
Date:

> -----Original Message-----
> From: Jean-Michel POURE [mailto:jm.poure@freesurf.fr]
> Sent: 11 June 2003 09:36
> To: howard@mu.edu.ph
> Cc: pgadmin-hackers@postgresql.org
> Subject: Re: [pgadmin-hackers] Howto Make?
>
>
> On Wednesday 11 June 2003 10:20, Dave Page wrote:
> > The --disable-shared seems a little redundant unless I've
> > misunderstood it's meaning. pgAdmin only builds with
> dynamic libraries
> > at the moment (as implied by the ldconfig you do at the end of each
> > step).
>
> Thanks, ldconfig is not needed.  My RPM snapshots are build
> staticly in order
> to require little dependencies. Therefore, I only use the
> static version of
> wxGTK.
>
> But you can set up the same environment with dynamic libraries.

But pgAdmin links it all dynamically at the moment as Adam has yet to
put in the static link options.

Regards, Dave.

Re: Howto Make?

From
Jean-Michel POURE
Date:
On Wednesday 11 June 2003 10:41, Dave Page wrote:
> But pgAdmin links it all dynamically at the moment as Adam has yet to
> put in the static link options.
> Regards, Dave.

For testing, I removed wxWindows source and binaries from my laptop and
installed pgAdmin3 rpm. It works like a charm.

Apparently, pgAdmin3 binaries are build staticly and do not depend on
wxWindows shared libraries.

Cheers,
Jean-Michel


Re: Howto Make?

From
"Dave Page"
Date:

> -----Original Message-----
> From: Jean-Michel POURE [mailto:jm.poure@freesurf.fr]
> Sent: 11 June 2003 09:49
> To: Dave Page
> Cc: pgadmin-hackers@postgresql.org
> Subject: Re: [pgadmin-hackers] Howto Make?
>
> For testing, I removed wxWindows source and binaries from my
> laptop and
> installed pgAdmin3 rpm. It works like a charm.
>
> Apparently, pgAdmin3 binaries are build staticly and do not depend on
> wxWindows shared libraries.

Hmm,

I just cleaned up snake, and re-installed wx. At the same time, Mark
followed the same steps exactly on his test box (doink). The pgAdmin
link step looked like:

g++ -DDATA_DIR=\"/usr/local/pgadmin3/share/pgadmin3/\" -Wall -g
-I./include/ -I -g -O2  -L/usr/local/pgsql/lib -L/usr/local//lib -o
pgAdmin3  pgAdmin3.o pgConn.o pgSet.o pgAggregate.o pgCast.o pgCheck.o
pgCollection.o pgColumn.o pgConstraints.o pgConversion.o pgDatabase.o
pgDomain.o pgForeignKey.o pgFunction.o pgGroup.o pgIndex.o
pgIndexConstraint.o pgLanguage.o pgObject.o pgOperator.o
pgOperatorClass.o pgRule.o pgSchema.o pgSequence.o pgServer.o pgTable.o
pgTrigger.o pgType.o pgUser.o pgView.o pgDatatype.o ctlSQLBox.o
ctlSQLResult.o dlgAddTableView.o events.o frmAbout.o
frmChildTableViewFrame.o frmConnect.o frmMain.o frmOptions.o
frmPassword.o frmQuery.o frmQueryBuilder.o frmHelp.o frmQBJoin.o
frmSplash.o frmVacuum.o frmEditGrid.o dlgProperty.o dlgUser.o dlgGroup.o
dlgDatabase.o dlgLanguage.o dlgSchema.o dlgDomain.o dlgTable.o
dlgColumn.o dlgIndex.o dlgFunction.o dlgView.o dlgRule.o dlgOperator.o
dlgAggregate.o dlgCast.o dlgConversion.o dlgIndexConstraint.o
dlgForeignKey.o dlgSequence.o dlgTrigger.o dlgType.o dlgCheck.o
frmStatus.o misc.o sysLogger.o sysSettings.o  -lssl -lcrypto -lpq
-lwx_gtk2ud_stc-2.5 -lwx_gtk2ud_xrc-2.5 -L/usr/local/lib -pthread
-lwx_gtk2ud-2.5
make[2]: Leaving directory `/usr/local/src/pgadmin3/src'

Which is not static afaict. This was confirmed by Mark who forgot to add
/usr/local/pgsql/lib to /etc/ld.so.conf, resulting in a 'cannot load
shared library' error when he ran pgAdmin.

The only thing I can think of, is that we omitted the --disable-shared
option to wx. A while ago this would have produced this behaviour when
the build system used the wx-config script which would have passed the
relevant static option to the linker, but Adam stopped using wx-config a
week or so back.

Of course, I may have overlooked something....

Regards, Dave.

Re: Howto Make?

From
"Dave Page"
Date:

> -----Original Message-----
> From: Dave Page
> Sent: 11 June 2003 10:10
> To: jm.poure@freesurf.fr
> Cc: pgadmin-hackers@postgresql.org
> Subject: Re: [pgadmin-hackers] Howto Make?
>
>
> The only thing I can think of, is that we omitted the
> --disable-shared option to wx. A while ago this would have
> produced this behaviour when the build system used the
> wx-config script which would have passed the relevant static
> option to the linker, but Adam stopped using wx-config a week
> or so back.
>
> Of course, I may have overlooked something....

Which I have - we are still using it, but in configure not the makefile
where it used to be.

Sorry...

Regards, Dave.

Re: Howto Make?

From
Jean-Michel POURE
Date:
On Wednesday 11 June 2003 11:14, Dave Page wrote:
> Which I have - we are still using it, but in configure not the makefile
> where it used to be.

Cool. wxWindows is a really nice environment.

From what I read this morning (saw my post?), we will be able to talk to
PostgreSQL using server-side encodings, without using "set client_encoding=".

By the way, pgAdmin3 still has several shared dependencies, as written in the
pgAdmin3 spec file. This means a tar.gz ***may*** not be the best way to
distribute binaries. Binary packages are better because they check for
dependencies.

What do you think?

Cheers,
Jean-Michel


Re: Howto Make?

From
"Dave Page"
Date:

> -----Original Message-----
> From: Jean-Michel POURE [mailto:jm.poure@freesurf.fr]
> Sent: 11 June 2003 10:25
> To: Dave Page
> Cc: pgadmin-hackers@postgresql.org
> Subject: Re: [pgadmin-hackers] Howto Make?
>
>
> On Wednesday 11 June 2003 11:14, Dave Page wrote:
> > Which I have - we are still using it, but in configure not the
> > makefile where it used to be.
>
> Cool. wxWindows is a really nice environment.
>
> From what I read this morning (saw my post?), we will be able
> to talk to
> PostgreSQL using server-side encodings, without using "set
> client_encoding=".

I'll leave that to you guys as you clearly know more than I. BTW. do you
speak Japanese?

> By the way, pgAdmin3 still has several shared dependencies,
> as written in the
> pgAdmin3 spec file. This means a tar.gz ***may*** not be the
> best way to
> distribute binaries.

Slackware's packaging system is based on tgz's but I know what you mean.
They were only a quick lash up.

> Binary packages are better because they
> check for
> dependencies.

RPMs do, but others don't. Ideally I think our binary releases should be
100% static, which is why I asked Adam for a static/dynamic options the
other day.

Regards, Dave.


Packaging policy

From
Jean-Michel POURE
Date:
> I'll leave that to you guys as you clearly know more than I. BTW. do you
> speak Japanese?

No... I can only say "Yes" in Japanese (pronounce "Hi" like in American). One
of my client has a Japanese web site, therefore got used to using UTF-8.

Out of memory (don't trust me), SJSS is a subpart of UTF-8, therefore SJSS may
display well under Windows. But we need to use the conversion libraries of
wxWindows2.5 in all other cases.

Let's talk of packages now...

> Slackware's packaging system is based on tgz's but I know what you mean.
> They were only a quick lash up.

Can http://www.slackware.com/config/packages.php be used to install your
packages?

I am currently downloading Mandrake 9.1 for installation on an old box. Seems
like we now have RedHat, Slackware and Mandrake daily packages. We still need
Suse 8?1 packages and Debian packages.

- Suse
I will try to get in contact with the maintainer of PostgreSQL packages at
Suse to ask for help. I met him at the PostgreSQL conference in FOSDEM, he is
a very nice guy.

- Debian
Knopix is the easiest way to install Debian. Maybe it can be used to generate
packages. I don't know anything about Debian. Dave, do you run Debian
stations at work? Have you tried Knopix? It is designed by a PostgreSQL
hacker.

Cheers,
Jean-Michel