Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1242873 - php 5.6.1[01] is FTBFS on aarch64
Summary: php 5.6.1[01] is FTBFS on aarch64
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: postgresql
Version: 23
Hardware: aarch64
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Pavel Raiskup
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: ARM64, F-ExcludeArch-aarch64
TreeView+ depends on / blocked
 
Reported: 2015-07-14 10:06 UTC by Peter Robinson
Modified: 2015-07-17 11:14 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-16 07:44:44 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Possible fix. (2.73 KB, patch)
2015-07-14 12:21 UTC, Pavel Raiskup
no flags Details | Diff

Description Peter Robinson 2015-07-14 10:06:31 UTC
Fails due to an issue with the postgresql plugin


http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=3070818


/bin/sh /builddir/build/BUILD/php-5.6.11/build-cgi/libtool --silent --preserve-dup-deps --mode=compile cc -I/builddir/build/BUILD/php-5.6.11/ext  -Iext/pdo_pgsql/ -I/builddir/build/BUILD/php-5.6.11/ext/pdo_pgsql/ -DPHP_ATOM_INC -I/builddir/build/BUILD/php-5.6.11/build-cgi/include -I/builddir/build/BUILD/php-5.6.11/build-cgi/main -I/builddir/build/BUILD/php-5.6.11 -I/builddir/build/BUILD/php-5.6.11/build-cgi/ext/date/lib -I/builddir/build/BUILD/php-5.6.11/ext/date/lib -I/builddir/build/BUILD/php-5.6.11/ext/ereg/regex -I/usr/include/libxml2 -I/usr/include/enchant -I/usr/X11 -I/usr/include/freetype2 -I/usr/include/imap -I/usr/lib64/firebird/include -I/builddir/build/BUILD/php-5.6.11/ext/mbstring/oniguruma -I/builddir/build/BUILD/php-5.6.11/build-cgi/ext/mbstring/oniguruma -I/builddir/build/BUILD/php-5.6.11/ext/mbstring/libmbfl -I/builddir/build/BUILD/php-5.6.11/build-cgi/ext/mbstring/libmbfl -I/builddir/build/BUILD/php-5.6.11/ext/mbstring/libmbfl/mbfl -I/builddir/build/BUILD/php-5.6.11/build-cgi/ext/mbstring/libmbfl/mbfl -I/usr/include/pspell -I/builddir/build/BUILD/php-5.6.11/build-cgi/TSRM -I/builddir/build/BUILD/php-5.6.11/build-cgi/Zend -I/builddir/build/BUILD/php-5.6.11/main -I/builddir/build/BUILD/php-5.6.11/Zend -I/builddir/build/BUILD/php-5.6.11/TSRM -I/builddir/build/BUILD/php-5.6.11/build-cgi/    -I/usr/include -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fno-strict-aliasing -Wno-pointer-sign -fvisibility=hidden  -prefer-pic -c /builddir/build/BUILD/php-5.6.11/ext/pdo_pgsql/pdo_pgsql.c -o ext/pdo_pgsql/pdo_pgsql.lo 
/builddir/build/BUILD/php-5.6.11/ext/pdo_odbc/pdo_odbc.c: In function 'zm_startup_pdo_odbc':
/builddir/build/BUILD/php-5.6.11/ext/pdo_odbc/pdo_odbc.c:135:63: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   SQLSetEnvAttr(SQL_NULL_HANDLE, SQL_ATTR_CONNECTION_POOLING, (void*)pdo_odbc_pool_on, 0);
                                                               ^
