Bug 241944 - graphics/pcl-pointclouds: fix build on powerpc64 with clang
Summary: graphics/pcl-pointclouds: fix build on powerpc64 with clang
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Yuri Victorovich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-13 11:02 UTC by Piotr Kubaj
Modified: 2019-11-29 13:24 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (yuri)


Attachments
patch (336 bytes, patch)
2019-11-13 11:02 UTC, Piotr Kubaj
no flags Details | Diff
v2 (334 bytes, patch)
2019-11-13 11:14 UTC, Piotr Kubaj
pkubaj: maintainer-approval? (yuri)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer 2019-11-13 11:02:43 UTC
Created attachment 209128 [details]
patch

I'm getting the following lld failure on powerpc64:
ld: error: relocation refers to a discarded section: .text.__clang_call_terminate
>>> defined in common/CMakeFiles/pcl_common.dir/src/pcl_base.cpp.o
>>> section group signature: __clang_call_terminate
>>> prevailing definition is in common/CMakeFiles/pcl_common.dir/src/point_types.cpp.o
>>> referenced by pcl_base.cpp
>>>               common/CMakeFiles/pcl_common.dir/src/pcl_base.cpp.o:(pcl::PCLBase<pcl::PCLPointCloud2>::initCompute())

ld: error: relocation refers to a discarded section: .text._ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m
>>> defined in common/CMakeFiles/pcl_common.dir/src/io.cpp.o
>>> section group signature: _ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m
>>> prevailing definition is in common/CMakeFiles/pcl_common.dir/src/point_types.cpp.o
>>> referenced by io.cpp
>>>               common/CMakeFiles/pcl_common.dir/src/io.cpp.o:(getFieldsSizes(std::__1::vector<pcl::PCLPointField, std::__1::allocator<pcl::PCLPointField> > const&, std::__1::vector<int, std::__1::allocator<int> >&))

ld: error: relocation refers to a discarded section: .text._ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_
>>> defined in common/CMakeFiles/pcl_common.dir/src/io.cpp.o
>>> section group signature: _ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_
>>> prevailing definition is in common/CMakeFiles/pcl_common.dir/src/point_types.cpp.o
>>> referenced by io.cpp
>>>               common/CMakeFiles/pcl_common.dir/src/io.cpp.o:(getFieldsSizes(std::__1::vector<pcl::PCLPointField, std::__1::allocator<pcl::PCLPointField> > const&, std::__1::vector<int, std::__1::allocator<int> >&))

ld: error: relocation refers to a discarded section: .text.__clang_call_terminate
>>> defined in common/CMakeFiles/pcl_common.dir/src/io.cpp.o
>>> section group signature: __clang_call_terminate
>>> prevailing definition is in common/CMakeFiles/pcl_common.dir/src/point_types.cpp.o
>>> referenced by io.cpp
>>>               common/CMakeFiles/pcl_common.dir/src/io.cpp.o:(getFieldsSizes(std::__1::vector<pcl::PCLPointField, std::__1::allocator<pcl::PCLPointField> > const&, std::__1::vector<int, std::__1::allocator<int> >&))

ld: error: relocation refers to a discarded section: .text._ZNSt3__120__throw_length_errorEPKc
>>> defined in common/CMakeFiles/pcl_common.dir/src/io.cpp.o
>>> section group signature: _ZNSt3__120__throw_length_errorEPKc
>>> prevailing definition is in common/CMakeFiles/pcl_common.dir/src/pcl_base.cpp.o
>>> referenced by io.cpp
>>>               common/CMakeFiles/pcl_common.dir/src/io.cpp.o:(getFieldsSizes(std::__1::vector<pcl::PCLPointField, std::__1::allocator<pcl::PCLPointField> > const&, std::__1::vector<int, std::__1::allocator<int> >&))

