Thread: Re: [GENERAL] JDBC and Perl compiling problems w/ postgresql-7.1rc4

Re: [GENERAL] JDBC and Perl compiling problems w/ postgresql-7.1rc4

From
"Homayoun Yousefi'zadeh"
Date:
Charlie Derr wrote:

> This sounds like the problem with the version of gcc that is included with
> rh7.0
>
> If you don't want to upgrade gcc to a newer version, I think you can fix the
> problem by "mv"ing gcc to brokengcc and then creating creating a new symlink
> gcc to kgcc.  Redhat included a non-broken gcc in the distro and called it
> kgcc.

I did what you suggested and nothing changed.
Actually, JDBC problem seems to be ant related
as it did not exist w/ version 7.0.3.

The perl problem is definitely coming from libperl.a
file as specifically mentioned in the Makefile.

Suggestions??

Regards,
HY


> ~ -----Original Message-----
> ~ From: pgsql-general-owner@postgresql.org
> ~ [mailto:pgsql-general-owner@postgresql.org]On Behalf Of Homayoun
> ~ Yousefi'zadeh
> ~ Sent: Monday, April 09, 2001 6:33 PM
> ~ To: pgsql-general@postgresql.org
> ~ Subject: [GENERAL] JDBC and Perl compiling problems w/ postgresql-7.1rc4
> ~
> ~
> ~ Hello there,
> ~
> ~ I first ran configure with the following options
> ~
> ~   ./configure --with-perl  --with-tcl --enable-odbc --with-java
> ~ --enable-syslog --enable-debug
> ~
> ~ and then compiled postgresql-7.1rc4 on Redhat 7.0 successfully
> ~ with the exceptions in JDBC and Perl modules as
> ~ indicated below.
> ~
> ~ -------------------------------------------------------------
> ~
> ~ gmake[3]: Entering directory
> ~ `/usr/pgsql-pkg/postgresql-7.1rc4/src/interfaces/jdbc'
> ~ /usr/jakarta/jakarta-ant/bin/ant -buildfile ../../../build.xml -Dmajor=7
> ~ -Dminor=1 -Dfullversion=7.1rc4 -Ddef_pgport=5432
> ~ Buildfile: ../../../build.xml
> ~
> ~ jar:
> ~
> ~ call:
> ~
> ~ prepare:
> ~
> ~ check_versions:
> ~
> ~ driver:
> ~ Configured build for the JDBC2 edition driver.
> ~
> ~ compile:
> ~      [javac] Compiling 41 source files to
> ~ /usr/pgsql-pkg/postgresql-7.1rc4/src/interfaces/jdbc/build
> ~      [javac] Modern compiler is not available - using classic compiler
> ~
> ~ BUILD FAILED
> ~
> ~ /usr/pgsql-pkg/postgresql-7.1rc4/src/interfaces/jdbc/build.xml:99:
> ~ Cannot use classic compiler, as it is not available
> ~
> ~ Total time: 0 seconds
> ~
> ~ -----------------------------------------------------------------
> ~
> ~    <!-- This is the core of the driver. It is common for all three
> ~ versions -->
> ~
> ~      <target name="compile" depends="prepare,check_versions,driver">
> ~
> ~      <!-- **** The following is line 99 of build.xml ******* -->
> ~      <javac srcdir="${src}" destdir="${dest}">
> ~
> ~        <include name="${package}/**" />
> ~        <exclude name="${package}/core/ConnectionHook.java"
> ~ unless="jdk1.3+" />
> ~        <exclude name="${package}/jdbc1/**" if="jdk1.2+" />
> ~        <exclude name="${package}/jdbc2/**" unless="jdk1.2+" />
> ~        <exclude name="${package}/largeobject/PGblob.java"
> ~ unless="jdk1.2+" />
> ~        <exclude name="${package}/largeobject/PGclob.java"
> ~ unless="jdk1.2+" />
> ~        <exclude name="${package}/PostgresqlDataSource.java"
> ~ unless="jdk1.2e+" />
> ~        <exclude name="${package}/xa/**" unless="jdk1.2e+" />
> ~        <exclude name="${package}/test/**" unless="junit" />
> ~      </javac>
> ~      <copy todir="${dest}" overwrite="true" filtering="on">
> ~        <fileset dir="${src}">
> ~          <include name="**/*.properties" />
> ~          <exclude name="${dest}/**" />
> ~        </fileset>
> ~      </copy>
> ~    </target>
> ~
> ~
> ~ I have both j2se version 1.3 and ant installed on the machine.
> ~
> ~ ----------------------------------------------------------------
> ~ gmake[4]: Entering directory
> ~ `/usr/pgsql-pkg/postgresql-7.1rc4/src/pl/plperl'
> ~ *****
> ~ * Cannot build PL/Perl because libperl is not a shared library.
> ~ * Skipped.
> ~ *****
> ~
> ~ It seems like that the compiler does not like the fact that
> ~
> ~ /usr/lib/perl5/5.6.0/i386-linux/CORE/libperl.a
> ~
> ~ is not a shared object.
> ~ -----------------------------------------------------
> ~
> ~ Your comments to resolve these issues is greatly
> ~ appreciated.
> ~
> ~ BTW, rserv module in contrib directory now compiles
> ~ beautifully.
> ~
> ~ Regards,
> ~ HY
> ~
> ~
> ~ ---------------------------(end of broadcast)---------------------------
> ~ TIP 4: Don't 'kill -9' the postmaster
> ~


