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

[cmake] fix capi_exp build failed #59076

Merged
merged 1 commit into from Nov 17, 2023

Conversation

gouzil
Copy link
Member

@gouzil gouzil commented Nov 16, 2023

PR types

Bug fixes

PR changes

Others

Description

修复libpaddle_inference_c.dylib编译错误

FAILED: paddle/fluid/inference/capi_exp/libpaddle_inference_c.dylib
: && /opt/homebrew/bin/ccache /Library/Developer/CommandLineTools/usr/bin/c++ -DCRYPTOPP_ARM_CRC32_AVAILABLE=0 -std=c++17 -Wno-deprecated-register -Werror=format -Werror=inconsistent-missing-override -Werror=braced-scalar-init -Werror=uninitialized -Werror=tautological-constant-out-of-range-compare -Werror=literal-conversion -Werror=pragma-pack -Werror=c++17-extensions  -fPIC -O3 -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk -mmacosx-version-min=14.1 -dynamiclib -Wl,-headerpad_max_install_names  -o paddle/fluid/inference/capi_exp/libpaddle_inference_c.dylib -install_name @rpath/libpaddle_inference_c.dylib paddle/fluid/inference/capi_exp/CMakeFiles/paddle_inference_c_shared.dir/pd_config.cc.o paddle/fluid/inference/capi_exp/CMakeFiles/paddle_inference_c_shared.dir/pd_predictor.cc.o paddle/fluid/inference/capi_exp/CMakeFiles/paddle_inference_c_shared.dir/pd_tensor.cc.o paddle/fluid/inference/capi_exp/CMakeFiles/paddle_inference_c_shared.dir/pd_utils.cc.o  third_party/install/glog/lib/libglog.a  paddle/fluid/inference/libpaddle_inference.a  third_party/install/xxhash/lib/libxxhash.a  third_party/install/utf8proc/lib/libutf8proc.a  third_party/install/cryptopp/lib/libcryptopp.a  third_party/install/protobuf/lib/libprotobuf.a  paddle/phi/libphi.a  libcblas.a  third_party/install/xxhash/lib/libxxhash.a  third_party/install/utf8proc/lib/libutf8proc.a  third_party/install/openblas/lib/libopenblas.a  paddle/phi/api/profiler/libphi_profiler_proto.a  paddle/phi/core/distributed/auto_parallel/libauto_parallel_proto.a  third_party/install/protobuf/lib/libprotobuf.a  paddle/utils/libpaddle_flags.a  third_party/install/glog/lib/libglog.a && :
ld: warning: ignoring duplicate libraries: 'third_party/install/glog/lib/libglog.a', 'third_party/install/protobuf/lib/libprotobuf.a', 'third_party/install/utf8proc/lib/libutf8proc.a', 'third_party/install/xxhash/lib/libxxhash.a'
ld: Undefined symbols:
  pir::Float16Type::get(pir::IrContext*), referenced from:
      paddle::dialect::TransToIrDataType(phi::DataType, pir::IrContext*) in libpaddle_inference.a[1589](manual_op.cc.o)
      paddle::dialect::ParameterConvertInterface::VariableToParameter(paddle::framework::Variable*) in libpaddle_inference.a[1593](param_to_variable.cc.o)
      paddle::dialect::TransToIrDataType(phi::DataType, pir::IrContext*) in libpaddle_inference.a[1596](pd_op.cc.o)
      paddle::dialect::TransToIrDataType(phi::DataType, pir::IrContext*) in libpaddle_inference.a[1611](pd_op_to_kernel_pass.cc.o)
      std::__1::__function::__func<paddle::translator::TypeTranslator::TypeTranslator()::$_6, std::__1::allocator<paddle::translator::TypeTranslator::TypeTranslator()::$_6>, pir::Type (pir::IrContext*, paddle::framework::VarDesc const&)>::operator()(pir::IrContext*&&, paddle::framework::VarDesc const&) in libpaddle_inference.a[1626](type_translator.cc.o)
  pir::Float32Type::get(pir::IrContext*), referenced from:
      paddle::dialect::TransToIrDataType(phi::DataType, pir::IrContext*) in libpaddle_inference.a[1589](manual_op.cc.o)
      paddle::dialect::ParameterConvertInterface::VariableToParameter(paddle::framework::Variable*) in libpaddle_inference.a[1593](param_to_variable.cc.o)
      paddle::dialect::TransToIrDataType(phi::DataType, pir::IrContext*) in libpaddle_inference.a[1596](pd_op.cc.o)
      paddle::dialect::BuildOutputs(pir::Operation*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, phi::KernelKey const&, pir::IrContext*) in libpaddle_inference.a[1611](pd_op_to_kernel_pass.cc.o)

...

Copy link

paddle-bot bot commented Nov 16, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot bot added the contributor External developers label Nov 16, 2023
@risemeup1 risemeup1 merged commit adb7ba6 into PaddlePaddle:develop Nov 17, 2023
28 checks passed
SecretXV pushed a commit to SecretXV/Paddle that referenced this pull request Nov 28, 2023
@SigureMo SigureMo added the HappyOpenSource 快乐开源活动issue与PR label Dec 7, 2023
@gouzil gouzil deleted the fix_capi_exp_build branch December 27, 2023 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants