y-a-v-a / node-gd

🎨 GD graphics library (libgd) C++ bindings for Node.js.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error loading built node-gd

scarabdesign opened this issue · comments

Updating my package.json with the master branch of node-gd builds just fine now (improvement from deprecation warnings [Issue 44]), however when I try to run it, i'm getting an error:

/home/sean/dev1_node6/matzah/node_modules/node-gd/build/Release/node_gd.node: undefined symbol: _ZN2Gd5Image4TiffERKN3Nan20FunctionCallbackInfoIN2v85ValueEEE Cannot find module '/home/sean/dev1_node6/matzah/node_modules/node-gd/js/../build/default/node_gd.node' Unable to find addon node_gd.node in build directory.

Hi thanks for reaching out,
I'm currently working on this, since I have not yet found the root cause. First I thought it was libgd-version-related, but now I think it's Mac OSX-version related. I have one laptop on which node-gd runs smoothly, on the other it does not. I will keep you posted here.
Cheers,
Vincent

Excellent! Thanks for looking into it.
FYI: Here is my platform:
$> cat /proc/version
Linux version 3.16.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.39-1+deb8u2 (2017-03-07)

So, I got your master branch to run! But, it took updating libgd to 2.2.4 from source
wget https://github.com/libgd/libgd/releases/download/gd-2.2.4/libgd-2.2.4.tar.gz
tar -xzvf libgd-2.2.4.tar.gz
cd libgd-2.2.4/
./configure
make
sudo make install
Not sure what this means exactly, but the version prior to installing from source was 2.1.0. Feel free to ask any other questions about the environment.

Yes indeed upgrading to libgd 2.2.4 fixes this descriptor issue. I had an error in the code that checks for the libgd version. It was defining a c++ method somewhere while it shouldn't. The upcoming release will break usage of tiff related functions when on libgd lower than 2.2.4. Since libgd has fixed an issue regarding opening tiffs per version 2.2.4, you will need that version if you want to take full advantage of tiff anyway.
Thanks for the info. I will try to push a new version to npm soon.

So I published 1.5.0! If you want to open and save tiff files, you should indeed upgrade libgd to version 2.2.4. If not, you can stay at a lower version of libgd. If you're using homebrew or macports, it is fairly easy to upgrade to libgd@2.2.4. Other platforms I have not checked.

Awesome! I removed/purged 2.2.4 and installed the regular distro package:
sudo apt-get install libgd2-dev
...updated to 1.5.0 of node-gd, and it builds and runs fine with no issues. Thanks a lot!