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

test: unittest_hostname compile error on freebsd #13739

Merged
merged 1 commit into from Mar 2, 2017

Conversation

liuchang0812
Copy link
Contributor

Signed-off-by: liuchang0812 liuchang0812@gmail.com

@wjwithagen I have no FreeBSD environment, mind taking a look? It's compiled successfully by clang. thanks!

#include <iostream>
#include <string>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might want to remove #include <string>.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but std::string is used in line 35

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, do you mean that I shouldn't reorder #include <string> ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's duplicated with the #include at line:30

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry. fixed it

@liuchang0812
Copy link
Contributor Author

../../lib/libceph-common.so.0: undefined reference to `boost::re_detail_106300::cpp_regex_traits_implementation<char>::transform[abi:cxx11](char const*, char const*) const'
../../lib/libceph-common.so.0: undefined reference to `boost::re_detail_106300::cpp_regex_traits_implementation<char>::transform_primary[abi:cxx11](char const*, char const*) const'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
src/test/CMakeFiles/unittest_xlist.dir/build.make:117: recipe for target 'bin/unittest_xlist' failed
make[2]: *** [bin/unittest_xlist] Error 1
CMakeFiles/Makefile2:7156: recipe for target 'src/test/CMakeFiles/unittest_xlist.dir/all' failed
make[1]: *** [src/test/CMakeFiles/unittest_xlist.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

Seems that clang linker could not find boost::regex.

Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
Copy link
Contributor

@wjwithagen wjwithagen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compile oke and executes on Clang/FreeBSD

@liuchang0812
Copy link
Contributor Author

@wjwithagen thanks!

@liewegas liewegas merged commit 50d215d into ceph:master Mar 2, 2017
@liuchang0812 liuchang0812 deleted the fix-unittest-hostname branch March 3, 2017 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants