shinvdu / php-amqp

Automatically exported from code.google.com/p/php-amqp
0 stars 0 forks source link

Compilation Issues #2

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Is the compilation procedure complete?

The last error I have compiling is:

/bin/bash ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..     
-g -O2 -Wall -MT amqp_socket.lo -MD -MP -MF 
.deps/amqp_socket.Tpo -c -o amqp_socket.lo amqp_socket.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -MT amqp_socket.lo 
-MD -MP -MF .deps/amqp_socket.Tpo -c amqp_socket.c  
-fPIC -DPIC -o .libs/amqp_socket.o
amqp_socket.c: In function ‘amqp_login’:
amqp_socket.c:381: error: unknown field ‘deprecated_capabilities’ specified 
in initializer
amqp_socket.c:382: error: unknown field ‘deprecated_insist’ specified in 
initializer
make[3]: *** [amqp_socket.lo] Error 1

And previously I changed the configure to point to amqp-0.8.json and 
librabbitmq/codegen.py spec.revision

Original issue reported on code.google.com by sebastia...@gmail.com on 4 Sep 2009 at 6:58

GoogleCodeExporter commented 8 years ago
Hi Sebastian,

You will need to switch rabbitmq-c to the "default" branch, rather than the
"amqp_0_9_1" branch. The differences between the branches are minor, but 
significant:
not only is the JSON spec file name different, but certain arguments have been
renamed and a number of other minor changes made.

Here's how I build an AMQP 0-8 rabbitmq-c client:

  hg clone http://hg.rabbitmq.com/rabbitmq-codegen
  hg clone http://hg.rabbitmq.com/rabbitmq-c
  cd rabbitmq-c
  autoreconf -i
  ./configure
  make

If you already have checkouts of rabbitmq-codegen and/or rabbitmq-c, you can 
switch
them to the default branch by running "hg update -C default" in the top 
directory of
each checkout.

Regards,
  Tony

Original comment by tonygarnockjones on 6 Sep 2009 at 10:44

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Compiling php-amqp (from svn and 0.2) I receive:

/bin/bash /home/sebastian/Documents/src/avatar-architecture/php-amqp-read-
only/libtool --mode=compile gcc  -I. -I/home/sebastian/Documents/src/avatar-
architecture/php-amqp-read-only -DPHP_ATOM_INC -
I/home/sebastian/Documents/src/avatar-architecture/php-amqp-read-only/include -
I/home/sebastian/Documents/src/avatar-architecture/php-amqp-read-only/main -
I/home/sebastian/Documents/src/avatar-architecture/php-amqp-read-only -
I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -
I/usr/include/php5/Zend -I/usr/include/php5/ext 
-I/usr/include/php5/ext/date/lib -
D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/local/include  -DHAVE_CONFIG_H 
 -g -
O2   -c 
/home/sebastian/Documents/src/avatar-architecture/php-amqp-read-only/amqp.c -
o amqp.lo 
libtool: compile:  gcc -I. 
-I/home/sebastian/Documents/src/avatar-architecture/php-
amqp-read-only -DPHP_ATOM_INC -I/home/sebastian/Documents/src/avatar-
architecture/php-amqp-read-only/include -I/home/sebastian/Documents/src/avatar-
architecture/php-amqp-read-only/main -I/home/sebastian/Documents/src/avatar-
architecture/php-amqp-read-only -I/usr/include/php5 -I/usr/include/php5/main -
I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -
I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -
I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c 
/home/sebastian/Documents/src/avatar-
architecture/php-amqp-read-only/amqp.c  -fPIC -DPIC -o .libs/amqp.o
/home/sebastian/Documents/src/avatar-architecture/php-amqp-read-only/amqp.c: In 
function ‘zif_amqp_login’:
/home/sebastian/Documents/src/avatar-architecture/php-amqp-read-only/amqp.c:281:

error: incompatible type for argument 6 of ‘amqp_login’
make: *** [amqp.lo] Error 1

