<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>Comments for page &quot;Ruby extension&quot;</title>
		<link>http://www.openamq.org/addon:ruby-extension/comments/show</link>
		<description></description>
				<copyright></copyright>
		<lastBuildDate>Sat, 04 Feb 2012 20:44:08 +0000</lastBuildDate>
		
					<item>
				<guid>http://www.openamq.org/addon:ruby-extension/comments/show#post-412956</guid>
				<title>Re: How to build ruby Extension</title>
				<link>http://www.openamq.org/addon:ruby-extension/comments/show#post-412956</link>
				<description></description>
				<pubDate>Thu, 12 Mar 2009 14:23:15 +0000</pubDate>
				<wikidot:authorName>juvanham</wikidot:authorName>				<wikidot:authorUserId>297067</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I'm trying to use ruby with OpenAMQ-1.3c5.tar.gz and like to share a few small improvements for the tips above.</p> <p>step 2 above modifies the ruby API but since this is a method of connection the modification can be better:<br /> amq_connection.h:126 remove second parameter from this function<br /> amq_connection.h:132 change the first parameter to self</p> <p>the connection object is already known so the change above could allow something inconsistent where the object and the argument are different.</p> <p>in step 8 the change in line 20 will be no longer needed</p> <p>to make the binding compile I needed to change $AMQ_HOME/include/apr.h:270 in such way that __off64_t is used instead of off64_t. This must be the same after including 'sys/types.h' but for some reason it doesn't work always.</p> <p>Line 16 of test.rb call connection.error_text but this leads to a segfault, after removing this line it worked, until I find a better way to fix this problem.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.openamq.org/addon:ruby-extension/comments/show#post-260951</guid>
				<title>Build ruby extension with OpenAMQ-1.2d1 in Intel 64 bit system</title>
				<link>http://www.openamq.org/addon:ruby-extension/comments/show#post-260951</link>
				<description></description>
				<pubDate>Tue, 16 Sep 2008 05:26:06 +0000</pubDate>
				<wikidot:authorName>Eranga Samararathna</wikidot:authorName>				<wikidot:authorUserId>139062</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>If you try to build the ruby extension with OpenAMQ-1.2d1 in Intel 64 bit system you will probably end up with a following error.</p> <p>relocation R_X86_64_32 against ‘a local symbol’ can not be used when making a shared object; recompile with -fPIC<br /> /opt/ibaseold//lib/libamq_wireapi.a: could not read symbols: Bad value</p> <p>You can an idea about this error from the following link.<br /> <a href="http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&amp;chap=3#doc_chap7">http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&amp;chap=3#doc_chap7</a></p> <p>How could you overcome this issue?<br /> Rebuild the OpenAMQ-1.2d1 with following additional options.</p> <p>export CCDEFINES="-fPIC"<br /> export CFLAGS="-fPIC"<br /> export BASE_THREADSAFE="-DBASE_THREADSAFE"</p> <p>Then follow the regular build steps.</p> <p>Then you need to follow the instruction I was given in my previous post.</p> <p>Regards,</p> <p>Eranga</p> <p><a href="http://www.erangac.blogspot.com/">http://www.erangac.blogspot.com/</a></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.openamq.org/addon:ruby-extension/comments/show#post-182506</guid>
				<title>How to build ruby Extension</title>
				<link>http://www.openamq.org/addon:ruby-extension/comments/show#post-182506</link>
				<description></description>
				<pubDate>Thu, 05 Jun 2008 13:22:25 +0000</pubDate>
				<wikidot:authorName>Eranga Samararathna</wikidot:authorName>				<wikidot:authorUserId>139062</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>1.) Install ruby-full in your machine.<br /> I would suggest to use something like "sudo apt-get install ruby-full "</p> <p>2.)Open the "amq_client.c" file.<br /> Change the line 197 as follows</p> <p>old -&gt; rb_define_method(amqp_connection,"client_session_new", con_client_session_new,0);<br /> new-&gt; rb_define_method(amqp_connection,"client_session_new", con_client_session_new,1);</p> <p>2.)Remove the Makefile in the distribution.</p> <p>3.)Open extconf.rb in a text editor.<br /> Chnage it to</p> <p>require 'mkmf'<br /> $INCFLAGS += ' -I${AMQ_HOME}/include'<br /> $LIBS += ' -L${AMQ_HOME}/lib -Wl,-rpath=${AMQ_HOME}/lib -lamq_wireapi -lamq_common -lsmt -licl -lipr -lasl -lapr -laprutil -lpcre'<br /> create_makefile("open_amqp")</p> <p>4.)Set OpenAMQ home<br /> export AMQ_HOME=/opt/amq</p> <p>5.)Generate make file using command<br /> ruby extconf.rb</p> <p>6.)Build ruby library using command<br /> make all</p> <p>7.)Start your OpenAMQ server<br /> cd ${AMQ_HOME}/bin/<br /> ./amq_server</p> <p>8.)Open the test.rb file<br /> Change the line 14 as follows</p> <p>old -&gt; auth_data = foo.client_connection_auth_plain("guest","foobar")<br /> new -&gt; auth_data = foo.client_connection_auth_plain("guest","guest")</p> <p>Comment the line 17</p> <p>Change the line 20 as follows</p> <p>old -&gt; session = connection.client_session_new<br /> new -&gt; session = connection.client_session_new(connection)</p> <p>Save your changes.</p> <p>9.) Run sample program<br /> ruby test.rb</p> <p>10.) Enjoy ! :)</p> <p>Regards,</p> <p>Eranga</p> <p><a href="http://www.erangac.blogspot.com/">http://www.erangac.blogspot.com/</a></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://www.openamq.org/addon:ruby-extension/comments/show#post-152951</guid>
				<title>Compile on Ubuntu</title>
				<link>http://www.openamq.org/addon:ruby-extension/comments/show#post-152951</link>
				<description></description>
				<pubDate>Sat, 26 Apr 2008 18:09:12 +0000</pubDate>
				<wikidot:authorName>carlskii</wikidot:authorName>				<wikidot:authorUserId>13128</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi,</p> <p>I'm trying to compile this wrapper on Ubuntu and it keeps failing. Are there any specific build instructions?</p> <p>I have ruby and ruby-dev installed.</p> <p>Best Regards,</p> <p>Carl</p> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>
