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+... 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/de...
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+... 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/de...
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.1es...
Georg
On Sun, Apr 10, 2016 at 11:59:09PM -0700, David Fifield wrote:
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+... 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 never fully solved these problems. Even with the vmbuilder patches, the Ubuntu VMs would spin with 100% CPU at the BIOS screen, not even allowing SSH. But the preparation of the VMs was the only problem. I installed a fresh Ubuntu 14.04 on another computer, used it to build the VM images, copied the images to the build host that was giving me trouble before, and then I was able to complete a build.