ld: error: relocation refers to a discarded section: .text._ZNSt12length_errorC2EPKc
>>> defined in common/CMakeFiles/pcl_common.dir/src/io.cpp.o
>>> section group signature: _ZNSt12length_errorC2EPKc
>>> prevailing definition is in common/CMakeFiles/pcl_common.dir/src/pcl_base.cpp.o
>>> referenced by io.cpp
>>>               common/CMakeFiles/pcl_common.dir/src/io.cpp.o:(getFieldsSizes(std::__1::vector<pcl::PCLPointField, std::__1::allocator<pcl::PCLPointField> > const&, std::__1::vector<int, std::__1::allocator<int> >&))

ld: error: relocation refers to a discarded section: .text._ZNSt3__16vectorIiNS_9allocatorIiEEE8__appendEm
>>> defined in common/CMakeFiles/pcl_common.dir/src/io.cpp.o
>>> section group signature: _ZNSt3__16vectorIiNS_9allocatorIiEEE8__appendEm
>>> prevailing definition is in common/CMakeFiles/pcl_common.dir/src/pcl_base.cpp.o
>>> referenced by io.cpp
>>>               common/CMakeFiles/pcl_common.dir/src/io.cpp.o:(pcl::PCLException::createDetailedMessage(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const*, char const*, unsigned int))

ld: error: relocation refers to a discarded section: .text._ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m
>>> defined in common/CMakeFiles/pcl_common.dir/src/correspondence.cpp.o
>>> section group signature: _ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m
>>> prevailing definition is in common/CMakeFiles/pcl_common.dir/src/point_types.cpp.o
>>> referenced by correspondence.cpp
>>>               common/CMakeFiles/pcl_common.dir/src/correspondence.cpp.o:(pcl::getRejectedQueryIndices(std::__1::vector<pcl::Correspondence, Eigen::aligned_allocator<pcl::Correspondence> > const&, std::__1::vector<pcl::Correspondence, Eigen::aligned_allocator<pcl::Correspondence> > const&, std::__1::vector<int, std::__1::allocator<int> >&, bool))

ld: error: relocation refers to a discarded section: .text._ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_
>>> defined in common/CMakeFiles/pcl_common.dir/src/correspondence.cpp.o
>>> section group signature: _ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_
>>> prevailing definition is in common/CMakeFiles/pcl_common.dir/src/point_types.cpp.o
>>> referenced by correspondence.cpp
>>>               common/CMakeFiles/pcl_common.dir/src/correspondence.cpp.o:(pcl::getRejectedQueryIndices(std::__1::vector<pcl::Correspondence, Eigen::aligned_allocator<pcl::Correspondence> > const&, std::__1::vector<pcl::Correspondence, Eigen::aligned_allocator<pcl::Correspondence> > const&, std::__1::vector<int, std::__1::allocator<int> >&, bool))

ld: error: relocation refers to a discarded section: .text.__clang_call_terminate
>>> defined in common/CMakeFiles/pcl_common.dir/src/correspondence.cpp.o
>>> section group signature: __clang_call_terminate
>>> prevailing definition is in common/CMakeFiles/pcl_common.dir/src/point_types.cpp.o
>>> referenced by correspondence.cpp
>>>               common/CMakeFiles/pcl_common.dir/src/correspondence.cpp.o:(pcl::getRejectedQueryIndices(std::__1::vector<pcl::Correspondence, Eigen::aligned_allocator<pcl::Correspondence> > const&, std::__1::vector<pcl::Correspondence, Eigen::aligned_allocator<pcl::Correspondence> > const&, std::__1::vector<int, std::__1::allocator<int> >&, bool))

