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

Georg Koppen gk at torproject.org
Tue Apr 12 18:57:04 UTC 2016


David Fifield:
> 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.

I am not sure about those two issues. I pinged Joseph Bisch (who
developed the Debian support) on IRC. We'll see if I/we get some feedback.

> 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

Could you have been using a wrong branch? We have a fix for this issue
on our 6.0 branch used in our alphas and nightlies. See e.g.:
https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-38.7.1esr-6.0-1&id=9abdcf81f707040447b00cc516cda0e2085a708d

Georg


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.torproject.org/pipermail/tbb-dev/attachments/20160412/43101ba1/attachment.sig>


More information about the tbb-dev mailing list