Issue with libpng12.0.dylib when using LaTeX formula effect

This is NOT a support forum. You are welcome to discuss software issues here, but all issues should be reported on Launchpad if you want them fixed.
bluefloyd
Posts: 7
Joined: Sat Sep 06, 2008 6:31 pm

Issue with libpng12.0.dylib when using LaTeX formula effect

Postby bluefloyd » Sat Sep 06, 2008 6:39 pm

I recently wanted to try out the LaTeX formula effect in Inkscape's Effects -> Render -> Latex formula on my MacBook (Mac OS X 10.5.4 Leopard). I encountered an error telling me that my version of "/sw/lib/libpng12.0.dylib" (which I installed via Fink) is not compatible since version 30.0.0 or above is needed:
dyld: Library not loaded: /sw/lib/libpng12.0.dylib
Referenced from: /sw/bin/latex
Reason: Incompatible library version: latex requires version 30.0.0 or later, but libpng12.0.dylib provides version 26.0.0
sh: line 1: 81964 Trace/BPT trap latex -output-directory=/var/folders/71/71wgK3o7FtGClPSEzjU3v++++TM/-Tmp-/inkscape-9yWR6s -halt-on-error /var/folders/71/71wgK3o7FtGClPSEzjU3v++++TM/-Tmp-/inkscape-9yWR6s/eq.tex > /var/folders/71/71wgK3o7FtGClPSEzjU3v++++TM/-Tmp-/inkscape-9yWR6s/eq.out
invalid LaTeX input:
\(\displaystyle\frac{\pi^2}{6}=\lim_{n \to \infty}\sum_{k=1}^n \frac{1}{k^2}\)
temporary files were left in: /var/folders/71/71wgK3o7FtGClPSEzjU3v++++TM/-Tmp-/inkscape-9yWR6s

Curiously, when I print out the version number of "/sw/lib/libpng12.0.dylib" via otool, it tells me that I already use the most recent version, which is 32.0.0, so there should be no problems.

I just found out what goes wrong: The Inkscape .dmg application package which I got from the Inkscape homepage comes with an own version of libpng12.0.dylib, which lies in "Inkscape.app/Contents/Resources/lib/", that has version number 26.0.0. It seems that Inkscape uses this file although the error message above explicitely shows the Fink path "/sw/lib/" !!

So I just renamed the libpng12.0.dylib which comes with the application package so that Inkscape doesn't find / use this file anymore and now the LaTeX effect works fine.

Just wanted to tell you in case someone else has a similar problem...

bluefloyd

P.S.: My version of Inkscape is 0.46.

P.P.S.: The identical problem occurs when using the textext extension. The solution is the same. An additional comment concerning textext: On a Mac there are actually two places where you can put the files of the textext extension:
1) ~/inkscape/extensions/
2)/Applications/Inkscape.app/Contents/Resources/extensions/
I propose putting the files in 2), since the extension is looking for inkex.py which has to be in the same directory as the extensions itself; inkex.py lies in 2), not in 1). Another possibility would be to use 1) and copy inkex.py (and probably some other needed files?) also from 2) to 1).

comet

Re: Issue with libpng12.0.dylib when using LaTeX formula effect

Postby comet » Mon Sep 08, 2008 10:22 pm

Hi bluefloyd!

I'd like to get textext in Inkscape 0.46 working. As I can guess from your second comment, you got it working. I'm on Leopard 10.5.4 as well and tried to get it working with a pstoedit from MacPorts. However I somehow failed to get it working.

How were you able to have a working Inkscape with Latex support? Are you also yousing the MacTex package?

Thanks a lot!

bluefloyd
Posts: 7
Joined: Sat Sep 06, 2008 6:31 pm

Re: Issue with libpng12.0.dylib when using LaTeX formula effect

Postby bluefloyd » Mon Sep 08, 2008 10:34 pm

Can you please describe your problem in more detail? Do you get an error message in Inkscape when calling Effects -> Tex Text? Do you have this menu item at all?

I use MacTex. I didn't use MacPorts, but I used Fink instead. I believe I also installed pstoedit via Fink.

comet

Re: Issue with libpng12.0.dylib when using LaTeX formula effect

Postby comet » Mon Sep 08, 2008 11:11 pm

Thanks for the fast reply!

I've installed the MacTex package and Inkscape 0.46 from the dmg image. Then I copied the textext 0.4.3 in the extensions folder in the inkscape application package. I installed the pstoedit 3.45 with MacPorts.

The error I got was actually weird: He couldn't find the pdflatex eventhough the path was set (it finds it in the terminal). Then I changed the pdflatex path in the textext script, so that it found the pdflatex binary. However then it stoped with the pstoedit file, because it could not load the libraries (again, in the terminal I could execute everything and it could find the libraries).

