Trying to compile selfrando for 32bit system crashes with
g++ -o sconsRelease/x86/gcc/LinuxSymproc/ObjectFileParser.o -c -std=c++11 -include /home/debian/build/elfutils-0.160/libelf/elf.h -I /home/debian/install/elfutils/include -fno-reorder-functions -O2 -fno-omit-frame-pointer -g -Wl,-z,noexecstack -m32 -DRANDOLIB_ARCH=x86 -DRANDOLIB_ARCH_SIZE=32 -DRANDOLIB_IS_X86=1 -IsconsRelease/x86/gcc/LinuxSymproc -ILinuxSymproc LinuxSymproc/ObjectFileParser.cppLinuxSymproc/ObjectFileParser.cpp: In member function 'void ExecFileParser::add_txtrp_section(const std::vector<ObjectFileParser::Section>&, const ObjectFileParser::NonExecutableRelocations&)':LinuxSymproc/ObjectFileParser.cpp:383:78: error: no matching function for call to 'max(long unsigned int&, ELFIO::Elf64_Addr)' p = std::max(p, segm->get_virtual_address() + segm->get_memory_size()); ^In file included from /home/debian/install/gcc/include/c++/5.1.0/algorithm:61:0, from LinuxSymproc/ObjectFileParser.cpp:9:/home/debian/install/gcc/include/c++/5.1.0/bits/stl_algobase.h:219:5: note: candidate: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&) max(const _Tp& __a, const _Tp& __b) ^/home/debian/install/gcc/include/c++/5.1.0/bits/stl_algobase.h:219:5: note: template argument deduction/substitution failed:LinuxSymproc/ObjectFileParser.cpp:383:78: note: deduced conflicting types for parameter 'const _Tp' ('long unsigned int' and 'ELFIO::Elf64_Addr {aka long long unsigned int}') p = std::max(p, segm->get_virtual_address() + segm->get_memory_size());
After talking to the selfrando devs it turns out the 32bit mode never really got finished properly. Thus we integrate it only for 64bit bundles for now. I've filed #20848 (moved) for the 32bit part.
bug_20683_v4 (https://gitweb.torproject.org/user/gk/tor-browser-bundle.git/commit/?h=bug_20683_v4&id=74bc959b60d4ebb04179a87a113fbb5254d9d3fa) in my public repo has a patch for review. It uses TrapLinker now under the hood which fixes the NSS AES incompatibility as well and improves stability in general. The relevant selfrando and elfutils commits/tags are in the nightly versions file. I'll update the alpha one with proper tags once we had the code baking in our nightlies for a while and nothing exploded.
Note: This patch makes use of our own gcc/binutils for the remaining components in the gitian-utils descriptor (a thing I wanted to have for quite a while now).
Trac: Status: new to needs_review Keywords: TorBrowserTeam201702 deleted, TorBrowserTeam201703R added
Selfrando does not cope with ESR52 it seems (I know, surprise, surprise). Linking libxul fails with:
+ exec g++ -std=gnu++11 -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++14-compat -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -fno-lifetime-dse -frandom-seed=tor -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -pipe -g -freorder-blocks -Os -fomit-frame-pointer -fPIC -shared -Wl,-z,defs -Wl,-h,libxul.so -o libxul.so /home/debian/build/tor-browser/obj-x86_64-pc-linux-gnu/toolkit/library/tmps717Jq.list -lpthread -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id -Wl,-version-script,symverscript -Wl,-rpath-link,/home/debian/build/tor-browser/obj-x86_64-pc-linux-gnu/dist/bin -Wl,-rpath-link,/usr/local/lib ../../security/nss/lib/crmf/libcrmf.a ../../js/src/libjs_static.a ../../security/sandbox/linux/libmozsandbox.so ../../security/nss/lib/nss/libnss3.so ../../security/nss/lib/smime/libsmime3.so ../../security/nss/lib/ssl/libssl3.so ../../security/nss/lib/util/libnssutil3.so ../../config/external/sqlite/libmozsqlite3.so ../../config/external/nspr/pr/libnspr4.so ../../config/external/nspr/libc/libplc4.so ../../config/external/nspr/ds/libplds4.so ../../config/external/lgpllibs/liblgpllibs.so -ldl -lm -ldl -lrt -lfreetype -lfontconfig -lXrender -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lglib-2.0 -lgtk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk-x11-2.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lpango-1.0 -lcairo -lX11-xcb -lxcb-shm -lxcb -lX11 -lXext -lXt -lgthread-2.0 -B../../../../selfrando/Tools/TorBrowser/tc-wrapperar: creating /tmp/traparchive-jbmfaJgQar: creating /tmp/traparchive-foOLxsbhar: creating /tmp/traparchive-ORMlPggaar: creating /tmp/traparchive-pjmQhMcd/home/debian/install/binutils/bin/ld.gold.real: error: /tmp/trapobj-beqolrlN: requires dynamic R_X86_64_PC32 reloc against '_ZNK6icu_5813UnicodeString6lengthEv$orig' which may overflow at runtime; recompile with -fPIC/home/debian/install/binutils/bin/ld.gold.real: error: /tmp/trapobj-bmvslhPr: requires dynamic R_X86_64_PC32 reloc against '_ZNK6icu_5813UnicodeString6lengthEv$orig' which may overflow at runtime; recompile with -fPIC/home/debian/install/binutils/bin/ld.gold.real: error: /tmp/trapobj-KbQLRpaQ: requires dynamic R_X86_64_PC32 reloc against '_ZNK6icu_5813UnicodeString6lengthEv$orig' which may overflow at runtime; recompile with -fPIC/home/debian/install/binutils/bin/ld.gold.real: error: /tmp/trapobj-doScfxce: requires dynamic R_X86_64_PC32 reloc against '_ZNK6icu_5813UnicodeStringeqERKS0_$orig' which may overflow at runtime; recompile with -fPIC/home/debian/install/binutils/bin/ld.gold.real: error: /tmp/trapobj-uijklyoz: requires dynamic R_X86_64_PC32 reloc against '_ZNK6icu_5813UnicodeString6lengthEv$orig' which may overflow at runtime; recompile with -fPIC/home/debian/install/binutils/bin/ld.gold.real: error: /tmp/trapobj-Klflqxns: requires dynamic R_X86_64_PC32 reloc against '_ZNK6icu_5813UnicodeString6lengthEv$orig' which may overflow at runtime; recompile with -fPIC/home/debian/install/binutils/bin/ld.gold.real: error: /tmp/trapobj-ormLgKLz: requires dynamic R_X86_64_PC32 reloc against '_ZN6icu_5813UnicodeString6appendERKS0_$orig' which may overflow at runtime; recompile with -fPIC/home/debian/install/binutils/bin/ld.gold.real: error: /tmp/trapobj-uvkxduhn: requires dynamic R_X86_64_PC32 reloc against '_ZNK6icu_5813UnicodeString6lengthEv$orig' which may overflow at runtime; recompile with -fPIC/home/debian/install/binutils/bin/ld.gold.real: error: /tmp/trapobj-jPrLKSxa: requires dynamic R_X86_64_PC32 reloc against '_ZN6icu_5813UnicodeString5setToEi$orig' which may overflow at runtime; recompile with -fPIC/home/debian/install/binutils/bin/ld.gold.real: error: /tmp/trapobj-ajgryPzd: requires dynamic R_X86_64_PC32 reloc against '_ZNK6icu_5813UnicodeString6lengthEv$orig' which may overflow at runtime; recompile with -fPIC/home/debian/install/binutils/bin/ld.gold.real: error: /tmp/trapobj-PiQOPOqv: requires dynamic R_X86_64_PC32 reloc against '_ZNK6icu_5813UnicodeString6lengthEv$orig' which may overflow at runtime; recompile with -fPIC/home/debian/install/binutils/bin/ld.gold.real: error: /tmp/trapobj-mjmkpsfh: requires dynamic R_X86_64_PC32 reloc against '_ZNK6icu_5813UnicodeString6lengthEv$orig' which may overflow at runtime; recompile with -fPIC/home/debian/install/binutils/bin/ld.gold.real: error: /tmp/trapobj-heevkOjx: requires dynamic R_X86_64_PC32 reloc against '_ZNK6icu_5813UnicodeString6lengthEv$orig' which may overflow at runtime; recompile with -fPIC/home/debian/install/binutils/bin/ld.gold.real: error: /tmp/trapobj-RdPzOpwx: requires dynamic R_X86_64_PC32 reloc against '_ZN6icu_5813UnicodeStringaSEOS0_$orig' which may overflow at runtime; recompile with -fPIC/home/debian/install/binutils/bin/ld.gold.real: error: /tmp/trapobj-yeotOvOn: requires dynamic R_X86_64_PC32 reloc against '_ZNK6icu_5813UnicodeString6lengthEv$orig' which may overflow at runtime; recompile with -fPIC/home/debian/install/binutils/bin/ld.gold.real: error: /tmp/trapobj-poiLngPi: requires dynamic R_X86_64_PC32 reloc against '_ZNK6icu_5813UnicodeString6lengthEv$orig' which may overflow at runtime; recompile with -fPIC/home/debian/install/binutils/bin/ld.gold.real: error: /tmp/trapobj-QMKJvcdh: requires dynamic R_X86_64_PC32 reloc against '_ZNK6icu_5813UnicodeString6lengthEv$orig' which may overflow at runtime; recompile with -fPIC/home/debian/install/binutils/bin/ld.gold.real: error: /tmp/trapobj-gQmcMoux: requires dynamic R_X86_64_PC32 reloc against '_ZNK6icu_5813UnicodeStringeqERKS0_$orig' which may overflow at runtime; recompile with -fPIC/home/debian/install/binutils/bin/ld.gold.real: error: /tmp/trapobj-wMQxNkli: requires dynamic R_X86_64_PC32 reloc against '_ZNK6icu_5813UnicodeString6lengthEv$orig' which may overflow at runtime; recompile with -fPIC/home/debian/install/binutils/bin/ld.gold.real: error: /tmp/trapobj-ahRQnahK: requires dynamic R_X86_64_PC32 reloc against '_ZNK6icu_5813UnicodeString6lengthEv$orig' which may overflow at runtime; recompile with -fPIC
Thanks. I cherry-picked the commit to master (commit 332c5b6c16f1b0915f537a4ad5af48295f80c733) and waiting for a proper tag from the selfrando folks for the alpha before closing this ticket.
Okay, I added support for the signed tag (commit 8fe0e322b950efa2456502428bee66dde8b4948a) and bumped the elfutils version for our alphas as well (commit 3e752843dfa39beec844822c9f6c3dd1f80355ea). I think we are done here.
Trac: Resolution: N/Ato fixed Status: needs_review to closed