Re: Re: [GENERAL] JDBC and Perl compiling problems w/ postgresql-7.1rc4

From
Doug McNaught
Date:
"Homayoun Yousefi'zadeh" <homayounyz@home.com> writes:

> I did what you suggested and nothing changed.
> Actually, JDBC problem seems to be ant related
> as it did not exist w/ version 7.0.3.

You might want to double-check that JAVAHOME (sp?) is set before you
make.  I had problems building with Ant until I figured that out.  If
you look in the Ant docs it tells you how to set that variable (I
think).

> The perl problem is definitely coming from libperl.a
> file as specifically mentioned in the Makefile.

No solution for this except to get the Perl sources, configure it to
build a shared libperl.so, and build and install the whole thing.
None of the RPM packages that I know of supply a shared library for
Perl.

-Doug

Re: Re: [GENERAL] JDBC and Perl compiling problems w/ postgresql-7.1rc4

From
"Norman J. Clarke"
Date:
Yes, and also rerun ./configure --with-java < ... > after you set
JAVA_HOME in your shell environment.

Norm

--------------------------------------
Norman Clarke
Combimatrix Corp Software Development
Harbour Pointe Tech Center
6500 Harbour Heights Pkwy, Suite 301
Mukilteo, WA 98275
tel: 425.493.2240
fax: 425.493.2010
--------------------------------------

On 9 Apr 2001, Doug McNaught wrote:

> You might want to double-check that JAVAHOME (sp?) is set before you
> make.  I had problems building with Ant until I figured that out.  If
> you look in the Ant docs it tells you how to set that variable (I
> think).




Re: JDBC and Perl compiling problems w/ postgresql-7.1rc4

From
"Homayoun Yousefi'zadeh"
Date:
Doug McNaught wrote:


>> I did what you suggested and nothing changed.
>> Actually, JDBC problem seems to be ant related
>> as it did not exist w/ version 7.0.3.
>
>
> You might want to double-check that JAVAHOME (sp?) is set before you
> make.  I had problems building with Ant until I figured that out.  If
> you look in the Ant docs it tells you how to set that variable (I
> think).

Thanks for the response. I actually went thru
the full exercise when I was compiling Tomcat
engine with Ant. Every thing seems to be set up
properly. This is a part od /etc/profile file
that shows the settings of environmental variables.

PATH="$PATH:/usr/X11R6/bin:/usr/jbuilder4/bin:/usr/jdk1.3/bin:/usr/jakarta/jakarta-ant/bin:/usr/j2e
e1.3/bin:/usr/local/pgsql/bin"
MANPATH=$MANPATH:/usr/local/pgsql/man

export JAVA_HOME=/usr/jdk1.3
export JAVAHOME=/usr/jdk1.3
export J2EE_HOME=/usr/j2ee1.3
export ANT_HOME=/usr/jakarta/jakarta-ant

export JAKARTA_HOME=/usr/jakarta
export TOMCAT_HOME=/usr/jakarta/dist/tomcat
export LD_LIBRARY_PATH=/usr/local/pgsql/lib
export PGDATA=/usr/local/pgsql/data

Did you use j2se 1.3_02 for Linux from Sun
to build the driver?

BTW, I did not have any problem building the
driver under version 7.0.3.


