Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

[solved] Eclipse IDE not finding a proper WebKit GTK

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
12 posts • Page 1 of 1
Author
Message
acarstoiu
Apprentice
Apprentice
Posts: 209
Joined: Wed Oct 20, 2004 10:14 am

[solved] Eclipse IDE not finding a proper WebKit GTK

  • Quote

Post by acarstoiu » Wed Jun 21, 2023 5:15 pm

I have installed a minimal Eclipse IDE (the Eclipse Platform) by manually unzipping the downloaded tarball in /opt. It starts nicely, without any tweaks. But I cannot make the internal web browser work, in spite of having installed net-libs/webkit-gtk-2.40.2-r600. This is the exception I get:

Code: Select all

No more handles because there is no underlying browser available.
Please ensure that WebKit with its GTK 3.x/4.x bindings is installed.
org.eclipse.swt.SWTError: No more handles because there is no underlying browser available.
Please ensure that WebKit with its GTK 3.x/4.x bindings is installed.
	at org.eclipse.swt.SWT.error(SWT.java:4944)
	at org.eclipse.swt.browser.Browser.<init>(Browser.java:119)
	at org.eclipse.ui.internal.browser.BrowserViewer.<init>(BrowserViewer.java:239)
	at org.eclipse.ui.internal.browser.WebBrowserView.createPartControl(WebBrowserView.java:51)
Relevant Eclipse documentation: https://www.eclipse.org/swt/faq.php#browserlinux
The Gentoo package seems to depend on both GTK-4 and GTK+-3 8O :

Code: Select all

# equery depgraph --depth 1 webkit-gtk-2.40.2-r600
* Searching for webkit-gtk2.40.2-r600 ...

