FS#45908 - [intellij-idea-community-edition] missing dependencies

Attached to Project: Community Packages
Opened by Laszlo Nagy (rizsotto) - Wednesday, 05 August 2015, 22:41 GMT
Last edited by Lukas Jirkovsky (6xx) - Monday, 02 January 2017, 18:48 GMT
Task Type Support Request
Category Packages
Status Closed
Assigned To Lukas Jirkovsky (6xx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

i did install the 'intellij-idea-community-edition' package in a lxc environment, but it does not work until certain packages are not installed inside the lxc.

i think this is a special case, when the X server itself run on the host machine. in the lxc environment i just installed the 'intellij-idea-community-edition' which were not pulling these packages:

[2015-08-05 20:42] [PACMAN] Running 'pacman -S intellij-idea-community-edition'
[2015-08-05 20:43] [ALPM] transaction started
[2015-08-05 20:43] [ALPM] installed java-environment-common (2-2)
[2015-08-05 20:43] [ALPM] installed java-runtime-common (2-2)
[2015-08-05 20:43] [ALPM] installed nspr (4.10.8-1)
[2015-08-05 20:43] [ALPM] installed nss (3.19.2-2)
[2015-08-05 20:43] [ALPM] installed jre8-openjdk-headless (8.u51-1)
[2015-08-05 20:43] [ALPM] installed xcb-proto (1.11-1)
[2015-08-05 20:43] [ALPM] installed xproto (7.0.28-1)
[2015-08-05 20:43] [ALPM] installed libxdmcp (1.1.2-1)
[2015-08-05 20:43] [ALPM] installed libxau (1.0.8-2)
[2015-08-05 20:43] [ALPM] installed libxcb (1.11-1)
[2015-08-05 20:43] [ALPM] installed kbproto (1.0.7-1)
[2015-08-05 20:43] [ALPM] installed libx11 (1.6.3-1)
[2015-08-05 20:43] [ALPM] installed xextproto (7.3.0-1)
[2015-08-05 20:43] [ALPM] installed libxext (1.3.3-1)
[2015-08-05 20:43] [ALPM] installed libice (1.0.9-1)
[2015-08-05 20:43] [ALPM] installed libsm (1.2.2-2)
[2015-08-05 20:43] [ALPM] installed libxt (1.1.5-1)
[2015-08-05 20:43] [ALPM] installed libxmu (1.1.2-1)
[2015-08-05 20:43] [ALPM] installed xorg-xset (1.2.3-1)
[2015-08-05 20:43] [ALPM] installed xdg-utils (1.1.0.git20150323-1)
[2015-08-05 20:43] [ALPM] installed hicolor-icon-theme (0.15-1)
[2015-08-05 20:43] [ALPM] installed jre8-openjdk (8.u51-1)
[2015-08-05 20:43] [ALPM] installed jdk8-openjdk (8.u51-1)
[2015-08-05 20:43] [ALPM] installed intellij-idea-libs (1:14.1.4-1)
[2015-08-05 20:43] [ALPM] installed giflib (5.1.1-1)
[2015-08-05 20:43] [ALPM] installed inputproto (2.3.1-1)
[2015-08-05 20:43] [ALPM] installed libxi (1.7.4-1)
[2015-08-05 20:43] [ALPM] installed recordproto (1.14.2-2)
[2015-08-05 20:43] [ALPM] installed fixesproto (5.0-3)
[2015-08-05 20:43] [ALPM] installed libxfixes (5.0.1-1)
[2015-08-05 20:43] [ALPM] installed libxtst (1.2.2-1)
[2015-08-05 20:43] [ALPM] installed intellij-idea-community-edition (1:14.1.4-1)
[2015-08-05 20:43] [ALPM] transaction completed

after this i try to run 'idea.sh', but it failed with exception...

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.ide.Bootstrap.main(Bootstrap.java:39)
at com.intellij.idea.Main.main(Main.java:83)
Caused by: java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-8-openjdk/jre/lib/amd64/libawt_xawt.so: libXrender.so.1: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1822)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1843)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at java.awt.Toolkit$3.run(Toolkit.java:1636)
at java.awt.Toolkit$3.run(Toolkit.java:1634)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1633)
at java.awt.Toolkit.<clinit>(Toolkit.java:1668)
at java.awt.Cursor.<clinit>(Cursor.java:195)
at javax.swing.text.html.HTMLEditorKit.<clinit>(HTMLEditorKit.java:623)
at com.intellij.util.ui.UIUtil.<clinit>(UIUtil.java:96)
at com.intellij.ide.plugins.PluginManager.start(PluginManager.java:71)
... 6 more

so, i did install the missing package...

