Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Resolve build failures by unsetting LD_LIBRARY_PATH and using st… #162

Closed
wants to merge 1 commit into from

Conversation

sc20ka
Copy link

@sc20ka sc20ka commented Dec 9, 2024

Fix: Resolve build failures in WSL2 (Ubuntu 22.04) when building milkv-duo256m-sd (#133)

When building milkv-duo256m-sd with build.sh on WSL2 (Ubuntu 22.04), the build process was failing due to issues in dependencies.sh and brmake. This commit addresses these problems:

  1. dependencies.sh: The script was failing due to the presence of the current working directory in the LD_LIBRARY_PATH environment variable. This could lead to unpredictable behavior and incorrect builds. The issue has been resolved by forcibly unsetting LD_LIBRARY_PATH before the build process. This ensures the build uses system libraries from the correct locations, preventing conflicts.

  2. brmake: The use of unbuffer in brmake was causing an error: "unbuffer can't find package Expect while executing "package require Expect" (file "/usr/bin/unbuffer" line 6)". This has been corrected by replacing unbuffer with stdbuf -oL, which provides similar line-buffering functionality without the Expect dependency. This ensures correct and timely output of build logs.

These changes resolve the build failures encountered on WSL2 (Ubuntu 22.04) and ensure a more robust and reliable build process for milkv-duo256m-sd.

And complited normaly worked and tested build on the board.

…dbuf (milkv-duo#133)

The build process was failing due to the current working directory being present in the LD_LIBRARY_PATH, which can lead to unpredictable behavior and errors. This commit addresses the issue in two ways:

1. Unsetting LD_LIBRARY_PATH:  Before invoking , the  environment variable is explicitly unset. This ensures that the build process uses system libraries from standard locations, preventing conflicts with potentially outdated or incorrect libraries in the current working directory.

2. Using stdbuf -oL with make: The original  command was replaced with . This forces line buffering of the output from , ensuring that build logs are displayed correctly and in a timely manner. This change addresses potential issues with buffering that could lead to incomplete or delayed log output.

These changes together resolve the build failures reported in milkv-duo#133 and improve the reliability and consistency of the build process.
@sc20ka
Copy link
Author

sc20ka commented Dec 10, 2024

req rework

@sc20ka sc20ka closed this Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant