Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 186791 - dev-lang/php-5.2.2-r1 compilation failure with firebird 2.0
Summary: dev-lang/php-5.2.2-r1 compilation failure with firebird 2.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: William L. Thomson Jr. (RETIRED)
URL:
Whiteboard:
Keywords:
: 188240 193145 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-07-27 13:18 UTC by Tiago Freire
Modified: 2007-10-05 21:36 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log as requested (php-5.2.2-r1.build.log,296.46 KB, text/plain)
2007-07-27 13:48 UTC, Tiago Freire
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tiago Freire 2007-07-27 13:18:39 UTC
I am installing a brand new system, with firebird 2.0.1.12855.0-r4, and the firebird USE flag.

Reproducible: Always

Steps to Reproduce:
1. enable 'firebird' USE flag
2. emerge firebird
3. emerge php

Actual Results:  
Compilation failure

Expected Results:  
php should compile with firebird support
Comment 1 Tiago Freire 2007-07-27 13:20:54 UTC
Portage 2.1.2.9 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.5-r4, 2.6.21-gentoo-r4 i686)
=================================================================
System uname: 2.6.21-gentoo-r4 i686 Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Thu, 26 Jul 2007 17:30:01 +0000
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.6.3, 1.7.9-r1, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=prescott -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/terminfo"
CXXFLAGS="-O2 -march=prescott -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS=" ftp://mirror.datapipe.net/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl alsa apache2 berkdb bitmap-fonts chroot cli cracklib crypt cups curl dbus dri fam ffmpeg firebird fortran gd gdbm gif gpm gtk2 hal iconv ipv6 isdnlog java javascript jpeg jpeg2k kde libg++ midi mono mpeg mpeg4 mudflap ncurses nls nptl nptlonly ntfs ogg oggvorbis opengl openmp pam pcre pdf perl php png pppd python qt4 readline reflection samba session spl ssl startup-notification svg tcpd truetype-fonts type1-fonts unicode utf8 vim-syntax win32 win32codecs wmf x264 x86 xml xorg xsl zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard vmmouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="vmware fbdev vesa"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY


emerge -av apache php firebird

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] net-www/apache-2.0.58-r2  USE="apache2 ssl -debug -doc -ldap -mpm-itk -mpm-leader -mpm-peruser -mpm-prefork -mpm-threadpool -mpm-worker (-selinux) -static-modules -threads" 0 kB
[ebuild  N    ] dev-lang/php-5.2.2-r1  USE="apache2 berkdb cli crypt curl firebird gd gdbm iconv ipv6 ncurses nls pcre readline reflection session spl ssl unicode xml xsl zlib -adabas -bcmath -birdstep -bzip2 -calendar -cdb -cgi -cjk -concurrentmodphp -ctype -curlwrappers -db2 -dbase -dbmaker -debug -discard-path -doc -empress -empress-bcs -esoob -exif -fastbuild -fdftk -filter -flatfile -force-cgi-redirect -frontbase -ftp -gd-external -gmp -hash -imap -inifile -interbase -iodbc -java-external -json -kerberos -ldap -ldap-sasl -libedit -mcve -mhash -msql -mssql -mysql -mysqli -oci8 -oci8-instant-client -odbc -pcntl -pdo -pdo-external -pic -posix -postgres -qdbm -recode -sapdb -sharedext -sharedmem -simplexml -snmp -soap -sockets -solid -spell -sqlite -suhosin -sybase -sybase-ct -sysvipc -threads -tidy -tokenizer -truetype -wddx -xmlreader -xmlrpc -xmlwriter -xpm -yaz -zip -zip-external" 0 kB
[ebuild   R   ] dev-db/firebird-2.0.1.12855.0-r4  USE="-debug -doc -examples -xinetd" 0 kB
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-07-27 13:24:19 UTC
Reopen with some errors and config.log attached, please.
Comment 3 Tiago Freire 2007-07-27 13:48:25 UTC
Created attachment 126158 [details]
build log as requested