[2015-08-05 21:18] [PACMAN] Running 'pacman -S libxrender'
[2015-08-05 21:18] [ALPM] transaction started
[2015-08-05 21:18] [ALPM] installed renderproto (0.11.1-3)
[2015-08-05 21:18] [ALPM] installed libxrender (0.9.9-1)
[2015-08-05 21:18] [ALPM] transaction completed

after this, i got a different exceptions...

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.ide.Bootstrap.main(Bootstrap.java:39)
at com.intellij.idea.Main.main(Main.java:83)
Caused by: java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-8-openjdk/jre/lib/amd64/libfontmanager.so: libfreetype.so.6: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1843)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at sun.font.FontManagerNativeLibrary$1.run(FontManagerNativeLibrary.java:61)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.FontManagerNativeLibrary.<clinit>(FontManagerNativeLibrary.java:32)
at sun.java2d.xr.XRSurfaceData.initXRSurfaceData(XRSurfaceData.java:85)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:137)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:102)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:81)
at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:126)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at java.awt.Toolkit$2.run(Toolkit.java:860)
at java.awt.Toolkit$2.run(Toolkit.java:855)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:854)
at java.awt.Toolkit.getEventQueue(Toolkit.java:1734)
at java.awt.EventQueue.isDispatchThread(EventQueue.java:1041)
at javax.swing.SwingUtilities.isEventDispatchThread(SwingUtilities.java:1361)
at javax.swing.text.StyleContext.reclaim(StyleContext.java:454)
at javax.swing.text.StyleContext.addAttribute(StyleContext.java:311)
at javax.swing.text.html.StyleSheet.addAttribute(StyleSheet.java:578)
at javax.swing.text.StyleContext$NamedStyle.addAttribute(StyleContext.java:1501)
at javax.swing.text.StyleContext$NamedStyle.setName(StyleContext.java:1312)
at javax.swing.text.StyleContext$NamedStyle.<init>(StyleContext.java:1259)
at javax.swing.text.StyleContext.addStyle(StyleContext.java:107)
at javax.swing.text.StyleContext.<init>(StyleContext.java:87)
at javax.swing.text.html.StyleSheet.<init>(StyleSheet.java:166)
at javax.swing.text.html.HTMLEditorKit.getStyleSheet(HTMLEditorKit.java:391)
at com.intellij.util.ui.UIUtil.<clinit>(UIUtil.java:97)
at com.intellij.ide.plugins.PluginManager.start(PluginManager.java:71)
... 6 more

so, i did install the missing package...

[2015-08-05 21:20] [PACMAN] Running 'pacman -S freetype2'
[2015-08-05 21:20] [ALPM] transaction started
[2015-08-05 21:20] [ALPM] installed libpng (1.6.16-1)
[2015-08-05 21:20] [ALPM] installed graphite (1:1.2.4-1)
[2015-08-05 21:20] [ALPM] installed harfbuzz (1.0.1-1)
[2015-08-05 21:20] [ALPM] installed freetype2 (2.6-1)
[2015-08-05 21:20] [ALPM] transaction completed

after this, i got a different exception...

com.intellij.ide.plugins.PluginManager$StartupAbortedException: java.lang.reflect.InvocationTargetException
at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:94)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:91)
... 1 more
Caused by: java.lang.NullPointerException
at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264)
at sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:219)
at sun.awt.FontConfiguration.init(FontConfiguration.java:107)
at sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:776)
at sun.font.SunFontManager$2.run(SunFontManager.java:431)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.SunFontManager.<init>(SunFontManager.java:376)
at sun.awt.X11FontManager.<init>(X11FontManager.java:57)
at sun.reflect.GeneratedConstructorAccessor2.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at java.lang.Class.newInstance(Class.java:442)
at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:83)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
at sun.font.SunFontManager.getInstance(SunFontManager.java:250)
at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:264)
at sun.swing.SwingUtilities2.getFontMetrics(SwingUtilities2.java:1113)
at javax.swing.JComponent.getFontMetrics(JComponent.java:1626)
at javax.swing.text.FieldView.getFontMetrics(FieldView.java:62)
at javax.swing.text.FieldView.getPreferredSpan(FieldView.java:215)
at javax.swing.plaf.basic.BasicTextUI$RootView.getPreferredSpan(BasicTextUI.java:1353)
at javax.swing.plaf.basic.BasicTextUI.getPreferredSize(BasicTextUI.java:919)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1662)
at javax.swing.JTextField.getPreferredSize(JTextField.java:424)

the too many FontConfiguration message hint me to install libxft package as well...

[2015-08-05 21:23] [PACMAN] Running 'pacman -S libxft'
[2015-08-05 21:23] [ALPM] transaction started
[2015-08-05 21:23] [ALPM] installed fontconfig (2.11.1-1)
[2015-08-05 21:23] [ALPM] installed libxft (2.3.2-1)
[2015-08-05 21:23] [ALPM] transaction completed

then the exceptions are more promissing and window appears...

