Git Product home page Git Product logo

Comments (6)

rthornton128 avatar rthornton128 commented on August 12, 2024 1

This is telling you that pkg-config is passing in flags the linker doesn't understand. This is likely something specific to Arch or how the package was installed.

I don't know enough to help you diagnose but I can say that -O1 seems misplaced as that's an optimization flag and should probably be emitted from --cflags, not --libs. I don't know what the -z related flags are.

from goncurses.

n-hachi avatar n-hachi commented on August 12, 2024 1

@amireldor

If yo do the following settings, the problem may be solved.

$ export CGO_LDFLAGS_ALLOW="-Wl,-Bsymbolic-functions"
$ go get github.com/rthornton128/goncurses

The following is the reference URL.
https://github.com/golang/go/wiki/InvalidFlag

from goncurses.

amireldor avatar amireldor commented on August 12, 2024

I think I have a similar problem, when I run this under an Ubuntu-based distro (20.04, Regolith) I get:

❯ go get github.com/rthornton128/goncurses
go build github.com/rthornton128/goncurses: invalid flag in pkg-config --libs: -Wl,-Bsymbolic-functions

from goncurses.

scrouthtv avatar scrouthtv commented on August 12, 2024

@n-hachi Doesn't work for me.

Like op, I'm running Linux archlinux 5.8.14-arch1-1 #1 SMP PREEMPT Wed, 07 Oct 2020 23:59:46 +0000 x86_64 GNU/Linux

Thanks for any help in advance.

from goncurses.

rthornton128 avatar rthornton128 commented on August 12, 2024

Further to what @n-hachi suggested, the "fix" is the *_ALLOW family of environment variables. See #55 for more details. Potentially, if it were to work, the #cgo directives might be used to allow the flags (though I suspect this won't work) but I'm reluctant to do that, as every package uses different flags and I'm reluctant to open it up to everything.

from goncurses.

scrouthtv avatar scrouthtv commented on August 12, 2024

If you don't want to dive into the depths of CGO compilation and that stuff here's a quick and insecure "workaround" using the fix mentioned above:

export CGO_CFLAGS_ALLOW=".*"
export CGO_LDFLAGS_ALLOW=".*"
go get github.com/rthornton128/goncurses
export CGO_CFLAGS_ALLOW=
export CGO_LDFLAGS_ALLOW=

It is important to reset the allowed flags again for security reasons.

from goncurses.

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.