Closed harperreed closed 1 month ago
Certainly! I'll address the user's request to resolve the Linux build failure in PR #13 due to missing OpenGL dependencies. Let's go through the tasks and implement the necessary changes.
The issue stems from newly introduced OpenGL dependencies in PR #13, which are not available in the Linux build environment. The main errors are related to missing OpenGL and X11 development packages. To resolve this, we need to update the README.md with installation instructions and modify the GitHub Actions workflow to install these dependencies before running the tests.
Let's make the necessary changes to resolve the build failure:
README.md
---
+++
@@ -1,6 +1,9 @@
### Prerequisites
- Go 1.23.2 or later
- Access to a Lightroom catalog (`.lrcat`) if you want to structure your output by original paths.
+- For Linux users:
+ - OpenGL development libraries
+ - X11 development libraries
### Installation
1. Clone the repository:
@@ -9,7 +12,20 @@
cd lrprev-extract-go
-2. Compile the code: +2. For Linux users, install the required development packages:
+3. Compile the code:
go build -o lrprev-extract ./cmd/lrprev-extract
@@ -67,6 +83,8 @@
github.com/mattn/go-sqlite3
: A pure Go SQLite driver.github.com/schollz/progressbar/v3
: A progress bar for console applications.github.com/go-gl/gl/v2.1/gl
: OpenGL bindings for Go.github.com/go-gl/glfw/v3.3/glfw
: GLFW bindings for Go.
2. Update the GitHub Actions workflow file to install the necessary dependencies before running the tests.
#### `.github/workflows/go-tests.yaml`
```diff
---
+++
@@ -51,6 +51,10 @@
uses: actions/setup-go@v4.0.1
with:
go-version: "1.21"
+ - name: Install OpenGL and X11 dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y libgl1-mesa-dev xorg-dev
- name: Cache Go modules
uses: actions/cache@v3.3.1
with:
@@ -92,6 +96,10 @@
uses: actions/setup-go@v4.0.1
with:
go-version: "1.21"
+ - name: Install OpenGL and X11 dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y libgl1-mesa-dev xorg-dev
- name: Cache Go modules
uses: actions/cache@v3.3.1
with:
go.mod
---
+++
@@ -7,6 +7,8 @@
require github.com/DATA-DOG/go-sqlmock v1.5.2
require (
+ github.com/go-gl/gl v0.0.0-20211210172815-726fda9656d6
+ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20240307211618-a69d953ea142
github.com/schollz/progressbar/v3 v3.16.1
github.com/stretchr/testify v1.9.0
)
These changes should resolve the Linux build failure in PR #13 by addressing the missing OpenGL dependencies. Here's a summary of the changes:
These changes should allow the project to build and run successfully on Linux environments, resolving the issues encountered in PR #13.
Continue the conversation with Sweep here: https://app.sweep.dev/c/1b085ef1-e7cf-465f-a827-18aea6f1448e.
:book: For more information on how to use Sweep, please read our documentation.
Error Logs
Resolve Linux build failure in PR #13 due to missing OpenGL dependencies
Description:
PR #13 is failing to build on Linux due to missing OpenGL and X11 dependencies. The error logs indicate that the required packages for OpenGL and X11 are not found in the build environment.
Tasks:
README.md
file to include instructions for installing the required OpenGL and X11 development packages on Linux.github/workflows/go-tests.yaml
) to install the necessary dependencies before running the testsAdditional Information:
The main errors are:
Package gl was not found in the pkg-config search path.
fatal error: X11/Xcursor/Xcursor.h: No such file or directory
These errors suggest that the OpenGL and X11 development libraries are missing in the Linux build environment.