Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » Eclipse Titan on Windows10/WSL part 2(CLI and Eclipse plug-in support after Creators Update)
Eclipse Titan on Windows10/WSL part 2 [message #1759935] Thu, 20 April 2017 07:06
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Dear all,

I have examined the usability of WSL (Windows Subsystem for Linux) from Titan perspective in an earlier post:

Eclipse Titan on Win 10 WSL part 1: command line

https://www.eclipse.org/forums/index.php/t/1080473/

The conclusion was that, with a little tweaking, the command line is usable. However I could not find a reliable way to
operate the Eclipse plug-ins from within or outside WSL.

After the general availability of Windows Creators Update (Build 15063) I have decided to revisit the issue.

A step-by-step guide to install/re-install WSL and Eclipse Titan follows.

-First, install the Creators Update. There are several guides on the net that will drive you through the installation steps.

-Next, re-install WSL from scratch ( or, instead , upgrade with "do-release-upgrade" or "apt dist-upgrade" - but I preferred a clean install)

lxrun /uninstall /full
lxrun /install


From Windows side, the Linux installation is visible under
C:\Users\{WindowsUser}\AppData\Local\lxss


and {LinuxUser}'s home under:
C:\Users\{WindowsUser}\AppData\Local\lxss\home\{LinuxUser}

From Linux side, the Windows C: drive is visible as a mounted drive:
/mnt/c

The new WSL is based on Ubuntu 16.04, with a 4.4.0 kernel and gcc 5.4.0:
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.1 LTS
Release:        16.04
Codename:       xenial

uname -a
Linux GlobalWarning8 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014 x86_64 x86_64 x86_64 GNU/Linux

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.4' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)


-Install packages needed by Titan core and plug-ins:
sudo apt-get update
sudo apt-get install mc make

//install  dependencies needed by building Titan from source:
sudo apt-get install g++ expect libssl-dev libxml2-dev libncurses5-dev flex bison
sudo apt-get install xutils-dev
sudo apt-get install ant xsltproc
//after this , openjdk-8-jdk-headless will be installed , so we have to continue:
sudo apt-get install openjdk-8-jdk


check your Java version:
java -version
openjdk version "1.8.0_121"
OpenJDK Runtime Environment (build 1.8.0_121-8u121-b13-0ubuntu1.16.04.2-b13)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)


-Download and install Titan from https://projects.eclipse.org/projects/tools.titan/downloads
(Ubuntu 16.04/gcc 5.4.0 binary)

Both the pre-compiled binary and the binary compiled from source works well as tested on a (small) number of projects.
The Unix socket support seems to be improved, I did not encounter any glitches that can be traced back to that and there is no need to switch to
TCP sockets as before.

Unlike before. network interface enumeration works:

 ifconfig
eth1      Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          unspec addr:[NONE SET]  Mask:00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet6 addr: 2001:0:5ef5:79fd:4f3:12c6:a1ea:bf4c/64 Scope:Global
          inet6 addr: fe80::4f3:12c6:a1ea:bf4c/64 Scope:Global
          UP RUNNING  MTU:1472  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Global
          UP LOOPBACK RUNNING  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wifi0     Link encap:UNSPEC  HWaddr 20-68-9D-90-86-FC-00-00-00-00-00-00-00-00-00-00
          inet addr:192.168.1.101  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::de4:c096:980a:9d8/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


and for ping there's no more need for root privileges.

In general, the Linux core leaves a more robust, reliable impression than before.
For changes and improvements to the new WSL , please check:
https://blogs.msdn.microsoft.com/commandline/2017/04/11/windows-10-creators-update-whats-new-in-bashwsl-windows-console/

Now, there's no explicit support for using graphics in WSL, but it was demonstrated that even in the early version of WSL graphical applications e.g. Firefox work in combination with an X server installed in Windows.
(http://www.pcworld.com/article/3055403/windows/windows-10s-bash-shell-can-run-graphical-linux-applications-with-this-trick.html)

So I have:
-installed an Xming Xserver for Windows under Windows 10, and exported the display in Linux:

export DISPLAY=:0


-Download the Eclipse installation package for 64-bit Linux:
eclipse-inst-linux-x64.tar.gz


-unpack it and execute the installer:
eclipse-installer/eclipse-inst


The graphical interface of the installer should wake up in your X server;
proceed with Eclipse IDE for C/C++ Developers.

It will be installed in:

/home/{LinuxUser}/eclipse-cpp-neon


-At the end of the installation procedure , press Launch; Eclipse Neon should start.

-Download and install Titan plug-ins and you are done.

Note 1. For convenience , you can download Eclipse installer and Titan add-ons with your Windows browser, and then copy it across, initiating the copy from Linux
(and not from Windows!!!-this seems to cause problems at the moment). I have used Midnight Commander to copy from /mnt/c/..etc. to /home/{LinuxUser}

Note 2. From networking point of view, this setup is exactly the same as using a remote Linux box, with the Eclipse plug-ins being installed on the Linux side.
One can install the Eclipse plug-ins in Windows too, and using the Remote System Explorer plug-in, access the Linux box,
but in this case, the plug-ins can only be used to read-write(that is edit),
but not execute, as Linux executables (funny , the spell checker does not recognize his word , and offers "executrices" instead... ) cannot be run in Windows memory space and the shell that can be started (which is a Windows executable in itself) is not an interactive one. The latter may change though as WSL develops.

Note 3. For Cygwin, the recommendation is exactly the opposite: Eclipse should not be installed inside the Cygwin emulation, as that is an environment with limited resources;
it has to be installed on the Windows side, the main difference between this scenario and the previous one being that Cygwin binaries are in fact Windows executables (or executrices if you prefer), so they can be started
by a program residing in Windows.


Note 4. I did not try to install a complete desktop environment in WSL, but if you feel adventurous, don't hold back. Please let me and the community know if -and how- you have succeeded.

Bottom line is, WSL seems to be usable, at least for projects of small volume, and presents a realistic alternative to virtual machines or emulations run under Windows.


Best regards
Elemer


Previous Topic:Using TLS/DTLS with Titan test ports part 6
Next Topic:Handling of version information in Titan
Goto Forum:
  


Current Time: Thu Apr 25 01:17:48 GMT 2024

Powered by FUDForum. Page generated in 0.03261 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top