Skip to content

Failed to require on Ubuntu 12.04LTS #493

Closed

Description

@dennari

With node v0.12.0 and npm 2.5.1, npm install goes through fine:

\
> nodegit@0.3.3 install node_modules/nodegit
> node lifecycleScripts/install

[nodegit] Fetching binary from S3.
[nodegit] Completed installation successfully.

> nodegit@0.3.3 postinstall node_modules/nodegit
> node lifecycleScripts/clean

[nodegit] Cleaning up after ourselves.
[nodegit] Deleting unneeded files.
[nodegit] Finished deleting files.
[nodegit] Pruning devdependencies.
[nodegit] Cleaning unneeded dependencies.
npm WARN uninstall not installed in node_modules/nodegit/node_modules: "for-node-webkit"
npm WARN uninstall not installed in node_modules/nodegit/node_modules: "fs-extra"
unbuild which-native-nodish@1.1.1
unbuild node-pre-gyp@0.6.4
unbuild npm@2.7.1
[nodegit] Successfully pruned devdependencies.
[nodegit] Successfully cleaned unneeded dependencies.
[nodegit] Done cleaning, enjoy!

nodegit@0.3.3 node_modules/nodegit
├── promisify-node@0.1.5
├── nodegit-promise@1.0.0 (asap@1.0.0)
├── which-native-nodish@1.1.1 (find-parent-dir@0.3.0)
└── npm@2.7.1

But then

~$ node
> var git = require("nodegit")
Error: Cannot find module '../build/Debug/nodegit'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (node_modules/nodegit/lib/nodegit.js:12:12)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)

Activity

  1. dennari commented on Mar 17, 2015

    @dennari
    Author

    After installing from the repository, I got cc1plus: error: unrecognized command line option ‘-std=c++11’, which lead me to upgrade to gcc 4.8. Nodegit now works fine.

  2. johnhaley81 commented on Mar 17, 2015

    @johnhaley81
    Collaborator

    Did you recompile nodegit using gcc or did you just upgrade and then it worked?

  3. dennari commented on Mar 17, 2015

    @dennari
    Author

    I recompiled using gcc

  4. maxkorp commented on Mar 18, 2015

    @maxkorp
    Collaborator

    Yeah, IIRC GCC 4.6 and below don't support -std=c++11

    I'll make sure theres a note in the readme.

  5. tbranyen commented on Mar 18, 2015

    @tbranyen
    Member

    I think we have a note for that already. The problem here was originally libc or libstdc++ being out-of-date though. We need to document that in a way that isn't super confusing and easy to check.

    λ ldd ~/git/nodegit/nodegit/build/Release/nodegit.node 
        linux-vdso.so.1 (0x00007ffd00942000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f9afbdbb000)
        libm.so.6 => /usr/lib/libm.so.6 (0x00007f9afbab6000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f9afb8a0000)
        libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f9afb682000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007f9afb2df000)
        /usr/lib64/ld-linux-x86-64.so.2 (0x00007f9afc775000)
    

    Edit: accuracy with words

  6. maxkorp commented on Mar 18, 2015

    @maxkorp
    Collaborator

    Hrm, it seems like the build instructions are gone entirely, at least from the readme O.o

  7. tbranyen commented on Mar 18, 2015

    @tbranyen
    Member

    They exist in the install from source guide: http://www.nodegit.org/guides/install/from-source/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions