Problems finding files in devbox shell

Đang mở
#2,829 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
devtools

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Go
Star
12.4k
Fork
358
Merge trung bình
17 giờ 12 phút
Pull request đã merge (30 ngày)
31

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của jetify-com/devbox

Tất cả issue của jetify-com/devbox

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.