Now I'm just wondering, how you were able to do it. I haven't found pstoedit in fink for example... And by the way, with which script can you make latex in rendering show up? This would already be great if this was working!

thanks!

bluefloyd
Posts: 7
Joined: Sat Sep 06, 2008 6:31 pm

Re: Issue with libpng12.0.dylib when using LaTeX formula effect

Postby bluefloyd » Mon Sep 08, 2008 11:26 pm

Hm, it seems that what you did was right. Can you please copy and paste the exact error message?
However then it stoped with the pstoedit file, because it could not load the libraries (again, in the terminal I could execute everything and it could find the libraries).

Exactly which libraries are you talking about. Please state the full name and the complete path. How did you install the libraries?
I haven't found pstoedit in fink for example

This is what I get when I run 'fink list pstoedit' on the console:

Code: Select all

Information about 7119 packages read in 1 seconds.
    pstoedit         3.45-1       PS/PDF converter to other vector formats
 i   pstoedit-bin     3.45-1       binary pstoedit utility
 i   pstoedit-shlibs  3.45-1       shared libraries for pstoedit

There is no 'i' before pstoedit, so I'm not exactly sure which pstoedit Inkscape uses (perhaps I've also installed pstoedit in another way..., don't know, my system is quite messy at the moment.). But it's actually there, and you could install it by running 'fink install pstoedit'. By the way, do you use Fink and MacPorts together? Could be a problem ...
And by the way, with which script can you make latex in rendering show up?

I don't understand what you mean. In Inkscape, I go to "Effects -> Tex Text", then a dialog box shows up, I enter my formula (or whatever), click on OK and then it shows up in the Inkscape document (it's a bit small in the beginning, you may have to rescale it.)

comet

Re: Issue with libpng12.0.dylib when using LaTeX formula effect

Postby comet » Mon Sep 08, 2008 11:49 pm

Unfortunately I have already uninstalled MacPort's pstoedit. I'll reinstall it and give you the error messages as well as the libraries it uses. The libraries were installed together with the pstoedit over MacPort.

BTW I have not as much packages in fink as you have!? Have you also an intel mac?

No, actually I was only using MacPorts before. Now I installed fink and deinstalled MacPort

I wondered how you got the menu item under Render -> Latex formula. I don't have it. I only get Textext after copying the python scripts.

bluefloyd
Posts: 7
Joined: Sat Sep 06, 2008 6:31 pm

Re: Issue with libpng12.0.dylib when using LaTeX formula effect

Postby bluefloyd » Tue Sep 09, 2008 12:09 am

Stay with fink and don't use MacPorts if you don't need to. Fink has far more packages than MacPorts. Fink provides all the packages you need for Inkscape and textext. Give Fink a try, perhaps your problem resolves when you installed the Fink pstoedit and libraries. As I said, using both Fink and MacPorts could cause problems, since in the search paths for libraries, binaries etc. one is always preferred over the other.
BTW I have not as much packages in fink as you have!? Have you also an intel mac?

Yes I have a Intel Mac. Have you run a selfupdate and have you included the 'unstable' tree? If not, then do so. Note: 'unstable' doesn't mean that software in this tree is actually unstable, but rather 'not tested by a million people' or 'not enough testing feedback provided up to now'. I never had any problems with Fink and its unstable tree. Further, a lot of software (like pstoedit for intel macs) is only available in the unstable tree, so you'll have to activate it anyway.
I wondered how you got the menu item under Render -> Latex formula. I don't have it. I only get Textext after copying the python scripts.

Forget Render -> Latex formula. This is a built-in Inkscape effect, which also lets you enter a Latex expression and render it, but it is far less advanced since you cannot, for example, re-edit your Latex expression. With textext (under Effects -> Tex Text) , you can. Both effects are completely independent.
Don't ask me how I got this menu entry; suddenly it was there. I believe that once you have textext working, you'll also have this built-in effect. Perhaps Inkscape checks on startup if you fulfill the requirements for displaying Latex and if not, it doesn't show this menu entry.

comet

Re: Issue with libpng12.0.dylib when using LaTeX formula effect

Postby comet » Tue Sep 09, 2008 2:09 am

Thanks already for the informations. I'll try a bit and keep you up to date.

I'm installing now the pstoedit of fink and I hope every thing will work out.

comet

Re: Issue with libpng12.0.dylib when using LaTeX formula effect

Postby comet » Wed Sep 10, 2008 1:07 am

Cool! It worked! Obviously it likes more the pstoedit from fink than the one from MacPorts *g*

