Git Product home page Git Product logo

Comments (8)

treilly-nuodb avatar treilly-nuodb commented on May 29, 2024

Installing 1.1beta2 didn't appear to help.

from go-nuodb.

treilly-nuodb avatar treilly-nuodb commented on May 29, 2024

This fixed my issue:

export CGO_LDFLAGS='-L. -lcnuodb -L/opt/nuodb/lib64/ -lNuoRemote'

from go-nuodb.

treilly-nuodb avatar treilly-nuodb commented on May 29, 2024

I ran into more issues running the test but eventually got them running. They passed! I'll add some notes on what I had to do tomorrow after I have a chance to go through and sort out exactly what I did to make things work.

from go-nuodb.

tilinna avatar tilinna commented on May 29, 2024

Great, I've been puzzling with the cgo flags myself too :)

For me, the thing works well if I install the libcnuodb.so to the system. The other option was to modify nuodb.go's #cgo LDFLAGS so that they included absolute pathed -Wl,-rpath, and -L options. I wouldn't like to do either -- it should be just "go get".

I'm hoping the upcoming Go 1.1 fixes the problem by allowing inclusion of C++ files (with extern C linkaged functions). See Issue 8248043 for example.

from go-nuodb.

treilly-nuodb avatar treilly-nuodb commented on May 29, 2024

So the problem is with the Makefile, if you move the "-L/opt/nuodb/lib64/ -lNuoRemote" to after the -o $@ then libcnuodb.so will depend on libNuoRemote.so, otherwise it won't. This is verifiable by running ldd on libcnuodb.so.

With that fix the CGO_LDFLAGS aren't necessary.

from go-nuodb.

tilinna avatar tilinna commented on May 29, 2024

I moved the -lNuoRemote to the nuodb.go and that, I think, solved the issue for good. Please test it with a new Go version.

commit: d032b58

from go-nuodb.

treilly-nuodb avatar treilly-nuodb commented on May 29, 2024

Okay, I played with that too and in my case it wasn't enough b/c it still couldn't find libNuoRemote. With the dependency fix the full path to /opt/nuodb/lib64 is recorded in libcnuodb.so so it found it. Doing both seems harmless and probably a good idea.

from go-nuodb.

tilinna avatar tilinna commented on May 29, 2024

Ok, I reverted it back, Thanks for help :)

from go-nuodb.

Related Issues (2)

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.