bneradt commented on issue #7353:
URL: https://github.com/apache/trafficserver/issues/7353#issuecomment-3549393074
Thank you @rajeshadp for the Ermine statifier tip. That may be helpful for
others.
Apart from that, here's an update of the state of static builds now that we
have ATS 10 released. ATS 10 has transitioned from automake to cmake. Our cmake
configuration supports the use of the `-DBUILD_SHARED_LIBS=OFF` which
configures the build to generate static libraries.
## How to Build Statically
```bash
# Configure with static libraries
cmake -B build -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=/opt/ats
cmake --build build
cmake --install build
```
## What Gets Built
With `-DBUILD_SHARED_LIBS=OFF`:
- **Static**: All core TrafficServer libraries (tscore, inkcache, inknet,
inkhostdb, etc.)
- **Still Shared**:
- Plugin API library (tsapi) - required for dynamic plugin loading.
- Bundled thirdparty libraries (yaml-cpp, libswoc).
- System libraries (OpenSSL, zlib, etc.).
This hybrid approach ensures that:
1. Core TrafficServer code is statically linked for easier deployment.
2. Plugin loading capability is preserved.
3. The resulting binary is more portable while maintaining functionality.
For reference, see PR #10588.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]