GithubHelp home page GithubHelp logo

Build failed on FreeBSD about gocraft HOT 7 CLOSED

icexin avatar icexin commented on August 29, 2024
Build failed on FreeBSD

from gocraft.

Comments (7)

icexin avatar icexin commented on August 29, 2024

I have not tested on FreeBSD. The error message shows that X Window Header is missing. You may try installing the X development library on the machine.

from gocraft.

Martinfx avatar Martinfx commented on August 29, 2024

Yes i know. I have this headers in my machine.

/usr/local/include/X11/Xlib.h
/usr/local/include/GL/glx.h

from gocraft.

icexin avatar icexin commented on August 29, 2024

Maybe /usr/local/include is not in the default include path, try CGO_CFLAGS="-I/usr/local/include" go build

from gocraft.

Martinfx avatar Martinfx commented on August 29, 2024

Thank you for fot the path but failed linker with go build

# github.com/go-gl/gl/v3.3-core/gl
/usr/bin/ld: cannot find -lGL
clang: error: linker command failed with exit code 1 (use -v to see invocation)
# github.com/go-gl/gl/v3.3-core/gl
../../go/pkg/mod/github.com/go-gl/[email protected]/v3.3-core/gl/procaddr.go:54:28: warning: passing 'const char *' to parameter of type 'const GLubyte *' (aka 'const unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
/usr/local/include/GL/glx.h:325:48: note: passing argument to parameter 'procname' here
# github.com/go-gl/glfw/v3.2/glfw
/usr/bin/ld: cannot find -lGL
clang: error: linker command failed with exit code 1 (use -v to see invocation)

from gocraft.

icexin avatar icexin commented on August 29, 2024

trying CGO_CFLAGS="-I/usr/local/include" CGO_LDFLAGS="-L/usr/local/lib" go build

from gocraft.

Martinfx avatar Martinfx commented on August 29, 2024

Thank you go build

go build
# github.com/go-gl/glfw/v3.2/glfw
In file included from ../../go/pkg/mod/github.com/go-gl/[email protected]/v3.2/glfw/c_glfw.go:4:
In file included from ./glfw/src/context.c:28:
In file included from ./glfw/src/internal.h:169:
./glfw/src/x11_platform.h:36:10: fatal error: 'X11/Xlib.h' file not found
#include <X11/Xlib.h>
         ^~~~~~~~~~~~
1 error generated.
^[[B# github.com/go-gl/gl/v3.3-core/gl
../../go/pkg/mod/github.com/go-gl/[email protected]/v3.3-core/gl/procaddr.go:52:11: fatal error: 'GL/glx.h' file not found
        #include <GL/glx.h>
          

from gocraft.

Martinfx avatar Martinfx commented on August 29, 2024

OK i found problem, this is right command only some warnings. Last problem i have with fish. Thank you M.

$ CGO_CFLAGS="-I/usr/local/include" CGO_LDFLAGS="-L/usr/local/lib" go build
# github.com/go-gl/gl/v3.3-core/gl
../../go/pkg/mod/github.com/go-gl/[email protected]/v3.3-core/gl/procaddr.go:54:28: warning: passing 'const char *' to parameter of type 'const GLubyte *' (aka 'const unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]
/usr/local/include/GL/glx.h:325:48: note: passing argument to parameter 'procname' here

from gocraft.

Related Issues (13)

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.