Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Error for ZMQ 4.2.5 #3042

Closed
Chris-Castles opened this issue Apr 12, 2018 · 6 comments
Closed

Build Error for ZMQ 4.2.5 #3042

Chris-Castles opened this issue Apr 12, 2018 · 6 comments

Comments

@Chris-Castles
Copy link

Chris-Castles commented Apr 12, 2018

Please use this template for reporting suspected bugs or requests for help.

Issue description

@bluca
When build ZMQ 4.2.5, I meet some errors ,

Environment

  • libzmq version (4.2.5):
  • OS:
    linux

Minimal test code / Steps to reproduce the issue

  1. When build it using command :

./configure --host=arm-brcm-linux-gnueabi --prefix=$LO_SDK_TOP_DIR
LIBS=-L$LO_SDK_LIB_DIR --with-relaxed &&
make && make install || (cat config.log && exit 1)

It stops when meet errors as below :

What's the actual result? (include assertion message & call stack if applicable)

configure: WARNING: unrecognized options: --with-relaxed
Making all in doc
make[1]: Entering directory /tmp/src/zeromq-4.2.5/doc' make[1]: Nothing to be done for all'.
make[1]: Leaving directory /tmp/src/zeromq-4.2.5/doc' make[1]: Entering directory /tmp/src/zeromq-4.2.5'
CC external/unity/unity.o
AR external/unity/libunity.a
CXX src/src_libzmq_la-address.lo
cc1plus: warnings being treated as errors
In file included from src/ypipe.hpp:33,
from src/mailbox.hpp:39,
from src/ctx.hpp:38,
from src/address.cpp:33:
src/atomic_ptr.hpp: In member function 'void zmq::atomic_value_t::store(int)':
src/atomic_ptr.hpp:252: warning: dereferencing type-punned pointer will break strict-aliasing rules
src/atomic_ptr.hpp: In member function 'int zmq::atomic_value_t::load() const':
src/atomic_ptr.hpp:266: warning: dereferencing type-punned pointer will break strict-aliasing rules
src/atomic_ptr.hpp:271: error: invalid initialization of reference of type 'zmq::mutex_t&' from expression of type 'const zmq::mutex_t'
src/atomic_ptr.hpp:123: error: in passing argument 4 of 'void* zmq::atomic_cas(void* volatile*, void*, void*, zmq::mutex_t&)'
make[1]: *** [src/src_libzmq_la-address.lo] Error 1
make: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/src/zeromq-4.2.5'
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

What's the expected result?

Complete the build with successful result.

Thank you.

@bluca
Copy link
Member

bluca commented Apr 12, 2018

What are the compiler, libc and libstdc++ versions?

@Chris-Castles
Copy link
Author

Hi bluca, Version information as below:
libc-2.5.so
libc.so.6
libform.so.5.6
libmenu.so.5
libnsl.so.1
libnss_hesiod.so.2
libpanel.so.5.6
libSegFault.so
libstdc++.so.6.0.9

Thank you

@bluca
Copy link
Member

bluca commented Apr 17, 2018

Those are the ABI versions, what are the package versions? And what is the distribution and compiler?

@korbes
Copy link
Contributor

korbes commented May 15, 2018

I have the same problem with the compiler arm-bcm2708-linux-gnueabi, from the raspberry pi tools: https://github.com/raspberrypi/tools/tree/master/arm-bcm2708/arm-bcm2708-linux-gnueabi.

The problems was introduced in #2910. If ZMQ_ATOMIC_PTR_MUTEX is defined, the mutex_t in line 286 needs to be mutable (as is for VxWorks) because load() is const and passes it as non-const to atomic_cas.

@sigiesec
Copy link
Member

@korbes Can you send a PR to fix this?

@bluca
Copy link
Member

bluca commented May 15, 2018

Fixed by #3112

@bluca bluca closed this as completed May 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants