[Pljava-dev] Build Errors while building PL/Java 1.4.0 on Solaris 10

From: Prabhakara_Janardhan at emc(dot)com (Prabhakara_Janardhan at emc(dot)com)
To:
Subject: [Pljava-dev] Build Errors while building PL/Java 1.4.0 on Solaris 10
Date: 2009-03-18 19:08:53
Message-ID: 6ECF8F2E89FB354F9D3E26F7A398842BCCDAA0@CORPUSMX100A.corp.emc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

> Hi,
>
> I had the following error while building PL/Java 1.4.0 on Solaris 10:
>
> -bash-3.00$ gmake
> gmake[1]: Entering directory
> `/opt/voyence/db/controldb/pljava-1.4.0/build/classes/pljava'
> javac -source 1.4 -target 1.4 -d . <java sources>
> jar cf /opt/voyence/db/controldb/pljava-1.4.0/build/pljava.jar .
> javah -classpath . -d /opt/voyence/db/controldb/pljava-1.4.0/build/jni
> <jni classes>
> gmake[1]: Leaving directory
> `/opt/voyence/db/controldb/pljava-1.4.0/build/classes/pljava'
> gmake[1]: Entering directory
> `/opt/voyence/db/controldb/pljava-1.4.0/build/classes/deploy'
> javac -source 1.4 -target 1.4 -d . <java sources>
> jar cmf
> /opt/voyence/db/controldb/pljava-1.4.0/src/java/deploy/META-INF/manife
> st.txt /opt/voyence/db/controldb/pljava-1.4.0/build/deploy.jar .
> gmake[1]: Leaving directory
> `/opt/voyence/db/controldb/pljava-1.4.0/build/classes/deploy'
> gmake[1]: Entering directory
> `/opt/voyence/db/controldb/pljava-1.4.0/build/objs'
> gcc -c -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
> -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
> -fwrapv -fPIC -I.
> -I/opt/voyence/db/controldb/include/postgresql/server
> -I/opt/voyence/db/controldb/include/postgresql/internal -I/usr/include
> -I/usr/local/ssl/include -I/usr/local/include
> -DPKGLIBDIR=\"/opt/voyence/db/controldb/lib/postgresql\"
> -I/opt/voyence/db/controldb/pljava-1.4.0/src/C/include
> -I/opt/voyence/db/controldb/pljava-1.4.0/build/jni -DPGSQL_MAJOR_VER=8
> -DPGSQL_MINOR_VER=2 -DPGSQL_PATCH_VER=11
> -I"/usr/java/jdk1.5.0_13/include"
> -I"/usr/java/jdk1.5.0_13/include/solaris"
> /opt/voyence/db/controldb/pljava-1.4.0/src/C/pljava/type/BigDecimal.c
> -o type/BigDecimal.o
> In file included from
> /opt/voyence/db/controldb/include/postgresql/server/c.h:826,
> from
> /opt/voyence/db/controldb/include/postgresql/server/postgres.h:48,
> from
> /opt/voyence/db/controldb/pljava-1.4.0/src/C/pljava/type/BigDecimal.c:
> 9:
> /opt/voyence/db/controldb/include/postgresql/server/port.h:377: error:
> conflicting types for 'unsetenv'
> /usr/include/stdlib.h:188: error: previous declaration of 'unsetenv'
> was here
> /opt/voyence/db/controldb/include/postgresql/server/port.h:377: error:
> conflicting types for 'unsetenv'
> /usr/include/stdlib.h:188: error: previous declaration of 'unsetenv'
> was here
> gmake[1]: *** [type/BigDecimal.o] Error 1
> gmake[1]: Leaving directory
> `/opt/voyence/db/controldb/pljava-1.4.0/build/objs'
> gmake: *** [c_all] Error 2
>
>
> The way I fixed the buiild error was to modify the Makefile under:
>
> src/C/pljava/Makefile:
>
> -bash-3.00$ diff src/C/pljava/Makefile src/C/pljava/Makefile.orig
> 23c23
> < $(CC) -c $(CFLAGS) $(CPPFLAGS) -DHAVE_UNSETENV $< -o $@
> ---
> > $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
>
> Now the discrepency is that
>
>
> /usr/include/stdlib.h has:
>
> extern int unsetenv(const char *);
>
>
> And
>
> $DBHOME/include/postgresql/server/port.h has:
>
> #ifndef HAVE_UNSETENV
> extern void unsetenv(const char *name);
> #endif
>
>
> I chose to do the -DHAVE_UNSETENV since the functions only differ in
> the return type. Did others who built face the same issue? What
> approach was taken to build PL/Java 1.4.0 on Solaris?
>
>
> Details of the system:
>
> -bash-3.00$ postmaster --version
> postgres (PostgreSQL) 8.2.11
> uname -a
> SunOS ############# 5.10 Generic_118833-17 sun4u sparc
> SUNW,Sun-Fire-V240
>
> Janardhan Prabhakara
> Software Engineer
> EMC Corporation

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Kris Jurka 2009-03-18 21:29:30 [Pljava-dev] Build Errors while building PL/Java 1.4.0 on Solaris 10
Previous Message Kris Jurka 2009-02-20 21:19:11 Re: [Pljava-dev] Re: Should creating a new base type require superuser status?