ld: error: relocation refers to a discarded section: .text._ZNSt3__120__throw_length_errorEPKc
>>> defined in common/CMakeFiles/pcl_common.dir/src/correspondence.cpp.o
>>> section group signature: _ZNSt3__120__throw_length_errorEPKc
>>> prevailing definition is in common/CMakeFiles/pcl_common.dir/src/pcl_base.cpp.o
>>> referenced by correspondence.cpp
>>>               common/CMakeFiles/pcl_common.dir/src/correspondence.cpp.o:(pcl::getRejectedQueryIndices(std::__1::vector<pcl::Correspondence, Eigen::aligned_allocator<pcl::Correspondence> > const&, std::__1::vector<pcl::Correspondence, Eigen::aligned_allocator<pcl::Correspondence> > const&, std::__1::vector<int, std::__1::allocator<int> >&, bool))

ld: error: relocation refers to a discarded section: .text._ZNSt12length_errorC2EPKc
>>> defined in common/CMakeFiles/pcl_common.dir/src/correspondence.cpp.o
>>> section group signature: _ZNSt12length_errorC2EPKc
>>> prevailing definition is in common/CMakeFiles/pcl_common.dir/src/pcl_base.cpp.o
>>> referenced by correspondence.cpp
>>>               common/CMakeFiles/pcl_common.dir/src/correspondence.cpp.o:(pcl::getRejectedQueryIndices(std::__1::vector<pcl::Correspondence, Eigen::aligned_allocator<pcl::Correspondence> > const&, std::__1::vector<pcl::Correspondence, Eigen::aligned_allocator<pcl::Correspondence> > const&, std::__1::vector<int, std::__1::allocator<int> >&, bool))

ld: error: relocation refers to a discarded section: .text._ZNSt3__16vectorIiNS_9allocatorIiEEE8__appendEm
>>> defined in common/CMakeFiles/pcl_common.dir/src/correspondence.cpp.o
>>> section group signature: _ZNSt3__16vectorIiNS_9allocatorIiEEE8__appendEm
>>> prevailing definition is in common/CMakeFiles/pcl_common.dir/src/pcl_base.cpp.o
>>> referenced by correspondence.cpp
>>>               common/CMakeFiles/pcl_common.dir/src/correspondence.cpp.o:(pcl::getRejectedQueryIndices(std::__1::vector<pcl::Correspondence, Eigen::aligned_allocator<pcl::Correspondence> > const&, std::__1::vector<pcl::Correspondence, Eigen::aligned_allocator<pcl::Correspondence> > const&, std::__1::vector<int, std::__1::allocator<int> >&, bool))

ld: error: relocation refers to a discarded section: .text.__clang_call_terminate
>>> defined in common/CMakeFiles/pcl_common.dir/src/parse.cpp.o
>>> section group signature: __clang_call_terminate
>>> prevailing definition is in common/CMakeFiles/pcl_common.dir/src/point_types.cpp.o
>>> referenced by parse.cpp
>>>               common/CMakeFiles/pcl_common.dir/src/parse.cpp.o:(pcl::console::parse_x_arguments(int, char const* const*, char const*, std::__1::vector<double, std::__1::allocator<double> >&))

ld: error: relocation refers to a discarded section: .text._ZNSt3__120__throw_length_errorEPKc
>>> defined in common/CMakeFiles/pcl_common.dir/src/parse.cpp.o
>>> section group signature: _ZNSt3__120__throw_length_errorEPKc
>>> prevailing definition is in common/CMakeFiles/pcl_common.dir/src/pcl_base.cpp.o
>>> referenced by parse.cpp
>>>               common/CMakeFiles/pcl_common.dir/src/parse.cpp.o:(pcl::console::parse_x_arguments(int, char const* const*, char const*, std::__1::vector<double, std::__1::allocator<double> >&))

ld: error: relocation refers to a discarded section: .text._ZNSt12length_errorC2EPKc
>>> defined in common/CMakeFiles/pcl_common.dir/src/parse.cpp.o
>>> section group signature: _ZNSt12length_errorC2EPKc
>>> prevailing definition is in common/CMakeFiles/pcl_common.dir/src/pcl_base.cpp.o
>>> referenced by parse.cpp
>>>               common/CMakeFiles/pcl_common.dir/src/parse.cpp.o:(pcl::console::parse_x_arguments(int, char const* const*, char const*, std::__1::vector<double, std::__1::allocator<double> >&))

