php-uv icon indicating copy to clipboard operation
php-uv copied to clipboard

Fail to compile with php 5.4.6

Open superjimpupcake opened this issue 13 years ago • 3 comments

I try to compile php-uv with source from php 5.4.6 on centos 6.2 64bit.

I got the following errors:

/root/downloads/php-uv/php_uv.c: In function ‘php_uv_zval_to_fd’: /root/downloads/php-uv/php_uv.c:293: error: ‘php_socket’ undeclared (first use in this function) /root/downloads/php-uv/php_uv.c:293: error: (Each undeclared identifier is reported only once /root/downloads/php-uv/php_uv.c:293: error: for each function it appears in.) /root/downloads/php-uv/php_uv.c:305: error: expected expression before ‘)’ token /root/downloads/php-uv/php_uv.c:307: error: request for member ‘bsd_socket’ in something not a structure or union

Do you have any hints on this?

Thanks.

superjimpupcake avatar Aug 18 '12 04:08 superjimpupcake

got it. you don't enable socket on you php5.4. for now, can you add --enable-sockets for configure options? or install via aptitude or yum.

I'll modify config.m4 later.

chobie avatar Aug 18 '12 08:08 chobie

Great! Got it working now. Thanks! I do find that I need to add CPPFLAGS += -fPIC in config.m4 since I was on 64bit

superjimpupcake avatar Aug 18 '12 13:08 superjimpupcake

@superjimpupcake The dependency on sockets has been added as part of 5817bfe4b04b6179f4d377f059e67a1b2d2e2e78

Not sure about the -fPIC compiler flags, AFAIK that should be set automatically as part of the ./configure run.

datibbaw avatar Aug 27 '14 00:08 datibbaw