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

Source install does not pass any tests #3012

Closed
aytekinar opened this issue Mar 21, 2018 · 5 comments
Closed

Source install does not pass any tests #3012

aytekinar opened this issue Mar 21, 2018 · 5 comments

Comments

@aytekinar
Copy link

Environment

I am using Arch Linux with the following:

~> uname -a
Linux KTH-5435 4.15.8-1-ARCH #1 SMP PREEMPT Sat Mar 10 00:00:33 UTC 2018 x86_64 GNU/Linux

Steps to reproduce

I run the following set of commands on my fish shell to install v4.2.3 from source:

~> git clone https://github.com/zeromq/libzmq
~> cd libzmq/
~> git checkout -b install v4.2.3 
~/libzmq> mkdir build install
~/libzmq> cd build
~/l/build> cmake -D CMAKE_INSTALL_PREFIX=../install -D WITH_DOC=0 -D WITH_LIBSODIUM=1 -D WITH_OPENPGM=1 -D LIBZMQ_WERROR=1 -G Ninja ../ > cmake.log ; and cmake --build . > build.log ; and cmake --build . --target test > test.log

The last command returns with error. I have attached the corresponding cmake.log, build.log and test.log files.

I would appreciate if you helped me resolve the

/usr/bin/ld: warning: cannot find entry symbol rrwarn=%all; defaulting to 0000000000002090

type of warnings. I guess this is the problem that results in segfaults in the test phase.

@bluca
Copy link
Member

bluca commented Mar 21, 2018

Don't use ninja - nobody supports it. Just use make.

@aytekinar
Copy link
Author

aytekinar commented Mar 21, 2018

FYI, dropping the -G Ninja results in the same. I think the problem is on the line below:

zmq_check_cxx_flag_prepend ("-errwarn=%all")

When I change my compiler with env CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake ... and compile with LLVM, that switch is ignored by LLVM and everything proceeds as normal. Then, when I disable LIBZMQ_WERROR by setting it to 0, it builds and passes the tests, again (this time, with gcc).

EDIT. My compiler versions are as follows:

~> gcc --version
gcc (GCC) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

~> clang --version
clang version 5.0.1 (tags/RELEASE_501/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

@sigiesec
Copy link
Member

I think -errwarn is an option of the Sun compiler, probably this check is supposed to fail with gcc.
But apparently it doesn't with your gcc version (7.3.0), which is very recent, and probably not widely used yet.

@aytekinar
Copy link
Author

I see. I think it passes this option directly to ld, which creates other problems, I assume, by checking the build log. For now, I will disable WERROR, then?

@sigiesec
Copy link
Member

Can you try to change this to

if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
    zmq_check_cxx_flag_prepend ("-errwarn=%all") 
endif()

If it works, please send a PR with the change :)

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

3 participants