Perl and GTK3

Preamble

After reading that Clam Tk is actually Perl using GTK (see ClamAV vs ClamWin vs ClamTK: What the Heck is Going On? and wiki – ClamTk), I thought I could add an interface to the WP ToC perl script.

Links

Downloading kevin’s master zip and expanding in the eclipse-workspace doesn’t work, so you need to make each project separately.

First install GTK3 in cpan, using install Gtk3. This failed for me, endless errors, gave up. The issue seems to be the same as this: How to install the Gtk3 module for Perl from CPAN?

Here is the full installation output and error.

http://gtk.10911.n7.nabble.com/Installing-perl-Gtk3-under-OS-X-td65949.html

I tried brew install gtk+3. It was already installed

Warning: gtk+3 3.24.24 is already installed and up-to-date.
To reinstall 3.24.24, run:
brew reinstall gtk+3

First issue: Directory permissions

Solution: run as sudo cpan install Gtk3

This removes the errors:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ERROR: Can't create '/Library/Perl/5.18/ExtUtils'
mkdir /Library/Perl/5.18/ExtUtils: Permission denied at /System/Library/Perl/5.18/ExtUtils/Install.pm line 469.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Second issue (full output) : libffi version

Requested 'libffi >= 3.0.0' but version of libffi is 2.1
 at Makefile.PL line 129.
*** can not find package libffi >= 3.0.0
*** check that it is properly installed and available in PKG_CONFIG_PATH
at Makefile.PL line 129.

However brew says (link):

Warning: libffi 3.3_2 is already installed and up-to-date.
To reinstall 3.3_2, run:
  brew reinstall libffi

pkg-config --list-all | grep ffi shows (link)

libffi                              libffi - Library supporting Foreign Function Interfaces

Version (link):

MacBook-Pro-van-Macbook:~ macbook$ otool -L /usr/lib/libffi.dylib 
/usr/lib/libffi.dylib:
/usr/lib/libffi.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)
MacBook-Pro-van-Macbook:~ macbook$

Path (link) isn’t set. echo PKG_CONFIG_PATH returns a null string. Need to find the location of the v3 libffi and put in PKG_CONFIG_PATH

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s