ld: error: relocation refers to a discarded section: .text._ZNSt3__16vectorIiNS_9allocatorIiEEE8__appendEm
>>> defined in common/CMakeFiles/pcl_common.dir/src/parse.cpp.o
>>> section group signature: _ZNSt3__16vectorIiNS_9allocatorIiEEE8__appendEm
>>> prevailing definition is in common/CMakeFiles/pcl_common.dir/src/pcl_base.cpp.o
>>> referenced by parse.cpp
>>>               common/CMakeFiles/pcl_common.dir/src/parse.cpp.o:(pcl::console::parse_x_arguments(int, char const* const*, char const*, std::__1::vector<double, std::__1::allocator<double> >&))

ld: error: relocation refers to a discarded section: .text._ZNSt3__120__throw_length_errorEPKc
>>> defined in common/CMakeFiles/pcl_common.dir/src/poses_from_matches.cpp.o
>>> section group signature: _ZNSt3__120__throw_length_errorEPKc
>>> prevailing definition is in common/CMakeFiles/pcl_common.dir/src/pcl_base.cpp.o
>>> referenced by poses_from_matches.cpp
>>>               common/CMakeFiles/pcl_common.dir/src/poses_from_matches.cpp.o:(pcl::TransformationFromCorrespondences::getTransformation())

ld: error: relocation refers to a discarded section: .text._ZNSt12length_errorC2EPKc
>>> defined in common/CMakeFiles/pcl_common.dir/src/poses_from_matches.cpp.o
>>> section group signature: _ZNSt12length_errorC2EPKc
>>> prevailing definition is in common/CMakeFiles/pcl_common.dir/src/pcl_base.cpp.o
>>> referenced by poses_from_matches.cpp
>>>               common/CMakeFiles/pcl_common.dir/src/poses_from_matches.cpp.o:(pcl::TransformationFromCorrespondences::getTransformation())

ld: error: relocation refers to a discarded section: .text.__clang_call_terminate
>>> defined in common/CMakeFiles/pcl_common.dir/src/time_trigger.cpp.o
>>> section group signature: __clang_call_terminate
>>> prevailing definition is in common/CMakeFiles/pcl_common.dir/src/point_types.cpp.o
>>> referenced by time_trigger.cpp
>>>               common/CMakeFiles/pcl_common.dir/src/time_trigger.cpp.o:(boost::system::error_category::default_error_condition(int) const)

Switch to linking with GNU ld to fix build.
Comment 1 Piotr Kubaj freebsd_committer 2019-11-13 11:14:05 UTC
Created attachment 209129 [details]
v2

Use LLD_UNSAFE instead.
Comment 2 commit-hook freebsd_committer 2019-11-29 13:24:14 UTC
A commit references this bug:

Author: pkubaj
Date: Fri Nov 29 13:23:22 UTC 2019
New revision: 518648
URL: https://svnweb.freebsd.org/changeset/ports/518648

Log:
  graphics/pcl-pointclouds: fix build on powerpc64 with clang

  lld on powerpc64 elfv2 can't link this port, add LLD_UNSAFE=yes:
  ld: error: relocation refers to a discarded section: .text.__clang_call_terminate
  >>> defined in common/CMakeFiles/pcl_common.dir/src/pcl_base.cpp.o
  >>> section group signature: __clang_call_terminate
  >>> prevailing definition is in common/CMakeFiles/pcl_common.dir/src/point_types.cpp.o
  >>> referenced by pcl_base.cpp
  >>>               common/CMakeFiles/pcl_common.dir/src/pcl_base.cpp.o:(pcl::PCLBase<pcl::PCLPointCloud2>::initCompute())

  PR:		241944
  Approved by:	mentors (implicit approval), yuri (maintainer timeout)

Changes:
  head/graphics/pcl-pointclouds/Makefile