>> The perl problem is definitely coming from libperl.a
>> file as specifically mentioned in the Makefile.
>
>
> No solution for this except to get the Perl sources, configure it to
> build a shared libperl.so, and build and install the whole thing.
> None of the RPM packages that I know of supply a shared library for
> Perl.

This is what I was not hoping for.
Why does version 7.0.3 not have the problem?

Do you guys suggest I go thru the exercise
of building libperl.so or this is going to
be fixed w/ the official release?

Best,
HY



Re: JDBC and Perl compiling problems w/ postgresql-7.1rc4

From
Doug McNaught
Date:
"Homayoun Yousefi'zadeh" <homayounyz@home.com> writes:

> Thanks for the response. I actually went thru
> the full exercise when I was compiling Tomcat
> engine with Ant. Every thing seems to be set up
> properly. This is a part od /etc/profile file
> that shows the settings of environmental variables.

Hmm, nothing obviously wrong there that I can see...

> Did you use j2se 1.3_02 for Linux from Sun
> to build the driver?

Actually, I think it was Blackdown 1.2.2, with PG7.1beta5 (I haven't
tried compiling anything later).  If I run into the prblem you're
having with RC4 or the release 7.1 (as I plan to compile them soon)
I'll try to look into it.

> BTW, I did not have any problem building the
> driver under version 7.0.3.

I don't think 7.0.x used Ant, so it's not surprising.

> >> The perl problem is definitely coming from libperl.a
> >> file as specifically mentioned in the Makefile.
> > No solution for this except to get the Perl sources, configure it to
>
> > build a shared libperl.so, and build and install the whole thing.
> > None of the RPM packages that I know of supply a shared library for
> > Perl.
>
> This is what I was not hoping for.
> Why does version 7.0.3 not have the problem?

Because it doesn't have Perl as an embedded procedural language (see
below).

> Do you guys suggest I go thru the exercise
> of building libperl.so or this is going to
> be fixed w/ the official release?

What you may not be aware of is that there are two places where Perl
is used in the build.  One is the Perl client library (the 'Pg'
module).  This should not require libperl.so as all it does is build a
bog-standard extension module.

The other usage is for Perl as an embedded procedural language like
PL/PGSQL.  In order to compile this you need a shared libperl.  It is
not a "bug" in Postgres; it's simply what's required to embed the
Perl interpreter into the backend.

If you just want the client lib, I think you can ignore the missing
libperl.so and the client will be built just fine.  PL/Perl isn't that
useful right now anyhow since it doesn't have an interface to the
backend's query mechanism.

-Doug

Re: JDBC and Perl compiling problems w/ postgresql-7.1rc4

From
"Homayoun Yousefi'zadeh"
Date:
> What you may not be aware of is that there are two places where Perl
> is used in the build.  One is the Perl client library (the 'Pg'
> module).  This should not require libperl.so as all it does is build a
> bog-standard extension module.
>
> The other usage is for Perl as an embedded procedural language like
> PL/PGSQL.  In order to compile this you need a shared libperl.  It is
> not a "bug" in Postgres; it's simply what's required to embed the
> Perl interpreter into the backend.
>
> If you just want the client lib, I think you can ignore the missing
> libperl.so and the client will be built just fine.  PL/Perl isn't that
> useful right now anyhow since it doesn't have an interface to the
> backend's query mechanism.

Great information. Thanks.

The reason I need to compile w/ Perl
support turned on is what I am reading
in the README.rserv of the ERServer
available in contrib directory.
It says that the requirements are:

- PostgreSQL >= 7.0.X
   A separate Makefile is required for PostgreSQL 7.0.x and earlier
- Perl5 and the PostgreSQL perl interface

I am thinking that it only requires client lib as
the module compiles just fine. Can you confirm this please?

Regards,
HY



Re: JDBC and Perl compiling problems w/ postgresql-7.1rc4

From
Thomas Lockhart
Date:
> The reason I need to compile w/ Perl
> support turned on is what I am reading
> in the README.rserv of the ERServer
> available in contrib directory.
> It says that the requirements are:
> - PostgreSQL >= 7.0.X
>    A separate Makefile is required for PostgreSQL 7.0.x and earlier
> - Perl5 and the PostgreSQL perl interface
> I am thinking that it only requires client lib as
> the module compiles just fine. Can you confirm this please?

Yes. It is only the external (client-side) perl interface which is
required, to support the rserv scripts.

                     - Thomas