missing jsc.h when building wxpython

I have a 32bit pc with mint 19 running. No problem there. For installing wxpython I run this bash-script:

function installWxPython {
p3=$(python3 --version)
if [[ $? = 0 ]]; then
echo “Python3 = $p3”
else
echo “Get Python 3”
exit 1
fi
pip3=$(pip3 --version)
if [[ $? = 0 ]]; then
echo “Pip = $pip3”
else
echo “Get pip for python3”
exit 1
fi
echo “Get some extra’s…”
sudo apt-get -y install dpkg-dev build-essential python3.6-dev libjpeg-dev libtiff-dev libpng-dev
sudo apt-get -y install libgstreamer-plugins-base1.0-dev
sudo apt-get -y install libwebkitgtk-dev
sudo apt-get -y install libnotify-dev freeglut3 freeglut3-dev libgtk2.0-dev libsm-dev
sudo apt-get -y install libgtk-3-dev libwebkitgtk-dev libwebkitgtk-3.0-dev libwebkit2gtk-4.0-dev
sudo apt-get -y install python-wxgtk3.0-dev python-wxversion python-wxtools
sudo apt-get -y install libxtst-dev libsdl1.2-dev libsdl2-dev
sudo apt autoremove -y

if false; then
    sudo -H pip3 install -U wxPython
    if [[ $? = 0 ]]; then
        exit 0
    fi
fi
if true; then
    sudo -H pip3 install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04 wxPython
    exit $?
fi

}

I end up with an error:

In file included from /usr/include/webkitgtk-4.0/webkit2/webkit2.h:54:0,
from /tmp/pip-build-ac95dka0/wxPython/ext/wxWidgets/src/gtk/webview_webkit2.cpp:23:
/usr/include/webkitgtk-4.0/webkit2/WebKitJavascriptResult.h:28:10: fatal error: jsc/jsc.h: No such file or directory
#include <jsc/jsc.h>
^~~~~~~~~~~
compilation terminated.
Makefile:39832: recipe for target ‘webviewdll_webview_webkit2.o’ failed
make: *** [webviewdll_webview_webkit2.o] Error 1
make: *** Waiting for unfinished jobs…
Error building
ERROR: failed building wxWidgets
Traceback (most recent call last):
File “build.py”, line 1321, in cmd_build_wx
wxbuild.main(wxDir(), build_options)
File “/tmp/pip-build-ac95dka0/wxPython/buildtools/build_wxwidgets.py”, line 499, in main
exitIfError(wxBuilder.build(dir=buildDir, options=args), “Error building”)
File “/tmp/pip-build-ac95dka0/wxPython/buildtools/build_wxwidgets.py”, line 85, in exitIfError
raise builder.BuildError(msg)
buildtools.builder.BuildError: Error building
Finished command: build_wx (6m34.461s)
Finished command: build (6m34.461s)
Command ‘"/usr/bin/python3" -u build.py build’ failed with exit code 1.

Appearently jsc.h is missing. This file is somewehere in webkit, but I installed already a number of webkit libraries. Which one is missing ? Or should I grab jsc.h from github and dump it somewhere in …/lib, which lib folder?

Help, anybody, I need some help!

I have a 32bit pc with mint 19 running. No problem there. For installing wxpython I run this bash-script:

It took me a minute to realize why it is trying to build the wheel instead of just using the existing ones at the URL you give pip. I didn’t think there were many new installs using 32-bit linuxes these days. Just curious why are you using that instead of 64-bit?

sudo apt-get -y install libgtk-3-dev libwebkitgtk-dev libwebkitgtk-3.0-dev libwebkit2gtk-4.0-dev

I don’t install libwebkit2gtk-4.0-dev in the build VM for Ubuntu-18.04, you may want to try without it. It could be causing some confusion somewhere in the build.

sudo apt-get -y install python-wxgtk3.0-dev python-wxversion python-wxtools

You won’t need these unless you also want wxPython classic installed. And if that’s the case then you probably don’t want to install wxPython4 directly in the master Python environment as they could conflict. Instead you could build the wheel for wxPython4 and then install it in Python venvs where you need it.

···

On Thursday, October 4, 2018 at 8:47:05 AM UTC-7, Roel Dijkema wrote:

Robin

Hello Robin,

My PC just will not break down. It keeps on running. Just a fresh install of mint occasionally and ready to go… apart from wxpython. ,:slight_smile:

(haha, my mobile keyboard app changes that to ‘Scotty on’).

I will give your suggestions a try.

Thank you for your reply.

Verzonden door BlueMail

Op 4 okt. 2018, om 18:30, Robin Dunn robin@alldunn.com schreef:

···

On Thursday, October 4, 2018 at 8:47:05 AM UTC-7, Roel Dijkema wrote:

I have a 32bit pc with mint 19 running. No problem there. For installing wxpython I run this bash-script:

It took me a minute to realize why it is trying to build the wheel instead of just using the existing ones at the URL you give pip. I didn’t think there were many new installs using 32-bit linuxes these days. Just curious why are you using that instead of 64-bit?

sudo apt-get -y install libgtk-3-dev libwebkitgtk-dev libwebkitgtk-3.0-dev libwebkit2gtk-4.0-dev

I don’t install libwebkit2gtk-4.0-dev in the build VM for Ubuntu-18.04, you may want to try without it. It could be causing some confusion somewhere in the build.

sudo apt-get -y install python-wxgtk3.0-dev python-wxversion python-wxtools

You won’t need these unless you also want wxPython classic installed. And if that’s the case then you probably don’t want to install wxPython4 directly in the master Python environment as they could conflict. Instead you could build the wheel for wxPython4 and then install it in Python venvs where you need it.

Robin

Hi Robin,

I adapted my script:

  sudo apt-get -y install dpkg-dev build-essential

python3.6-dev
sudo apt-get -y install libjpeg-dev libtiff-dev libpng-dev
libxtst-dev libsdl1.2-dev libsdl2-dev
sudo apt-get -y install libgstreamer-plugins-base1.0-dev
sudo apt-get -y install libnotify-dev freeglut3 freeglut3-dev
libgtk2.0-dev libsm-dev libgtk-3-dev
sudo apt-get -y install libwebkitgtk-dev libwebkitgtk-3.0-dev
#sudo apt-get -y install libwebkit2gtk-4.0-dev
#sudo apt-get -y install python-wxgtk3.0-dev python-wxversion
python-wxtools

  The outcommented lines...I uninstalled those packages. After

that:

Collecting wxPython
Using cached
Requirement already up-to-date: PyPubSub in
/usr/local/lib/python3.6/dist-packages (from wxPython)
Requirement already up-to-date: six in
/usr/lib/python3/dist-packages (from wxPython)
Building wheels for collected packages: wxPython
Running setup.py bdist_wheel for wxPython … done
Stored in directory:
/root/.cache/pip/wheels/f5/dc/99/ee2a2d2c76e7e2d24a6e6d8750f3907b2e77dbf31d61a03a59
Successfully built wxPython
Installing collected packages: wxPython
Successfully installed wxPython-4.0.3

  I use pycharm as IDE and it found wxpython. So mission completed

successfully! Thank you.

Kind regards, Roel

···

https://files.pythonhosted.org/packages/dd/31/bd55ab40e406a026a7fda0bb5eb61f466682544ae91ac26267c750f5e618/wxPython-4.0.3.tar.gz

  On 10/04/2018 06:30 PM, Robin Dunn

wrote:

    On Thursday, October 4, 2018 at 8:47:05 AM UTC-7,

Roel Dijkema wrote:

          I have a 32bit pc with mint 19 running. No problem

there. For installing wxpython I run this bash-script:

      It took me a minute to realize why it is trying to build

the wheel instead of just using the existing ones at the URL
you give pip. I didn’t think there were many new installs
using 32-bit linuxes these days. Just curious why are you
using that instead of 64-bit?

          sudo apt-get -y install libgtk-3-dev

libwebkitgtk-dev libwebkitgtk-3.0-dev
libwebkit2gtk-4.0-dev

      I don't install libwebkit2gtk-4.0-dev in the build VM for

Ubuntu-18.04, you may want to try without it. It could be
causing some confusion somewhere in the build.

          sudo apt-get -y install python-wxgtk3.0-dev

python-wxversion python-wxtools

      You won't need these unless you also want wxPython classic

installed. And if that’s the case then you probably don’t want
to install wxPython4 directly in the master Python environment
as they could conflict. Instead you could build the wheel for
wxPython4 and then install it in Python venvs where you need
it.

Robin

  You received this message because you are subscribed to the Google

Groups “wxPython-dev” group.

  To unsubscribe from this group and stop receiving emails from it,

send an email to wxPython-dev+unsubscribe@googlegroups.com.

  For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

-- Met vriendelijke groet
Roel Dijkema