[ 136] WARN - #com.intellij.ui.AppUIUtil - Cannot register font: jar:file:/usr/share/intellijidea-ce/lib/resources.jar!/fonts/Inconsolata.ttf
[ 158] WARN - #com.intellij.ui.AppUIUtil - Cannot register font: jar:file:/usr/share/intellijidea-ce/lib/resources.jar!/fonts/SourceCodePro-Regular.ttf
[ 180] WARN - #com.intellij.ui.AppUIUtil - Cannot register font: jar:file:/usr/share/intellijidea-ce/lib/resources.jar!/fonts/SourceCodePro-Bold.ttf

so i did install some font packages as well...

[2015-08-05 21:28] [PACMAN] Running 'pacman -S ttf-inconsolata ttf-bitstream-vera ttf-dejavu ttf-freefont ttf-liberation'
[2015-08-05 21:28] [ALPM] transaction started
[2015-08-05 21:28] [ALPM] installed libfontenc (1.1.3-1)
[2015-08-05 21:28] [ALPM] installed fontsproto (2.1.3-1)
[2015-08-05 21:28] [ALPM] installed libxfont (1.5.1-1)
[2015-08-05 21:28] [ALPM] installed xorg-bdftopcf (1.0.5-1)
[2015-08-05 21:28] [ALPM] installed xorg-mkfontscale (1.1.2-1)
[2015-08-05 21:28] [ALPM] installed xorg-mkfontdir (1.0.7-2)
[2015-08-05 21:28] [ALPM] installed xorg-font-util (1.3.1-1)
[2015-08-05 21:28] [ALPM] installed xorg-font-utils (7.6-4)
[2015-08-05 21:28] [ALPM] installed ttf-inconsolata (20090215-5)
[2015-08-05 21:28] [ALPM] installed xorg-fonts-encodings (1.0.4-4)
[2015-08-05 21:28] [ALPM] installed ttf-bitstream-vera (1.10-10)
[2015-08-05 21:28] [ALPM] installed ttf-dejavu (2.34-2)
[2015-08-05 21:28] [ALPM] installed ttf-freefont (20120503-4)
[2015-08-05 21:28] [ALPM] installed ttf-liberation (2.00.1-5)
[2015-08-05 21:28] [ALPM] transaction completed

and finally it works!

i don't know which packages should pull the font packages and which one should pull the needed libraries. i did not investigated it further... but what i saw was: the first two exception was coming from 'awt' library.

$ pacman -Qo /usr/lib/jvm/java-8-openjdk/jre/lib/amd64/libawt_xawt.so
/usr/lib/jvm/java-8-openjdk/jre/lib/amd64/libawt_xawt.so is owned by jre8-openjdk-headless 8.u51-1
$ pacman -Qo /usr/lib/jvm/java-8-openjdk/jre/lib/amd64/libfontmanager.so
/usr/lib/jvm/java-8-openjdk/jre/lib/amd64/libfontmanager.so is owned by jre8-openjdk-headless 8.u51-1

so, i understand that headless installation can't pull those packages in, but why the 'jre8-openjdk' does not pull those dependencies in?

and because the intellij idea was the one which was going for specific fonts, why 'intellij-idea-community-edition' does not pull one of those ttf packages in?
This task depends upon

Closed by  Lukas Jirkovsky (6xx)
Monday, 02 January 2017, 18:48 GMT
Reason for closing:  Fixed
Additional comments about closing:  The dependencies specific to idea were fixed. For the remaining JRE dependecies see  FS#52336 
Comment by Lukas Jirkovsky (6xx) - Wednesday, 30 September 2015, 19:41 GMT
I did some tests with a minimal AWT application (a window with a single button) and libxrender and freetype2 were required. libxft and ttf fonts were not required by this application, so these must be specific to Intellij Idea. Also, I think any ttf font should suffice, as I don't have the mentioned fonts installed except for ttf-dejavu and ttf-bitsream-vera.
Comment by Dennis Schridde (devurandom) - Sunday, 01 January 2017, 12:01 GMT
Is this bug still valid? It's been more than a year...
Comment by Laszlo Nagy (rizsotto) - Monday, 02 January 2017, 10:04 GMT
I did report this bug. Since I was not doing this. If you give me a few weeks, then I can replay the scenario and see what changed since then... but I'm afraid that this was involve more coordination between packages and saw not much discussion around it... and my major intent with this bug report was to start a discussion to figure out what package shall declare what dependencies, and as a side effect solve the problem.
Comment by Lukas Jirkovsky (6xx) - Monday, 02 January 2017, 18:47 GMT
In a way it's still valid. The dependencies specific to intellij idea were added. However, some of the dependencies should be dependencies of jre/jdk. I sent mail about it to Guillaume but I guess he forgot about it. I'll create a separate package and close this one.

Loading...