[pgpool-hackers: 647] Re: 3.4.0 build error on Fedora 20

Muhammad Usama m.usama at gmail.com
Fri Nov 7 21:01:28 JST 2014


Hi,

I can see the problem in the code when compiling with memcached
support. Can you please try the attached patch if it fixes the compile
issue.

--Usama



On Fri, Nov 7, 2014 at 4:52 PM, Tatsuo Ishii <ishii at postgresql.org> wrote:
> Seems like it's related to memcached support. What is the configure option?
>
> Best regards,
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese:http://www.sraoss.co.jp
>
>> Hi,
>> I'm getting the below on Fedora 20 (gcc 4.8.3) and pgpool 3.4.0 while
>> building the RPMS. Is this a packaging error, or?
>>
>> <snip>
>> gcc -DHAVE_CONFIG_H -DDEFAULT_CONFIGDIR=\"/etc/pgpool-II-94\" -I. -I../src/include  -D_GNU_SOURCE -I /usr/pgsql-9.4/include   -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -MT main/pool_globals.o -MD -MP -MF $depbase.Tpo -c -o main/pool_globals.o main/pool_globals.c &&\
>> mv -f $depbase.Tpo $depbase.Po
>> depbase=`echo main/pgpool_main.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
>> gcc -DHAVE_CONFIG_H -DDEFAULT_CONFIGDIR=\"/etc/pgpool-II-94\" -I. -I../src/include  -D_GNU_SOURCE -I /usr/pgsql-9.4/include   -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -MT main/pgpool_main.o -MD -MP -MF $depbase.Tpo -c -o main/pgpool_main.o main/pgpool_main.c &&\
>> mv -f $depbase.Tpo $depbase.Po
>> main/pgpool_main.c: In function 'initialize_shared_mem_objects':
>> main/pgpool_main.c:2658:8: error: 'clear_memcache_oidmaps' undeclared (first use in this function)
>>     if (clear_memcache_oidmaps)
>>         ^
>> main/pgpool_main.c:2658:8: note: each undeclared identifier is reported only once for each function it appears in
>> make[3]: *** [main/pgpool_main.o] Error 1
>> make[3]: Leaving directory `/home/devrim/Documents/postgresqlrpms.org/svn/repo/rpm/redhat/9.4/pgpool-II/F-20/pgpool-II-3.4.0/src'
>> make[2]: *** [all-recursive] Error 1
>> make[2]: Leaving directory `/home/devrim/Documents/postgresqlrpms.org/svn/repo/rpm/redhat/9.4/pgpool-II/F-20/pgpool-II-3.4.0/src'
>> make[1]: *** [all-recursive] Error 1
>> make[1]: Leaving directory `/home/devrim/Documents/postgresqlrpms.org/svn/repo/rpm/redhat/9.4/pgpool-II/F-20/pgpool-II-3.4.0'
>> error: Bad exit status from /var/tmp/rpm-tmp.SQXVwh (%build)
>>
>> Regards,
>> --
>> Devrim GÜNDÜZ
>> Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
>> PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
>> Twitter: @DevrimGunduz , @DevrimGunduzTR
>>
> _______________________________________________
> pgpool-hackers mailing list
> pgpool-hackers at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-hackers
-------------- next part --------------
diff --git a/src/main/pgpool_main.c b/src/main/pgpool_main.c
index b55bd7f..e59187a 100644
--- a/src/main/pgpool_main.c
+++ b/src/main/pgpool_main.c
@@ -120,7 +120,7 @@ static RETSIGTYPE reload_config_handler(int sig);
 static RETSIGTYPE health_check_timer_handler(int sig);
 static RETSIGTYPE wakeup_handler(int sig);
 
-static void initialize_shared_mem_objects(void);
+static void initialize_shared_mem_objects(bool clear_memcache_oidmaps);
 static int trigger_failover_command(int node, const char *command_line,
 									int old_master, int new_master, int old_primary);
 static bool verify_backend_node_status(int backend_no, bool* is_standby);
@@ -253,7 +253,7 @@ int PgpoolMain(bool discard_status, bool clear_memcache_oidmaps)
 		free(inet_fds);
 	}
 
-	initialize_shared_mem_objects();
+	initialize_shared_mem_objects(clear_memcache_oidmaps);
 
 	/* start watchdog */
 	if (pool_config->use_watchdog )
@@ -2575,7 +2575,7 @@ pid_t fork_follow_child(int old_master, int new_primary, int old_primary)
 }
 
 
-static void initialize_shared_mem_objects()
+static void initialize_shared_mem_objects(bool clear_memcache_oidmaps)
 {
 	int size,i;
 	/*


More information about the pgpool-hackers mailing list