Problems finding files in devbox shell

Ouverte
#2,829 3 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
55/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
go
Domaine
devtools

Piste de recherche

Start with the reported devbox.json and reproduce the Go example command in a Devbox shell on Linux, comparing it with the working host environment. Investigate how Devbox exposes system dependencies to Go builds and identify why X11/Xlib.h is unavailable; done when the example compiles in the documented setup or the required dependency is clearly documented.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

bug p3 processed triage unrelated
What happened?

I try to use https://github.com/hajimehoshi/ebiten Go game engine and followed the instructions.

To confirm the environment, one can run the following command: go run github.com/hajimehoshi/ebiten/v2/examples/rotate@latest

If I install go on my computer (Ubuntu) with all the required system dependencies and run go run github.com/hajimehoshi/ebiten/v2/examples/rotate@latest then it works.

If I remove Go from my computer, create a devbox environment, add Go package to it, open a devbox shell and then run the same command I get an error:

# github.com/hajimehoshi/ebiten/v2/internal/glfw
In file included from pkg/mod/github.com/hajimehoshi/ebiten/[email protected]/internal/glfw/native_linbsd.go:14:
./glfw3native_unix.h:105:12: fatal error: X11/Xlib.h: No such file or directory
  105 |   #include <X11/Xlib.h>
      |            ^~~~~~~~~~~~
compilation terminated.
Steps to reproduce
  1. Install system dependencies
  2. add go to devbox environment
  3. run a devbox shell
  4. run go run github.com/hajimehoshi/ebiten/v2/examples/rotate@latest
Command

shell

devbox.json
{
  "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.16.0/.schema/devbox.schema.json",
  "packages": ["curl@latest", "gettext@latest", "go@latest"],
  "env": {
    "GOPATH": "$PWD",
    "PATH": "$PATH:$PWD"
  },
  "shell": {
    "init_hook": ["echo 'Welcome to devbox!' > /dev/null"],
    "scripts": {
      "test": ["echo \"Error: no test specified\" && exit 1"]
    }
  }
}
Devbox version

0.17.2

Nix version

nix (Nix) 2.31.1

What system does this bug occur on?

Linux (x86-64)

Debug logs

No response

Langage dominant
Go
Étoiles
12.4k
Forks
358
Merge moyen
17 h 12 min
PR mergées (30 j)
31

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de jetify-com/devbox

Toutes les issues de jetify-com/devbox

Issues similaires

Plus d'issues Go

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.