Giter VIP home page Giter VIP logo

Comments (29)

tojocky avatar tojocky commented on June 14, 2024

this means that your cups lib it is in a different place.
what it says if you type cups-config --libs and cups-config --cflags?

from node-printer.

Multiply avatar Multiply commented on June 14, 2024
$ cups-config --libs
-lcups -Wl,-Bsymbolic-functions -Wl,-z,relro -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lgnutls -L/lib/x86_64-linux-gnu -lgcrypt -lz -lpthread -lm -lcrypt -lz
$ cups-config --cflags

# Above command was empty

from node-printer.

tojocky avatar tojocky commented on June 14, 2024

what happens if you run your application with LD_LIBRARY_PATH=/lib/x86_64-linux-gnu node app.js?

from node-printer.

ShengLiangS avatar ShengLiangS commented on June 14, 2024

I getting a same error:
"node_modules/printer/build/Release/node_printer.node: undefined symbol: cupsCreateJob"

I see the -lcups can't effec, I add -v agament parameter and look the output:
"LIBRARY_PATH=/usr/lib/gcc/i686-linux-gnu/4.7/:/usr/lib/gcc/i686-linux-gnu/4.7/../../../i386-linux-gnu/:/usr/lib/gcc/i686-linux-gnu/4.7/../../../../lib/:/lib/i386-linux-gnu/:/lib/../lib/:/usr/lib/i386-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/i686-linux-gnu/4.7/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-D' '_LARGEFILE_SOURCE' '-D' '_FILE_OFFSET_BITS=64' '-D' 'BUILDING_NODE_EXTENSION' '-I' '/home/ssl/.node-gyp/0.10.29/src' '-I' '/home/ssl/.node-gyp/0.10.29/deps/uv/include' '-I' '/home/ssl/.node-gyp/0.10.29/deps/v8/include' '-L/usr/lib/i386-linux-gnu' '-Wall' '-Wextra' '-Wno-unused-parameter' '-pthread' '-m32' '-v' '-O2' '-fno-strict-aliasing' '-fno-tree-vrp' '-fno-tree-sink' '-L/usr/lib/i386-linux-gnu' '-fno-omit-frame-pointer' '-fno-rtti' '-fno-exceptions' '-L/usr/lib/i386-linux-gnu' '-MMD' '-MF' './Release/.deps/Release/obj.target/node_printer/src/node_printer_posix.o.d.raw' '-c' '-o' 'Release/obj.target/node_printer/src/node_printer_posix.o' '-shared-libgcc' '-mtune=generic' '-march=i686'"

no -lcups

from node-printer.

tojocky avatar tojocky commented on June 14, 2024

sorry for silly questions:

  1. did you try the latest repository version?
  2. did you run from the same user which you build the package?

I updated https://www.npmjs.org/package/printer , maybe you can try to install directly from npmjs.org:
npm uninstall printer
npm install printer

from node-printer.

alevilar avatar alevilar commented on June 14, 2024

I am getting something similar: "undefined symbol" error. I am running latest Linux Mint (ubuntu 14.04 based distro)

[6267:0814/132754:INFO:CONSOLE(352)] "Uncaught Error: nw-print-client/node_modules/printer/build/Release/node_printer.node: undefined symbol: _ZN2v816FunctionTemplate3NewEPFNS_6HandleINS_5ValueEEERKNS_9ArgumentsEES3_NS1_INS_9SignatureEEE", source: module.js (352)

from node-printer.

tojocky avatar tojocky commented on June 14, 2024

alevilar: did you compile printer module with nw-gyp? If not. Then this may be the issue.

The issue reported by Multiply seems to be different.

Multiply: could you please reinstall From npmjs.org npm install printer?

from node-printer.

alevilar avatar alevilar commented on June 14, 2024

