[rabbitmq-discuss] Problems compiling RabbitMQ-C Kit on Sparc 32-bit...

Alan Antonuk alan.antonuk at gmail.com
Thu Oct 18 18:28:52 BST 2012


Good to see you found a workaround for these issues.

I hope to provide fixes for these issues in the future.

I've added these to the bug tracker as two separate issues:
https://github.com/alanxz/rabbitmq-c/issues/66 (the htonll/ntohll issue)

https://github.com/alanxz/rabbitmq-c/issues/67 (the issue of linking
against the socket and networking libraries)

-Alan

On Thu, Oct 18, 2012 at 12:28 PM, Brandish, Tom
<tom.brandish at tekcomms.com>wrote:

>  Brett,****
>
> ** **
>
> Thanks for your responses.  I created a new header file with your
> definitions, included it and was able to compile.****
>
> ** **
>
> Appreciate your help.****
>
> ** **
>
> Best Regards,****
>
> Tom Brandish****
>
> ** **
>
> *From:* rabbitmq-discuss-bounces at lists.rabbitmq.com [mailto:
> rabbitmq-discuss-bounces at lists.rabbitmq.com] *On Behalf Of *Brett Cameron
> *Sent:* Wednesday, October 17, 2012 10:15 PM
> *To:* Discussions about RabbitMQ
> *Subject:* Re: [rabbitmq-discuss] Problems compiling RabbitMQ-C Kit on
> Sparc 32-bit...****
>
> ** **
>
> Tom,
>
> Just thinking about it, network byte order and Solaris SPARC are both big
> endian, so you can probably just do something like the following (or some
> variant thereof):
>
> #if defined(__sparc)
> #define ntohll(x) (x)
> #define htonll(x) (x)
> #endif
>
> Regards,
> Brett****
>
> On Thu, Oct 18, 2012 at 11:00 AM, Brett Cameron <brett.r.cameron at gmail.com>
> wrote:****
>
> Tom,
>
> I think you've got a couple of problems here. I don't have access to a
> 32-bit Solaris system right now to check, but first up I suspect that you
> might need to add something like "-lsocket -lxnet -lnsl" to the link
> statement. This should resolve most of the missing symbols, but my guess is
> that htonll() will be missing on your (I'm guessing reasonably old) system.
> There should be ways and means around this... I might just be able to get
> access to a suitable machine and have a look into it.
>
> Brett
>
>
> ****
>
> On Thu, Oct 18, 2012 at 10:32 AM, Brandish, Tom <tom.brandish at tekcomms.com>
> wrote:****
>
>   Hi,****
>
>  ****
>
> I have been able to successfully compile RabbitMQ-C on 64-bit Linux, but I
> am having difficulty doing so on Sparc 32-bit.  It looks I am missing some
> headers but with some 64-bit routines but why would I need the 64-bit stuff
> while compiling on a 32-bit system?****
>
>  ****
>
> Here is my log:****
>
>  ****
>
> aclocal: writing aclocal.m4****
>
> autoreconf: Entering directory `.'****
>
> autoreconf: configure.ac: not using Gettext****
>
> autoreconf: running: aclocal -I m4****
>
> autoreconf: configure.ac: tracing****
>
> autoreconf: running: libtoolize --copy****
>
> libtoolize: putting auxiliary files in `.'.****
>
> libtoolize: copying file `./ltmain.sh'****
>
> libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.****
>
> libtoolize: copying file `m4/libtool.m4'****
>
> libtoolize: copying file `m4/ltoptions.m4'****
>
> libtoolize: copying file `m4/ltsugar.m4'****
>
> libtoolize: copying file `m4/ltversion.m4'****
>
> libtoolize: copying file `m4/lt~obsolete.m4'****
>
> autoreconf: running:
> /uadev/scm/tbrandis/V4.0.0.4-tb/sea-partitions/local/install/sparc-sunos-solaris-9/versions/V4.0.0.TRUNK/bin/autoconf
> ****
>
> autoreconf: running:
> /uadev/scm/tbrandis/V4.0.0.4-tb/sea-partitions/local/install/sparc-sunos-solaris-9/versions/V4.0.0.TRUNK/bin/autoheader
> ****
>
> autoreconf: running: automake --add-missing --copy --no-force****
>
> configure.ac:29: installing `./config.guess'****
>
> configure.ac:29: installing `./config.sub'****
>
> configure.ac:22: installing `./install-sh'****
>
> configure.ac:22: installing `./missing'****
>
> Makefile.am: installing `./depcomp'****
>
> autoreconf: Leaving directory `.'****
>
> checking for a BSD-compatible install...
> /uadev/scm/tbrandis/V4.0.0.4-tb/sea-partitions/local/install/sparc-sunos-solaris-9/versions/V4.0.0.TRUNK/bin/install
> -c****
>
> checking whether build environment is sane... yes****
>
> checking for a thread-safe mkdir -p...
> /uadev/scm/tbrandis/V4.0.0.4-tb/sea-partitions/local/install/sparc-sunos-solaris-9/versions/V4.0.0.TRUNK/bin/mkdir
> -p****
>
> checking for gawk... gawk****
>
> checking whether make sets $(MAKE)... yes****
>
> checking for style of include used by make... GNU****
>
> checking for gcc... gcc****
>
> checking whether the C compiler works... yes****
>
> checking for C compiler default output file name... a.out****
>
> checking for suffix of executables...****
>
> checking whether we are cross compiling... no****
>
> checking for suffix of object files... o****
>
> checking whether we are using the GNU C compiler... yes****
>
> checking whether gcc accepts -g... yes****
>
> checking for gcc option to accept ISO C89... none needed****
>
> checking dependency style of gcc... gcc3****
>
> checking how to run the C preprocessor... gcc -E****
>
> checking for grep that handles long lines and -e...
> /uadev/scm/tbrandis/V4.0.0.4-tb/sea-partitions/local/install/sparc-sunos-solaris-9/versions/V4.0.0.TRUNK/bin/grep
> ****
>
> checking for egrep...
> /uadev/scm/tbrandis/V4.0.0.4-tb/sea-partitions/local/install/sparc-sunos-solaris-9/versions/V4.0.0.TRUNK/bin/grep
> -E****
>
> checking for ANSI C header files... yes****
>
> checking for sys/types.h... yes****
>
> checking for sys/stat.h... yes****
>
> checking for stdlib.h... yes****
>
> checking for string.h... yes****
>
> checking for memory.h... yes****
>
> checking for strings.h... yes****
>
> checking for inttypes.h... yes****
>
> checking for stdint.h... yes****
>
> checking for unistd.h... yes****
>
> checking minix/config.h usability... no****
>
> checking minix/config.h presence... no****
>
> checking for minix/config.h... no****
>
> checking whether it is safe to define __EXTENSIONS__... yes****
>
> checking build system type... sparc-sun-solaris2.10****
>
> checking host system type... sparc-sun-solaris2.10****
>
> checking how to print strings... printf****
>
> checking for a sed that does not truncate output...
> /uadev/scm/tbrandis/V4.0.0.4-tb/sea-partitions/local/install/sparc-sunos-solaris-9/versions/V4.0.0.TRUNK/bin/sed
> ****
>
> checking for fgrep...
> /uadev/scm/tbrandis/V4.0.0.4-tb/sea-partitions/local/install/sparc-sunos-solaris-9/versions/V4.0.0.TRUNK/bin/grep
> -F****
>
> checking for ld used by gcc... /sea/compilers/native/gcc-4.4.5/V1.3/bin/ld
> ****
>
> checking if the linker (/sea/compilers/native/gcc-4.4.5/V1.3/bin/ld) is
> GNU ld... yes****
>
> checking for BSD- or MS-compatible name lister (nm)...
> /sea/compilers/native/gcc-4.4.5/V1.3/bin/nm -B****
>
> checking the name lister (/sea/compilers/native/gcc-4.4.5/V1.3/bin/nm -B)
> interface... BSD nm****
>
> checking whether ln -s works... yes****
>
> checking the maximum length of command line arguments... 786240****
>
> checking whether the shell understands some XSI constructs... yes****
>
> checking whether the shell understands "+="... no****
>
> checking how to convert sparc-sun-solaris2.10 file names to
> sparc-sun-solaris2.10 format... func_convert_file_noop****
>
> checking how to convert sparc-sun-solaris2.10 file names to toolchain
> format... func_convert_file_noop****
>
> checking for /sea/compilers/native/gcc-4.4.5/V1.3/bin/ld option to reload
> object files... -r****
>
> checking for objdump... objdump****
>
> checking how to recognize dependent libraries... pass_all****
>
> checking for dlltool... no****
>
> checking how to associate runtime and link libraries... printf %s\n****
>
> checking for ar... ar****
>
> checking for archiver @FILE support... @****
>
> checking for strip... strip****
>
> checking for ranlib... ranlib****
>
> checking command to parse /sea/compilers/native/gcc-4.4.5/V1.3/bin/nm -B
> output from gcc object... ok****
>
> checking for sysroot... no****
>
> checking for mt... mt****
>
> checking if mt is a manifest tool... no****
>
> checking for dlfcn.h... yes****
>
> checking for objdir... .libs****
>
> checking if gcc supports -fno-rtti -fno-exceptions... no****
>
> checking for gcc option to produce PIC... -fPIC -DPIC****
>
> checking if gcc PIC flag -fPIC -DPIC works... yes****
>
> checking if gcc static flag -static works... no****
>
> checking if gcc supports -c -o file.o... yes****
>
> checking if gcc supports -c -o file.o... (cached) yes****
>
> checking whether the gcc linker
> (/sea/compilers/native/gcc-4.4.5/V1.3/bin/ld) supports shared libraries...
> yes****
>
> checking whether -lc should be explicitly linked in... yes****
>
> checking dynamic linker characteristics... solaris2.10 ld.so****
>
> checking how to hardcode library paths into programs... immediate****
>
> checking whether stripping libraries is possible... yes****
>
> checking if libtool supports shared libraries... yes****
>
> checking whether to build shared libraries... yes****
>
> checking whether to build static libraries... no****
>
> checking for gcc option to accept ISO C99... -std=gnu99****
>
> checking whether byte ordering is bigendian... yes****
>
> checking for inline... inline****
>
> checking if compiler accepts '-Wall'... yes****
>
> checking if compiler accepts '-Wextra'... yes****
>
> checking if compiler accepts '-pedantic'... yes****
>
> checking if compiler accepts '-Wstrict-prototypes'... yes****
>
> checking if compiler accepts '-Wcast-align'... yes****
>
> checking if compiler accepts '-fno-common'... yes****
>
> checking if compiler accepts '-fvisibility=hidden'... yes****
>
> checking if linker accepts '-no-undefined'... yes****
>
> checking for a Python interpreter with version >= 2.5... python****
>
> checking for python...
> /uadev/scm/tbrandis/V4.0.0.4-tb/sea-partitions/local/install/sparc-sunos-solaris-9/versions/V4.0.0.TRUNK/bin/python
> ****
>
> checking for python version... 2.7****
>
> checking for python platform... sunos5****
>
> checking for python script directory...
> ${prefix}/lib/python2.7/site-packages****
>
> checking for python extension module directory...
> ${exec_prefix}/lib/python2.7/site-packages****
>
> checking python module: json... yes****
>
> checking for popt.h... no****
>
> checking for poptGetContext in -lpopt... no****
>
> configure: creating ./config.status****
>
> config.status: creating librabbitmq.pc****
>
> config.status: creating Makefile****
>
> config.status: creating config.h****
>
> config.status: executing depfiles commands****
>
> config.status: executing libtool commands****
>
> configure: WARNING: unrecognized options: --enable-32-bit****
>
>  ****
>
> rabbitmq-c build options:****
>
>         Host: sparc-sun-solaris2.10****
>
>         Version: 0.2.0****
>
>         64-bit: no****
>
>         Tools: no****
>
>         Documentation: no****
>
>  ****
>
>   GEN    librabbitmq/amqp_framing.h****
>
>   GEN    librabbitmq/amqp_framing.c****
>
> make  all-am****
>
> make[1]: Entering directory `/home/spiuser/gitwa/rabbitmq-c'****
>
>   CC     librabbitmq/librabbitmq_librabbitmq_la-amqp_api.lo****
>
> In file included from librabbitmq/amqp_api.c:37:****
>
> librabbitmq/amqp_private.h: In function 'amqp_e64':****
>
> librabbitmq/amqp_private.h:251: warning: implicit declaration of function
> 'htonll'****
>
> librabbitmq/amqp_private.h: In function 'amqp_d64':****
>
> librabbitmq/amqp_private.h:251: warning: implicit declaration of function
> 'ntohll'****
>
>   CC     librabbitmq/librabbitmq_librabbitmq_la-amqp_connection.lo****
>
> In file included from librabbitmq/amqp_connection.c:37:****
>
> librabbitmq/amqp_private.h: In function 'amqp_e64':****
>
> librabbitmq/amqp_private.h:251: warning: implicit declaration of function
> 'htonll'****
>
> librabbitmq/amqp_private.h: In function 'amqp_d64':****
>
> librabbitmq/amqp_private.h:251: warning: implicit declaration of function
> 'ntohll'****
>
> librabbitmq/amqp_connection.c: In function 'amqp_send_frame':****
>
> librabbitmq/amqp_connection.c:365: warning: pointer targets in assignment
> differ in signedness****
>
>   CC     librabbitmq/librabbitmq_librabbitmq_la-amqp_framing.lo****
>
> In file included from librabbitmq/amqp_framing.c:38:****
>
> librabbitmq/amqp_private.h: In function 'amqp_e64':****
>
> librabbitmq/amqp_private.h:251: warning: implicit declaration of function
> 'htonll'****
>
> librabbitmq/amqp_private.h: In function 'amqp_d64':****
>
> librabbitmq/amqp_private.h:251: warning: implicit declaration of function
> 'ntohll'****
>
>   CC     librabbitmq/librabbitmq_librabbitmq_la-amqp_mem.lo****
>
> In file included from librabbitmq/amqp_mem.c:37:****
>
> librabbitmq/amqp_private.h: In function 'amqp_e64':****
>
> librabbitmq/amqp_private.h:251: warning: implicit declaration of function
> 'htonll'****
>
> librabbitmq/amqp_private.h: In function 'amqp_d64':****
>
> librabbitmq/amqp_private.h:251: warning: implicit declaration of function
> 'ntohll'****
>
>   CC     librabbitmq/librabbitmq_librabbitmq_la-amqp_socket.lo****
>
> In file included from librabbitmq/amqp_socket.c:37:****
>
> librabbitmq/amqp_private.h: In function 'amqp_e64':****
>
> librabbitmq/amqp_private.h:251: warning: implicit declaration of function
> 'htonll'****
>
> librabbitmq/amqp_private.h: In function 'amqp_d64':****
>
> librabbitmq/amqp_private.h:251: warning: implicit declaration of function
> 'ntohll'****
>
>   CC     librabbitmq/librabbitmq_librabbitmq_la-amqp_table.lo****
>
> In file included from librabbitmq/amqp_table.c:37:****
>
> librabbitmq/amqp_private.h: In function 'amqp_e64':****
>
> librabbitmq/amqp_private.h:251: warning: implicit declaration of function
> 'htonll'****
>
> librabbitmq/amqp_private.h: In function 'amqp_d64':****
>
> librabbitmq/amqp_private.h:251: warning: implicit declaration of function
> 'ntohll'****
>
>   CC     librabbitmq/librabbitmq_librabbitmq_la-amqp_url.lo****
>
> In file included from librabbitmq/amqp_url.c:37:****
>
> librabbitmq/amqp_private.h: In function 'amqp_e64':****
>
> librabbitmq/amqp_private.h:251: warning: implicit declaration of function
> 'htonll'****
>
> librabbitmq/amqp_private.h: In function 'amqp_d64':****
>
> librabbitmq/amqp_private.h:251: warning: implicit declaration of function
> 'ntohll'****
>
>   CC     librabbitmq/unix/librabbitmq_librabbitmq_la-socket.lo****
>
> In file included from librabbitmq/unix/socket.c:37:****
>
> ./librabbitmq/amqp_private.h: In function 'amqp_e64':****
>
> ./librabbitmq/amqp_private.h:251: warning: implicit declaration of
> function 'htonll'****
>
> ./librabbitmq/amqp_private.h: In function 'amqp_d64':****
>
> ./librabbitmq/amqp_private.h:251: warning: implicit declaration of
> function 'ntohll'****
>
>   CCLD   librabbitmq/librabbitmq.la****
>
>   CC     examples/examples_libutils_la-utils.lo****
>
>   CC     examples/unix/examples_libutils_la-platform_utils.lo****
>
>   CCLD   examples/libutils.la****
>
>   CC     examples/amqp_bind.o****
>
>   CCLD   examples/amqp_bind****
>
> librabbitmq/.libs/librabbitmq.so: undefined reference to `connect'****
>
> librabbitmq/.libs/librabbitmq.so: undefined reference to `ntohll'****
>
> librabbitmq/.libs/librabbitmq.so: undefined reference to `send'****
>
> librabbitmq/.libs/librabbitmq.so: undefined reference to `freeaddrinfo'***
> *
>
> librabbitmq/.libs/librabbitmq.so: undefined reference to `htonll'****
>
> librabbitmq/.libs/librabbitmq.so: undefined reference to `recv'****
>
> librabbitmq/.libs/librabbitmq.so: undefined reference to `setsockopt'****
>
> librabbitmq/.libs/librabbitmq.so: undefined reference to `socket'****
>
> librabbitmq/.libs/librabbitmq.so: undefined reference to `getaddrinfo'****
>
> collect2: ld returned 1 exit status****
>
>  ****
>
> ** **
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss****
>
>  ** **
>
> ** **
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20121018/1185c1b3/attachment.htm>


More information about the rabbitmq-discuss mailing list