How to install Uniconvertor (command-line app) on Mac OS 10.7.2 (Lion)?

11

1

Uniconvertor is a command-line tool that shares code with the sK1 Project. it's used to convert from one type of vector graphic file to another like this:

uniconvertor before.eps after.svg

I'm looking for a step by step solution to install this tool on my laptop.

A similar question posted on the Uniconvertor Forum back in August is still unanswered.

I read about Uniconvertor in an answer posted by Neil but don't understand how to send him a message directly for more details.

RecentlyAFish

Posted 2012-01-05T03:14:07.323

Reputation: 111

I don't think it was ever meant to be installed on OS X because it has a few dependencies … you'd have to compile it from source anyway. I dropped Nell a comment with a link to your question. – slhck – 2012-01-05T08:09:06.550

Answers

3

I have Lion with MacPorts installed packages.

I will describe here all what I did to make compilation work. May be some steps are unnecessary, maybe some additionnal libraries will have to be installed (using MacPorts) prior to sk1libs or uniconvertor compilation to make it work.

My answer is based on @bitboxer's answer with some additions.

Downloads

I used the links provided here: http://sk1project.org/modules.php?name=Products&product=uniconvertor&op=download

Downloaded and extracted uniconvertor and sk1libs

sk1libs installation

First try

I first ran the following:

$ export LDFLAGS="-L/usr/X11/lib"
$ export CFLAGS="-I/usr/X11/include -I/usr/X11/include/freetype2 -I/usr/X11/include/libpng15"
$ python setup.py build

Please notice that the libpng version is 15 (not 12 as in @bitboxer's answer). I noticed this searching in /usr/X11/include directory.

Which gave some errors:

ld: library not found for -llcms
collect2: ld returned 1 exit status
ld: library not found for -llcms
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/3w/5x6f3w0n4rg0w6sdq2n_48j00000gn/T//cc8y3Erh.out (No such file or directory)
error: command 'llvm-gcc-4.2' failed with exit status 1

Troubleshooting

So I tried to figure out if I had already lcms library installed:

$ locate lcms
...
/opt/local/include/lcms.h
...
/opt/local/lib/liblcms.a
....

lcms was installed by MacPort on my computer (lcms seems to be a dependency of Inkscape).

Second try: success

So I did this:

$ export LDFLAGS="-L/usr/X11/lib -L/opt/local/lib/"
$ export CFLAGS="-I/usr/X11/include -I/usr/X11/include/freetype2 -I/usr/X11/include/libpng15 -I/opt/local/include"

Which added the MacPorts include and lib dir to compilation flags.

Then:

$ python setup.py build

Which ended with no errors (but some warnings).

Then:

$ sudo python setup.py install

Uniconvertor installation

Same thing (I ran it just after sk1libs compilation, so LDFLAGS and CFLAGS value are the same):

$ python setup.py build
$ sudo python setup.py install

lauhub

Posted 2012-01-05T03:14:07.323

Reputation: 165

I'm getting ld: library not found for -lX11 when running sudo python setup.py build. Any idea how to fix this ? I'm on El Capitan. – Geoffrey Hug – 2016-10-15T20:38:39.560

1

Download sk1libs and uniconvertor and extract it. Open Terminal.app and go into the sk1libs dir. Execute this:

export LDFLAGS="-L/usr/X11/lib"
export CFLAGS="-I/usr/X11/include -I/usr/X11/include/freetype2 -I/usr/X11/include/libpng12"
python setup.py build
sudo python setup.py install

After that go into the uniconvert dir and do the same. That should do the trick.

You may get an error like this:

In file included from src/imaging/libimagingft/_imagingft.c:31: /usr/local/include/ft2build.h:56:10: fatal error: 'freetype/config/ftheader.h' file not found

You can fix it with symbolic link - execute this command:

sudo ln -s /usr/local/include/freetype2/freetype/ /usr/include/freetype

bitboxer

Posted 2012-01-05T03:14:07.323

Reputation: 243

2I failed to install sk1libs. I got 0.9.1. First, you have unnecessary space between '-' and 'I' an second command. Second, there wasn't /usr/X11/include/libpng12 folder on my computer but was /usr/X11/include/libpng15. After being corrected to libpng15 build finished with error src/pycms/_pycms.c:21:10: fatal error: 'lcms.h' file not found. What would you suggest? – Valeriy Van – 2013-02-07T12:58:29.340

I fixed the lcms.h error by creating a /usr/local/include/freetype symlink: ln -s /usr/local/include/freetype2 /usr/local/include/freetype – Koen. – 2014-03-31T10:30:17.383

1

Follow the above in Mavericks. Just took a shot to see if it would work. Did this:

Uncompressed the tar.gz to a ~/tmp/uniconvertor-1.1.5 Opened a terminal and cd ~/tmp/uniconvertor-1.1.5/ sudo python setup.py install or su to a root shell and python setup.py install

Many warnings in the process. I saved a log and will look it over. OSX needed command line developer tools to get cc. It prompted and I downloaded. Went back into Inkwell and got this error on import attempt.

Below: This seems more than a little vague in the error console of Inkwell. Posting here in case someone wants to figure it out. I'm chalking it up to getting what I get for thinking I could try this the "easy way."

Inkwell error:

UniConvertor failed:

Traceback (most recent call last):
  File "/usr/local/bin/uniconvertor", line 13, in <module>
    uniconv_run()
  File "/Library/Python/2.7/site-packages/uniconvertor/__init__.py", line 83, in uniconv_run
    from app.io import load
  File "/Library/Python/2.7/site-packages/uniconvertor/app/__init__.py", line 69, in <module>
    from conf.configurator import Configurator
  File "/Library/Python/2.7/site-packages/uniconvertor/app/conf/configurator.py", line 11, in <module>
    from app.events import connector
  File "/Library/Python/2.7/site-packages/uniconvertor/app/__init__.py", line 69, in <module>
    from conf.configurator import Configurator
  File "/Library/Python/2.7/site-packages/uniconvertor/app/conf/configurator.py", line 13, in <module>
    from sk1libs.utils.fs import gethome
ImportError: No module named sk1libs.utils.fs

user3259519

Posted 2012-01-05T03:14:07.323

Reputation: 11

0

Here's a step by step guide to install uniconvertor with Homebrew as of April 2017. It's available, but buried and only accessibly as a HEAD install.

Open the Terminal app and install Home Brew, a mac package manager, by running this command:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Once you have home brew installed you can install uniconvertor with the following command:

brew install --HEAD uniconverter

I realize this involves installing a separate system (Homebrew), but it's worth it. I use it to manage so many similar packages on my Mac.

Kevin Leary

Posted 2012-01-05T03:14:07.323

Reputation: 101

0

Today I have successfully installed UniConvertor on my Snow Leopard:

  1. Downloaded it from softpedia
  2. Uncompressed the tar.gz to a ~/tmp/uniconvertor-1.1.5
  3. Opened a terminal and cd ~/tmp/uniconvertor-1.1.5/
  4. sudo python setup.py install or su to a root shell and python setup.py install

And now it works like charme.

Attila Fulop

Posted 2012-01-05T03:14:07.323

Reputation: 403

Can you verify this works in Lion? – JoshP – 2012-10-10T17:19:45.420

I don't have Lion unfortunately – Attila Fulop – 2012-10-10T17:33:04.110