Giter VIP home page Giter VIP logo

Comments (7)

chrisdew avatar chrisdew commented on July 23, 2024

The first error is in OSX specific code in the protocol buffers library.

../protobuf/src/google/protobuf/stubs/atomicops_internals_macosx.h:139: error: invalid conversion from ‘google::protobuf::internal::Atomic64*’ to ‘volatile int64_t*’

Can you compile the protocol buffers library on your machine? http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.gz

from protobuf.

trevex avatar trevex commented on July 23, 2024

Yes without any problems by just running ./configure && make

from protobuf.

chrisdew avatar chrisdew commented on July 23, 2024

Unfortunately I don't have an OSX machine to debug this on.

If anyone else reading this has a Mac, could you tell me if you also see this issue (or not)? (We need to determine whether this affects all OSX machines, or just trevex's.)

from protobuf.

trevex avatar trevex commented on July 23, 2024

I was testing it previously on my 10.7 mac but on a fresh 10.8 (mountain lion) installation it is the same, same error...
If someone could tell me how to get more verbose informations out of gyp, I could compare these to the protobuf makefile configuration and adapt the gyp file.

Also I am not really experienced using gyp, but my work around is currently having compiling the 2.4.1 src of protobuf the usual way globally with make install and then using this binding.gyp:

{
    "targets": [
        {
            "target_name": "protobuf_for_node",
            "include_dirs": ["protobuf/src"],
            "sources": [
                "protobuf_for_node.cc", "addon.cc"
            ],
            'libraries': [
              '-lprotobuf'
            ],
        }
    ]
}

After hours of comparing the settings generated by configure and gyp I was not able to find the problem...

from protobuf.

yyfrankyy avatar yyfrankyy commented on July 23, 2024

Same here.

The protobuf directory inside this repo is not the same as protobuf-2.4.1, and the trunk branch of official protobuf repo still failed to compile on my mac (10.7.5).

I recommend @chrisdew to use the stable version of protobuf-2.4.1 instead of the newest version at the trunk of protobuf.

from protobuf.

chrisdew avatar chrisdew commented on July 23, 2024

Thanks for the updates, I will integrate the 2.4.1 release code in a week or two.

If anyone wants to do this sooner, test on a Mac and send me a pull request, that would be much appreciated.

from protobuf.

yyfrankyy avatar yyfrankyy commented on July 23, 2024

There is a temporary solution from here: https://code.google.com/p/protobuf/issues/detail?id=407

diff --git a/protobuf/src/google/protobuf/stubs/atomicops.h b/protobuf/src/google/protobuf/stubs/atomicops.h
index 1315682..8eb0d85 100644
--- a/protobuf/src/google/protobuf/stubs/atomicops.h
+++ b/protobuf/src/google/protobuf/stubs/atomicops.h
@@ -71,7 +71,7 @@ typedef int32 Atomic32;
 // http://code.google.com/p/nativeclient/issues/detail?id=1162
 typedef int64 Atomic64;
 #else
-typedef intptr_t Atomic64;
+typedef int64 Atomic64;
 #endif
 #endif

With this patch, I'm be able to build and require protobuf with node-gyp successfully.

$ node -e 'console.log(require("protobuf"))'
{ Schema: [Function: Schema] }

from protobuf.

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.