[zeromq-dev] compiling zeromq 2.0 beta2 with pgm on centOS
Guo, Yanchao
Yanchao.Guo at sac.com
Wed Jan 20 10:54:03 CET 2010
Hello,
I am compiling omq 2.0beta2 on centOS, and I tried with both intel icc/icpc and gcc/g++, but I have issues with both of them.
With gcc/g++, I got this error when creating the shared lib:
libtool: link: g++ -shared -nostdlib /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtbeginS.o .libs/libzmq_la-app_thread.o .libs/libzmq_la-devpoll.o .libs/libzmq_la-dispatcher.o .libs/libzmq_la-downstream.o .libs/libzmq_la-epoll.o .libs/libzmq_la-err.o .libs/libzmq_la-fd_signaler.o .libs/libzmq_la-fq.o .libs/libzmq_la-io_object.o .libs/libzmq_la-io_thread.o .libs/libzmq_la-ip.o .libs/libzmq_la-kqueue.o .libs/libzmq_la-lb.o .libs/libzmq_la-object.o .libs/libzmq_la-options.o .libs/libzmq_la-owned.o .libs/libzmq_la-pgm_receiver.o .libs/libzmq_la-pgm_sender.o .libs/libzmq_la-pgm_socket.o .libs/libzmq_la-p2p.o .libs/libzmq_la-pipe.o .libs/libzmq_la-poll.o .libs/libzmq_la-pub.o .libs/libzmq_la-rep.o .libs/libzmq_la-req.o .libs/libzmq_la-select.o .libs/libzmq_la-session.o .libs/libzmq_la-socket_base.o .libs/libzmq_la-sub.o .libs/libzmq_la-tcp_connecter.o .libs/libzmq_la-tcp_listener.o .libs/libzmq_la-tcp_socket.o .libs/libzmq_la-thread.o .libs/libzmq_la-upstream.o .libs/libzmq_la-uuid.o .libs/libzmq_la-xrep.o .libs/libzmq_la-xreq.o .libs/libzmq_la-ypollset.o .libs/libzmq_la-zmq.o .libs/libzmq_la-zmq_connecter.o .libs/libzmq_la-zmq_decoder.o .libs/libzmq_la-zmq_encoder.o .libs/libzmq_la-zmq_engine.o .libs/libzmq_la-zmq_init.o .libs/libzmq_la-zmq_listener.o .libs/libzmq_la-packet.o .libs/libzmq_la-time.o .libs/libzmq_la-if.o .libs/libzmq_la-getifaddrs.o .libs/libzmq_la-getnodeaddr.o .libs/libzmq_la-indextoaddr.o .libs/libzmq_la-indextoname.o .libs/libzmq_la-nametoindex.o .libs/libzmq_la-inet_network.o .libs/libzmq_la-md5.o .libs/libzmq_la-gsi.o .libs/libzmq_la-tsi.o .libs/libzmq_la-signal.o .libs/libzmq_la-txwi.o .libs/libzmq_la-rxwi.o .libs/libzmq_la-transport.o .libs/libzmq_la-source.o .libs/libzmq_la-receiver.o .libs/libzmq_la-recv.o .libs/libzmq_la-pgm.o .libs/libzmq_la-timer.o .libs/libzmq_la-net.o .libs/libzmq_la-rate_control.o .libs/libzmq_la-async.o .libs/libzmq_la-checksum.o .libs/libzmq_la-reed_solomon.o .libs/libzmq_la-galois_tables.o .libs/libzmq_la-wsastrerror.o .libs/libzmq_la-glib-compat.o .libs/libzmq_la-backtrace.o .libs/libzmq_la-log.o -L/lib64 -lgthread-2.0 -lglib-2.0 -lpthread -lssl -L/opt/intel/Compiler/11.1/064/tbb/intel64/cc4.1.0_libc2.4_kernel2.6.16.21/lib -L/opt/intel/Compiler/11.1/064/lib/intel64 -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtendS.o /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crtn.o -pthread -pthread -pthread -Wl,-soname -Wl,libzmq.so.0 -o .libs/libzmq.so.0.0.0
/usr/bin/ld: .libs/libzmq_la-txwi.o: relocation R_X86_64_PC32 against `pgm_rs_create' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
The linker asked me to "recompile with fPIC", but I am already compiling everything with this option. I also tried with -m64, didn't work either.
With intel icc/icpc, there are couple of issues. First I have to replace the option "--param max-inline-insns-single=600" with "finline-limit=600", and make icpc as the C compiler so that code like "for (int i = 0, i < 100...) " will compile, but I still have the following error related to "gpointer":
/bin/sh ../libtool --tag=CC --mode=compile icpc -DHAVE_CONFIG_H -I. -D_REENTRANT -I../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/include/ -Wno-variadic-macros -Wno-long-long -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pipe -Wall -Wextra -Wfloat-equal -Wshadow -Wunsafe-loop-optimizations -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Wnested-externs -Winline -pedantic -std=gnu99 -finline-limit=600 -D_REENTRANT -D_GNU_SOURCE -D__need_IOV_MAX -DCONFIG_HAVE_PSELECT -DCONFIG_HAVE_POLL -DCONFIG_HAVE_PPOLL -DCONFIG_HAVE_EPOLL -DCONFIG_HAVE_CLOCK_GETTIME -DCONFIG_HAVE_CLOCK_NANOSLEEP -DCONFIG_HAVE_NANOSLEEP -DCONFIG_HAVE_USLEEP -DCONFIG_HAVE_RTC -DCONFIG_HAVE_TSC -DCONFIG_HAVE_IFR_NETMASK -DCONFIG_HAVE_GETIFADDRS -DCONFIG_HAVE_GETHOSTBYNAME2 -DCONFIG_HAVE_GETPROTOBYNAME_R -DCONFIG_BIND_INADDR_ANY -DCONFIG_GALOIS_MUL_LUT -DGETTEXT_PACKAGE='"pgm"' -DG_LOG_DOMAIN='"Pgm"' -g -O2 -MT libzmq_la-packet.lo -MD -MP -MF .deps/libzmq_la-packet.Tpo -c -o libzmq_la-packet.lo `test -f '../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c' || echo './'`../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c
libtool: compile: icpc -DHAVE_CONFIG_H -I. -D_REENTRANT -I../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/include/ -Wno-variadic-macros -Wno-long-long -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pipe -Wall -Wextra -Wfloat-equal -Wshadow -Wunsafe-loop-optimizations -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Wnested-externs -Winline -pedantic -std=gnu99 -finline-limit=600 -D_REENTRANT -D_GNU_SOURCE -D__need_IOV_MAX -DCONFIG_HAVE_PSELECT -DCONFIG_HAVE_POLL -DCONFIG_HAVE_PPOLL -DCONFIG_HAVE_EPOLL -DCONFIG_HAVE_CLOCK_GETTIME -DCONFIG_HAVE_CLOCK_NANOSLEEP -DCONFIG_HAVE_NANOSLEEP -DCONFIG_HAVE_USLEEP -DCONFIG_HAVE_RTC -DCONFIG_HAVE_TSC -DCONFIG_HAVE_IFR_NETMASK -DCONFIG_HAVE_GETIFADDRS -DCONFIG_HAVE_GETHOSTBYNAME2 -DCONFIG_HAVE_GETPROTOBYNAME_R -DCONFIG_BIND_INADDR_ANY -DCONFIG_GALOIS_MUL_LUT -DGETTEXT_PACKAGE=\"pgm\" -DG_LOG_DOMAIN=\"Pgm\" -g -O2 -MT libzmq_la-packet.lo -MD -MP -MF .deps/libzmq_la-packet.Tpo -c ../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c -fPIC -DPIC -o .libs/libzmq_la-packet.o
icpc: command line warning #10006: ignoring unknown option '-Wno-variadic-macros'
icpc: command line warning #10006: ignoring unknown option '-Wno-long-long'
icpc: command line warning #10006: ignoring unknown option '-Wextra'
icpc: command line warning #10006: ignoring unknown option '-Wfloat-equal'
icpc: command line warning #10006: ignoring unknown option '-Wunsafe-loop-optimizations'
icpc: command line warning #10006: ignoring unknown option '-Wbad-function-cast'
icpc: command line warning #10006: ignoring unknown option '-Wcast-align'
icpc: command line warning #10006: ignoring unknown option '-Waggregate-return'
icpc: command line warning #10006: ignoring unknown option '-Wold-style-definition'
icpc: command line warning #10006: ignoring unknown option '-Wmissing-noreturn'
icpc: command line warning #10006: ignoring unknown option '-Wmissing-format-attribute'
icpc: command line warning #10006: ignoring unknown option '-Wredundant-decls'
icpc: command line warning #10006: ignoring unknown option '-Wnested-externs'
icpc: command line remark #10148: option '-pedantic' not supported
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/include/pgm/sockaddr.h(227): remark #2259: non-pointer conversion from "gboolean={gint={int}}" to "const gint8={signed char}" may lose significant bits
const gint8 optval = v;
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/include/pgm/sockaddr.h(302): warning #1011: missing return statement at end of non-void function "pgm_sockaddr_join_group"
}
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/include/pgm/sockaddr.h(331): warning #1011: missing return statement at end of non-void function "pgm_sockaddr_join_source_group"
}
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/include/pgm/sockaddr.h(359): remark #2259: non-pointer conversion from "gboolean={gint={int}}" to "const gint8={signed char}" may lose significant bits
const gint8 optval = v;
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/include/pgm/sockaddr.h(381): remark #2259: non-pointer conversion from "gint={int}" to "const gint8={signed char}" may lose significant bits
const gint8 optval = hops;
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/include/pgm/skbuff.h(73): warning #1628: function declared with "noreturn" does return
}
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/include/pgm/skbuff.h(80): warning #1628: function declared with "noreturn" does return
}
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/include/pgm/skbuff.h(117): remark #2259: non-pointer conversion from "int" to "guint16={unsigned short}" may lose significant bits
skb->len += len;
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/include/pgm/skbuff.h(125): remark #2259: non-pointer conversion from "int" to "guint16={unsigned short}" may lose significant bits
skb->len -= len;
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(110): remark #981: operands are evaluated in unspecified order
_("IP packet too small at %" G_GUINT16_FORMAT " bytes, expecting at least %" G_GUINT16_FORMAT " bytes."),
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(107): remark #981: operands are evaluated in unspecified order
g_set_error (error,
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(175): remark #981: operands are evaluated in unspecified order
_("IPv6 is not supported for raw IP header parsing."));
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(172): remark #981: operands are evaluated in unspecified order
g_set_error (error,
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(182): remark #981: operands are evaluated in unspecified order
_("IP header reports an invalid version %d."),
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(179): remark #981: operands are evaluated in unspecified order
g_set_error (error,
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(193): remark #981: operands are evaluated in unspecified order
_("IP header reports an invalid header length %" G_GSIZE_FORMAT " bytes."),
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(190): remark #981: operands are evaluated in unspecified order
g_set_error (error,
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(213): remark #981: operands are evaluated in unspecified order
_("IP packet received at %" G_GUINT16_FORMAT " bytes whilst IP header reports %" G_GSIZE_FORMAT " bytes."),
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(210): remark #981: operands are evaluated in unspecified order
g_set_error (error,
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(220): remark #193: zero used for undefined preprocessing identifier "PGM_CHECK_IN_CKSUM"
#if PGM_CHECK_IN_CKSUM
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(239): remark #981: operands are evaluated in unspecified order
_("IP header reports packet fragmentation."));
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(236): remark #981: operands are evaluated in unspecified order
g_set_error (error,
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(260): error: a value of type "gpointer" cannot be assigned to an entity of type "pgm_header *"
skb->pgm_header = (gpointer)( (guint8*)skb->data + ip_header_length );
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(280): remark #981: operands are evaluated in unspecified order
_("UDP payload too small for PGM packet at %" G_GUINT16_FORMAT " bytes, expecting at least %" G_GSIZE_FORMAT " bytes."),
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(277): remark #981: operands are evaluated in unspecified order
g_set_error (error,
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(286): error: a value of type "gpointer" cannot be assigned to an entity of type "pgm_header *"
skb->pgm_header = skb->data;
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(308): remark #2259: non-pointer conversion from "int" to "guint16={unsigned short}" may lose significant bits
skb->pgm_header->pgm_checksum = sum;
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(313): remark #981: operands are evaluated in unspecified order
_("PGM packet checksum mismatch, reported 0x%x whilst calculated 0x%x."),
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(310): remark #981: operands are evaluated in unspecified order
g_set_error (error,
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(324): remark #981: operands are evaluated in unspecified order
_("PGM checksum missing whilst mandatory for %cDATA packets."),
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(321): remark #981: operands are evaluated in unspecified order
g_set_error (error,
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(406): remark #181: argument is incompatible with corresponding format string conversion
if (ip->ip_ttl >= 1) printf (", ttl %u", ip->ip_ttl);
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(415): remark #181: argument is incompatible with corresponding format string conversion
g_ntohs(ip->ip_id),
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(469): remark #981: operands are evaluated in unspecified order
pgm_gethostbyaddr((const struct in_addr*)&ip->ip_src), pgm_udpport_string(pgm_header->pgm_sport));
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(468): remark #981: operands are evaluated in unspecified order
printf ("%s.%s > ",
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(471): remark #981: operands are evaluated in unspecified order
pgm_gethostbyaddr((const struct in_addr*)&ip->ip_dst), pgm_udpport_string(pgm_header->pgm_dport));
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(470): remark #981: operands are evaluated in unspecified order
printf ("%s.%s: PGM\n",
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(479): remark #2259: non-pointer conversion from "int" to "guint8={unsigned char}" may lose significant bits
pgm_type_string(pgm_header->pgm_type & 0xf),
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(607): remark #981: operands are evaluated in unspecified order
(gulong)g_ntohl(spm->spm_trail),
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(605): remark #981: operands are evaluated in unspecified order
printf ("sqn %lu trail %lu lead %lu nla-afi %u ",
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(703): remark #181: argument is incompatible with corresponding format string conversion
g_ntohs(poll4->poll_round),
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(704): remark #181: argument is incompatible with corresponding format string conversion
g_ntohs(poll4->poll_s_type),
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(723): remark #981: operands are evaluated in unspecified order
isprint (poll4->poll_rand[1]) ? poll4->poll_rand[1] : '.',
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(721): remark #981: operands are evaluated in unspecified order
printf (" rand [%c%c%c%c]",
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(748): remark #981: operands are evaluated in unspecified order
isprint (poll6->poll6_rand[1]) ? poll6->poll6_rand[1] : '.',
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(746): remark #981: operands are evaluated in unspecified order
printf (" rand [%c%c%c%c]",
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(810): remark #181: argument is incompatible with corresponding format string conversion
g_ntohs(polr->polr_round));
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(865): remark #981: operands are evaluated in unspecified order
(gulong)g_ntohl(odata->data_trail));
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(863): remark #981: operands are evaluated in unspecified order
printf ("sqn %lu trail %lu [",
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(870): error: a value of type "gconstpointer" cannot be used to initialize an entity of type "const char *"
const char* payload = pgm_opt;
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(920): remark #981: operands are evaluated in unspecified order
(gulong)g_ntohl(rdata->data_trail));
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(918): remark #981: operands are evaluated in unspecified order
printf ("sqn %lu trail %lu [",
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(925): error: a value of type "gconstpointer" cannot be used to initialize an entity of type "const char *"
const char* payload = pgm_opt;
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(1323): remark #181: argument is incompatible with corresponding format string conversion
printf ("OPT-%u{%u} ", opt_header->opt_type & PGM_OPT_MASK, opt_header->opt_length);
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(1323): remark #181: argument is incompatible with corresponding format string conversion
printf ("OPT-%u{%u} ", opt_header->opt_type & PGM_OPT_MASK, opt_header->opt_length);
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(1377): error: return value type does not match the function type
return service_string;
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(1389): error: return value type does not match the function type
return service_string;
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(1405): error: return value type does not match the function type
return host_string;
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(1416): error: argument of type "const in_addr *" is incompatible with parameter of type "gpointer"
g_hash_table_insert (hosts, ap, host_string);
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(1417): error: return value type does not match the function type
return host_string;
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(1429): error: a value of type "gconstpointer" cannot be used to initialize an entity of type "const char *"
const char* op = ipopt;
^
../foreign/openpgm/libpgm-2.0.20rc5/openpgm/pgm/packet.c(1433): remark #2259: non-pointer conversion from "int" to "char" may lose significant bits
char len = (*op == IPOPT_NOP || *op == IPOPT_EOL) ? 1 : op[1];
Any idea to fix this? Ideally I'd like a icpc build. Thanks.
Regards,
YC
DISCLAIMER: This e-mail message and any attachments are intended solely for the use of the individual or entity to which it is addressed and may contain information that is confidential or legally privileged. If you are not the intended recipient, you are hereby notified that any dissemination, distribution, copying or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately and permanently delete this message and any attachments.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20100120/be31f1ed/attachment.htm>
More information about the zeromq-dev
mailing list