However to make it work with the MacTex package, I had to change the call of pdflatex in the textext.py script to the exact path /usr/texbin/pdflatex. Else it didn't find pdflatex. Don't ask me why...

After that I got the same error as you have described, I changed the file name of the old library in the inkscape application package and then it worked! finally!

thank you a lot,
comet

bluefloyd
Posts: 7
Joined: Sat Sep 06, 2008 6:31 pm

Re: Issue with libpng12.0.dylib when using LaTeX formula effect

Postby bluefloyd » Wed Sep 10, 2008 5:02 am

Glad I could help. About pdflatex: I think you have to make sure that you have included the path to pdflatex in you PATH environment variable. Type 'env' in the console and check if the PATH variable contains any directories which in turn contain pdflatex. For example, besides having pdflatex in /usr/texbin, which is NOT on my path, I also have pdflatex in /sw/bin (probably installed by fink), which IS on my path. There are a number of threads on the web on how to permanently add a directory to the PATH...

camineo

Re: Issue with libpng12.0.dylib when using LaTeX formula effect

Postby camineo » Mon Dec 15, 2008 12:53 am

Hello,

I too wanted to get textext working in inkscape, and followed the advice here. In the end, inkscape no longer would start up, I would get that MAC OS X dialog box saying "The application inkscape-bin quit unexpectedly....", giving me the ignore, report..., and relaunch options. What I found was that removing or renaming libpng12.0.dylib caused this. I do in fact have libpng12.0.dylib in /sw/lib , so I made a symblic link to this file. I did:

ln -s /sw/lib/libpng12.0.dylib /Applications/Inkscape.app/Contents/Resources/lib/.

in the terminal. Everything seems to work now. I just wanted to see if this seems like a good solution to you guys, and if it does, hopefully this will help someone else!

mvrnn

Re: Issue with libpng12.0.dylib when using LaTeX formula effect

Postby mvrnn » Thu Jan 14, 2010 6:38 am

I also was able to install pstoedit with fink to get tex text working in Inkscape. Fink took a _very_ long time to install pstoedit for me (~6 hours). I'm not sure why; maybe because this was the first time I've used fink. So if it is also taking a long time for you, consider waiting it out...

kik
Posts: 2
Joined: Thu Mar 18, 2010 8:56 pm

Re: Issue with libpng12.0.dylib when using LaTeX formula effect

Postby kik » Thu Mar 18, 2010 9:06 pm

Hi,
I managed to install the Latex Formula extension on my Mac OS X 10.5.8. However when I want to write somethin in the box and click apply, I get the following message:
Unsupported driver plot-svg

Available formats : and then a long list of formats

What should I do?

bluefloyd
Posts: 7
Joined: Sat Sep 06, 2008 6:31 pm

Re: Issue with libpng12.0.dylib when using LaTeX formula effect

Postby bluefloyd » Thu Mar 18, 2010 10:04 pm

Sorry kik, I never encountered this error. I did some googling and found the following post:

http://ubuntuforums.org/archive/index.php/t-478208.html

kik
Posts: 2
Joined: Thu Mar 18, 2010 8:56 pm

Re: Issue with libpng12.0.dylib when using LaTeX formula effect

Postby kik » Fri Mar 19, 2010 8:38 pm

I found out why I get the message 'Unsupported driver plot-svg' when running the latex formula. In fact pstoedit cannot convert to SVG any more the driver plot-svg is not inside the pstoedit package. I tried to install the new pstoedit package 3.50 when I want to build it as described in readme I get error messages. I found an ubuntu forum (https://bugs.launchpad.net/ubuntu/+sour ... bug/364319) where people have the same problem and found a solution, but I don't know what to do as I'm using Mac OS X.

bluefloyd
Posts: 7
Joined: Sat Sep 06, 2008 6:31 pm

Re: Issue with libpng12.0.dylib when using LaTeX formula effect

Postby bluefloyd » Sun Mar 28, 2010 9:15 am

So, kik, I played around a bit with my pstoedit installation. I first updated MacPorts and it's pstoedit package. After that, pstoedit was broken on my system. I then uninstalled pstoedit, did a full selfupdate, upgraded all outdated packages and reinstalled pstoedit after that. So, now I have the most current pstoedit version available via MacPorts, and textext still works without problems within Inkscape. I would therefore suggest to try the following:

sudo port uninstall pstoedit
sudo port clean pstoedit
sudo port selfupdate
sudo port upgrade outdated
sudo port install pstoedit

(not sure if really all of these steps are neccessary)

Let me know if this helps.


Return to “Discuss Software Issues”