Updated Linux building instructions.#1624
Updated Linux building instructions.#1624bkaradzic-microsoft wants to merge 4 commits intomasterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the Ubuntu/Linux build documentation to reflect a new set of required system packages and an updated CMake configuration example for selecting the JavaScript engine.
Changes:
- Replaces the example Ubuntu dependency installation command with a new
apt installpackage list. - Updates the JavaScriptCore CMake configuration example.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
|
@bkaradzic-microsoft I've opened a new pull request, #1625, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@bkaradzic-microsoft I've opened a new pull request, #1626, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@bkaradzic-microsoft I've opened a new pull request, #1627, to work on those changes. Once the pull request is ready, I'll request review from you. |
BUILDING.md
Outdated
|
|
||
| ``` | ||
| cmake -G Ninja -D JAVASCRIPTCORE_LIBRARY=/usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-4.1.so -D NAPI_JAVASCRIPT_ENGINE=JavaScriptCore | ||
| cmake -G Ninja -D -D NAPI_JAVASCRIPT_ENGINE=JavaScriptCore |
There was a problem hiding this comment.
Path to JSC .so is not needed anymore here?
There was a problem hiding this comment.
so this must be updated as well ?
BabylonNative/.github/jobs/linux.yml
Line 31 in a3264cf
There was a problem hiding this comment.
it doesn't hurt to pass it in... it's just the default
…1626) The Linux build instructions referenced a "Clang-9 toolchain" for a package install command that actually installs `g++` (GCC), not Clang. ## Change - Updated the description label from "Clang-9 toolchain" → "GCC toolchain" to accurately reflect the `apt install` command that follows it. <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: bkaradzic-microsoft <260535795+bkaradzic-microsoft@users.noreply.github.com>
…nstructions (#1627) The Linux build instructions listed `libjavascriptcoregtk-4.1-dev` in the base mandatory packages, causing it to be installed for all engine targets (including V8) and duplicating the engine-specific install step. The base command also used `apt` while engine-specific steps used `apt-get`. ## Changes - **Remove `libjavascriptcoregtk-4.1-dev` from base install** — engine-specific packages now live only in their respective engine sections - **Standardize on `apt-get`** throughout the Linux section for consistency Before: ``` sudo apt install libgl1-mesa-dev x11proto-core-dev libx11-dev libcurl4-openssl-dev libjavascriptcoregtk-4.1-dev g++ cmake ninja-build npm ``` After: ``` sudo apt-get install libgl1-mesa-dev x11proto-core-dev libx11-dev libcurl4-openssl-dev g++ cmake ninja-build npm ``` <!-- START COPILOT CODING AGENT TIPS --> --- 🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. [Learn more about Advanced Security.](https://gh.io/cca-advanced-security) --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: bkaradzic-microsoft <260535795+bkaradzic-microsoft@users.noreply.github.com>
The JavaScriptCore cmake invocation in `BUILDING.md` contained a stray `-D` flag (`-D -D NAPI_JAVASCRIPT_ENGINE=...`), making it an invalid command that would fail immediately. ## Changes - **Remove stray `-D`** from the JavaScriptCore cmake command - **Add `-B build/linux`** to both JavaScriptCore and V8 cmake commands — consistent with every other platform section in the docs - **Replace bare `ninja`** with `cmake --build build/linux` to match the out-of-source build pattern used elsewhere Before/after for the broken command: ```sh # Before (invalid) cmake -G Ninja -D -D NAPI_JAVASCRIPT_ENGINE=JavaScriptCore # After cmake -B build/linux -G Ninja -D NAPI_JAVASCRIPT_ENGINE=JavaScriptCore ``` <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: bkaradzic-microsoft <260535795+bkaradzic-microsoft@users.noreply.github.com>
|
|
||
| ``` | ||
| cmake -G Ninja -D JAVASCRIPTCORE_LIBRARY=/usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-4.1.so -D NAPI_JAVASCRIPT_ENGINE=JavaScriptCore | ||
| cmake -B build/linux -G Ninja -D NAPI_JAVASCRIPT_ENGINE=JavaScriptCore |
There was a problem hiding this comment.
| cmake -B build/linux -G Ninja -D NAPI_JAVASCRIPT_ENGINE=JavaScriptCore | |
| cmake -B build/linux -G Ninja |
JavaScriptCore is also the default now.
|
|
||
| ``` | ||
| sudo apt-get install libgl1-mesa-dev libcurl4-openssl-dev clang-9 libc++-9-dev libc++abi-9-dev lld-9 ninja-build | ||
| sudo apt-get install libgl1-mesa-dev x11proto-core-dev libx11-dev libcurl4-openssl-dev g++ cmake ninja-build npm |
There was a problem hiding this comment.
I don't think we should add npm here. Depending on how people use npm, it may be installed differently. Same goes for cmake. They are already requirements listed in the All Development Platforms section.
There was a problem hiding this comment.
Also, why switch from CLang to GCC?
There was a problem hiding this comment.
Since clang is not really required and GCC might be already installed.
There was a problem hiding this comment.
The whole command line gets you into the state where you can build just build. If cmake or npm is not there, something might fail.
There was a problem hiding this comment.
Yes, but many people don't install cmake or npm using apt, so this may cause problems for them.
No description provided.