/builddir/build/BUILD/php-5.6.11/ext/pdo_odbc/odbc_driver.c: In function 'pdo_odbc_fetch_error_func':
/builddir/build/BUILD/php-5.6.11/ext/pdo_odbc/odbc_driver.c:46:24: warning: format '%ld' expects argument of type 'long int', but argument 6 has type 'SDWORD {aka int}' [-Wformat=]
  spprintf(&message, 0, "%s (%s[%ld] at %s:%d)",
                        ^
/builddir/build/BUILD/php-5.6.11/ext/pdo_odbc/odbc_driver.c: In function 'pdo_odbc_handle_factory':
/builddir/build/BUILD/php-5.6.11/ext/pdo_odbc/odbc_driver.c:412:49: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   rc = SQLSetEnvAttr(H->env, SQL_ATTR_CP_MATCH, (void*)pdo_odbc_pool_mode, 0);
                                                 ^
/builddir/build/BUILD/php-5.6.11/ext/pdo_odbc/odbc_driver.c:435:51: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  rc = SQLSetConnectAttr(H->dbc, SQL_ODBC_CURSORS, (void*)cursor_lib, SQL_IS_INTEGER);
                                                   ^
/bin/sh /builddir/build/BUILD/php-5.6.11/build-cgi/libtool --silent --preserve-dup-deps --mode=compile cc -I/builddir/build/BUILD/php-5.6.11/ext  -Iext/pdo_pgsql/ -I/builddir/build/BUILD/php-5.6.11/ext/pdo_pgsql/ -DPHP_ATOM_INC -I/builddir/build/BUILD/php-5.6.11/build-cgi/include -I/builddir/build/BUILD/php-5.6.11/build-cgi/main -I/builddir/build/BUILD/php-5.6.11 -I/builddir/build/BUILD/php-5.6.11/build-cgi/ext/date/lib -I/builddir/build/BUILD/php-5.6.11/ext/date/lib -I/builddir/build/BUILD/php-5.6.11/ext/ereg/regex -I/usr/include/libxml2 -I/usr/include/enchant -I/usr/X11 -I/usr/include/freetype2 -I/usr/include/imap -I/usr/lib64/firebird/include -I/builddir/build/BUILD/php-5.6.11/ext/mbstring/oniguruma -I/builddir/build/BUILD/php-5.6.11/build-cgi/ext/mbstring/oniguruma -I/builddir/build/BUILD/php-5.6.11/ext/mbstring/libmbfl -I/builddir/build/BUILD/php-5.6.11/build-cgi/ext/mbstring/libmbfl -I/builddir/build/BUILD/php-5.6.11/ext/mbstring/libmbfl/mbfl -I/builddir/build/BUILD/php-5.6.11/build-cgi/ext/mbstring/libmbfl/mbfl -I/usr/include/pspell -I/builddir/build/BUILD/php-5.6.11/build-cgi/TSRM -I/builddir/build/BUILD/php-5.6.11/build-cgi/Zend -I/builddir/build/BUILD/php-5.6.11/main -I/builddir/build/BUILD/php-5.6.11/Zend -I/builddir/build/BUILD/php-5.6.11/TSRM -I/builddir/build/BUILD/php-5.6.11/build-cgi/    -I/usr/include -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fno-strict-aliasing -Wno-pointer-sign -fvisibility=hidden  -prefer-pic -c /builddir/build/BUILD/php-5.6.11/ext/pdo_pgsql/pgsql_driver.c -o ext/pdo_pgsql/pgsql_driver.lo 
/builddir/build/BUILD/php-5.6.11/ext/pdo_pgsql/pdo_pgsql.c: In function 'zm_info_pdo_pgsql':
/builddir/build/BUILD/php-5.6.11/ext/pdo_pgsql/pdo_pgsql.c:117:59: error: 'PG_VERSION' undeclared (first use in this function)
  php_info_print_table_row(2, "PostgreSQL(libpq) Version", PG_VERSION);
                                                           ^
/builddir/build/BUILD/php-5.6.11/ext/pdo_pgsql/pdo_pgsql.c:117:59: note: each undeclared identifier is reported only once for each function it appears in
/bin/sh /builddir/build/BUILD/php-5.6.11/build-cgi/libtool --silent --preserve-dup-deps --mode=compile cc -I/builddir/build/BUILD/php-5.6.11/ext  -Iext/pdo_pgsql/ -I/builddir/build/BUILD/php-5.6.11/ext/pdo_pgsql/ -DPHP_ATOM_INC -I/builddir/build/BUILD/php-5.6.11/build-cgi/include -I/builddir/build/BUILD/php-5.6.11/build-cgi/main -I/builddir/build/BUILD/php-5.6.11 -I/builddir/build/BUILD/php-5.6.11/build-cgi/ext/date/lib -I/builddir/build/BUILD/php-5.6.11/ext/date/lib -I/builddir/build/BUILD/php-5.6.11/ext/ereg/regex -I/usr/include/libxml2 -I/usr/include/enchant -I/usr/X11 -I/usr/include/freetype2 -I/usr/include/imap -I/usr/lib64/firebird/include -I/builddir/build/BUILD/php-5.6.11/ext/mbstring/oniguruma -I/builddir/build/BUILD/php-5.6.11/build-cgi/ext/mbstring/oniguruma -I/builddir/build/BUILD/php-5.6.11/ext/mbstring/libmbfl -I/builddir/build/BUILD/php-5.6.11/build-cgi/ext/mbstring/libmbfl -I/builddir/build/BUILD/php-5.6.11/ext/mbstring/libmbfl/mbfl -I/builddir/build/BUILD/php-5.6.11/build-cgi/ext/mbstring/libmbfl/mbfl -I/usr/include/pspell -I/builddir/build/BUILD/php-5.6.11/build-cgi/TSRM -I/builddir/build/BUILD/php-5.6.11/build-cgi/Zend -I/builddir/build/BUILD/php-5.6.11/main -I/builddir/build/BUILD/php-5.6.11/Zend -I/builddir/build/BUILD/php-5.6.11/TSRM -I/builddir/build/BUILD/php-5.6.11/build-cgi/    -I/usr/include -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fno-strict-aliasing -Wno-pointer-sign -fvisibility=hidden  -prefer-pic -c /builddir/build/BUILD/php-5.6.11/ext/pdo_pgsql/pgsql_statement.c -o ext/pdo_pgsql/pgsql_statement.lo 
Makefile:1668: recipe for target 'ext/pdo_pgsql/pdo_pgsql.lo' failed
make: *** [ext/pdo_pgsql/pdo_pgsql.lo] Error 1
make: *** Waiting for unfinished jobs....
In file included from /builddir/build/BUILD/php-5.6.11/main/php.h:39:0,
                 from /builddir/build/BUILD/php-5.6.11/ext/pdo_pgsql/pgsql_driver.c:27:
/builddir/build/BUILD/php-5.6.11/ext/pdo_pgsql/pgsql_driver.c: In function 'pdo_pgsql_get_attribute':
/builddir/build/BUILD/php-5.6.11/ext/pdo_pgsql/pgsql_driver.c:408:30: error: 'PG_VERSION' undeclared (first use in this function)
    ZVAL_STRING(return_value, PG_VERSION, 1);
                              ^
/builddir/build/BUILD/php-5.6.11/Zend/zend_API.h:578:20: note: in definition of macro 'ZVAL_STRING'
   const char *__s=(s);    \
                    ^
/builddir/build/BUILD/php-5.6.11/ext/pdo_pgsql/pgsql_driver.c:408:30: note: each undeclared identifier is reported only once for each function it appears in
    ZVAL_STRING(return_value, PG_VERSION, 1);
                              ^
/builddir/build/BUILD/php-5.6.11/Zend/zend_API.h:578:20: note: in definition of macro 'ZVAL_STRING'
   const char *__s=(s);    \
                    ^
Makefile:1670: recipe for target 'ext/pdo_pgsql/pgsql_driver.lo' failed
make: *** [ext/pdo_pgsql/pgsql_driver.lo] Error 1
RPM build errors:

Comment 1 Joe Orton 2015-07-14 11:07:43 UTC
Pavel AFAICS, you are doing the multilib dance in postgresql.spec for aarch64 but the pg_config.h doesn't actually have a #if section for that arch?

I may be missing something but it fits the symptom, effectively pg_config.h appears empty.

Comment 2 Peter Robinson 2015-07-14 11:18:03 UTC
Shouldn't need a multilib dance on aarch64, we don't support it. Also weird in that this use to work, wonder what changed recently

Comment 3 Pavel Raiskup 2015-07-14 11:30:41 UTC
Yes, the multilib hack in postgresql.spec is broken.  Spec file classifies
aarch64 as multilib but it is not correct.

(In reply to Peter Robinson from comment #2)
> Shouldn't need a multilib dance on aarch64, we don't support it. Also weird
> in that this use to work, wonder what changed recently

It is quite recent commit, Peter.  Could this be relevant?
http://pkgs.fedoraproject.org/cgit/postgresql.git/commit/?id=e6acde1a903c7360e

Comment 4 Peter Robinson 2015-07-14 11:39:07 UTC
quite possibly, was there a reason it was added, I only see the older bug referenced. ppc64le or armv7hl aren't referenced and they're not multilib either. Technically nor is ppc64* either any more at least for Fedora since we dropped ppc32 with Fedora 20 (although it's probably worth leaving it there)

Comment 5 Pavel Raiskup 2015-07-14 11:58:08 UTC
(In reply to Peter Robinson from comment #4)
> quite possibly, was there a reason it was added,

I'm not aware of any reason.  I'll revert that part of
commit related to arch classification -- it seems to be clear bug.

> I only see the older bug
> referenced. ppc64le or armv7hl aren't referenced and they're not multilib
> either. Technically nor is ppc64* either any more at least for Fedora since
> we dropped ppc32 with Fedora 20 (although it's probably worth leaving it
> there)

Well IIUC, ppc64p7 is distinct (incompatible) architecture from ppc64 and as
such its unlikely it will have 32bit counterpart -- I'll revert that also.
I also don't think removing 'ppc' vs 'ppc64' from multilib hack makes much
sense as it is not broken and it might still be useful to someone.

Comment 6 Peter Robinson 2015-07-14 12:03:06 UTC
> Well IIUC, ppc64p7 is distinct (incompatible) architecture from ppc64 and as

No, that's incorrect, it's completely compatible with ppc64 (Power 64 bit Big Endian) but just with optimisations for the Power7 architecture. There's around 30-40 packages such as DBs that have a large perf improvement

Comment 7 Pavel Raiskup 2015-07-14 12:06:53 UTC
Thanks for the info.  Then better fix than "just revert" is needed probably,
if we do want to keep multilib support for that.  Is macro __ppc64__ defined
on ppc64v7?

Comment 8 Joe Orton 2015-07-14 12:07:17 UTC
Just 2c: it would be nice to have an #else/#error in pg_config.h so the failure case was more obvious, most other multilib wrappers do that.

Comment 9 Peter Robinson 2015-07-14 12:08:51 UTC
(In reply to Pavel Raiskup from comment #7)
> Thanks for the info.  Then better fix than "just revert" is needed probably,
> if we do want to keep multilib support for that.  Is macro __ppc64__ defined
> on ppc64v7?

I think we can probably leave the ppc64* stuff as is and just drop the aarch64 bits.

Comment 10 Pavel Raiskup 2015-07-14 12:11:49 UTC
(In reply to Peter Robinson from comment #9)
> I think we can probably leave the ppc64* stuff as is and just drop the
> aarch64 bits.

IMO only if __ppc64__ is also defined on ppc64v7, otherwise the pg_config.h
is not yet ready for this arch.

Comment 11 Peter Robinson 2015-07-14 12:13:00 UTC
(In reply to Pavel Raiskup from comment #10)
> (In reply to Peter Robinson from comment #9)
> > I think we can probably leave the ppc64* stuff as is and just drop the
> > aarch64 bits.
> 
> IMO only if __ppc64__ is also defined on ppc64v7, otherwise the pg_config.h
> is not yet ready for this arch.

Yes, it should be, the difference is basically just the CFLAGS defined.

Comment 12 Pavel Raiskup 2015-07-14 12:21:52 UTC
Created attachment 1051810 [details]
Possible fix.

Peter, does the patch attached look right then?

Comment 13 Tom Lane 2015-07-14 12:55:58 UTC
(In reply to Pavel Raiskup from comment #12)
> Possible fix.

Hm, won't that lead to the ppc64p7 and ppc64 builds both creating pg_config_ppc64.h?

It might be okay since I think the files would have identical contents, but that seems like a fragile assumption.

Comment 14 Dan Horák 2015-07-14 13:04:28 UTC
Generally ppc64 and ppc64p7 are like were i386 and i686 used in Fedora in the past. The compiler should define just __powerpc64__ on both. The difference is set on the rpm level (by using different -mcpu/-mtune flags).

Comment 15 Pavel Raiskup 2015-07-14 14:08:16 UTC
(In reply to Tom Lane from comment #13)
> (In reply to Pavel Raiskup from comment #12)
> > Possible fix.
> 
> Hm, won't that lead to the ppc64p7 and ppc64 builds both creating
> pg_config_ppc64.h?

Thanks for looking at it, that was expected change.  Because we do not want to
have pg_config_ppc64v7.h -> because we do not have __ppc64v7__ macro to add
new "#ifdef" fork into pg_config.h (or if we do, it probably does not make
much sense to add the fork).  Currently, if postgresql.spec was actually ever
built on ppc64v7 (and aarch64), postgresql-devel has broken pg_config.h.

Comment 16 Peter Robinson 2015-07-15 09:07:39 UTC
So do we have agreement here on the fix? Can we get it pushed to f23/f24 please?

Comment 17 Jan Kurik 2015-07-15 13:17:16 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23

Comment 18 Peter Robinson 2015-07-15 15:50:33 UTC
Update?

Comment 19 Pavel Raiskup 2015-07-16 07:44:44 UTC
Sorry for the delay.  Yep, I pushed the commit above - however there is still
one FTBFS bug #1242817 which needs to be fixed before submit a build.

Comment 20 Pavel Raiskup 2015-07-17 08:48:10 UTC
(In reply to Peter Robinson from comment #16)
> So do we have agreement here on the fix? Can we get it pushed to f23/f24
> please?

http://koji.fedoraproject.org/koji/buildinfo?buildID=669462
http://koji.fedoraproject.org/koji/buildinfo?buildID=669461

Comment 21 Peter Robinson 2015-07-17 08:52:00 UTC
thanks, building now

Comment 22 Peter Robinson 2015-07-17 11:14:51 UTC
Confirmed fixed building of php. Thanks


Note You need to log in before you can comment on or make changes to this bug.