* dependency graph for net-libs/webkit-gtk-2.40.2-r600
`--  net-libs/webkit-gtk-2.40.2-r600  amd64
`--  x11-libs/cairo-1.17.8  (>=x11-libs/cairo-1.16.0) amd64  [X?]
`--  media-libs/fontconfig-2.14.2-r2  (>=media-libs/fontconfig-2.13.0) amd64
`--  media-libs/freetype-2.13.0  (>=media-libs/freetype-2.9.0) amd64
`--  dev-libs/libgcrypt-1.10.1-r3  (>=dev-libs/libgcrypt-1.7.0) amd64
`--  x11-libs/gtk+-3.24.37  (>=x11-libs/gtk+-3.22.0) amd64  [aqua? introspection? wayland? X?]
`--  gui-libs/gtk-4.10.3  (gui-libs/gtk) amd64
Present WebKit libraries:

Code: Select all

# locate libwebkit
/usr/lib64/libwebkitgtk-6.0.so
/usr/lib64/libwebkitgtk-6.0.so.4
/usr/lib64/libwebkitgtk-6.0.so.4.0.3
/usr/lib64/webkitgtk-6.0/injected-bundle/libwebkitgtkinjectedbundle.so
Last edited by acarstoiu on Fri Jun 23, 2023 8:35 am, edited 1 time in total.
Top
fedeliallalinea
Administrator
Administrator
User avatar
Posts: 31985
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:
Contact fedeliallalinea
Website

  • Quote

Post by fedeliallalinea » Wed Jun 21, 2023 5:33 pm

Try to install net-libs/webkit-gtk:4.1.
Questions are guaranteed in life; Answers aren't.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
Top
logrusx
Advocate
Advocate
User avatar
Posts: 3533
Joined: Thu Feb 22, 2018 2:29 pm

  • Quote

Post by logrusx » Wed Jun 21, 2023 7:13 pm

fedeliallalinea wrote:Try to install net-libs/webkit-gtk:4.1.
Wrong. Eclipse can only use webkit-gtk:4

Best Regards,
Georgi
Top
CaptainBlood
Advocate
Advocate
User avatar
Posts: 4237
Joined: Sun Jan 24, 2010 9:38 am

  • Quote

Post by CaptainBlood » Thu Jun 22, 2023 5:38 am

Just launched eclipse-bin-4.27 from console as in

Code: Select all

user@amd64 ~ $ eclipse-bin-4.27
Picked up _JAVA_OPTIONS: -Xmx1g
10:19:41.735 [main] DEBUG org.eclipse.m2e.core.internal.project.registry.ProjectRegistryRefreshJob - Queued refresh request: []
with

Code: Select all

eix webkit-gtk
[U] net-libs/webkit-gtk
     Available versions:  
     (4)    2.40.1(4/37)^t 2.40.2(4/37)^t
     (4.1)  2.40.1-r410(4.1/0)^t 2.40.2-r410(4.1/0)^t
     (6)    2.40.1-r600(6/0)^t 2.40.2-r600(6/0)^t
       {X aqua avif examples gamepad gles2-only +gstreamer +introspection +jpeg2k +jumbo-build keyring lcms pdf seccomp spell systemd wayland}
     Installed versions:  2.40.2-r410(4.1/0)^t(03:03:52 13/06/2023)(X gles2-only introspection jumbo-build seccomp wayland -aqua -avif -examples -gamepad -gstreamer -jpeg2k -keyring -lcms -pdf -spell -systemd)
Matching ebuild:

Code: Select all

/var/db/repos/local-repo/dev-util/eclipse-sdk-bin/eclipse-sdk-bin-4.27.0.ebuild



# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit eutils desktop

SR="R"
RNAME="2023-03"

SRC_BASE="https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/${RNAME}/${SR}/eclipse-java-${RNAME}-${SR}-linux-gtk"

DESCRIPTION="Eclipse SDK"
HOMEPAGE="http://www.eclipse.org"
SRC_URI="amd64? ( ${SRC_BASE}-x86_64.tar.gz&r=1 -> eclipse-java-${RNAME}-${SR}-linux-gtk-x86_64-${PV}.tar.gz )"

LICENSE="EPL-1.0"
SLOT="4.27"
KEYWORDS="~x86 ~amd64"
IUSE=""

RDEPEND="
        >=virtual/jdk-1.8
        x11-libs/gtk+:2"

S=${WORKDIR}/eclipse

src_install() {
        local dest=/opt/${PN}-${SLOT}

        insinto ${dest}
        doins -r features icon.xpm plugins artifacts.xml p2 eclipse.ini configuration dropins

        exeinto ${dest}
        doexe eclipse

        docinto html
        dodoc -r readme/*

        cp "${FILESDIR}"/eclipserc-bin-${SLOT} "${T}" || die
        cp "${FILESDIR}"/eclipse-bin-${SLOT} "${T}" || die
        sed "s@%SLOT%@${SLOT}@" -i "${T}"/eclipse{,rc}-bin-${SLOT} || die

        insinto /etc
        newins "${T}"/eclipserc-bin-${SLOT} eclipserc-bin-${SLOT}

        newbin "${T}"/eclipse-bin-${SLOT} eclipse-bin-${SLOT}
        make_desktop_entry "eclipse-bin-${SLOT}" "Eclipse ${PV} (bin)" "${dest}/icon.xpm"
}
likely lacking many dependencies.


EDIT: for consistency

Code: Select all

user@amd64 ~ $ for i in eclipse-bin-4.27 eclipserc-bin-4.27; do echo ----------------------;echo $i;echo ----------------------; cat /var/db/repos/local-repo/dev-util/eclipse-sdk-bin/files/$i; done
----------------------
eclipse-bin-4.27
----------------------
#! /bin/sh
#
# Tiny startup wrapper for Eclipse
#
# Copyright (c) 2004, Karl Trygve Kalleberg <karltk@gentoo.org>
# Copyright (c) 2007-2008, Jean-Noël Rivasseau <elvanor@gentoo.org>
# Copyright (c) 2004-2008, Gentoo Foundation
#
# Licensed under the GNU General Public License, version 2
#

SLOT="%SLOT%"

[ -f "/etc/eclipserc-bin-${SLOT}" ] && . "/etc/eclipserc-bin-${SLOT}"
[ -f "$HOME/gentoo/.eclipserc" ] && . "$HOME/gentoo/.eclipserc"

ECLIPSE_HOME=${ECLIPSE_HOME:="/opt/eclipse-sdk-bin-%SLOT%"}
ECLIPSE_BIN="${ECLIPSE_HOME}/eclipse"

if [ ! -x "${ECLIPSE_BIN}" ] ; then
	echo "Failed to find executable '${ECLIPSE_BIN}'" > /dev/stderr
	exit 1
fi

if [ $(id -u) -eq 0 ] ; then
	echo "Do not run eclipse as root user! Exiting ..." > /dev/stderr
	exit 1
fi

case "$(java-config -f)" in
	*gcj*)
		export JAVA_PKG_CLASSMAP="${ECLIPSE_HOME}/eclipse.gcjdb"
		;;
esac

#eval $(gjl --package "swt-${SLOT}" --get-args)

[ -n "${ECLIPSE_XMS}" ] && VM_ARGS="${VM_ARGS} -Xms${ECLIPSE_XMS}"
[ -n "${ECLIPSE_XMX}" ] && VM_ARGS="${VM_ARGS} -Xmx${ECLIPSE_XMX}"
[ -n "${ECLIPSE_PERMSIZE}" ] && VM_ARGS="${VM_ARGS} -XX:PermSize=${ECLIPSE_PERMSIZE}"
[ -n "${ECLIPSE_MAX_PERMSIZE}" ] && VM_ARGS="${VM_ARGS} -XX:MaxPermSize=${ECLIPSE_MAX_PERMSIZE}"

# Fix for JRE 1.5.
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib

exec "${ECLIPSE_BIN}" -vm $(java-config --java) "$@" "${ECLIPSE_USER_ARGS}" -vmargs ${VM_ARGS} 
----------------------
eclipserc-bin-4.27
----------------------
# This file specifies some initial Eclipse settings, like memory allowed
# These settings only affect Eclipse startup and overall configuration
# Main Eclipse configuration should be done within Eclipse (with the GUI)

# Following variables controls the minimal and maximum amounts of memory
# allocated to Eclipse (respectively).
# Increase those numbers if you get OutOfMemory errors.

ECLIPSE_XMS=128m
ECLIPSE_XMX=256m

# Following variables controls the minimal and maximum amounts of memory
# allocated to the permanent generation space.
# This space contains data related to all classes.
# Thus, if you use a lot of Eclipse plugins, it is recommended to uncomment
# these variables and even increase it, if you have enough RAM.
# Else you will get crashes related to OutOfMemory in PermGen exceptions. 

#ECLIPSE_PERMSIZE=64m
#ECLIPSE_MAX_PERMSIZE=128m
Hope it helps.

Thks 4 ur attention, interest & support
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Top
logrusx
Advocate
Advocate
User avatar
Posts: 3533
Joined: Thu Feb 22, 2018 2:29 pm

  • Quote

Post by logrusx » Thu Jun 22, 2023 5:56 am

CaptainBlood wrote: Hope it helps.
This is not the way to go.

Eclipse just wasn't meant to be managed by portage. The solution is to emerge webkit-gtk 4/37 and download an eclipse distribution in your home directory. And swallow the headaches of Eclipse's crappy packaging and update system.

Please don't confuse users with custom ebuilds.
acarstoiu wrote: The Gentoo package...
There is no Gentoo package and there likely won't be. The overlay you likely got that ebuild from hasn't been touched for 2 years.

Best Regards,
Georgi
Top
CaptainBlood
Advocate
Advocate
User avatar
Posts: 4237
Joined: Sun Jan 24, 2010 9:38 am

  • Quote

Post by CaptainBlood » Thu Jun 22, 2023 6:19 am

logrusx wrote:
CaptainBlood wrote: Hope it helps.
This is not the way to go.
I guess you know what you're talking about.
Nevertheless launching eclipse here with only net-libs/webkit-gtk:4.1 installed with no complain in console.

I may be totally mistaking though.

Only posted ebuild as I'm not sure java flavor installed here matches the one from the OP.

Thks 4 ur attention, interest & support
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Top
logrusx
Advocate
Advocate
User avatar
Posts: 3533
Joined: Thu Feb 22, 2018 2:29 pm

  • Quote

Post by logrusx » Thu Jun 22, 2023 6:25 am

CaptainBlood wrote:
logrusx wrote:
CaptainBlood wrote: Hope it helps.
This is not the way to go.
I guess you know what you're talking about.
Nevertheless launching eclipse here with only net-libs/webkit-gtk:4.1 installed with no complain in console.

I may be totally mistaking though.

Only posted ebuild as I'm not sure java flavor installed here matches the one from the OP.

Thks 4 ur attention, interest & support

It's not about eclipse complaining in console, it's about the SWT browser widget only working with webkit-gtk:4. It's not a big deal actually, because without webkit-gtk only the links are not working and in the same time webkit-gtk consumes huge amount of memory. This whole thing is crappy as hell as everything conceived by IBM.

Best Regards,
Georgi
Top
fedeliallalinea
Administrator
Administrator
User avatar
Posts: 31985
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:
Contact fedeliallalinea
Website

  • Quote

Post by fedeliallalinea » Thu Jun 22, 2023 6:33 am

logrusx wrote:Wrong. Eclipse can only use webkit-gtk:4
But you installed net-libs/webkit-gtk:6
Questions are guaranteed in life; Answers aren't.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
Top
logrusx
Advocate
Advocate
User avatar
Posts: 3533
Joined: Thu Feb 22, 2018 2:29 pm

  • Quote

Post by logrusx » Thu Jun 22, 2023 9:10 am

fedeliallalinea wrote:
logrusx wrote:Wrong. Eclipse can only use webkit-gtk:4
But you installed net-libs/webkit-gtk:6
Please don't add more confusion. The question has been answered already.

Best Regards,
Georgi
Top
acarstoiu
Apprentice
Apprentice
Posts: 209
Joined: Wed Oct 20, 2004 10:14 am

  • Quote

Post by acarstoiu » Thu Jun 22, 2023 1:07 pm

logrusx wrote:
acarstoiu wrote: The Gentoo package...
There is no Gentoo package and there likely won't be. The overlay you likely got that ebuild from hasn't been touched for 2 years.
Georgi
You're missing the point, I was talking about the webkit-gtk package, I even quoted the command line, so there would be no confusion. I also explained that I have manually extracted the software in /opt, so no ebuild could have been used :wink:

Anyway, thanks for the help, everyone - I'll test and report back. I'm also interested in the why, what is Eclipse expecting and doesn't find :?:
Top
logrusx
Advocate
Advocate
User avatar
Posts: 3533
Joined: Thu Feb 22, 2018 2:29 pm

  • Quote

Post by logrusx » Thu Jun 22, 2023 2:11 pm

You need to emerge webkit-gtk:4/37. This is the only webkit-gtk eclipse can currently find. It is not webkit-gtk's problem.
EDIT: just tested 4.1 and I owe @fedeliallalinea an apology. It works.

To my knowledge the problem comes from the fact that Eclipse supports gtk 3 only, I don't remember details. I just know that this version will work for you because it works for me. Also it has different ABI from the other 2 available in tree. That's why it's slotted and subslotted. That's why Eclipse will only work with it.

EDIT2: eclipse looks for libwebkit2gtk 4.0.so.37 and 4.1.so.0 (where the slot and subslot numers come from), webkit-gtk:6 has libwebkitgtk-6.so.0. Eclipse still seem to not support it. A couple of months ago it didn't even support 4.1 either.

Best Regards,
Georgi
Top
acarstoiu
Apprentice
Apprentice
Posts: 209
Joined: Wed Oct 20, 2004 10:14 am

  • Quote

Post by acarstoiu » Fri Jun 23, 2023 9:18 am

Yes, it worked after

Code: Select all

emerge net-libs/webkit-gtk:4.1
Thanks :)
Top
Post Reply

12 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic