New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review/Retire pycontrib #3399

skef opened this Issue Jan 7, 2019 · 2 comments


None yet
2 participants
Copy link

skef commented Jan 7, 2019

I've been looking into the contents of pycontrib, mostly because graphicore shows warnings on my system.

graphicore itself is way out of date. It would be fairly easy to make it somewhat less so. Most of the meat of it is in graphicore/, and there is a more contemporary version of that interface at . Unfortunately that version only works up to IPython 5, or at least it is broken for version 7, which is what I have on my system. Fixing it is not straightforward. may be an implicit piece of graphicore -- it's referenced in and not anywhere else obvious.

gdraw/ needs a one-line fix (to the import) but gdraw/ is probably a lost cause. It's trying be a bridge for python gtk-based UI elements to gdraw, but it hasn't been updated to match FontForge's gtk-based implementation, so it's playing games at the X level (asking for an xid for example). I'm not sure anything it does is even necessary now -- I got graphicore 1/4 working without it.

I can't vouch for gdraw/, but it's definitely wizard-level stuff.

simple/ works fine for me. Whether run with fontforge or python, simple/ gets just past the line that prints "new ..." and dumps core like this:

Core was generated by `fontforge ./'.
Program terminated with signal SIGBUS, Bus error.
#0  0x00007ff3d7e0fb7b in PyObject_GetAttr () from /usr/lib/
(gdb) where
#0  0x00007ff3d7e0fb7b in PyObject_GetAttr () at /usr/lib/
#1  0x00007ff3d7e4cd3a in _PyEval_EvalFrameDefault () at /usr/lib/
#2  0x00007ff3d7d93b59 in _PyEval_EvalCodeWithName () at /usr/lib/
#3  0x00007ff3d7d94a94 in PyEval_EvalCodeEx () at /usr/lib/
#4  0x00007ff3d7d94abc in PyEval_EvalCode () at /usr/lib/
#5  0x00007ff3d7ebec44 in  () at /usr/lib/
#6  0x00007ff3d7ec086e in PyRun_FileExFlags () at /usr/lib/
#7  0x00007ff3d7ec1c25 in PyRun_SimpleFileExFlags () at /usr/lib/
#8  0x00007ff3d7ec3e67 in  () at /usr/lib/
#9  0x00007ff3d7d5f6a8 in Py_Main () at /usr/lib/
#10 0x00007ff3d9a4ce14 in PyFF_Main (argc=2, argv=0x7fff63992398, start=1) at python.c:18748
#11 0x00007ff3d9a7fb39 in _CheckIsScript (argc=2, argv=0x7fff63992398) at scripting.c:10959
#12 0x00007ff3d9a7fbb6 in CheckIsScript (argc=2, argv=0x7fff63992398) at scripting.c:10977
#13 0x00007ff3da344586 in fontforge_main (argc=2, argv=0x7fff63992398) at startui.c:1072
#14 0x000055fcdc29213a in main (argc=2, argv=0x7fff63992398) at main.c:39

Someone might want to glance at that. is on its surface in somewhat better shape. needs parentheses for its print line, but otherwise parses. I get these errors:

Joined session, font name: Untitled1
web-test-collab: starting up...
    throw err;

Error: Cannot find module ''
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15)
    at Function.Module._load (internal/modules/cjs/loader.js:529:25)
    at Module.require (internal/modules/cjs/loader.js:657:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/usr/share/fontforge/nodejs/collabwebview/server.js:12:10)
    at Module._compile (internal/modules/cjs/loader.js:721:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
    at Function.Module._load (internal/modules/cjs/loader.js:552:3)
kf5.kio.core: couldn't create slave: "klauncher said: Error loading '/usr/lib/qt/plugins/kf5/kio/'."
kf5.kio.widgets: KRun(0x55fdfa0f3ce0) ERROR (stat): 173   "Unable to create io-slave. klauncher said: Error loading '/usr/lib/qt/plugins/kf5/kio/'."

But they're so specific to my environment that it's hard to know what would happen other systems.

Recommendation: At a minimum put graphicore somewhere that won't generate errors.


This comment has been minimized.

Copy link

frank-trampe commented Jan 7, 2019

Are you getting these errors just bootstrapping, configuring, and making with no special options? What platform?


This comment has been minimized.

Copy link

skef commented Jan 7, 2019

My platform is Arch Linux. I've been building the git repo code with a PKGBUILD very close to that used to build FontForge as currently shipped with Arch, where the build function is:

build() {
    cd "${gitname}"
    export LIBZMQ_LIBS=-lzmq
    ./bootstrap --force
    ./configure \
        --prefix=/usr \
        --enable-debug \
        --mandir=/usr/share/man \


One result of this is that the python scripts I describe wind up in /usr/share/fontforge/python.

graphicore produces warnings every time the program starts up. The other programs only cause problems when explicitly run. But the fundamental issue is that Arch now uses Python 3(.7) by default and much of this code dates from the Python 2 era.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment