Thread: Postgres-XC build error on Fedora 12
First of all: Thanks everyone who involved in this project. I'm getting the following on my Fedora 12 box: make[4]: Leaving directory `/home/devrim/belgeler/postgresqlrpms.org/svn/rpm/redhat/8.4/postgres-xc/F-12/pgxc_v0.9/src/gtm/libpq' make[4]: Entering directory `/home/devrim/belgeler/postgresqlrpms.org/svn/rpm/redhat/8.4/postgres-xc/F-12/pgxc_v0.9/src/gtm/client' gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv-fpic -I../../include -D_GNU_SOURCE -DSO_MAJOR_VERSION=1 -c -o fe-misc.o fe-misc.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv-fpic -I../../include -D_GNU_SOURCE -DSO_MAJOR_VERSION=1 -c -o fe-connect.o fe-connect.c gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv-fpic -I../../include -D_GNU_SOURCE -DSO_MAJOR_VERSION=1 -c -o pqexpbuffer.o pqexpbuffer.c fe-misc.c: In function 'gtmpqGetInt': fe-misc.c:228: warning: format '%d' expects type 'int', but argument 3 has type 'size_t' fe-misc.c: In function 'gtmpqPutInt': fe-misc.c:262: warning: format '%d' expects type 'int', but argument 3 has type 'size_t' fe-misc.c: In function 'gtmpqReadData': fe-misc.c:652: error: 'GTM_Conn' has no member named 'ssl' fe-misc.c: In function 'gtmpqSocketCheck': fe-misc.c:934: error: 'GTM_Conn' has no member named 'ssl' fe-misc.c:934: warning: implicit declaration of function 'SSL_pending' fe-misc.c:934: error: 'GTM_Conn' has no member named 'ssl' make[4]: *** [fe-misc.o] Error 1 make[4]: *** Waiting for unfinished jobs.... fe-connect.c: In function 'GTMPQconnectPoll': fe-connect.c:607: warning: passing argument 5 of 'getsockopt' from incompatible pointer type /usr/include/sys/socket.h:190: note: expected 'socklen_t * __restrict__' but argument is of type 'size_t *' fe-connect.c:644: warning: passing argument 3 of 'getsockname' from incompatible pointer type /usr/include/sys/socket.h:119: note: expected 'socklen_t * __restrict__' but argument is of type 'size_t *' make[4]: Leaving directory `/home/devrim/belgeler/postgresqlrpms.org/svn/rpm/redhat/8.4/postgres-xc/F-12/pgxc_v0.9/src/gtm/client' make[3]: *** [all] Error 2 make[3]: Leaving directory `/home/devrim/belgeler/postgresqlrpms.org/svn/rpm/redhat/8.4/postgres-xc/F-12/pgxc_v0.9/src/gtm' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/devrim/belgeler/postgresqlrpms.org/svn/rpm/redhat/8.4/postgres-xc/F-12/pgxc_v0.9/src' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/devrim/belgeler/postgresqlrpms.org/svn/rpm/redhat/8.4/postgres-xc/F-12/pgxc_v0.9' error: Bad exit status from /var/tmp/rpm-tmp.MgRbMC (%build) FWIW, I'm trying to build RPMs of postgres-xc, and I'll make them public as soon as we solve all build related issues. Regards, -- Devrim GÜNDÜZ PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer PostgreSQL RPM Repository: http://yum.pgrpms.org Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr http://www.gunduz.org Twitter: http://twitter.com/devrimgunduz
Attachment
2010/3/31 Devrim GÜNDÜZ <devrim@gunduz.org>: > > First of all: Thanks everyone who involved in this project. > > I'm getting the following on my Fedora 12 box: > First of all, thanks for taking time out for trying out the project. Seems like we never tested with openssl. While we work to fix the issue, can you please try configuring --without-openssl and see if that helps ? Thanks, Pavan -- Pavan Deolasee EnterpriseDB http://www.enterprisedb.com
2010/3/31 Pavan Deolasee <pavan.deolasee@enterprisedb.com>: > 2010/3/31 Devrim GÜNDÜZ <devrim@gunduz.org>: >> >> First of all: Thanks everyone who involved in this project. >> >> I'm getting the following on my Fedora 12 box: >> > > First of all, thanks for taking time out for trying out the project. > Seems like we never tested with openssl. While we work to fix the > issue, can you please try configuring --without-openssl and see if > that helps ? > While we are at it, you would also need to pass PGXC flag to build the sources correctly. If the flag is not passed, the sources would just build to vanilla Postgres (though I think it errors out today without the flag) CFLAGS="-DPGXC" ./configure --without-openssl Thanks, Pavan -- Pavan Deolasee EnterpriseDB http://www.enterprisedb.com
On Wed, 2010-03-31 at 17:40 +0530, Pavan Deolasee wrote: > Seems like we never tested with openssl. While we work to fix the > issue, can you please try configuring --without-openssl and see if > that helps ? Now it gives something different. IIRC pg_config_paths.h needs to be generated during make, but I may be wrong: gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic-I/usr/include/et -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing-fwrapv -I../../src/include -I/usr/include/et -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -c-o ../../src/interfaces/libpq/fe-misc.o ../../src/interfaces/libpq/fe-misc.c ../../src/interfaces/libpq/fe-connect.c:28:29: error: pg_config_paths.h: No such file or directory ../../src/interfaces/libpq/fe-connect.c: In function 'parseServiceInfo': ../../src/interfaces/libpq/fe-connect.c:3007: error: 'SYSCONFDIR' undeclared (first use in this function) ../../src/interfaces/libpq/fe-connect.c:3007: error: (Each undeclared identifier is reported only once ../../src/interfaces/libpq/fe-connect.c:3007: error: for each function it appears in.) ../../src/interfaces/libpq/fe-connect.c: In function 'PasswordFromFile': ../../src/interfaces/libpq/fe-connect.c:3900: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result make[3]: *** [../../src/interfaces/libpq/fe-connect.o] Error 1 make[3]: *** Waiting for unfinished jobs.... ../../src/interfaces/libpq/fe-misc.c:60:29: error: pg_config_paths.h: No such file or directory ../../src/interfaces/libpq/fe-misc.c: In function 'libpq_gettext': ../../src/interfaces/libpq/fe-misc.c:1170: error: 'LOCALEDIR' undeclared (first use in this function) ../../src/interfaces/libpq/fe-misc.c:1170: error: (Each undeclared identifier is reported only once ../../src/interfaces/libpq/fe-misc.c:1170: error: for each function it appears in.) make[3]: *** [../../src/interfaces/libpq/fe-misc.o] Error 1 make[4]: Leaving directory `/home/devrim/belgeler/postgresqlrpms.org/svn/rpm/redhat/8.4/postgres-xc/F-12/pgxc_v0.9/src/backend/parser' make[3]: Leaving directory `/home/devrim/belgeler/postgresqlrpms.org/svn/rpm/redhat/8.4/postgres-xc/F-12/pgxc_v0.9/src/backend' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/devrim/belgeler/postgresqlrpms.org/svn/rpm/redhat/8.4/postgres-xc/F-12/pgxc_v0.9/src' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/devrim/belgeler/postgresqlrpms.org/svn/rpm/redhat/8.4/postgres-xc/F-12/pgxc_v0.9' error: Bad exit status from /var/tmp/rpm-tmp.U3HkBd (%build) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.U3HkBd (%build) make: *** [nopreprpm] Error 1 -- Devrim GÜNDÜZ PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer PostgreSQL RPM Repository: http://yum.pgrpms.org Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr http://www.gunduz.org Twitter: http://twitter.com/devrimgunduz
Attachment
2010/3/31 Devrim GÜNDÜZ <devrim@gunduz.org>: > On Wed, 2010-03-31 at 17:40 +0530, Pavan Deolasee wrote: > >> Seems like we never tested with openssl. While we work to fix the >> issue, can you please try configuring --without-openssl and see if >> that helps ? > > Now it gives something different. IIRC pg_config_paths.h needs to be > generated during make, but I may be wrong: > Can you please share the configure switches used for building the sources ? That will help us debug the issue. Also, I would appreciate the output of uname -a to know the exact OS. Thanks, Pavan -- Pavan Deolasee EnterpriseDB http://www.enterprisedb.com
On Wed, 2010-03-31 at 17:49 +0530, Pavan Deolasee wrote: > While we are at it, you would also need to pass PGXC flag to build the > sources correctly. If the flag is not passed, the sources would just > build to vanilla Postgres (though I think it errors out today without > the flag) > > CFLAGS="-DPGXC" ./configure --without-openssl Thanks for the heads-up. I updated my spec file. BTW, are there any docs about configuring postgres-xc? I could not find anything in the tarball. -- Devrim GÜNDÜZ PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer PostgreSQL RPM Repository: http://yum.pgrpms.org Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr http://www.gunduz.org Twitter: http://twitter.com/devrimgunduz
Attachment
Hi Pavan, On Wed, 2010-03-31 at 18:37 +0530, Pavan Deolasee wrote: > Can you please share the configure switches used for building the > sources ? That will help us debug the issue. http://wiki.pgrpms.org/browser/rpm/redhat/8.4/postgres-xc/F-12/postgres-xc-8.4.spec#L279 See there. %ssl is disabled at the top of the spec file, so it is not used for now. Other macros are enabled. Does this help? This is the standard PostgreSQL spec file actually. (For other people who want to look at the spec: It is just a WIP, and I'm pretty sure that it won't work) > Also, I would appreciate the output of uname -a to know the exact OS. Linux devrim-desktop01.corp 2.6.32.9-70.fc12.x86_64 #1 SMP Wed Mar 3 04:40:41 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux gcc version 4.4.3 20100127 (Red Hat 4.4.3-4) (GCC) Regards, -- Devrim GÜNDÜZ PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer PostgreSQL RPM Repository: http://yum.pgrpms.org Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr http://www.gunduz.org Twitter: http://twitter.com/devrimgunduz
Attachment
Hi Devrim, Devrim GÜNDÜZ さんは書きました: > > Thanks for the heads-up. I updated my spec file. > > BTW, are there any docs about configuring postgres-xc? I could not find > anything in the tarball. > You can find the release documentation here: https://sourceforge.net/projects/postgres-xc/files/ Please refer to the reference manual and the install manual to see the necessary configuration. Regards, Michael
On Thu, 2010-04-01 at 09:14 +0900, Michael Paquier wrote: > You can find the release documentation here: > https://sourceforge.net/projects/postgres-xc/files/ > > Please refer to the reference manual and the install manual to see the > necessary configuration. Thanks. BAsed on the doc, it seems I ran configure correctly. I'll pass this thread to the postgres-xc devel list. Regards, -- Devrim GÜNDÜZ PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer PostgreSQL RPM Repository: http://yum.pgrpms.org Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr http://www.gunduz.org Twitter: http://twitter.com/devrimgunduz
Attachment
2010/3/31 Devrim GÜNDÜZ <devrim@gunduz.org>: > On Wed, 2010-03-31 at 17:40 +0530, Pavan Deolasee wrote: > >> Seems like we never tested with openssl. While we work to fix the >> issue, can you please try configuring --without-openssl and see if >> that helps ? > > Now it gives something different. IIRC pg_config_paths.h needs to be > generated during make, but I may be wrong: > > gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic-I/usr/include/et -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing-fwrapv -I../../src/include -I/usr/include/et -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -c-o ../../src/interfaces/libpq/fe-misc.o ../../src/interfaces/libpq/fe-misc.c > ../../src/interfaces/libpq/fe-connect.c:28:29: error: pg_config_paths.h: No such file or directory Looking at the Makefile in src/interfaces/libpq, it indeed seems that the file should be generated by make. What baffles me more is the fact that the output above doesn't show the rigth set of flags and command line arguments being passed to gcc. For example, on my end, make shows the following output: [pavan@topaz libpq]$ make clean rm -f libpq.so.5.2 libpq.so libpq.so.5 libpq.a exports.list rm -f fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-print.o fe-lobj.o fe-protocol2.o fe-protocol3.o pqexpbuffer.o pqsignal.o fe-secure.o libpq-events.o md5.o ip.o wchar.o encnames.o noblock.o pgstrcasecmp.o thread.o strlcpy.o pg_config_paths.h crypt.c getaddrinfo.c inet_aton.c noblock.c open.c pgstrcasecmp.c snprintf.c strerror.c strlcpy.c thread.c md5.c ip.c encnames.c wchar.c win32error.c pgsleep.c pthread.h libpq.rc rm -f pg_config_paths.h [pavan@topaz libpq]$ make gcc -DPGXC -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -fpic -DFRONTEND -DUNSAFE_STAT_OK -I. -I../../../src/include -D_GNU_SOURCE -I../../../src/port -I../../../src/port -DSO_MAJOR_VERSION=5 -c -o fe-auth.o fe-auth.c gcc -DPGXC -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -fpic -DFRONTEND -DUNSAFE_STAT_OK -I. -I../../../src/include -D_GNU_SOURCE -I../../../src/port -I../../../src/port -DSO_MAJOR_VERSION=5 -c -o fe-connect.o fe-connect.c If you see, make creates the pg_config_paths.h and also adds src/port in the INCLUDEDIRS and that's where the pg_config_paths.h file resides. I have no experience with building rpms, so don't know why the flags are not passed properly to gcc. Thanks, Pavan -- Pavan Deolasee EnterpriseDB http://www.enterprisedb.com
2010/4/26 Pavan Deolasee <pavan.deolasee@enterprisedb.com>: > I have no experience with building rpms, so don't know why the flags > are not passed properly to gcc. > BTW, can you please try a simple configure-make and see if that fails for you ? You need to pass the PGXC flag to configure. Thanks, Pavan -- Pavan Deolasee EnterpriseDB http://www.enterprisedb.com
On Tue, 2010-04-27 at 16:15 +0530, Pavan Deolasee wrote: > > BTW, can you please try a simple configure-make and see if that fails > for you ? You need to pass the PGXC flag to configure. I'm back. :) I could not reproduce the issue I reported during manual configure & build process, as you suggested. So it is something with RPM build process actually. It is the same as PostgreSQL itself, so we will need to figure out the differences between them. Would config.log be enough for you to check? Regards, -- Devrim GÜNDÜZ PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer PostgreSQL RPM Repository: http://yum.pgrpms.org Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr http://www.gunduz.org Twitter: http://twitter.com/devrimgunduz
Attachment
2010/5/12 Devrim GÜNDÜZ <devrim@gunduz.org>: > On Tue, 2010-04-27 at 16:15 +0530, Pavan Deolasee wrote: >> >> BTW, can you please try a simple configure-make and see if that fails >> for you ? You need to pass the PGXC flag to configure. > > I'm back. :) > Welcome :-) > I could not reproduce the issue I reported during manual configure & > build process, as you suggested. Its good to know. > So it is something with RPM build > process actually. It is the same as PostgreSQL itself, so we will need > to figure out the differences between them. > > Would config.log be enough for you to check? > I have no experience with RPM builds, so if there are any other logs that you think would be useful in tracking down the issue, please share them as well. Few weeks back I actually tried to build RPMs from the spec file you shared earlier, but did not succeed. Is it possible for you to share the exact steps and any other add-ons (e.g I saw some patches being applied in the spec file) that are necessary to build the rpm ? Thanks, Pavan -- Pavan Deolasee EnterpriseDB http://www.enterprisedb.com
On Thu, 2010-05-13 at 07:19 +0530, Pavan Deolasee wrote: > > Few weeks back I actually tried to build RPMs from the spec file you > shared earlier, but did not succeed. Is it possible for you to share > the exact steps and any other add-ons (e.g I saw some patches being > applied in the spec file) that are necessary to build the rpm ? I applied many fixes to spec file since then. Here is a quick guide about building RPMs using the repo: http://people.planetpostgresql.org/devrim/index.php?/archives/44-How-To-Build-Your-Own-PostgreSQL-and-related-software-RPMs-on-CentOSRHELFedora.html As noted there, please install fedora-packager rpm first. then, cd to 8.4/postgres-xc/F-12, and run make rpm http://svn.pgrpms.org/browser/rpm/redhat/8.4/postgres-xc/F-12/ (or, http://svn.pgrpms.org/repo/rpm/redhat/8.4/postgres-xc/F-12 ) includes spec and patches that I have. Regards, -- Devrim GÜNDÜZ PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer PostgreSQL RPM Repository: http://yum.pgrpms.org Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr http://www.gunduz.org Twitter: http://twitter.com/devrimgunduz
Attachment
Thanks a lot for the great work. It's so nice to distribute Postgres-XC binaries with rpm. --- Koichi Suzuki (2010年05月13日 16:32), Devrim GÜNDÜZ wrote: > On Thu, 2010-05-13 at 07:19 +0530, Pavan Deolasee wrote: >> >> Few weeks back I actually tried to build RPMs from the spec file you >> shared earlier, but did not succeed. Is it possible for you to share >> the exact steps and any other add-ons (e.g I saw some patches being >> applied in the spec file) that are necessary to build the rpm ? > > I applied many fixes to spec file since then. Here is a quick guide > about building RPMs using the repo: > > http://people.planetpostgresql.org/devrim/index.php?/archives/44-How-To-Build-Your-Own-PostgreSQL-and-related-software-RPMs-on-CentOSRHELFedora.html > > As noted there, please install fedora-packager rpm first. > > then, cd to 8.4/postgres-xc/F-12, and run > > make rpm > > http://svn.pgrpms.org/browser/rpm/redhat/8.4/postgres-xc/F-12/ > > (or, http://svn.pgrpms.org/repo/rpm/redhat/8.4/postgres-xc/F-12 ) > > includes spec and patches that I have. > > Regards,