Environment
- OS: Ubuntu 24.04.2 LTS
- Rust: 1.88.0
- Cargo: 1.88.0
- Node: v20.18.0
- Bun: 1.2.17
- Nix: Present in environment
Issue Description
Encountered two separate but related build/runtime issues when building Claudia:
1. OpenSSL Development Headers Not Found
Error:
warning: openssl-sys@0.9.109: /usr/include/openssl/macros.h:14:10: fatal error: openssl/opensslconf.h: No such file or directory
error: failed to run custom build command for `openssl-sys v0.9.109`
Root Cause:
On Ubuntu 24.04, OpenSSL headers are located in /usr/include/x86_64-linux-gnu/openssl/ but the build system looks in /usr/include/openssl/.
Solution:
Even with libssl-dev and pkg-config installed, needed to create symbolic links:
sudo ln -sf /usr/include/x86_64-linux-gnu/openssl/opensslconf.h /usr/include/openssl/opensslconf.h
sudo ln -sf /usr/include/x86_64-linux-gnu/openssl/configuration.h /usr/include/openssl/configuration.h
2. Nix Environment Contamination
Error:
claudia: error while loading shared libraries: liblzma.so.5: cannot open shared object file: No such file or directory
Root Cause:
When built inside a Nix shell, the binary gets hardcoded RUNPATH pointing to non-existent Nix store paths:
$ readelf -d claudia | grep RUNPATH
Library runpath: [/home/user/outputs/out/lib:/nix/store/mhd0rk497xm0xnip7262xdw9bylvzh99-gcc-13.3.0-lib/lib:/nix/store/...]
Solution:
Build outside of Nix environment:
exit # exit nix shell
cargo clean
bun run tauri build
Suggested Improvements
- Documentation: Add Ubuntu 24.04 specific build instructions mentioning the OpenSSL symlink requirement
- Build Script: Consider adding a pre-build check for OpenSSL headers in platform-specific locations
- Nix Compatibility: Add warning in docs about Nix environment contamination or provide nix-specific build instructions
- CI/CD: Test builds on Ubuntu 24.04 to catch these issues early
Reproduction Steps
- Start with clean Ubuntu 24.04 system
- Install standard Rust/Node/Bun toolchain
- Enter Nix shell (if using Nix)
- Run
bun run tauri build
- Observe OpenSSL build failures
- After fixing OpenSSL issues, observe runtime library path issues
Workaround Summary
For Ubuntu 24.04 users:
- Create OpenSSL header symlinks as shown above
- Ensure you're NOT in a Nix shell when building
- Build should complete successfully
Environment
Issue Description
Encountered two separate but related build/runtime issues when building Claudia:
1. OpenSSL Development Headers Not Found
Error:
Root Cause:
On Ubuntu 24.04, OpenSSL headers are located in
/usr/include/x86_64-linux-gnu/openssl/but the build system looks in/usr/include/openssl/.Solution:
Even with
libssl-devandpkg-configinstalled, needed to create symbolic links:2. Nix Environment Contamination
Error:
Root Cause:
When built inside a Nix shell, the binary gets hardcoded RUNPATH pointing to non-existent Nix store paths:
Solution:
Build outside of Nix environment:
Suggested Improvements
Reproduction Steps
bun run tauri buildWorkaround Summary
For Ubuntu 24.04 users: