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

mac cmake 通过 make 报错了 #118

Open
leezer3379 opened this issue Jul 25, 2019 · 6 comments
Open

mac cmake 通过 make 报错了 #118

leezer3379 opened this issue Jul 25, 2019 · 6 comments

Comments

@leezer3379
Copy link

Scanning dependencies of target qconf_agent
[ 2%] Building CXX object agent/CMakeFiles/qconf_agent.dir/qconf_agent.cc.o
[ 4%] Building CXX object agent/CMakeFiles/qconf_agent.dir/qconf_cmd.cc.o
[ 6%] Building CXX object agent/CMakeFiles/qconf_agent.dir/qconf_config.cc.o
[ 9%] Building CXX object agent/CMakeFiles/qconf_agent.dir/qconf_daemon.cc.o
[ 11%] Building CXX object agent/CMakeFiles/qconf_agent.dir/qconf_dump.cc.o
[ 13%] Building CXX object agent/CMakeFiles/qconf_agent.dir/qconf_feedback.cc.o
[ 16%] Building CXX object agent/CMakeFiles/qconf_agent.dir/qconf_gray.cc.o
[ 18%] Building CXX object agent/CMakeFiles/qconf_agent.dir/qconf_lock.cc.o
[ 20%] Building CXX object agent/CMakeFiles/qconf_agent.dir/qconf_script.cc.o
[ 23%] Building CXX object agent/CMakeFiles/qconf_agent.dir/qconf_watcher.cc.o
[ 25%] Building CXX object agent/CMakeFiles/qconf_agent.dir/qconf_zoo.cc.o
[ 27%] Building CXX object agent/CMakeFiles/qconf_agent.dir//base/qconf_format.cc.o
[ 30%] Building CXX object agent/CMakeFiles/qconf_agent.dir/
/base/qconf_log.cc.o
[ 32%] Building CXX object agent/CMakeFiles/qconf_agent.dir//base/qconf_msg.cc.o
[ 34%] Building CXX object agent/CMakeFiles/qconf_agent.dir/
/base/qconf_shm.cc.o
[ 37%] Building CXX object agent/CMakeFiles/qconf_agent.dir//base/qlibc/md5.c.o
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
[ 39%] Building CXX object agent/CMakeFiles/qconf_agent.dir/
/base/qlibc/qhash.c.o
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
[ 41%] Building CXX object agent/CMakeFiles/qconf_agent.dir/__/base/qlibc/qhasharr.c.o
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
[ 44%] Linking CXX executable qconf_agent
Undefined symbols for architecture x86_64:
"_libintl_dgettext", referenced from:
_gdbm_strerror in libgdbm.a(gdbmerrno.o)
_gdbm_fetch in libgdbm.a(gdbmfetch.o)
_gdbm_store in libgdbm.a(gdbmstore.o)
__gdbm_alloc in libgdbm.a(falloc.o)
_push_avail_block in libgdbm.a(falloc.o)
__gdbm_end_update in libgdbm.a(update.o)
__gdbm_fatal in libgdbm.a(update.o)
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [agent/qconf_agent] Error 1
make[1]: *** [agent/CMakeFiles/qconf_agent.dir/all] Error 2
make: *** [all] Error 2

@FakeRocker
Copy link

我也遇到了同样的问题,一毛一样

@1366101575
Copy link

我也遇到了这个问题,哪位大佬知道咋解决么

@leezer3379
Copy link
Author

有的,联系我289684113

@QingGo
Copy link

QingGo commented Oct 1, 2020

就没有人解决问题以后顺便分享一下的吗?

我的办法是参考https://github.com/Homebrew/homebrew-core/issues/22349#issuecomment-354777218,

mv /usr/local/include/libintl.h ~/temp
mv /usr/local/lib/libintl.a ~/temp 

然后就可以了,记得要用cmake2.x版本。

@Thinklong
Copy link

就没有人解决问题以后顺便分享一下的吗?

我的办法是参考https://github.com/Homebrew/homebrew-core/issues/22349#issuecomment-354777218,

mv /usr/local/include/libintl.h ~/temp
mv /usr/local/lib/libintl.a ~/temp 

然后就可以了,记得要用cmake2.x版本。

很有用,cmake必须用2.x版本,附2.x版本链接

@lwx2615
Copy link

lwx2615 commented Apr 17, 2021

cmake --version
cmake version 3.13.4
可以正常编译

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants