Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Emerge PHP failed, "this code is not 64bit clean"
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
tallica
Apprentice
Apprentice


Joined: 27 Jul 2007
Posts: 152
Location: Lublin, POL

PostPosted: Fri Jul 04, 2008 1:50 pm    Post subject: [solved] Emerge PHP failed, "this code is not 64bit cle Reply with quote

Hello,

I've got fallowing errors:

Code:
* Installing Apache2 config file for PHP5 (70_mod_php5.conf)
 * Setting extension_dir in php.ini
 * Securing fopen wrappers
 * Setting correct include_path
 * MySQL extensions charset for 'apache2' SAPI is: empty
>>> Completed installing php-5.2.6-r2 into /var/tmp/portage/dev-lang/php-5.2.6-r2/image/

strip: x86_64-pc-linux-gnu-strip --strip-unneeded -R .comment
   usr/lib64/apache2/modules/libphp5.so
   usr/lib64/php5/bin/php
ecompressdir: bzip2 -9 /usr/lib64/php5/man

 * QA Notice: Package has poor programming practices which may compile
 *            fine but exhibit random runtime failures.
 * /var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/ext/session/mod_files.c:377: warning: implicit declaration of function ‘pread’
/var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/ext/session/mod_files.c:416: warning: implicit declaration of function ‘pwrite’
/var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/ext/standard/datetime.c:112: warning: implicit declaration of function ‘strptime’
/var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/Zend/zend_language_parser.c:2581: warning: implicit declaration of function ‘stpcpy’
/var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/ext/session/mod_files.c:377: warning: implicit declaration of function ‘pread’
/var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/ext/session/mod_files.c:416: warning: implicit declaration of function ‘pwrite’
/var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/ext/standard/datetime.c:112: warning: implicit declaration of function ‘strptime’
/var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/Zend/zend_language_parser.c:2581: warning: implicit declaration of function ‘stpcpy’


 * QA Notice: Package has poor programming practices which may compile
 *            fine but exhibit random runtime failures.
 * /var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/Zend/zend_language_parser.c:2581: warning: incompatible implicit declaration of built-in function ‘stpcpy’
/var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/Zend/zend_language_parser.c:2640: warning: incompatible implicit declaration of built-in function ‘stpcpy’
/var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/Zend/zend_language_parser.c:2581: warning: incompatible implicit declaration of built-in function ‘stpcpy’
/var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/Zend/zend_language_parser.c:2640: warning: incompatible implicit declaration of built-in function ‘stpcpy’


 * QA Notice: Package has poor programming practices which may compile
 *            but will almost certainly crash on 64bit architectures.
 * Function `strptime' implicitly converted to pointer at /var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/ext/standard/datetime.c:112
Function `strptime' implicitly converted to pointer at /var/tmp/portage/dev-lang/php-5.2.6-r2/work/php-5.2.6/ext/standard/datetime.c:112

 *
 * ERROR: dev-lang/php-5.2.6-r2 failed.
 * Call stack:
 *       misc-functions.sh, line 653:  Called install_qa_check
 *       misc-functions.sh, line 349:  Called die
 * The specific snippet of code:
 *               alpha*|ia64*|powerpc64*|mips64*|sparc64*|x86_64*) die "this code is not 64bit clean";;
 *  The die message:
 *   this code is not 64bit clean
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/dev-lang/php-5.2.6-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-lang/php-5.2.6-r2/temp/environment'.
 *
!!! install_qa_check failed; exiting.


Same with php 5.2.5-r1, 5.2.6_rc4, 5.2.6-r2...

emerge --info: http://pastebin.com/m356abeeb
www-servers/apache-2.2.9
dev-db/mysql-4.1.22-r1
_________________
Gentoo ~AMD64 | Audacious


Last edited by tallica on Fri Jul 04, 2008 10:36 pm; edited 1 time in total
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6196

PostPosted: Fri Jul 04, 2008 6:29 pm    Post subject: Reply with quote

I think the course of action is obvious:
1. write a trivial patch (cause this kind of bug suggest it's trivial)
2. send it to gentoo bugzilla and/or upstream
3. pray the upstream / gentoo php team decides to include it in one of the future releases,
till that time create an overlay adding that patch
Back to top
View user's profile Send private message
tallica
Apprentice
Apprentice


Joined: 27 Jul 2007
Posts: 152
Location: Lublin, POL

PostPosted: Fri Jul 04, 2008 10:35 pm    Post subject: Reply with quote

Seems to be fixed:
Code:
--- ext/standard/old.datetime.c   2007-12-31 08:20:12.000000000 +0100
+++ ext/standard/datetime.c   2008-07-04 23:52:41.000000000 +0200
@@ -100,7 +100,7 @@
    char      *format;
    int        format_length;
    struct tm  parsed_time;
-   char      *unparsed_part;
+   int        unparsed_part;
 
    if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss",
       &ts, &ts_length, &format, &format_length) == FAILURE) {

_________________
Gentoo ~AMD64 | Audacious
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6196

PostPosted: Sat Jul 05, 2008 12:25 am    Post subject: Reply with quote

No, that's a wrong fix, the one I had in mind was:
searching for the header defining strptime and #include it in
ext/standard/datetime.c.
The one you chose may not be correct.

One more thing, there's a chance that this is a glibc 2.8 _GNU_SOURCE issue,
in that case please file a bug about it.
Back to top
View user's profile Send private message
tallica
Apprentice
Apprentice


Joined: 27 Jul 2007
Posts: 152
Location: Lublin, POL

PostPosted: Sat Jul 05, 2008 12:43 am    Post subject: Reply with quote

So it probably needs
Code:
#include <string.h>
I'm going to check it later...
_________________
Gentoo ~AMD64 | Audacious
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6196

PostPosted: Sat Jul 05, 2008 10:54 am    Post subject: Reply with quote

Probably not.
I've opened this bug about it, but as it's not mine it can still get rejected.
Please, make it clear. Do you have glibc 2.8 installed ?

Also read this, some of the bugs depending on this one and manpage of strptime to see why I think it's a glibc 2.8 issue.
Back to top
View user's profile Send private message
tallica
Apprentice
Apprentice


Joined: 27 Jul 2007
Posts: 152
Location: Lublin, POL

PostPosted: Sat Jul 05, 2008 11:53 am    Post subject: Reply with quote

No I don't... I have glibc-2.7, here is my emerge --info: http://pastebin.com/m356abeeb
Anyway with my patch php compiled fine.
_________________
Gentoo ~AMD64 | Audacious
Back to top
View user's profile Send private message
hoffie
Retired Dev
Retired Dev


Joined: 30 Nov 2006
Posts: 24

PostPosted: Sat Jul 19, 2008 2:42 pm    Post subject: Reply with quote

I just committed an updated version of php-5.2.6-r5 ($Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.2.6-r5.ebuild,v 1.2 2008/07/19 14:33:44 hoffie Exp $), it would be nice if you could test and post your results to the bug report (posting them here won't help much, I don't regularly read forums).

The proposed patch in this thread is wrong btw, it just hides the warning. The proper fix is including the right file and making sure _GNU_SOURCE is defined before doing so, so that the needed function prototypes become available.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum