From 9cc74b0b688396be0f12c0c4c6593cfaccdd2489 Mon Sep 17 00:00:00 2001 From: Marvin Schmidt Date: Tue, 20 Oct 2020 00:11:14 +0200 Subject: Fix symbol visibility errors with clang LabelsDepSpec visibility: 133: >>> test action_TEST 133: Traceback (most recent call last): 133: File "/home/marv/devel/paludis-worktrees/master/python/action_TEST.py", line 21, in 133: from paludis import * 133: ImportError: /home/marv/devel/paludis-worktrees/master/build-clang/python/libpaludispython_3.0.so.300: undefined symbol: _ZN7paludis19spec_tree_internals14BasicInne rNodeINS_8SpecTreeINS_13TypeListEntryINS_20SpecTreeLeafNodeTypeINS_14PackageDepSpecEEENS3_INS4_INS_12BlockDepSpecEEENS3_INS4_INS_13LabelsDepSpecINS_17DependenciesLabelEE EEENS3_INS4_INS_15NamedSetDepSpecEEENS3_INS_21SpecTreeInnerNodeTypeINS_10AllDepSpecEEENS3_INSF_INS_10AnyDepSpecEEENS3_INSF_INS_18ConditionalDepSpecEEENS_12TypeListTailEE EEEEEEEEEEEEESG_EEE6appendISB_EESt10shared_ptrINSU_8NodeTypeIT_E4TypeEERKSX_ISZ_E 133: >>> test action_TEST returned 1 [1s] 133: >>> exiting with error for test action_TEST 1/1 Test #133: python_action ....................***Failed 0.03 sec The missing symbol is: std::shared_ptr>::Type> paludis::spec_tree_internals::BasicInnerNode>::append< paludis::LabelsDepSpec>( std::shared_ptr > const&) => Move LabelsDepSpec instantiation to header file Missing dep_spec.hh include: 133: >>> test action_TEST 133: Traceback (most recent call last): 133: File "/home/marv/devel/paludis-worktrees/master/python/action_TEST.py", line 21, in 133: from paludis import * 133: ImportError: /home/marv/devel/paludis-worktrees/master/build-clang/python/libpaludispython_3.0.so.300: undefined symbol: _ZN7paludis19spec_tree_internals14BasicInnerNodeINS_8SpecTreeINS_13TypeListEntryINS_20SpecTreeLeafNodeTypeINS_14PackageDepSpecEEENS3_INS4_INS_12BlockDepSpecEEENS3_INS4_INS_13LabelsDepSpecINS_17DependenciesLabelEEEEENS3_INS4_INS_15NamedSetDepSpecEEENS3_INS_21SpecTreeInnerNodeTypeINS_10AllDepSpecEEENS3_INSF_INS_10AnyDepSpecEEENS3_INSF_INS_18ConditionalDepSpecEEENS_12TypeListTailEEEEEEEEEEEEEEESG_EEE6appendISD_EESt10shared_ptrINSU_8NodeTypeIT_E4TypeEERKSX_ISZ_E 133: >>> test action_TEST returned 1 [0s] 133: >>> exiting with error for test action_TEST 1/1 Test #133: python_action ....................***Failed 0.03 sec The missing symbol is: std::shared_ptr::Type> paludis::spec_tree_internals::BasicInnerNode::append< paludis::NamedSetDepSpec>(std::shared_ptr const&) => Provide full type for NamedSetDepSpec --- paludis/dep_spec.cc | 4 ++-- paludis/dep_spec.hh | 3 +++ paludis/spec_tree.cc | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/paludis/dep_spec.cc b/paludis/dep_spec.cc index fc5c98139..e603fc443 100644 --- a/paludis/dep_spec.cc +++ b/paludis/dep_spec.cc @@ -641,8 +641,8 @@ PackageDepSpec::data() const namespace paludis { - template class PALUDIS_VISIBLE LabelsDepSpec; - template class PALUDIS_VISIBLE LabelsDepSpec; + template class LabelsDepSpec; + template class LabelsDepSpec; template class Cloneable; template class Pimp; diff --git a/paludis/dep_spec.hh b/paludis/dep_spec.hh index d4e5f5746..a74711329 100644 --- a/paludis/dep_spec.hh +++ b/paludis/dep_spec.hh @@ -710,6 +710,9 @@ namespace paludis const std::string label() const PALUDIS_ATTRIBUTE((warn_unused_result)); }; + extern template class PALUDIS_VISIBLE LabelsDepSpec; + extern template class PALUDIS_VISIBLE LabelsDepSpec; + extern template class PALUDIS_VISIBLE WrappedForwardIterator >; extern template class PALUDIS_VISIBLE WrappedForwardIterator #include #include #include -- cgit v1.2.3