mcpelauncher-linux
mcpelauncher-linux copied to clipboard
[1.2-xboxlive] Automatic testing of build
This issue is created to setup automatic build testing to improve the user friendliness of the build procedure. This uses vagrant it's recommended to install the version of virtual box and vagrant that is available from the respective websites rather than what's available from your distro ( unless you already have it running, in which case I assume you know what your doing and can fix any errors that crop up )
virtualbox https://www.virtualbox.org/wiki/Linux_Downloads vagrant https://www.vagrantup.com/downloads.html ( unbuntu users - your distro is debian based )
once that is done I recommend for your own sanity that you install the virtualbox guest additions plugin;
vagrant plugin install vagrant-vbguest
Once that is done make a new directory and copy the below code block to a file named Vagrantfile ( case is important ), cd to that dir and do vagrant up
it will work for quite a while and download a ton ( ubuntu iso + all updates + launcher source + cef )
the source dirwill be placed next to the Vagrant file inside this dir is also a new dir "DEBUGOUTPUT" where the output of cmake, make and setup_cef.sh is saved
currently the automated process fails ( see last code block ) to log into the box and see if you can fix it type;
vagrant ssh
this will place you in the virtual ubuntu 16.04 box as the user vagrant - all commands run here only affects the virtual machine ( please make sure it says "vagrant@vagrant:" before running commands I will not be held responsible for you screwing up your local machine ;) )
type exit to leave
if you made changes to Vagrantfile that work please share them here after testing ( either in a new directory or by doing vagrant destroy ).
once your done testing do vagrant halt to stop the virtual box an prevent it from hogging cpu resources
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "boxcutter/ubuntu1604"
config.vm.network "private_network", ip: "192.168.33.11"
config.vm.provider 'virtualbox' do |vb|
vb.customize ['modifyvm', :id, '--cableconnected1', 'on']
end
config.vm.provision "shell", inline: <<-SHELL
sudo apt update
sudo apt upgrade
sudo apt-get install git
sudo dpkg --add-architecture i386
#removed libgles2-mesa-dev as it requires a to of
#libmir stuff that's not needed in it's non :i386 versions
sudo apt -y install git cmake zlib1g-dev:i386 libncurses5-dev:i386 \
gcc-multilib g++-multilib zlib1g-dev:i386 libx11-dev \
linux-libc-dev:i386 uuid-dev:i386 libpng-dev:i386 libx11-dev:i386 \
libxext6:i386 libgles2-mesa-dev:i386 libegl1-mesa-dev:i386 \
libmirclient-dev:i386 libmircommon-dev:i386 libxkbcommon-dev:i386 \
libmirclient-dev:i386 libwayland-dev:i386 libwayland-egl1-mesa:i386 \
libegl1-mesa-drivers libegl1-mesa:i386 libgles2-mesa-dev:i386
#needed to keep cmake happy ( it detects the wrong architecture's libs = bug)
sudo apt -y install zlib1g-dev
# needed to compile xbl branch:
sudo apt install -y libcurl4-openssl-dev:i386 libssl-dev:i386
cd /vagrant
git clone https://github.com/MCMrARM/mcpelauncher-linux.git
cd mcpelauncher-linux
git checkout 1.2-xboxlive
mkdir DEBUGOUTPUT
#we need to cmake/make once ( that will fail or setup_cef.sh wont work :| )
cmake . 2>&1 > DEBUGOUTPUT/cmake_1.log
make 2>&1 > DEBUGOUTPUT/make_1.log
#now we do the actual work;
./setup_cef.sh 2>&1 > DEBUGOUTPUT/setup_cef.log
cmake . 2>&1 > DEBUGOUTPUT/cmake.log
make 2>&1 > DEBUGOUTPUT/make.log
exit
SHELL
end
Here is the current problem ( this only happens on the virtual machine - not on my local machine, so it's properly a missing dependency )
[ 12%] Building CXX object libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/cpptoc/context_menu_handler_cpptoc.cc.o
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/build.make:374: recipe for target 'libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/cpptoc/accessibility_handler_cpptoc.cc.o' failed
make[2]: *** [libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/cpptoc/accessibility_handler_cpptoc.cc.o] Error 4
make[2]: *** Deleting file 'libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/cpptoc/accessibility_handler_cpptoc.cc.o'
make[2]: *** Waiting for unfinished jobs....
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/build.make:398: recipe for target 'libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/cpptoc/app_cpptoc.cc.o' failed
make[2]: *** [libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/cpptoc/app_cpptoc.cc.o] Error 4
make[2]: *** Deleting file 'libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/cpptoc/app_cpptoc.cc.o'
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/build.make:422: recipe for target 'libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/cpptoc/base_ref_counted_cpptoc.cc.o' failed
make[2]: *** [libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/cpptoc/base_ref_counted_cpptoc.cc.o] Error 4
make[2]: *** Deleting file 'libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/cpptoc/base_ref_counted_cpptoc.cc.o'
CMakeFiles/Makefile2:85: recipe for target 'libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/all' failed
make[1]: *** [libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Moving files around
Target: /vagrant/mcpelauncher-linux/libs/cef
cp: cannot stat 'libcef_dll_wrapper.a': No such file or directory
Reducing libcef.so size
Cleaning up
To me this looks like a out-of-memory perhaps? I'd love to get this resolved as soon as possible though, so I'll get around to setting vagrant up today/tomorrow.
Please consider to use docker for such purposes, it's much more cheaper than virtualbox and provides good isolation.
I even successfully run 1.1 version within container with graphics and sound. see https://github.com/Irioth/mcpelauncher-linux/commit/8e573c75d8541ddf00e23f37f4b6d7c13699dc36
How can something be 'much more cheaper' than free ?
As for graphics and sound - the above Vagrantfile is headless, I also have one with a full DE stack if that is needed, but for purely compiling the overhead seems a little silly
@guppy42 he means cheaper as in a "takes less system resources" sense.
@Irioth Huge thanks for figuring out CMAKE_LIBRARY_ARCHITECTURE "i386-linux-gnu", it makes building much easier on Ubuntu. I'll add this to the main repo.