/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/interbase/ibase_query.c:2071: error: request for member 'sqld' in something not a structure or union
/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/interbase/ibase_query.c:2071: warning: assignment makes integer from pointer without a cast
/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/interbase/ibase_query.c: In function 'zif_ibase_param_info':
/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/interbase/ibase_query.c:2083: error: 'zend_ibase_globals' has no member named 'errmsg'
/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/interbase/ibase_query.c:2083: error: 'zend_ibase_globals' has no member named 'sql_code'
/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/interbase/ibase_query.c:2091: error: 'ibase_query' has no member named 'in_sqlda'
/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/interbase/ibase_query.c:2097: error: 'ibase_query' has no member named 'in_sqlda'
/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/interbase/ibase_query.c:2097: error: request for member 'sqld' in something not a structure or union
/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/interbase/ibase_query.c:2097: warning: comparison between pointer and integer
/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/interbase/ibase_query.c:2101: error: 'ibase_query' has no member named 'in_sqlda'
/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/interbase/ibase_query.c:2101: error: request for member 'sqlvar' in something not a structure or union
/var/tmp/portage/dev-lang/php-5.2.2-r1/work/php-5.2.2/ext/interbase/ibase_query.c:2101: error: too many arguments to function '_php_ibase_field_info'
make: *** [ext/interbase/ibase_query.lo] Error 1

!!! ERROR: dev-lang/php-5.2.2-r1 failed.
Comment 4 Tiago Freire 2007-07-27 13:49:38 UTC
build log attached as requested.
Comment 5 Niels Muller Larsen 2007-07-31 10:38:12 UTC
If it is any help:
Same problem occurs when trying to update to php-5.2.3-r3. Search results seem to indicate that the occurrence the firebird USE-flag raises the interbase USE-flag even if you have set -interbase; and there is no longer any interbase in the emerge search tree.
It can possibly be solved by using -firebird, but when you need firebird that is obviously a non-solution.
Could it be connected to using Firebird V2 instead of V1.5?

Also waiting eagerly for a solution.

/Niels 
Comment 6 Thierry RL 2007-08-04 18:42:31 UTC
i have the same bug
by analysing build log, i think the problem come from this:

In file included from /var/tmp/portage/dev-lang/php-5.2.3-r3/work/php-5.2.3/ext/interbase/interbase.c:37:
/var/tmp/portage/dev-lang/php-5.2.3-r3/work/php-5.2.3/ext/interbase/php_ibase_includes.h:26:19: error: ibase.h: No such file or directory

which could explain all those not found declarations
Comment 7 Thierry RL 2007-08-07 12:07:58 UTC
a manual solution is to use
$ for f in /opt/firebird/include/* ; do ln -s $f /usr/include/ ; done

before emerge php
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2007-08-09 14:48:47 UTC
*** Bug 188240 has been marked as a duplicate of this bug. ***
Comment 9 Jakub Moc (RETIRED) gentoo-dev 2007-08-09 14:54:37 UTC
@firebird folks - What's up w/ the includes in 2.0, where did the thing move? And can you get this upstream?
Comment 10 Carsten Lohrke (RETIRED) gentoo-dev 2007-08-09 15:37:17 UTC
(In reply to comment #9)
> @firebird folks - What's up w/ the includes in 2.0, where did the thing move?
> And can you get this upstream?

Bug is the maintainer removed the header symlinks to /usr as the 1.5.x versions provided. Restore that and I bet there won't be any issues with firebird headers...

Comment 11 William L. Thomson Jr. (RETIRED) gentoo-dev 2007-08-09 19:15:45 UTC
>
> Bug is the maintainer removed the header symlinks to /usr as the 1.5.x versions
> provided.

I removed nothing. I have no clue how it worked. I looked at all past versions except for 1.x and did not see any symlinks for the header files.

> Restore that and I bet there won't be any issues with firebird
> headers...

My next step will be to move Firebird out of /opt, and install it per FHS. In which case we won't need symlinks since the headers will be put in the proper place.

Best I can assume is upstreams, php/qt might have been providing a path to the header files during compile. That they no longer are. I surely could be wrong, but specifically recall looking at past ebuild versions for the symlinks. I know for a fact I did not remove them. This all came up before on a similar qt bug about Firebird's. See bug http://bugs.gentoo.org/show_bug.cgi?id=179668#c14

Comment 12 Jakub Moc (RETIRED) gentoo-dev 2007-09-01 01:21:27 UTC
Bleh... So, does this work for you, or?

--- eclass/php5_2-sapi.eclass	2007-08-28 21:36:06.000000000 +0200
+++ eclass/php5_2-sapi.eclass	2007-09-01 03:20:18.000000000 +0200
@@ -508,7 +508,7 @@
 
 	# Interbase support
 	if use firebird || use interbase ; then
-		my_conf="${my_conf} --with-interbase=/usr"
+		my_conf="${my_conf} --with-interbase=/opt"
 	fi
 
 	# LDAP support
Comment 13 Jakub Moc (RETIRED) gentoo-dev 2007-09-08 23:43:30 UTC
Well, someone test the above patch and report back. Thanks.
Comment 14 William L. Thomson Jr. (RETIRED) gentoo-dev 2007-09-09 03:41:51 UTC
It compiles, I did not test beyond that because I don't use php and don't know to much about it. Other than some basics of it's syntax :) But I believe the problem is with compiling anyway, and that seems to resolve it.
Comment 15 Jakub Moc (RETIRED) gentoo-dev 2007-09-09 07:28:24 UTC
Thanks for testing! :)
Comment 16 Markus Ullmann (RETIRED) gentoo-dev 2007-09-10 21:00:58 UTC
Fixed in cvs now :D Thankies
Comment 17 Jakub Moc (RETIRED) gentoo-dev 2007-09-10 21:02:53 UTC
@wltrj: btw, poke us when you start shuffling the thing out of /opt, or stick the needed has_version stuff there yourself.
Comment 18 Jakub Moc (RETIRED) gentoo-dev 2007-09-20 08:50:46 UTC
*** Bug 193145 has been marked as a duplicate of this bug. ***
Comment 19 William L. Thomson Jr. (RETIRED) gentoo-dev 2007-09-21 02:16:08 UTC
Ok I have moved Firebird out of /opt and into /usr :) Includes are now in /usr/include. Guess we can revert PHP back now in ~arch :) arch/stable still has it installed in /opt.
Comment 20 Jakub Moc (RETIRED) gentoo-dev 2007-09-21 06:50:29 UTC
(In reply to comment #19)
> Ok I have moved Firebird out of /opt and into /usr :) Includes are now in
> /usr/include. Guess we can revert PHP back now in ~arch :) arch/stable still
> has it installed in /opt.

We need a valid solution, ~arch is not something we could do in an eclass. You need has_version checks there, so please tell us which versions install where and I'll attach a patch. 

Comment 21 Jakub Moc (RETIRED) gentoo-dev 2007-09-21 07:14:48 UTC
Please, test this:

http://overlays.gentoo.org/proj/php/changeset/1860?format=diff&new=1860
Comment 22 Jakub Moc (RETIRED) gentoo-dev 2007-10-04 19:56:55 UTC
Ping!
Comment 23 William L. Thomson Jr. (RETIRED) gentoo-dev 2007-10-05 16:37:02 UTC
Looking good, tested dev-lang/php-5.2.4_p20070914-r2 and dev-lang/php-4.4.8_pre20070816

checking for InterBase support... yes
checking for isc_detach_database in -lfbclient... yes

In both, and both compiled without a problem. So should be good to go :)
Comment 24 Christian Hoffmann (RETIRED) gentoo-dev 2007-10-05 21:36:19 UTC
Patched eclasses committed to the tree, thanks jakub and thanks wltjr for testing. :)