Giter VIP home page Giter VIP logo

Comments (5)

Eimji avatar Eimji commented on July 30, 2024

Hello,

Try to do the following:
go get -u /github.com/devsisters/goquic
cd $GOPATH/src/github.com/devsisters/goquic
./build_libs.sh
Now compile with CGO_LDFLAGS="-L$GOPATH/src/github.com/devsisters/goquic/lib/linux_amd64" go build $GOPATH/src/github.com/devsisters/goquic/example/server.go

On my machine Debian Jessie with golang1.6, I got the following error when running my QUIC server:
"panic: runtime error: cgo argument has Go pointer to Go pointer"
But it seems that this error is due to the Golang bug: golang/go#14210

from goquic.

henning77 avatar henning77 commented on July 30, 2024

@Eimji I tried your sequence, but it yields the same errors. Maybe I need to change the build environment? To be exact, I am inside a Ubuntu 14.04 Docker container.

from goquic.

henning77 avatar henning77 commented on July 30, 2024

Now I tried to build on OSX, but get basically the same errors (slightly different error message).
./build_libs.sh executed successfully.

$ CGO_CFLAGS="-I$GOPATH/src/github.com/devsisters/goquic/libquic/boringssl/include" CGO_LDFLAGS="-L$GOPATH/src/github.com/devsisters/goquic/lib/darwin_amd64" go build $GOPATH/src/github.com/devsisters/goquic/example/server.go
# github.com/devsisters/goquic
Undefined symbols for architecture x86_64:
  "net::CachedNetworkParameters::default_instance()", referenced from:
      net::SourceAddressToken::InitAsDefaultInstance() in libquic.a(source_address_token.pb.cc.o)
  "net::CachedNetworkParameters::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream*)", referenced from:
      bool google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual<net::CachedNetworkParameters>(google::protobuf::io::CodedInputStream*, net::CachedNetworkParameters*) in libquic.a(source_address_token.pb.cc.o)
  "net::CachedNetworkParameters::Clear()", referenced from:
      net::SourceAddressToken::Clear() in libquic.a(source_address_token.pb.cc.o)
  "net::CachedNetworkParameters::CopyFrom(net::CachedNetworkParameters const&)", referenced from:
      net::CachedNetworkParameters::operator=(net::CachedNetworkParameters const&) in libquic.a(quic_crypto_server_config.cc.o)
  "net::CachedNetworkParameters::MergeFrom(net::CachedNetworkParameters const&)", referenced from:
      net::SourceAddressToken::MergeFrom(net::SourceAddressToken const&) in libquic.a(source_address_token.pb.cc.o)
  "net::CachedNetworkParameters::CachedNetworkParameters(net::CachedNetworkParameters const&)", referenced from:
      net::QuicCryptoServerStream::SetPreviousCachedNetworkParams(net::CachedNetworkParameters) in libquic.a(quic_crypto_server_stream.cc.o)
      net::QuicCryptoServerStream::ProcessClientHello(net::CryptoHandshakeMessage const&, net::ValidateClientHelloResultCallback::Result const&, net::CryptoHandshakeMessage*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) in libquic.a(quic_crypto_server_stream.cc.o)
  "net::CachedNetworkParameters::CachedNetworkParameters()", referenced from:
      net::ValidateClientHelloResultCallback::Result::Result(net::CryptoHandshakeMessage const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, net::QuicWallTime) in libquic.a(quic_crypto_server_config.cc.o)
      net::SourceAddressToken::mutable_cached_network_parameters() in libquic.a(quic_crypto_server_config.cc.o)
      net::SourceAddressToken::mutable_cached_network_parameters() in libquic.a(source_address_token.pb.cc.o)
      net::tools::GoQuicServerSessionBase::OnCongestionWindowChange(net::QuicTime) in libgoquic.a(go_quic_server_session_base.o)
  "net::CachedNetworkParameters::~CachedNetworkParameters()", referenced from:
      net::ValidateClientHelloResultCallback::Result::~Result() in libquic.a(quic_crypto_server_config.cc.o)
      net::tools::GoQuicServerSessionBase::OnCongestionWindowChange(net::QuicTime) in libgoquic.a(go_quic_server_session_base.o)
  "net::protobuf_AddDesc_cached_5fnetwork_5fparameters_2eproto()", referenced from:
      net::protobuf_AddDesc_source_5faddress_5ftoken_2eproto() in libquic.a(source_address_token.pb.cc.o)
  "net::CachedNetworkParameters::ByteSize() const", referenced from:
      int google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual<net::CachedNetworkParameters>(net::CachedNetworkParameters const&) in libquic.a(source_address_token.pb.cc.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

from goquic.

henning77 avatar henning77 commented on July 30, 2024

Turned out the issue was that I built from a shared folder inside my VM (shared with host). I started from scratch on a folder inside the VM and now it works.

from goquic.

hodduc avatar hodduc commented on July 30, 2024

I'm glad to hear it 👍

from goquic.

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.