[zeromq-dev] compiling 0MQ 2.0 beta2 with ICC on x86, GCC on PPC and XLC on PPC
sustrik at 250bpm.com
Wed Jan 20 09:30:39 CET 2010
> I tried compiling 0MQ 2.0 with ICC (Intel C compiler) 11.0 ... As as,
> the code does not compile due to the following error:
> tcp_connecter.cpp(243): error #1011: missing return statement at end
> of non-void function "zmq::tcp_connecter_t::open"
Fixed in the trunk.
> This error is easily fixed .... The code does compile after fixing
> this one error (though I only tested --with-c and --with-perf). ICC
> also generates a large number of warnings ... I have not investigated
> these, but I've attached the ICC compiler output in a text file if
> someone wants to take a look.
It seems that most warnings are
remark #981: operands are evaluated in unspecified order
Browsing the web a little I've found the following recommendation:
"In C++, functions without side effects tend to be so common that our
compiler developers recommend disabling #981 -- the noise-to-signal
ratio is typically just too high. But for C code, #981 is more likely to
So, it seems to be useful to use -wd981 when compiling with ICC.
> The performance tests with ICC ran fine.
> I could not see any difference in performance versus gcc, which is a
> bit surprising.
Yup. gcc is getting pretty good lately.
> I also tried compiling 0MQ 2.0 with GCC on POWER architecture (PPC)
> ... It compiles without errors, and the performance tests work.
> Compiling 0MQ 2.0 with IBM XLC on ppc is proving to be problematic ...
> One issue is that XLC does not support the flags -Wall -pedantic
> -Werror, and it gives an error on these flags. ICC also complains
> about -pedantic, but does not give an error ... My understanding is
> that these flags are pretty much unique to gcc.
I am not an expert on autotools but there should be a way to specify
compiler flags depending on underlying compiler, something like:
More information about the zeromq-dev