[tbb-dev] Trouble building Tor Browser on Debian stretch

David Fifield david at bamsoftware.com
Mon Apr 11 06:59:10 UTC 2016


I'm trying to build Tor Browser (tbb-6.0a4-build1) on Debian stretch,
and running into problems. I tried some workarounds but it seems like I
must be trying to do something unsupported. I'm not trying to reproduce
a package; just test a patch. Can anyone shed some light?

One of the problems seems actionable so I made a ticket:
https://bugs.torproject.org/18786.

I had to install the vmbuilder script manually, so I did what
check-prerequisites.sh told me to do:
	torsocks wget -U "" https://bugs.launchpad.net/ubuntu/+archive/primary/+files/vm-builder_0.12.4+bzr494.orig.tar.gz
	echo "76cbf8c52c391160b2641e7120dbade5afded713afaa6032f733a261f13e6a8e  vm-builder_0.12.4+bzr494.orig.tar.gz" | sha256sum -c
	tar -zxvf vm-builder_0.12.4+bzr494.orig.tar.gz
	cd vm-builder-0.12.4+bzr494
	sudo python setup.py install

I ran into two problems that I tried to fix by patching vmbuilder. The
first is that the call to "update-grub -y" would fail. I traced the
problem to a lack of /dev inside the chroot; update-grub runs
	grub-probe --device-map=/boot/grub/device.map -t device /
which fails with
	grub-probe: error: cannot find a device for / (is /dev mounted?).
For this, I copy-pasted some code to bind-mount /dev before the call and
unmount it after.

Then I had a problem during the dist-upgrade for the ubuntu precise VMs.
The "initscripts" package was failing to upgrade from 2.88dsf-13.10ubuntu11
to 2.88dsf-13.10ubuntu11.1:
	Setting up initscripts (2.88dsf-13.10ubuntu11.1) ...
	Processing triggers for libc-bin ...
	ldconfig deferred processing now taking place
	Extracting templates from packages: 100%

	Current default time zone: 'Etc/UTC'
	Local time is now:      Mon Apr 11 01:35:59 UTC 2016.
	Universal Time is now:  Mon Apr 11 01:35:59 UTC 2016.
	Run 'dpkg-reconfigure tzdata' if you wish to change it.

	invoke-rc.d: policy-rc.d denied execution of stop.
	mkdir: cannot create directory `/run/shm': File exists
The specific error is that mkdir is trying to create a directory over an
existing symlink. It's related to some confusion between /dev/shm and
/run/shm: https://bugs.launchpad.net/bugs/974584. Here I spliced in a
hack to remove the symlink and create the directory before upgrading
initscripts.

Finally I hit a compiler error during the build of i386 linux
tor-browser. It's complaining about -Wformat-security:
	c++ -o MetaData.o -c -I../../dist/stl_wrappers -I../../dist/system_wrappers -include /home/debian/build/tor-browser/config/gcc_hidden.h -DANDROID_SMP=0 -DLOG_NDEBUG=1 -D_GLIBCXX_OS_DEFINES -DHAVE_SYS_UIO_H -DFAKE_LOG_DEVICE -DSTATIC_EXPORTABLE_JS_API -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DMOZ_GLUE_IN_PROGRAM -DAB_CD=en-US -DNO_NSPR_10_SUPPORT -I/home/debian/build/tor-browser/media/libstagefright -I. -I/home/debian/build/tor-browser/media/libstagefright/binding/include -I/home/debian/build/tor-browser/media/libstagefright/frameworks/av/include -I/home/debian/build/tor-browser/media/libstagefright/frameworks/av/include/media/stagefright/foundation -I/home/debian/build/tor-browser/media/libstagefright/frameworks/av/media/libstagefright/ -I/home/debian/build/tor-browser/media/libstagefright/stubs/empty -I/home/debian/build/tor-browser/media/libstagefright/stubs/include -I/home/debian/build/tor-browser/media/libstagefright/stubs/include/media/stagefright/foundation -I/home/debian/build/tor-browser/media/libstagefright/system/core/include -I../../dist/include   -I/home/debian/build/tor-browser/obj-i686-pc-linux-gnu/dist/include/nspr -I/home/debian/build/tor-browser/obj-i686-pc-linux-gnu/dist/include/nss       -fPIC   -DMOZILLA_CLIENT -include ../../mozilla-config.h -MD -MP -MF .deps/MetaData.o.pp  -Wall -Wempty-body -Woverloaded-virtual -Wsign-compare -Wwrite-strings -Wno-invalid-offsetof -Wcast-align -frandom-seed=tor -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe  -DNDEBUG -DTRIMMED -g -freorder-blocks -Os -fomit-frame-pointer -Wno-format -Wno-multichar -Wno-sign-compare -Wno-unused    /home/debian/build/tor-browser/media/libstagefright/frameworks/av/media/libstagefright/MetaData.cpp
	cc1plus: error: -Wformat-security ignored without -Wformat [-Werror=format-security]
I didn't find a way to deal with this one. I noticed that a recent
commit refers to -Wformat-security in a comment, but it seems to be
about GCC, not Firefox:
	https://gitweb.torproject.org/builders/tor-browser-bundle.git/tree/gitian/descriptors/linux/gitian-utils.yml?id=tbb-6.0a4-build1#n75
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Make-sure-dev-is-mounted-whenever-running-update-gru.patch
Type: text/x-diff
Size: 2035 bytes
Desc: not available
URL: <http://lists.torproject.org/pipermail/tbb-dev/attachments/20160410/8640e727/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Turn-run-shm-into-a-directory-for-ubuntu.patch
Type: text/x-diff
Size: 2144 bytes
Desc: not available
URL: <http://lists.torproject.org/pipermail/tbb-dev/attachments/20160410/8640e727/attachment-0001.patch>


More information about the tbb-dev mailing list