microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.66k stars 28.68k forks source link

32Bit Linux VS Code Distributed With libjunixsocket-native-2.0.4.so Built For 64Bit amd64 #26028

Closed limey-git closed 7 years ago

limey-git commented 7 years ago

Steps to Reproduce:

  1. Download and install latest 32 Bit version of vscode for Debian Linux.
  2. Launch vscode and install the 'Language Support for Java(TM) by Red Hat' extension.
  3. Restart vscode.

On restart, error messages appear; reporting that components required for the 'Language Support for Java(TM) by Red Hat' extension, failed to initiate.

Reading and analyzing the stacktrace in vscode's log files, a "Library 'libjunixsocket-native-2.0.4.so' not found!" error entry identifies the root cause. That library was tracked down to '[user.home.dir]/.vscode/extensions/redhat.java-0.3.0/server/config_linux/org.eclipse.osgi/45/0/.cp/lib/junixsocket-native-common-2.0.4.jar'.

This is a listing of the native libraries contained in 1.12.0's 'junixsocket-native-common-2.0.4.jar'...

lib/x86_64-MacOSX-gpp/
lib/x86_64-MacOSX-gpp/jni/
lib/x86_64-MacOSX-gpp/jni/history.xml
lib/x86_64-MacOSX-gpp/jni/libjunixsocket-native-2.0.4.dylib
lib/x86_64-MacOSX-gpp/jni/libjunixsocket-native-2.0.4.jnilib
lib/amd64-Linux-gpp/
lib/amd64-Linux-gpp/jni/
lib/amd64-Linux-gpp/jni/libjunixsocket-native-2.0.4.so
lib/amd64-Linux-gpp/jni/history.xml

Notice that the only Linux library distributed in the 32Bit 1.12.0 release, is the one built for the amd64 [64Bit] architecture! It is therefore incompatible with the 32Bit Linux on which 32Bit versions of vscode are meant to be installed.

It was obvious to me after seeing the above files in the 1.12.20 jar, that the system — knowing that it is running on an i386 OS — is attempting to locate a library built for an i386 architecture. But there isn't one distributed in the 1.12.20 release. Hence the "Library 'libjunixsocket-native-2.0.4.so' not found!" error.

I downloaded the junixsocket-parent-2.0.4 source from here and built it on my 32bit Ubuntu machine, using maven.

I then replaced the original amd64 64Bit 'junixsocket-native-common-2.0.4.jar' with the 32Bit one that I built from the source. Details of the steps I took are listed here.

On my Ubuntu 1204 LTS machine, my freshly-built 32Bit [i386_] replacement 'libjunixsocket-native-2.0.4.so' library and jar files, perfectly resolved the defect described in detail here.

egamma commented 7 years ago

This issue was moved to redhat-developer/vscode-java#201