Skip to content

macOS下编译失败 #247

Closed
Closed
@shuxiao9058

Description

@shuxiao9058
 librime (master) ✗ make -f Makefile.xcode                                                                                                                                                                                                                (master|✚1

cmake . -Bxbuild -GXcode -DBUILD_STATIC=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON
-- Failed to find all ICU components (missing: ICU_INCLUDE_DIR ICU_LIBRARY)
-- Boost version: 1.68.0
-- Found the following Boost libraries:
--   filesystem
--   regex
--   system
--   locale
-- Found gflags: /usr/local/lib/libgflags.dylib
-- Found glog: /Users/jiya/workspace/librime/thirdparty/lib/libglog.a
-- Found yaml-cpp: /Users/jiya/workspace/librime/thirdparty/lib/libyaml-cpp.a
-- Found leveldb: /Users/jiya/workspace/librime/thirdparty/lib/libleveldb.a
-- Found marisa: /Users/jiya/workspace/librime/thirdparty/lib/libmarisa.a
-- Found opencc: /Users/jiya/workspace/librime/thirdparty/lib/libopencc.a
-- Found X11/keysym.h at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Headers
-- Configuring done
CMake Warning (dev):
  Policy CMP0068 is not set: RPATH settings on macOS do not affect
  install_name.  Run "cmake --help-policy CMP0068" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

  For compatibility with older versions of CMake, the install_name fields for
  the following targets are still affected by RPATH settings:

   rime

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /Users/jiya/workspace/librime/xbuild
cmake --build xbuild --config Release
Prepare build
note: Using legacy build system

=== BUILD AGGREGATE TARGET ZERO_CHECK OF PROJECT rime WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/jiya/workspace/librime/xbuild/rime.build/Release/ZERO_CHECK.build/Script-24087AEA11E14D0494FA810C.sh
chmod 0755 /Users/jiya/workspace/librime/xbuild/rime.build/Release/ZERO_CHECK.build/Script-24087AEA11E14D0494FA810C.sh

PhaseScriptExecution CMake\ Rules xbuild/rime.build/Release/ZERO_CHECK.build/Script-24087AEA11E14D0494FA810C.sh
    cd /Users/jiya/workspace/librime
    /bin/sh -c /Users/jiya/workspace/librime/xbuild/rime.build/Release/ZERO_CHECK.build/Script-24087AEA11E14D0494FA810C.sh
echo ""

make -f /Users/jiya/workspace/librime/xbuild/CMakeScripts/ReRunCMake.make
make[2]: `/Users/jiya/workspace/librime/xbuild/CMakeFiles/cmake.check_cache' is up to date.

=== BUILD TARGET rime OF PROJECT rime WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/jiya/workspace/librime/xbuild/src/rime.build/Release/rime.build/Script-3C00F4D8CD5D4DB8872F8C9C.sh
chmod 0755 /Users/jiya/workspace/librime/xbuild/src/rime.build/Release/rime.build/Script-3C00F4D8CD5D4DB8872F8C9C.sh

Ld xbuild/lib/Release/librime.1.3.2.dylib normal x86_64
    cd /Users/jiya/workspace/librime
    export MACOSX_DEPLOYMENT_TARGET=10.14
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -L/Users/jiya/workspace/librime/xbuild/lib/Release -L/usr/local/lib/Release -L/usr/local/lib -L/Users/jiya/workspace/librime/thirdparty/lib/Release -L/Users/jiya/workspace/librime/thirdparty/lib -F/Users/jiya/workspace/librime/xbuild/lib/Release -filelist /Users/jiya/workspace/librime/xbuild/src/rime.build/Release/rime.build/Objects-normal/x86_64/rime.1.3.2.LinkFileList -install_name /librime.1.3.2.dylib -mmacosx-version-min=10.14 -dynamiclib -Wl,-headerpad_max_install_names -install_name @rpath/librime.1.dylib /usr/local/lib/libboost_filesystem-mt.a /usr/local/lib/libboost_regex-mt.a /usr/local/lib/libboost_system-mt.a /usr/local/lib/libboost_locale-mt.a /Users/jiya/workspace/librime/thirdparty/lib/libglog.a /Users/jiya/workspace/librime/thirdparty/lib/libyaml-cpp.a /usr/local/lib/libgflags.dylib /usr/lib/libiconv.dylib /Users/jiya/workspace/librime/thirdparty/lib/libleveldb.a /Users/jiya/workspace/librime/thirdparty/lib/libmarisa.a /Users/jiya/workspace/librime/thirdparty/lib/libopencc.a -compatibility_version 1.0.0 -current_version 1.3.2 -Xlinker -dependency_info -Xlinker /Users/jiya/workspace/librime/xbuild/src/rime.build/Release/rime.build/Objects-normal/x86_64/rime.1.3.2_dependency_info.dat -o /Users/jiya/workspace/librime/xbuild/lib/Release/librime.1.3.2.dylib
ld: warning: directory not found for option '-L/usr/local/lib/Release'
ld: warning: directory not found for option '-L/Users/jiya/workspace/librime/thirdparty/lib/Release'
Undefined symbols for architecture x86_64:
  "_UCNV_FROM_U_CALLBACK_SKIP_63", referenced from:
      boost::locale::impl_icu::icu_std_converter<char, 1>::uconv::uconv(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, boost::locale::impl_icu::cpcvt_type) in libboost_locale-mt.a(codepage.o)
  "_UCNV_FROM_U_CALLBACK_STOP_63", referenced from:
      boost::locale::impl_icu::icu_std_converter<char, 1>::uconv::uconv(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, boost::locale::impl_icu::cpcvt_type) in libboost_locale-mt.a(codepage.o)
  "_UCNV_TO_U_CALLBACK_SKIP_63", referenced from:
      boost::locale::impl_icu::icu_std_converter<char, 1>::uconv::uconv(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, boost::locale::impl_icu::cpcvt_type) in libboost_locale-mt.a(codepage.o)
  "_UCNV_TO_U_CALLBACK_STOP_63", referenced from:
      boost::locale::impl_icu::icu_std_converter<char, 1>::uconv::uconv(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, boost::locale::impl_icu::cpcvt_type) in libboost_locale-mt.a(codepage.o)
  "icu_63::UnicodeString::append(int)", referenced from:
      boost::locale::impl_icu::icu_std_converter<wchar_t, 4>::icu_checked(wchar_t const*, wchar_t const*) const in libboost_locale-mt.a(codepage.o)
  "icu_63::UnicodeString::UnicodeString(char const*, int, UConverter*, UErrorCode&)", referenced from:
      boost::locale::impl_icu::icu_std_converter<char, 1>::icu(char const*, char const*) const in libboost_locale-mt.a(codepage.o)
  "icu_63::UnicodeString::UnicodeString(int, int, int)", referenced from:
      boost::locale::impl_icu::icu_std_converter<wchar_t, 4>::icu_checked(wchar_t const*, wchar_t const*) const in libboost_locale-mt.a(codepage.o)
  "icu_63::UnicodeString::~UnicodeString()", referenced from:
      boost::locale::conv::impl::uconv_between::convert(char const*, char const*) in libboost_locale-mt.a(codepage.o)
      boost::locale::impl_icu::icu_std_converter<char, 1>::icu(char const*, char const*) const in libboost_locale-mt.a(codepage.o)
      boost::locale::conv::impl::uconv_to_utf<char>::convert(char const*, char const*) in libboost_locale-mt.a(codepage.o)
      boost::locale::conv::impl::uconv_from_utf<char>::convert(char const*, char const*) in libboost_locale-mt.a(codepage.o)
      boost::locale::conv::impl::uconv_to_utf<wchar_t>::convert(char const*, char const*) in libboost_locale-mt.a(codepage.o)
      boost::locale::conv::impl::uconv_from_utf<wchar_t>::convert(wchar_t const*, wchar_t const*) in libboost_locale-mt.a(codepage.o)
      boost::locale::impl_icu::icu_std_converter<wchar_t, 4>::icu_checked(wchar_t const*, wchar_t const*) const in libboost_locale-mt.a(codepage.o)
      ...
  "_u_errorName_63", referenced from:
      boost::locale::impl_icu::icu_std_converter<char, 1>::uconv::uconv(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, boost::locale::impl_icu::cpcvt_type) in libboost_locale-mt.a(codepage.o)
      boost::locale::impl_icu::icu_std_converter<char, 1>::icu(char const*, char const*) const in libboost_locale-mt.a(codepage.o)
      boost::locale::impl_icu::icu_std_converter<char, 1>::uconv::go(char16_t const*, int, int) in libboost_locale-mt.a(codepage.o)
      boost::locale::impl_icu::icu_std_converter<wchar_t, 4>::std(icu_63::UnicodeString const&) const in libboost_locale-mt.a(codepage.o)
  "_u_strToUTF32_63", referenced from:
      boost::locale::impl_icu::icu_std_converter<wchar_t, 4>::std(icu_63::UnicodeString const&) const in libboost_locale-mt.a(codepage.o)
  "_ucnv_close_63", referenced from:
      boost::locale::impl_icu::icu_std_converter<char, 1>::icu_std_converter(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, boost::locale::impl_icu::cpcvt_type) in libboost_locale-mt.a(codepage.o)
      boost::locale::impl_icu::icu_std_converter<char, 1>::uconv::uconv(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, boost::locale::impl_icu::cpcvt_type) in libboost_locale-mt.a(codepage.o)
      boost::locale::impl_icu::icu_std_converter<char, 1>::std(icu_63::UnicodeString const&) const in libboost_locale-mt.a(codepage.o)
      boost::locale::impl_icu::icu_std_converter<char, 1>::icu(char const*, char const*) const in libboost_locale-mt.a(codepage.o)
  "_ucnv_fromUChars_63", referenced from:
      boost::locale::impl_icu::icu_std_converter<char, 1>::uconv::go(char16_t const*, int, int) in libboost_locale-mt.a(codepage.o)
  "_ucnv_getMaxCharSize_63", referenced from:
      boost::locale::impl_icu::icu_std_converter<char, 1>::icu_std_converter(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, boost::locale::impl_icu::cpcvt_type) in libboost_locale-mt.a(codepage.o)
  "_ucnv_open_63", referenced from:
      boost::locale::impl_icu::icu_std_converter<char, 1>::uconv::uconv(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, boost::locale::impl_icu::cpcvt_type) in libboost_locale-mt.a(codepage.o)
  "_ucnv_setFromUCallBack_63", referenced from:
      boost::locale::impl_icu::icu_std_converter<char, 1>::uconv::uconv(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, boost::locale::impl_icu::cpcvt_type) in libboost_locale-mt.a(codepage.o)
  "_ucnv_setToUCallBack_63", referenced from:
      boost::locale::impl_icu::icu_std_converter<char, 1>::uconv::uconv(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, boost::locale::impl_icu::cpcvt_type) in libboost_locale-mt.a(codepage.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions