plt conversion tools does not work in OS X

Bug #1187197 reported by paul beard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Undecided
Unassigned

Bug Description

This may not something directly fixable by the Inkscape team but it would make my life simpler if I could do all my conversions and exports on one machine.

If I try to export/convert a plt file, I get this error (I generated this with uniconvertor on the command line but it's the same error, stems from some brokenness within uniconvertor that surfaces when Inkscape calls on it).

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

No one at SK seems to be bothered by this: maybe take this off the list of conversion options?

Revision history for this message
su_v (suv-lp) wrote :

Please provide information about you OS/platform, and inkscape version (see Inkscape menu 'Help > About Inkscape').

> If I try to export/convert a plt file, (…)

Please attach the SVG file used to create the backtrace from UniConvertor to the bug report - while UniConvertor bugs won't be fixed by the Inkscape project, this would allow further testing on other systems/platforms.

Changed in inkscape:
status: New → Incomplete
tags: added: exporting plt uniconvertor
tags: removed: plt
Revision history for this message
paul beard (paulbeard) wrote :

As requested, a simple SVG file.

Revision history for this message
su_v (suv-lp) wrote :

Error not reproduced with UniConvertor 1.1.5 on OS X 10.7.5 (using the patch for sk1libs as mentioned in [1]).

> (…) no longer work in OS X

If UniConvertor used to work for you, but no longer does - what has changed since on your system?

Apparently your local installation of UniConvertor is (partially) broken: you seem to be missing the required python module sk1libs. I can reproduce the same error message from UniConvertor if I deactivate the 'sk1libs' python module in my local installation (via MacPorts local port repository).

-----
[1] <http://thread.gmane.org/gmane.comp.graphics.inkscape.devel/39694/focus=39701>

Revision history for this message
su_v (suv-lp) wrote :

Attaching patch used locally for sk1libs (UniConvertor 1.1.5) to replace the stub font path on OS X ('/') with better choices:

Revision history for this message
su_v (suv-lp) wrote :
Revision history for this message
su_v (suv-lp) wrote :

~suv wrote:
> Error not reproduced with UniConvertor 1.1.5 on OS X 10.7.5 (using the patch
> for sk1libs as mentioned in [1]).
>
> [1] <http://thread.gmane.org/gmane.comp.graphics.inkscape.devel/39694/focus=39701>

Correction: that specific issue had been discussed earlier:
<http://thread.gmane.org/gmane.comp.graphics.inkscape.devel/39667/focus=39682>

Revision history for this message
paul beard (paulbeard) wrote :
Download full text (6.2 KiB)

I don't know that it ever worked for me in OS X. It always has in FreeBSD and I am trying to get it working in a virtualized linux install so I have everything in one place.

So there is a patch. Useful to know. Yes, I know I am missing (or uniconvertor can't find) sk1libs. And there are no packages or other methods I can find to install it.

The fact that this can't be repro'ed in 10.7 is of little value if it's broken in 10.8.

Best I can tell, the developers of the sk1/uniconvertor tools don't give a rip about this.

python ./setup.py build
running build
running build_py
copying src/utils/fs.py -> build/lib.macosx-10.8-intel-2.7/sk1libs/utils
running build_ext
building 'sk1libs.pycms._pycms' extension
clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -DMAJOR_VERSION=1 -DMINOR_VERSION=0 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/pycms/_pycms.c -o build/temp.macosx-10.8-intel-2.7/src/pycms/_pycms.o -Wall
clang: warning: argument unused during compilation: '-mno-fused-madd'
src/pycms/_pycms.c:30:1: error: unknown type name 'DWORD'
DWORD
^
src/pycms/_pycms.c:79:2: warning: implicit declaration of function 'cmsErrorAction' is invalid in C99 [-Wimplicit-function-declaration]
        cmsErrorAction(LCMS_ERROR_IGNORE);
        ^
src/pycms/_pycms.c:79:17: error: use of undeclared identifier 'LCMS_ERROR_IGNORE'
        cmsErrorAction(LCMS_ERROR_IGNORE);
                       ^
src/pycms/_pycms.c:96:17: error: use of undeclared identifier 'LCMS_ERROR_IGNORE'
        cmsErrorAction(LCMS_ERROR_IGNORE);
                       ^
src/pycms/_pycms.c:113:17: error: use of undeclared identifier 'LCMS_ERROR_IGNORE'
        cmsErrorAction(LCMS_ERROR_IGNORE);
                       ^
src/pycms/_pycms.c:115:13: warning: implicit declaration of function 'cmsCreateLabProfile' is invalid in C99 [-Wimplicit-function-declaration]
        hProfile = cmsCreateLabProfile(NULL);
                   ^
src/pycms/_pycms.c:115:11: warning: incompatible integer to pointer conversion assigning to 'cmsHPROFILE' (aka 'void *') from 'int';
        hProfile = cmsCreateLabProfile(NULL);
                 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
src/pycms/_pycms.c:129:2: error: use of undeclared identifier 'LPGAMMATABLE'
        LPGAMMATABLE gamma;
        ^
src/pycms/_pycms.c:131:17: error: use of undeclared identifier 'LCMS_ERROR_IGNORE'
        cmsErrorAction(LCMS_ERROR_IGNORE);
                       ^
src/pycms/_pycms.c:133:24: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'cmsContext' (aka 'void *');
        gamma = cmsBuildGamma(256, 2.2);
                              ^~~
/usr/local/include/lcms.h:1112:61: note: passing argument to parameter 'ContextID' here
CMSAPI cmsToneCurve* CMSEXPORT cmsBuildGamma(cmsContext ContextID, cmsFloat64Number Gamma);
                                                            ^
src/pycms/_pycms.c:133:8: error: non-object type 'double (...

Read more...

Revision history for this message
su_v (suv-lp) wrote :

On 2013-06-04 07:38 +0100, paul beard wrote:
> I don't know that it ever worked for me in OS X.

Adapting bug summery accordingly.

summary: - plt conversion tools no longer work in OS X
+ plt conversion tools does not work in OS X
Revision history for this message
su_v (suv-lp) wrote :

On 2013-06-04 07:38 +0100, paul beard wrote:
> The fact that this can't be repro'ed in 10.7 is of little value if it's
> broken in 10.8.

You did not share information about your OS so far in this report. AFAIK the latest stable release UniConvertor 1.1.5 is not broken per se on OS X Mountain Lion (see the discussions on the mailing list I linked to earlier): Personally I do not have access to a Mountain Lion system to verify it myself but I do know that Valerio A. successfully built it on Mountain Lion.

Installation problems with a third-party package or python module on a specific platform IMHO are outside the scope of the Inkscape bug tracker. The official Inkscape package for Mac OS X currently available for download (0.48.2) doesn't include UniConvertor for a reason (at the time the package was created no one had volunteered to fully port UniConvertor/sk1libs to OS X, and to update the Inkscape bundling method to make UniConvertor work if included inside the application bundle).

> Working from the latest source via svn:

I would recommend to use the tarballs of the latest stable releases: UniConvertor 1.1.5 and sk1libs 0.9.1:
<http://sk1project.org/modules.php?name=Products&product=uniconvertor&op=download>
instead of a checkout of the abandoned SVN trunk at sf.net.

> python ./setup.py build
> ERROR>>> LittleCMS header file is not found!
(…)
> /usr/local/lib/pkgconfig/lcms2.pc

AFAIU UniConvertor/sk1libs requires lcms, not lcms2.
Latest release of lcms: 1.19
<http://sourceforge.net/projects/lcms/files/lcms/1.19/>

Current release of lcms2: 2.4
<http://sourceforge.net/projects/lcms/files/lcms/2.4/>

Revision history for this message
su_v (suv-lp) wrote :

> No one at SK seems to be bothered by this:
> maybe take this off the list of conversion options?

Due to the current architecture of script-based (input/output/effect) extensions, specific python modules can't be checked for presence at launch time when all extensions are loaded - this is a known problem, and already tracked in
- Bug #174992 "Extensions check for Python dependencies”
  <https://bugs.launchpad.net/inkscape/+bug/174992>

A major side-effect of this lack of more fine-grained dependency checks is that e.g. UniConvertor-based file types in Inkscape are listed in the file dialogs even if UniConvertor is not available.

Revision history for this message
paul beard (paulbeard) wrote :

If those files worked, I would have used them. But they don't. I didn't realize or care that the sf.net tree was old, if it could be built.

If anyone has any advice on how to build those from source, I'd like to hear it. I have had no luck so far.

sk1libs yields this:
fatal error: too many errors emitted, stopping now [-ferror-limit=]
6 warnings and 20 errors generated.
error: command 'clang' failed with exit status 1

and we don't get any further.

I see this post [http://inkscape.13.x6.nabble.com/Mac-OS-X-Build-0-48-4-RC1-td4965929.html] that shows it can be done but it's not clear why that hasn't been merged into a release. Or are there nightlies I should be looking for? What's holding up 0.4.8.4 release for the rest of us?

Revision history for this message
paul beard (paulbeard) wrote :

I tried the release mentioned above but without the instructions on how to reliably build a functional sk1libs/uniconvertor suite, it's not much of an improvement.

"You need to install the UniConvertor software.
For GNU/Linux: install the package python-uniconvertor.
For Windows: download it from
http://sk1project.org/modules.php?name=Products&product=uniconvertor
and install into your Inkscape's Python location"

Revision history for this message
paul beard (paulbeard) wrote :

I am calling this fixed but unreleased since I have verified that it works in the 0.4.8.4 RC5 build.

Changed in inkscape:
status: Incomplete → Fix Committed
Revision history for this message
su_v (suv-lp) wrote :

paul beard modified on 2013-06-04:
> status: Incomplete → Fix Committed

I strongly disagree with this bug status change by the reporter: There has been no commit to Inkscape's source code repository (neither to trunk nor to the stable release branch 0.48.x) which would have solved the original problem of the reporter to correctly install (an undisclosed version of) UniConvertor 1.x as standalone app on an undisclosed version of OS X.

As mentioned before, IMHO the installation of (standalone) UniConvertor 1.x on OS X Mountain Lion is beyond the scope of Inkscape's bug tracker. Personally, I won't further triage this report.

Revision history for this message
paul beard (paulbeard) wrote :

I have no way of knowing if a fix has been committed: I assumed there was since the RCs that address the bug seem to originate from within the Inkscape-devel community.

The simple fact is that the feature enabled by the uniconvertor code libraries is broken and there is no one on that team interested in fixing: they're evidently focused on releasing a 2.0 release of a 1.x product that is increasingly brittle and unusable. Meanwhile, someone in the Inkscape-devel community has addressed the issue and released a series of Release Candidates of OS X that address the slippage of that platform vs the others.

The installation of those libraries may be beyond the scope of the bugtracker or considered non-essential parts of the application: if that's so, I see no reason why it remains within the feature set, especially given that OS X releases have been slow in coming and this may be part of the delay. If it's a required feature of the release it should be fixed (and obviously someone has done just that) or it should be removed until the developer fixes it. And as noted, they don't seem to care.

I'll see what other status options there are. At the end of the day, some of us just want to get some work done, rather than find reasons why it can't be done.

Changed in inkscape:
status: Fix Committed → Opinion
Revision history for this message
paul beard (paulbeard) wrote :

Seems to be no way to add to or edit comments or I would simply add this to the prior one.

To remove the plt conversion as an option, I found that simply moving the Contents/Resources/extensions/plt* files to a subdirectory took them off the menu in the save dialog. For whatever reason, the HPGL and SK1 conversions work and I assume they draw on the same libraries.

That seems to be the simplest solution to the frustration of seeing features you can't use. No changes to executables or removal of dependencies, just making a broken option invisible. If it gets fixed at a later date, an update script or a new point release could be made available.

And as a bonus, now that I know where this stuff lives, I can add/edit some of the menu options in the new RC to match what I am used to in the older versions.

Revision history for this message
su_v (suv-lp) wrote :

The official OS X package for current stable Inkscape 0.91 does include UniConvertor 1.1.5 (no need for Mac users to attempt to install UniConvertor and its dependencies themselves).

Fixed with the merge of the osx-packaging-update branch in rev 13620.

Changed in inkscape:
milestone: none → 0.91
status: Opinion → Fix Released
tags: added: osx
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.