Original comment by sebastia...@gmail.com on 8 Sep 2009 at 7:58

GoogleCodeExporter commented 8 years ago
amqp_login is defines with an extra parameter (heartbeat), but it's not used on 
php-
amqp:

extern amqp_rpc_reply_t amqp_login(amqp_connection_state_t state,
                                   char const *vhost,
                                   int channel_max,
                                   int frame_max,
                                   int heartbeat,
                                   amqp_sasl_method_enum sasl_method, ...);

Original comment by sebastia...@gmail.com on 9 Sep 2009 at 8:53

GoogleCodeExporter commented 8 years ago
Supply a 0 for the parameter. I'll attach a patch.

Original comment by tonygarnockjones on 17 Sep 2009 at 3:24

Attachments:

GoogleCodeExporter commented 8 years ago
/bin/sh /root/amqp-php/amqp-0.0.7/libtool --mode=compile gcc  -I.
-I/root/amqp-php/amqp-0.0.7 -DPHP_ATOM_INC -I/root/amqp-php/amqp-0.0.7/include
-I/root/amqp-php/amqp-0.0.7/main -I/root/amqp-php/amqp-0.0.7 -I/usr/include/php
-I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend
-I/usr/include/php/ext -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -c
/root/amqp-php/amqp-0.0.7/amqp.c -o amqp.lo 
mkdir .libs
 gcc -I. -I/root/amqp-php/amqp-0.0.7 -DPHP_ATOM_INC
-I/root/amqp-php/amqp-0.0.7/include -I/root/amqp-php/amqp-0.0.7/main
-I/root/amqp-php/amqp-0.0.7 -I/usr/include/php -I/usr/include/php/main
-I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext
-I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /root/amqp-php/amqp-0.0.7/amqp.c 
-fPIC -DPIC -o .libs/amqp.o
/root/amqp-php/amqp-0.0.7/amqp.c: In function 'zif_amqp_login':
/root/amqp-php/amqp-0.0.7/amqp.c:372: error: incompatible type for argument 6 of
'amqp_login'
/root/amqp-php/amqp-0.0.7/amqp.c: In function 'zif_amqp_exchange_declare':
/root/amqp-php/amqp-0.0.7/amqp.c:656: warning: passing argument 4 of
'amqp_simple_rpc' makes pointer from integer without a cast
/root/amqp-php/amqp-0.0.7/amqp.c: In function 'zif_amqp_queue_declare':
/root/amqp-php/amqp-0.0.7/amqp.c:722: warning: passing argument 4 of
'amqp_simple_rpc' makes pointer from integer without a cast
/root/amqp-php/amqp-0.0.7/amqp.c: In function 'zif_amqp_queue_bind':
/root/amqp-php/amqp-0.0.7/amqp.c:784: warning: passing argument 4 of
'amqp_simple_rpc' makes pointer from integer without a cast
/root/amqp-php/amqp-0.0.7/amqp.c: In function 'zif_amqp_queue_unbind':
/root/amqp-php/amqp-0.0.7/amqp.c:847: warning: passing argument 4 of
'amqp_simple_rpc' makes pointer from integer without a cast
make: *** [amqp.lo] Error 1

Original comment by kaydanni...@gmail.com on 3 Nov 2009 at 12:30

GoogleCodeExporter commented 8 years ago
getting the same error as comment #6 :/

Original comment by jeffre...@gmail.com on 4 Dec 2009 at 2:22

GoogleCodeExporter commented 8 years ago
This patch got me from comment #6 to a successful build.

Original comment by adam.he...@gmail.com on 17 Dec 2009 at 4:22

Attachments:

GoogleCodeExporter commented 8 years ago
I can confirm that the issue2.patch2 file when applied on amqp.c results in a 
successful build (albeit with some 
warnings), on Ubuntu 9.10 Server 64bit.

Original comment by cou...@gmail.com on 2 Apr 2010 at 10:24