fhemberger / dssim-bin

[MAINTAINERS WANTED] dssim-bin wrapper that makes it seamlessly available as a local dependency

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pkg-config dependency

JamieMason opened this issue · comments

FYI: When installing dssim-bin on OSX I got the following error that pkg-config is needed.

name at mac in ~/some/project on master [!?]
$ npm-devdep dssim-bin
/
> dssim-bin@1.1.1 postinstall /Users/name/some/project/node_modules/dssim-bin
> node lib/install.js

  ℹ compiling dssimfrom source
  ✖ Error: make DESTDIR=/Users/name/some/project/node_modules/dssim-bin/vendor/ USE_COCOA=1
Command failed: /bin/sh -c make DESTDIR=/Users/name/some/project/node_modules/dssim-bin/vendor/ USE_COCOA=1
/bin/sh: pkg-config: command not found
/bin/sh: pkg-config: command not found
src/dssim.c:208:13: warning: unused function 'transpose' [-Wunused-function]
static void transpose(dssim_px_t *restrict src, dssim_px_t *restrict dst, const int width, const int height)
            ^
src/dssim.c:232:13: warning: unused function 'regular_1d_blur' [-Wunused-function]
static void regular_1d_blur(const dssim_px_t *src, dssim_px_t *restrict tmp1, dssim_px_t *dst, const int width, const int height, const int runs)
            ^
2 warnings generated.
/bin/sh: pkg-config: command not found
/bin/sh: pkg-config: command not found
src/rwpng.c:39:10: fatal error: 'png.h' file not found
#include "png.h"
         ^
1 error generated.
make: *** [src/rwpng.o] Error 1

    at ChildProcess.exithandler (child_process.js:213:12)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:818:16)
    at Socket.<anonymous> (internal/child_process.js:319:11)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at Pipe._onclose (net.js:469:12)
dssim-bin@1.1.1 node_modules/dssim-bin
├── logalot@2.1.0 (figures@1.4.0, squeak@1.3.0)
├── bin-wrapper@3.0.2 (lazy-req@1.1.0, os-filter-obj@1.0.3, each-async@1.1.1, bin-check@2.0.0, bin-version-check@2.1.0, download@4.4.3)
└── bin-build@2.2.0 (rimraf@2.5.0, url-regex@3.1.0, exec-series@1.0.2, archive-type@3.1.0, tempfile@1.1.1, decompress@3.0.0, download@4.4.3)

Installing it...

name at mac in ~/some/project on master [!?]
$ brew install pkg-config
==> Downloading https://homebrew.bintray.com/bottles/pkg-config-0.29.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring pkg-config-0.29.el_capitan.bottle.tar.gz
🍺  /usr/local/Cellar/pkg-config/0.29: 10 files, 648K

...was enough to fix the problem.

name at mac in ~/some/project on master [!?]
$ npm-devdep dssim-bin
-
> dssim-bin@1.1.1 postinstall /Users/name/some/project/node_modules/dssim-bin
> node lib/install.js

  ℹ compiling dssimfrom source
  ✔ dssim built successfully
dssim-bin@1.1.1 node_modules/dssim-bin
├── logalot@2.1.0 (figures@1.4.0, squeak@1.3.0)
├── bin-wrapper@3.0.2 (os-filter-obj@1.0.3, lazy-req@1.1.0, each-async@1.1.1, bin-check@2.0.0, bin-version-check@2.1.0, download@4.4.3)
└── bin-build@2.2.0 (rimraf@2.5.0, archive-type@3.1.0, exec-series@1.0.2, url-regex@3.1.0, tempfile@1.1.1, decompress@3.0.0, download@4.4.3)

Thanks Frederic.

Thanks, I'll add it to the docs and to the installation checks.