On Tue, Feb 06, 2007 at 08:32:38PM -0500, Colin Dean wrote:
> I'm attempting to build PHP 5.2.0 on CLFS-Embedded x86.
> 


> In file included from /mnt/vj/sources/php-5.2.0/Zend/zend_modules.h:26,
>                   from /mnt/vj/sources/php-5.2.0/Zend/zend_API.h:26,
>                   from /mnt/vj/sources/php-5.2.0/main/php.h:38,
>                   from 
> /mnt/vj/sources/php-5.2.0/ext/reflection/php_reflection.c:29:
> /mnt/vj/sources/php-5.2.0/Zend/zend_compile.h:265: warning: declaration 
> does not declare anything
> /mnt/vj/sources/php-5.2.0/ext/reflection/php_reflection.c: In function 
> 'zim_reflection_function_isDisabled':
> /mnt/vj/sources/php-5.2.0/ext/reflection/php_reflection.c:1461: error: 
> expected identifier before '__attribute__'
> make: *** [ext/reflection/php_reflection.lo] Error 1
> [root /mnt/vj/sources/php-5.2.0]#

 Likely to be a problem with the headers.  First question: were
there any warnings about missing headers before this ?  Working out
what is wrong varies from case to case, but you have to trace things
back.  Logs are helpful when you want to look back, and don't forget
to log stderr as well as stdout.

> It built fine on my host env, LFS 6.2.

 Yeah, but that uses linux-libc-headers-2.6.12.0 : a lot has
happened since then.  If you can, compile it again on the host (with
a log) so that you can see how the configured source ought to look -
the message from zend_compile.h:265 might point to something missing,
but it could equally be a perfectly normal warning!

 Another possibility is that this package doesn't like something in
your toolchain, e.g. gcc-4.1 - check the usual sources (gentoo,
fedora, perhaps debian) for patches or other workarounds.  Treat
gentoo ebuilds as written in an obscure script - you can work out
most of what they mean without too much difficulty, and understanding
their full detail is not usually necessary, just look for symlinks,
seds, configure flags, etc (and their patches).  If you have to look
at fedora source, extract it from the srpm using rpm2cpio and then
cpio.

 But, since you are on -embedded, it's possible you don't have
headers which glibc would provide, and perhaps you don't have the
functionality.

 Certainly, you need to look at the code around php_reflection.c:1461
to see if it is affected by a conditional define, then work back from
whatever you can find until you hit a possible cause.  Try to fix it
(sometimes using configparms, e.g. if 'configure' came up with the
wrong result), or a sed, other times trying to fix a header - if it
_is_ a header issue (missing, or changed content), take care that you
can restore the system to its pristine state if your attempted fix
doesn't work.

 If the problem is merely a missing {linux,asm}  header, you have the
option to try to copy it from the host (since it is the same
architecture).  If that fixes it, the correct thing to do is to alter
the clfs-headers script, check that the resulting new header works
(and diff the created headers to ensure nothing else changed
accidentally) and provide a patch.

> 
> Should I report this to the PHP guys?

 Not unless it's a PHP bug ;)  But looking at what is in their bug
system before you go any further is a good idea - there might be a
similar problem with details of a workaround.

ĸen
-- 
das eine Mal als Tragödie, das andere Mal als Farce
_______________________________________________
Clfs-support mailing list
Clfs-support@lists.cross-lfs.org
http://lists.cross-lfs.org/cgi-bin/mailman/listinfo/clfs-support

Reply via email to