Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[gentoo-user] Problem installing PHP pdo

312 views
Skip to first unread message

Mike Diehl

unread,
Dec 22, 2012, 9:00:02 PM12/22/12
to
Hi all,

I'm not a PHP programmer, so I'm a bit out of my water.  But, I'm trying to install the latest eGroupware and need to get PHP to support pdo database connectivigy.

After a recent emerge --sync, I did a new emerge of php with --newuse... after adding pdo to my tags list.

What I get is:

...running: make
/bin/sh /root/tmp/pear/temp/pear-build-rootFqdFar/PDO-1.0.3/libtool --mode=compile cc  -I. -I/root/tmp/pear/temp/PDO -DPHP_ATOM_INC -I/root/tmp/pear/temp/pear-build-rootFqdFar/PDO-1.0.3/include -I/root/tmp/pear/temp/pear-build-rootFqdFar/PDO-1.0.3/main -I/root/tmp/pear/temp/PDO -I/usr/lib/php5.3/include/php -I/usr/lib/php5.3/include/php/main -I/usr/lib/php5.3/include/php/TSRM -I/usr/lib/php5.3/include/php/Zend -I/usr/lib/php5.3/include/php/ext -I/usr/lib/php5.3/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /root/tmp/pear/temp/PDO/pdo.c -o pdo.lo
libtool: compile:  cc -I. -I/root/tmp/pear/temp/PDO -DPHP_ATOM_INC -I/root/tmp/pear/temp/pear-build-rootFqdFar/PDO-1.0.3/include -I/root/tmp/pear/temp/pear-build-rootFqdFar/PDO-1.0.3/main -I/root/tmp/pear/temp/PDO -I/usr/lib/php5.3/include/php -I/usr/lib/php5.3/include/php/main -I/usr/lib/php5.3/include/php/TSRM -I/usr/lib/php5.3/include/php/Zend -I/usr/lib/php5.3/include/php/ext -I/usr/lib/php5.3/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/temp/PDO/pdo.c  -fPIC -DPIC -o .libs/pdo.o
/bin/sh /root/tmp/pear/temp/pear-build-rootFqdFar/PDO-1.0.3/libtool --mode=compile cc  -I. -I/root/tmp/pear/temp/PDO -DPHP_ATOM_INC -I/root/tmp/pear/temp/pear-build-rootFqdFar/PDO-1.0.3/include -I/root/tmp/pear/temp/pear-build-rootFqdFar/PDO-1.0.3/main -I/root/tmp/pear/temp/PDO -I/usr/lib/php5.3/include/php -I/usr/lib/php5.3/include/php/main -I/usr/lib/php5.3/include/php/TSRM -I/usr/lib/php5.3/include/php/Zend -I/usr/lib/php5.3/include/php/ext -I/usr/lib/php5.3/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /root/tmp/pear/temp/PDO/pdo_dbh.c -o pdo_dbh.lo
libtool: compile:  cc -I. -I/root/tmp/pear/temp/PDO -DPHP_ATOM_INC -I/root/tmp/pear/temp/pear-build-rootFqdFar/PDO-1.0.3/include -I/root/tmp/pear/temp/pear-build-rootFqdFar/PDO-1.0.3/main -I/root/tmp/pear/temp/PDO -I/usr/lib/php5.3/include/php -I/usr/lib/php5.3/include/php/main -I/usr/lib/php5.3/include/php/TSRM -I/usr/lib/php5.3/include/php/Zend -I/usr/lib/php5.3/include/php/ext -I/usr/lib/php5.3/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/temp/PDO/pdo_dbh.c  -fPIC -DPIC -o .libs/pdo_dbh.o
/root/tmp/pear/temp/PDO/pdo_dbh.c: In function 'pdo_stmt_instantiate':
/root/tmp/pear/temp/PDO/pdo_dbh.c:410: error: 'zval' has no member named 'refcount'
/root/tmp/pear/temp/PDO/pdo_dbh.c:411: error: 'zval' has no member named 'is_ref'
/root/tmp/pear/temp/PDO/pdo_dbh.c: In function 'pdo_stmt_construct':
/root/tmp/pear/temp/PDO/pdo_dbh.c:435: error: 'zend_fcall_info' has no member named 'object_pp'
/root/tmp/pear/temp/PDO/pdo_dbh.c:458: error: 'zend_fcall_info_cache' has no member named 'object_pp'
/root/tmp/pear/temp/PDO/pdo_dbh.c: In function 'zim_PDO_setAttribute':
/root/tmp/pear/temp/PDO/pdo_dbh.c:752: error: 'zval' has no member named 'refcount'
/root/tmp/pear/temp/PDO/pdo_dbh.c: In function 'zim_PDO_getAttribute':
/root/tmp/pear/temp/PDO/pdo_dbh.c:818: error: 'zval' has no member named 'refcount'
/root/tmp/pear/temp/PDO/pdo_dbh.c: In function 'pdo_hash_methods':
/root/tmp/pear/temp/PDO/pdo_dbh.c:1122: warning: assignment discards qualifiers from pointer target type
/root/tmp/pear/temp/PDO/pdo_dbh.c:1126: warning: assignment discards qualifiers from pointer target type
make: *** [pdo_dbh.lo] Error 1
ERROR: `make' failed
===========================================================================


Any idea on how to fix this?

Mike.

Take care and have fun,
Mike Diehl.

Nilesh Govindrajan

unread,
Dec 22, 2012, 10:50:01 PM12/22/12
to
> ------------------------------------------------------------------------
>
> Take care and have fun,
> Mike Diehl.

Which GCC version? Did you do any GCC updates/etc?

--
Nilesh Govindarajan
http://nileshgr.com

Michael Orlitzky

unread,
Dec 23, 2012, 2:30:02 AM12/23/12
to
On 12/22/2012 08:55 PM, Mike Diehl wrote:
> Hi all,
>
> I'm not a PHP programmer, so I'm a bit out of my water. But, I'm trying
> to install the latest eGroupware and need to get PHP to support pdo
> database connectivigy.
>
> After a recent emerge --sync, I did a new emerge of php with --newuse...
> after adding pdo to my tags list.
>
> What I get is:
>

Can you give us the usual bug report stuff?

* emerge --info
* emerge -pv <package name>
* The command that you ran which failed
* The full output of that command
* Anything else you think might be relevant

Mike Diehl

unread,
Dec 23, 2012, 3:50:01 PM12/23/12
to
"Michael Orlitzky" <mic...@orlitzky.com> wrote:
> On 12/22/2012 08:55 PM, Mike Diehl wrote:
>> Hi all,
>>
>> I'm not a PHP programmer, so I'm a bit out of my water. But, I'm trying
>> to install the latest eGroupware and need to get PHP to support pdo
>> database connectivigy.
>>
>> After a recent emerge --sync, I did a new emerge of php with --newuse...
>> after adding pdo to my tags list.
>>
>> What I get is:
>>
>
> Can you give us the usual bug report stuff?
>
> * emerge --info
> * emerge -pv
> * The command that you ran which failed
> * The full output of that command
> * Anything else you think might be relevant

I did an emerge -s for pdo and didn't find anything so I followed the
directions given on the eGroupware installation guide and ran:

pecl install pdo

Is there an ebuild that I should/could use instead?

Mike.

Mike Diehl

unread,
Dec 23, 2012, 3:50:01 PM12/23/12
to
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5/configure --prefix=/usr
--bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.4.5
--includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.4.5/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.4.5
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.4.5/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.4.5/info
--with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.4.5/include/g++-v4
--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec
--disable-fixed-point --without-ppl --without-cloog --enable-nls
--without-included-gettext --with-system-zlib --disable-werror
--enable-secureplt --disable-multilib --enable-libmudflap --disable-libssp
--enable-libgomp
--with-python-dir=/share/gcc-data/i686-pc-linux-gnu/4.4.5/python
--enable-checking=release --disable-libgcj --with-arch=i686
--enable-languages=c,c++,fortran --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu
--with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.4.5 p1.2,
pie-0.4.5'
Thread model: posix
gcc version 4.4.5 (Gentoo 4.4.5 p1.2, pie-0.4.5)


Mike.

Michael Orlitzky

unread,
Dec 23, 2012, 4:30:01 PM12/23/12
to
On 12/23/2012 03:44 PM, Mike Diehl wrote:
>
> I did an emerge -s for pdo and didn't find anything so I followed the
> directions given on the eGroupware installation guide and ran:
>
> pecl install pdo
>
> Is there an ebuild that I should/could use instead?
>

Yep, it's a USE flag for dev-lang/php. In /etc/portage/package.use, you
can add,

dev-lang/php ... pdo ...

where the ellipses represent any other USE flags you may have set. The
re-emerge php with,

emerge -1 dev-lang/php

and it should work, although you may need to restart your web server first.

Digression: personally, I don't like Gentoo's webapp framework and I
don't use the ebuilds for any of the web applications that we run. But,
egroupware is in portage, as www-apps/egroupware.

This may make your life easier if you're familiar with webapps under
Gentoo: you can just emerge it, and it will make sure all of the
dependencies are satisfied.

If you *don't* want to go the webapp route, it still makes your life
easier, since somebody already went to the trouble of figuring out the
right dependencies. From the ebuild,

RDEPEND="jpgraph? ( dev-php/jpgraph )
dev-php/pear
dev-php/PEAR-Auth_SASL
virtual/httpd-php
dev-lang/php[gd,imap,pdo,posix,session,sqlite,ssl,
unicode,xml,zip,zlib,ldap?,mysql?,postgres?]
virtual/cron"

You should make sure you have each of these installed for eGroupware to
work. The stuff in square brackets [] are USE flags, in this case for
dev-lang/php.

Since I already mentioned that I don't use the webapp framework, what I
usually do in a case like this (where something's in portage but I don't
want to use it) is create my own ebuild just for the dependencies. So
basically, I would create an ebuild called egroupware-dependencies in an
overlay, and copy (R)DEPEND from the egroupware ebuild. The rest of the
ebuild would do nothing.

Then I emerge it, and it gets added to @world. This prevents someone
from later removing e.g. dev-php/PEAR-Auth_SASL because they don't know
what it's for. (That person would be me in, say, a year.)

Mike Diehl

unread,
Dec 23, 2012, 4:40:01 PM12/23/12
to
Forgive the top-posting, but I think my response will be more concise this
way.

I have pdo in my USE flag in /etc/make.conf, so I thought I had this
covered.

I'm also not a fan of the netapps mechanism because I put my web-space in a
nonstandard location for ease of backing up. Also, I probably just don't
understand it as well as I'd like. <wink>

So, I could emerge egroupware and let emerge handle the dependencies for me.
then I cold just emerge -C and re-install just the application by hand.
Sound right?

Thanks for such a detailed reply.

Mike.

Michael Orlitzky

unread,
Dec 23, 2012, 5:20:01 PM12/23/12
to
On 12/23/2012 04:36 PM, Mike Diehl wrote:
> Forgive the top-posting, but I think my response will be more concise this
> way.
>
> I have pdo in my USE flag in /etc/make.conf, so I thought I had this
> covered.
>

Does it show up in emerge --info? If not, you might have a typo. If so,
it's probably some other missing dependency. (Have you re-emerged PHP
since the USE change?)


> I'm also not a fan of the netapps mechanism because I put my web-space in a
> nonstandard location for ease of backing up. Also, I probably just don't
> understand it as well as I'd like. <wink>
>

Nah, it's inflexible.


> So, I could emerge egroupware and let emerge handle the dependencies for me.
> then I cold just emerge -C and re-install just the application by hand.
> Sound right?
>

This will get the dependencies, but once you uninstall egroupware,
portage won't know why you have them. So if you do an emerge --depclean
later, they'll come up for removal. Eventually you'll forget why you had
them, and let it remove something important (personal experience).

That's why I go to all that trouble with the ebuild in an overlay. A
simpler workaround would be to install the egroupware from portage, and
then ignore it but leave it installed.

Mike Diehl

unread,
Dec 23, 2012, 5:40:01 PM12/23/12
to
Sounds like I just need to emerge egroupware.

Per your advise, I tried:
emerge --info | grep -i pdo

I did get my USE flag as output, and it looked sane.

Thanks for your help; I'll let you know.

Mike.

"Michael Orlitzky" <mic...@orlitzky.com> wrote:
0 new messages