Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

svg2png fails without message; libfontconfig.so.1 dependency problem #21

Open
chrismeyersfsu opened this issue Oct 13, 2014 · 2 comments

Comments

@chrismeyersfsu
Copy link

Running "clean:build" (clean) task
>> 1 path cleaned.

Running "svgmin:icons" (svgmin) task
✔ src/box.svg (saved 412 B 40%)
✔ src/burger.svg (saved 653 B 25%)
✔ src/cake.svg (saved 617 B 33%)
✔ src/candy.svg (saved 832 B 24%)
✔ src/canned-drink.svg (saved 725 B 39%)
✔ src/cheese-cup.svg (saved 801 B 29%)
✔ src/chicken.svg (saved 752 B 31%)
✔ src/chips.svg (saved 706 B 40%)
✔ src/churro.svg (saved 658 B 44%)
✔ src/coffee.svg (saved 1.14 kB 38%)
✔ src/cookie.svg (saved 500 B 33%)
✔ src/corndog.svg (saved 510 B 45%)
✔ src/cotton-candy.svg (saved 712 B 34%)
✔ src/dippin-dots.svg (saved 541 B 24%)
✔ src/eggroll.svg (saved 509 B 36%)
✔ src/fountain-drink.svg (saved 610 B 36%)
✔ src/fries.svg (saved 699 B 43%)
✔ src/hotdog.svg (saved 445 B 34%)
✔ src/ice-cream.svg (saved 575 B 27%)
✔ src/lemonade.svg (saved 1.06 kB 36%)
✔ src/nachos.svg (saved 615 B 27%)
✔ src/peanuts.svg (saved 708 B 21%)
✔ src/pizza.svg (saved 526 B 31%)
✔ src/popcorn.svg (saved 987 B 35%)
✔ src/pretzel.svg (saved 2.23 kB 36%)
✔ src/quesadilla.svg (saved 1.7 kB 34%)
✔ src/sandwich.svg (saved 1.52 kB 25%)
✔ src/sausage.svg (saved 1.62 kB 29%)
✔ src/snowcone.svg (saved 537 B 34%)
✔ src/taco.svg (saved 877 B 24%)
✔ src/water-bottle.svg (saved 635 B 36%)
Total saved: 25.39 kB

Running "svg2png:images" (svg2png) task

Rasterizing SVG to PNG (31 files)...
0% [                                 ] 0.00% (0.1s) 
>> Rasterization complete.

Done, without errors.

No .png files are actually generated. The progress bar remains at 0%. I then ran strace -f -F -s 256 -o strace.log grunt svg2png --verbos https://clbin.com/Yp15a The interesting entry is listed below.

10793 read(14, "/home/ubuntu/SRIcons/node_modules/grunt-svg2png/node_modules/phantomjs/lib/phantom/bin/phantomjs: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory\n", 65536) = 214

After seeing this I ran sudo apt-get install libfontconfig1. I then ran the grunt command above again and success!

Environment

$ uname -a
Linux ip-10-184-149-222 3.13.0-35-generic #62-Ubuntu SMP Fri Aug 15 01:58:42 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.1 LTS
Release:    14.04
Codename:   trusty

Edit: Upon further inspection, it seems this may be a program with phantomjs (or the node wrapper). https://github.com/Medium/phantomjs/search?q=libfontconfig&type=Issues&utf8=%E2%9C%93 Could grunt-svg2png be made to fail (exit non-zero) if phantom fails? This would at least notify the user that there is a problem.

@willforsyth
Copy link

Getting the same error

Rasterizing SVG to PNG (75 files)...
0% [                                                                             ] 0.00% (0.0s) 
>> Rasterization complete.

no error message etc tried running sudo apt-get install libfontconfig1 still getting the empty rasterisation

@mplatt
Copy link

mplatt commented Sep 29, 2015

same here

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants