How to build boost for the android ndk llvm

To build the boost library for the android ndk is pretty simple. You need linux — I used ubuntu 15.10
Download the android NDK for linux
Download the boost source
extract both to the same folder
Capture

Open a terminal window and navigate inside the boost folder and type

./bootstrap.sh

A new file should appear in the folder named project-config.jam. Open it, delete everything in the file and replace it with this.

import os ;

ANDROID_NDK = /home/scott/Downloads/android-ndk-r10e ;
using clang : android :
$(ANDROID_NDK)/toolchains/llvm-3.6/prebuilt/linux-x86_64/bin/clang++ :
–sysroot=$(ANDROID_NDK)/platforms/android-21/arch-x86
-I$(ANDROID_NDK)/sources/cxx-stl/llvm-libc++/libcxx/include
-I$(ANDROID_NDK)/sources/cxx-stl/llvm-libc++/libs/x86
-I$(ANDROID_NDK)/sources/android/support/include
;

You need to replace the ANDROID_NDK path with the path your NDK location.
Save the file and go back to the terminal window inside the boost folder and run

./b2 toolset=clang-android target-os=android cxxflags=”-std=c++11″ threading=multi threadapi=pthread link=shared runtime-link=shared -j 4

Thats it… Look in the bin.v2 for the completed libraries. The libs are in deep folders so you have to navigate a bit to get to your libs.

openssl and libjpeg-turbo android builds

I added support for openssl and libjpeg-turbo android builds to my existing build scripts.
You can find them on my github repo https://github.com/smasherprog/

openssl automated build script for windows

I wrote a script to automate the nuget package open_ssl that I just started to maintain.
If you are interesting seeing how its set up, check it out.
https://github.com/smasherprog/openssl_nuget

fltk automated build script for windows

I wrote a script to automate the nuget package fltk that I maintain.
If you are interesting seeing how its set up, check it out.
https://github.com/smasherprog/fltk_nuget

Libjpeg-Turbo Automated build

I wrote a script to automate the nuget package libjpeg-turbo that I maintain.
If you are interesting seeing how its set up, check it out.
https://github.com/smasherprog/Libjpeg-Turbo_Nuget

Ubuntu 15.10 libvirt compile/install from source

  1. Install Prereqs
    In a console type

    sudo apt-get update && sudo apt-get install qemu-kvm libvirt-bin qemu-system gcc make pkg-config libxml2-dev libgnutls-dev libdevmapper-dev libcurl4-gnutls-dev python-dev libpciaccess-dev libxen-dev libnl-3-dev libnl-route-3-dev libyajl-dev uuid-dev

  2. Get Files:
    Download the latest source code from ftp://libvirt.org/libvirt/ For example, I downloaded libvirt-1.3.0.tar.gz.
  3. Extract Files:
    Extract the downloaded files anywhere on the machine, I extracted mine to /home/scott/Downloads/libvirt-1.3.0/
  4. Configure Build
    Open Terminal and change directory to the extracted files from above. Now Type

    ./autogen.sh –system

  5. Running Make
    In a console type

    make

  6. Running Make Install
    In a console type

    sudo make install

  7. Restart Libvirt
    Type

    sudo service libvirt-bin restart

  8. Check installed version
    Type

    libvirtd –version

    The version should be updated now.

Libvirt Web Manager

Screenshot of the initial design of the libvirt-based web manager I am creating . . .
Untitled-2

Libvirt Web Manager

I am developing a Web based Manager for Libvirt written in c# using Asp.net MVC. I am writing it to run on windows until the new release of mvc which will make the project multi platform. At that point, the manager can be used on a Linux host using the native libraries instead of using the Mingw built libraries. Get involved and help out at https://github.com/smasherprog/Libvirt_WebManager

Fedora 22 libvirt remote management setup without authentication

Disclaimer

This method should only be used for testing purposes as there is no authentication and no encryption!

  1. Install Pre-reqs: Open a console
    sudo dnf -y update && sudo dnf -y install qemu-kvm libvirt virt-install bridge-utils
  2. sudo gedit /etc/libvirt/libvirtd.conf
  3. Change the following lines:
    #listen_tls = 0
    TO
    listen_tls = 0

    #listen_tcp = 0
    TO
    listen_tcp = 1

    #auth_tcp= “sasl”
    TO
    auth_tcp= “none”
    Now save the file

  4. In a console, type
    sudo gedit /etc/sysconfig/libvirtd
  5. Change the following lines:
    #LIBVIRTD_ARGS=”–listen”
    TO
    LIBVIRTD_ARGS=”–listen”
    Now save the file
  6. In a console, type
    sudo systemctl start libvirtd.service
  7. In Console type
    sudo systemctl enable libvirtd.service
  8. Add Firewall Rules
    If you want to use TLS to connect to libvirt, add the below rule

    sudo firewall-cmd --permanent --add-port=16514/tcp

    If you want to connect to your VM’s using NoVNC, or VNC add the below rule

    sudo firewall-cmd --permanent --add-port=5700-6000/tcp

    If you want to use Regular –Unencrypted– TCP to connect to libvirt, add the below rule

    sudo firewall-cmd --permanent --add-port=16509/tcp
  9. Restart Firewall so Rules can take effect
    sudo systemctl restart firewalld.service

Thats it, now you can connect via tcp without having to authenticate. Be sure to use this for testing only!

How to Build Libvirt for windows using Fedora 22

  1. Install Prereqs
    In a console type

    sudo dnf update && sudo dnf install -y autoconf automake gcc gcc-c++ mingw64-gcc mingw64-gcc-c++ mingw64-zlib mingw64-libxml2 mingw64-portablexdr mingw64-gnutls mingw32-gcc mingw32-gcc-c++ mingw32-zlib mingw32-libxml2 mingw32-portablexdr mingw32-gnutls

  2. Get Files:
    Download the latest source code from ftp://libvirt.org/libvirt/ For example, I downloaded libvirt-1.2.16.tar.gz.
  3. Extract Files:
    Extract the downloaded files anywhere on the machine, I extracted mine to /home/scott/Downloads/libvirt-1.2.6/
  4. Configure Build
    Open Terminal and change directory to the extracted files from above. Now Type

    mingw64-configure

  5. Running Make
    In a console type

    sudo make

  6. Running Make Install
    In a console type

    sudo make install

  7. Copy /usr/x86_64_w_64-mingw32/sys-root/mingw/bin contents to a windows machine and get starting using virsh.exe

Disclaimer

There is a bug that has been in the libvirt library since 1.2.14 for the windows build that causes an error when connecting to a libvirt host. The error message is ‘Internal Error: Received hangup / error event on socket.’ I have submitted a bug report, we will see how long before it is fixed. Until then, you can build version 1.2.13 and run it without issue. . . Enjoy.

Next post will be how to enable tls for libvirt for remote management.