ok. Do you suggest to open a new issue asking for node webkit compatibility?
I´m now reading about gyp and nw-gyp :) and i continue with error
i did compile, but think I`m having problems when I do:
nw-gyp configure

the script is trying to download node-webkit but with node version..
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | ia32
gyp http GET http://node-webkit.s3.amazonaws.com/v0.10.30/nw-headers-v0.10.30.tar.gz
http://node-webkit.s3.amazonaws.com/v0.10.30/nw-headers-v0.10.30.tar.gz

... and fails

2014-08-14 15:54 GMT-03:00 Ion [email protected]:

alevilar: did you compile printer module with nw-gyp? If not. Then this
may be the issue.

The issue reported by Multiply seems to be different.

Multiply: could you please reinstall From npmjs.org npm install printer?


Reply to this email directly or view it on GitHub
#15 (comment).

from node-printer.

tojocky avatar tojocky commented on June 14, 2024

if you run from node-webkit then definetiely you have to compile with nw-gyp and set as target the exact version of node-webkit. Alternatively you can install the exact node version which node-webkit is using and compile with npm directly.

from node-printer.

tojocky avatar tojocky commented on June 14, 2024

I tested with node-webkit and is working fine. The only issue you have to build printer package with nw-gyp or with the same version of node which node-webkit uses.

from node-printer.

alevilar avatar alevilar commented on June 14, 2024

remove everything and started from scratch....

I am using latest nw version: 0.10.2
while updated to nodejs 0.11.13 so I have the one used by nw.

I am writing the node printer module as a dependency in my project
package:

"dependencies": {
"printer": "latest"
},

and when i write: npm install
the build is made
... but now is failing with this error and is not being installed.

Usage: gyp_main.py [options ...] [build_file ...]gyp_main.py: error: no
such option: --no-parallelgyp ERR! configure error gyp ERR! stack Error:
gyp failed with exit code: 2

I will continue trying and fighting...
I am newbie with node, nw, gyp, nw-gyp, grunt, glup, and so on.. and I
think the issue is there
:)

2014-08-15 10:40 GMT-03:00 Ion [email protected]:

I tested with node-webkit and is working fine. The only issue you have to
build printer package with nw-gyp or with the same version of node which
node-webkit uses.


Reply to this email directly or view it on GitHub
#15 (comment).

from node-printer.

tojocky avatar tojocky commented on June 14, 2024

seems you have gyp installed.
more details: atom/atom#1981
other links: (google)[https://www.google.co.uk/search?q=%22no+such+option%3A+--no-parallel%22&rlz=1C1CHFX_en-GBGB567GB567&oq=%22no+such+option%3A+--no-parallel%22&aqs=chrome..69i57.1102j0j7&sourceid=chrome&es_sm=122&ie=UTF-8]

from node-printer.

tojocky avatar tojocky commented on June 14, 2024

google

from node-printer.

alevilar avatar alevilar commented on June 14, 2024

thanks! i remove gyp command from my ubuntu distro with
apt-get remove gyp

That solved the error i was getting when
npm install printer

Then using nodewebkit 0.10.2 i needed to do this
nw-gyp configure --target=0.10.1, noticed the downgrade of the target.
Thats because latest build 0.10.2 was not found on server.
then
nw-gyp build
And everything was ok

BUT! the issue comes to me:

... Now I am getting this error
"Uncaught Error: ..../node_modules/printer/build/Release/node_printer.node:
undefined symbol: cupsCancelJob", source: module.js (352)

I tried setting LD_LIBRARY_PATH=/lib/x86_64-linux-gnu
..with no luck

2014-08-15 20:30 GMT-03:00 Ion [email protected]:

google
https://www.google.co.uk/search?q=%22no+such+option%3A+--no-parallel%22&rlz=1C1CHFX_en-GBGB567GB567&oq=%22no+such+option%3A+--no-parallel%22&aqs=chrome..69i57.1102j0j7&sourceid=chrome&es_sm=122&ie=UTF-8


Reply to this email directly or view it on GitHub
#15 (comment).

from node-printer.

tojocky avatar tojocky commented on June 14, 2024

Seems cups-dev is not linked.

Did you install libcups2-dev?
I think in your case you have to install apt-get install libcups2-dev.
After installation rebuild printer package.

Again, what it says if you type cups-config --libs and cups-config --cflags?

from node-printer.

alevilar avatar alevilar commented on June 14, 2024

libcups2-dev
http://packages.ubuntu.com/cgi-bin/search_packages.pl?keywords=libcups&searchon=names&subword=1&version=breezy&release=all
is
installed

Here is the output when running both commands:

cups-config --libs
-lcups -Wl,-Bsymbolic-functions -Wl,-z,relro -lgssapi_krb5 -lkrb5
-lk5crypto -lcom_err -lgnutls -lgcrypt -lz -lpthread -lm -lcrypt -lz

and cups-config --cflags
returns nothing

2014-08-19 5:47 GMT-03:00 Ion [email protected]:

cups-config --libs

from node-printer.

tojocky avatar tojocky commented on June 14, 2024

Ok, what happens if you reinstall/recompile and re-run printer package?

from node-printer.

alevilar avatar alevilar commented on June 14, 2024

again:
"Uncaught Error: node_modules/printer/build/Release/node_printer.node:
undefined symbol: cupsCancelJob", source: module.js (352)

there is something I can do to help? for example debugging inside the code?

2014-08-20 17:48 GMT-03:00 Ion [email protected]:

Ok, what happens if you reinstall/recompile and re-run printer package?


Reply to this email directly or view it on GitHub
#15 (comment).

from node-printer.

tojocky avatar tojocky commented on June 14, 2024

In file binding.gyp instead of <!(cups-config --libs) put your output -lcups -Wl,-Bsymbolic-functions -Wl,-z,relro -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lgnutls -lgcrypt -lz -lpthread -lm -lcrypt -lz.

If it doesn't work try to uncomment line #'-lcups -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lz -lpthread -lm -lcrypt -lz' and comment the line <!(cups-config --libs)

from node-printer.

Multiply avatar Multiply commented on June 14, 2024

The error I initially filed an issue for, doesn't seem related to your latest discussion. Would you mind either changing my initial issue, or move to a seperate?

from node-printer.

tojocky avatar tojocky commented on June 14, 2024

The issue seems to be the same: cups libs link.

from node-printer.

ezmac avatar ezmac commented on June 14, 2024

I had a similar issue and bashed my head against it for about a day. I'm a node noob starting a project to learn it. I'm still refining my "solution" but I'd be glad to help any way I can since I started with the same undefined symbol issue and ended able to list all printers.

What did it for me was adding

   "libraries": [
        '<!(cups-config --libs)',
    ]

to the object inside the targets array and rebuilt. I built the app in a docker container and dumped my bash history to text so let me know if there is anything else I can send to help you. I can also do a pull request if that would help you.

from node-printer.

tojocky avatar tojocky commented on June 14, 2024

thanks @ezmac for hint.
@alevilar : could you please test @ezmac solution?

from node-printer.

alevilar avatar alevilar commented on June 14, 2024

Yes !! It works!!!

Adding into binding.gyp file the libraries key

'targets':{

  • ...*

  • "libraries": [
    '<!(cups-config --libs)',
    ]*

    ...

}

now I can list printers !! thanks!

2014-08-25 7:55 GMT-03:00 Ion [email protected]:

thanks @ezmac https://github.com/ezmac for hint.
@alevilar https://github.com/alevilar : could you please test @ezmac
https://github.com/ezmac solution?


Reply to this email directly or view it on GitHub
#15 (comment).

from node-printer.

tojocky avatar tojocky commented on June 14, 2024

Thanks for testing.

from node-printer.

tojocky avatar tojocky commented on June 14, 2024

added the change: ba39a38

could you please retest with the latest changes?

Thank you in advance.

from node-printer.

alevilar avatar alevilar commented on June 14, 2024

Tested latest version and working,
thanks!!

2014-08-25 13:31 GMT-03:00 Ion [email protected]:

could you please retest with the latest changes?

from node-printer.

tojocky avatar tojocky commented on June 14, 2024

Thanks.

from node-printer.

saurabhghewari avatar saurabhghewari commented on June 14, 2024

Solved the issue changing the binding.gyp and rebuilding it. Thank you.

from node-printer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.