[oi-dev] Firefox build - Link problems

Carsten Grzemba grzemba at contac-dt.de
Tue Mar 9 09:57:16 UTC 2021



Am 09.03.21 09:38 schrieb "Joshua M. Clulow"  <josh at sysmgr.org>: 
> 
> On Tue, 9 Mar 2021 at 00:35, Carsten Grzemba via oi-dev
> <oi-dev at openindiana.org> wrote:
> > I attempt to build newer Firefox for OI, but my results alwas run in core dumps early on start or later on exit. One of them is demonstrated here.
> > Our current userland toolchain use gcc7, but with gcc7 I get an strange memory allocation error of g++, so I switched to gcc10. Here cores 'js' in libicu. libicu is build with gcc7:
> >
> > here is shown libstdc++ of gcc7 and gcc10 is loaded:
> > $ pldd core
> > core 'core' of 2496: ./js
> > /lib/amd64/libpthread.so.1
> > /lib/amd64/libsocket.so.1
> > /usr/lib/amd64/libffi.so.6.0.4
> > /usr/lib/amd64/libicui18n.so.66.1
> > /usr/lib/amd64/libicuuc.so.66.1
> > /usr/lib/amd64/libicudata.so.66.1
> > /usr/lib/mps/amd64/libplds4.so
> > /usr/lib/mps/amd64/libplc4.so
> > /usr/lib/mps/amd64/libnspr4.so
> > /lib/amd64/libdl.so.1
> > /lib/amd64/librt.so.1
> > /usr/lib/amd64/libz.so.1.2.11
> > /lib/amd64/libm.so.2
> > /lib/amd64/libnsl.so.1
> > /usr/gcc/10/lib/amd64/libstdc++.so.6.0.28
> > /usr/gcc/10/lib/amd64/libgcc_s.so.1
> > /lib/amd64/libc.so.1
> > /usr/gcc/7/lib/amd64/libstdc++.so.6.0.24
> > /usr/gcc/7/lib/amd64/libgcc_s.so.1
> >
> > if I modify the rpath to load the gcc7 libs:
> > $ elfedit -e 'dyn:value -s RPATH "$ORIGIN:/usr/lib/mps/amd64:/usr/gcc/7/lib/amd64"' js
> > the 'js' binary runs without core and an 'pldd' shows the libs of gcc7 only are loaded.
> 
> What was the RPATH/RUNPATH value before you modified it?
> 
 [20] RPATH 0x19c635 /usr/gcc/10/lib/amd64:$ORIGIN

I had to add the /usr/lib/mps/amd64 path anyway
 
> 
> 
> 
> It might help to use "ldd -v" on the actual binary (rather than the
> core) to see more details about why the runtime link editor decided to
> load each copy of libstdc++...
> 
because I have js modified already, here of xpcshell, the unmodified rpath

 [27] RUNPATH 0x6327 /usr/gcc/10/lib/amd64:$ORIGIN
 [28] RPATH 0x6327 /usr/gcc/10/lib/amd64:$ORIGIN
 
$ ldd -v xpcshell
..8<..
 find object=libstdc++.so.6; required by xpcshell
 libstdc++.so.6 => /usr/gcc/10/lib/amd64/libstdc++.so.6
 find version=libstdc++.so.6
 libstdc++.so.6 (GLIBCXX_3.4.21) => /usr/gcc/10/lib/amd64/libstdc++.so.6
 libstdc++.so.6 (CXXABI_1.3) => /usr/gcc/10/lib/amd64/libstdc++.so.6
 
..8<..
  find object=libstdc++.so.6; required by /ws/grzemba/oi-userland/components/web/firefox/build/amd64/dist/bin/libxul.so
 find version=libstdc++.so.6
 libstdc++.so.6 (GLIBCXX_3.4.26) => /usr/gcc/10/lib/amd64/libstdc++.so.6
 libstdc++.so.6 (CXXABI_1.3.5) => /usr/gcc/10/lib/amd64/libstdc++.so.6
 
..8<..
  find object=libstdc++.so.6; required by /usr/lib/64/libicui18n.so.66
 libstdc++.so.6 => /usr/gcc/7/lib/amd64/libstdc++.so.6
 find version=libstdc++.so.6
 libstdc++.so.6 (GLIBCXX_3.4) => /usr/gcc/7/lib/amd64/libstdc++.so.6
 libstdc++.so.6 (CXXABI_1.3.9) => /usr/gcc/7/lib/amd64/libstdc++.so.6
 
..8<..
  find object=libstdc++.so.6; required by /usr/lib/64/libicuuc.so.66
 find version=libstdc++.so.6
 libstdc++.so.6 (GLIBCXX_3.4.11) => /usr/gcc/7/lib/amd64/libstdc++.so.6
 libstdc++.so.6 (CXXABI_1.3.9) => /usr/gcc/7/lib/amd64/libstdc++.so.6
 ..8<..
 
It seems so far   correct  but it do not works so.

$ pstack core | c++filt 
core 'core' of 6259: ./xpcshell
--------------------- thread# 1 / lwp# 1 ---------------------
 0000000000000000 ???????? ()
 fffffbffedab1408 icu_66::umtx_initImplPreInit(icu_66::UInitOnce&) () + 78
 fffffbffedab195c u_init_66 () + 4c
 fffffbffe5f7a27c JS::detail::InitWithFailureDiagnostic(bool) () + 116
 fffffbffe31d5578 NS_InitXPCOM () + 6c1
 fffffbffe385cf79 XRE_XPCShellMain(int, char**, char**, XREShellData const*) () + 14dc
 fffffbffe5db9de8 mozilla::BootstrapImpl::XRE_XPCShellMain(int, char**, char**, XREShellData const*) () + 14
 0000000000411f08 main () + 76
 0000000000411dd7 _start_crt () + 87
 0000000000411d38 _start () + 18

 
> 
> 
> 
> -- 
> Joshua M. Clulow
> http://blog.sysmgr.org
> 
-- 
Carsten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openindiana.org/pipermail/oi-dev/attachments/20210309/61f966c7/attachment-0001.html>


More information about the oi-dev mailing list