builder@xam-power8-1:~$ uname -m
ppc64le
builder@xam-power8-1:~$ objdump -T /usr/lib/firefox/libxul.so | grep 
GLIBCXX_3.4.22
0000000000000000      DF *UND*  0000000000000000  GLIBCXX_3.4.22 
_ZNSt6thread15_M_start_threadESt10unique_ptrINS_6_StateESt14default_deleteIS1_EEPFvvE
0000000000000000      DF *UND*  0000000000000000  GLIBCXX_3.4.22 
_ZNSt6thread6_StateD2Ev

vs

root@breakfast:/# uname -m
x86_64
root@breakfast:/# objdump -T /usr/lib/firefox/libxul.so | grep GLIBCXX_3.4.22

The mangling of
std::thread::_M_start_thread(std::unique_ptr<std::thread::_State,
std::default_delete<std::thread::_State> >, void (*)()) and
std::thread::_State::~_State() is supposed to be handled by the block in
build/unix/stdc++compat/stdc++compat.cpp starting at line 104:

#if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 21)
/* Expose the definitions for the old ABI, allowing us to call its functions */
#  define _GLIBCXX_THREAD_ABI_COMPAT 1
#  include <thread>

namespace std {
/* The old ABI has a thread::_M_start_thread(shared_ptr<_Impl_base>),
 * while the new has thread::_M_start_thread(unique_ptr<_State>, void(*)()).
 * There is an intermediate ABI at version 3.4.21, with
 * thread::_M_start_thread(shared_ptr<_Impl_base>, void(*)()).
 * The void(*)() parameter is only there to keep a reference to pthread_create
 * on the caller side, and is unused in the implementation
 * We're creating an entry point for the new and intermediate ABIs, and make
 * them call the old ABI. */

__attribute__((weak)) void thread::_M_start_thread(shared_ptr<_Impl_base> impl,
                                                   void (*)()) {
  _M_start_thread(std::move(impl));
}

#  if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 22)
/* We need a _Impl_base-derived class wrapping a _State to call the old ABI
 * from what we got by diverting the new API */
struct StateWrapper : public thread::_Impl_base {
  unique_ptr<thread::_State> mState;

  StateWrapper(unique_ptr<thread::_State> aState) :
mState(std::move(aState)) {}

  void _M_run() override { mState->_M_run(); }
};

__attribute__((weak)) void thread::_M_start_thread(unique_ptr<_State> aState,
                                                   void (*)()) {
  auto impl = std::make_shared<StateWrapper>(std::move(aState));
  _M_start_thread(std::move(impl));
}

/* For some reason this is a symbol exported by new versions of libstdc++,
 * even though the destructor is default there too */
__attribute__((weak)) thread::_State::~_State() = default;
#  endif
}  // namespace std
#endif

I don't know what's broken in the build process causing this code not to
be included in ppc64el builds.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to firefox in Ubuntu.
https://bugs.launchpad.net/bugs/1819013

Title:
  Hard dependency on libstdc++ 6.1.0 at runtime on ppc64el on xenial

Status in firefox package in Ubuntu:
  Confirmed

Bug description:
  $ firefox 
  XPCOMGlueLoad error for file /usr/lib/firefox/libxul.so:
  /usr/lib/powerpc64le-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.22' not 
found (required by /usr/lib/firefox/libxul.so)
  Couldn't load XPCOM.
  $ ldd /usr/lib/firefox/libxul.so | head -1
  /usr/lib/firefox/libxul.so: /usr/lib/powerpc64le-linux-gnu/libstdc++.so.6: 
version `GLIBCXX_3.4.22' not found (required by /usr/lib/firefox/libxul.so)

  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: firefox 65.0.1+build2-0ubuntu0.16.04.1
  ProcVersionSignature: Ubuntu 4.15.0-29.31~16.04.1-generic 4.15.18
  Uname: Linux 4.15.0-29-generic ppc64le
  AddonCompatCheckDisabled: False
  AlsaDevices:
   total 0
   crw-rw---- 1 root audio 116,  1 Mar  7 10:00 seq
   crw-rw---- 1 root audio 116, 33 Mar  7 10:00 timer
  AplayDevices: Error: [Errno 2] No such file or directory: 'aplay'
  ApportVersion: 2.20.1-0ubuntu2.18
  Architecture: ppc64el
  ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord'
  AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', 
'/dev/snd/timer'] failed with exit code 1:
  BuildID: 20190215002040
  Channel: Unavailable
  Date: Thu Mar  7 10:02:49 2019
  ForcedLayersAccel: False
  InstallationDate: Installed on 2018-01-11 (419 days ago)
  InstallationMedia: Ubuntu-Server 16.04.3 LTS "Xenial Xerus" - Release ppc64el 
(20170801)
  IpRoute:
   default via 10.128.60.1 dev enP2p1s0f0 
   10.128.60.0/25 dev enP2p1s0f0  proto kernel  scope link  src 10.128.60.99
  NoProfiles: True
  PciMultimedia:
   
  ProcLoadAvg: 2.46 2.48 2.23 3/1329 109239
  ProcSwaps:
   Filename                             Type            Size    Used    Priority
   /dev/sda3                               partition    37941184        1110016 
-2
  ProcVersion: Linux version 4.15.0-29-generic (buildd@bos02-ppc64el-002) (gcc 
version 5.4.0 20160609 (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.10)) #31~16.04.1-Ubuntu 
SMP Wed Jul 18 08:50:43 UTC 2018
  RunningIncompatibleAddons: False
  SourcePackage: firefox
  UpgradeStatus: No upgrade log present (probably fresh install)
  cpu_cores: Number of cores present = 16
  cpu_coreson: Number of cores online = 16
  cpu_smt: SMT=8

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1819013/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to