public inbox for [email protected]  
help / color / mirror / Atom feed
Subject: [Pljava-dev] Build Errors while building PL/Java 1.4.0 on Solaris 10
Date: Wed, 18 Mar 2009 14:29:30 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

Prabhakara_Janardhan at emc.com wrote:
>> Hi,
>>
>> I had the following error while building PL/Java 1.4.0 on Solaris 10:
>>
>> /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?
>>
>>

The definition of HAVE_UNSETENV should be in 
$DBHOME/include/postgresql/server/pg_config.h and matches up with what 
the server compile environment found.  This could be different than the 
pljava compile environment if the server was built on a different 
machine or if additional libraries were installed after the server 
build.  If you build the server and then immediately build pljava 
against that server it should definitely work.  Can you clarify how your 
server was built?

Kris Jurka




view thread (5+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Subject: Re: [Pljava-dev] Build Errors while building PL/Java 1.4.0 on Solaris 10
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox