Hello,
I’m looking to build Habitat on FreeBSD, largely because I want to see if I can, but if I can I think there’s definitely a use case here… I realize that it’s not a “supported” OS, but it’s just rust… I don’t see a reason why it shouldn’t build… (running may be an entirely different story, but we’ll cross that bridge…)
Anyway, I built a fresh FreeBSD 11.2 for this process.
Here’s my process so far:
# install curl so we can download the installer
pkg install curl
# install rust/cargo/et al
curl https://sh.rustup.rs -sSf | sh
# You have to manually update your .cshrc to include $HOME/.cargo/bin, your path should look like (uncommented):
# set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin $HOME/bin $HOME/.cargo/bin)
# clone 0.68.0 since I know that works in linux
git clone -b '0.68.0' --single-branch --depth 1 https://github.com/habitat-sh/habitat.git
cd habitat
# install prereqs
pkg install pkgconf libarchive libsodium protobuf gmake
# Run gmake because that's gnu make which we use in linux
gmake
This all goes swimmingly until:
# gmake
sh -c 'cd components/hab && cargo build '
Compiling habitat_http_client v0.0.0 (https://github.com/habitat-sh/core.git#63f04305)
Compiling habitat-sup-protocol v0.0.0 (/root/habitat/components/sup-protocol)
error: /root/habitat/target/debug/build/habitat_http_client-0b153eeb838571ed/out/cacert.pem wasn't a utf-8 file
--> /root/.cargo/git/checkouts/core-4cdefcf00786d1eb/63f0430/components/http-client/src/lib.rs:54:38
|
54 | const CACERT_PEM: &'static str = include_str!(concat!(env!("OUT_DIR"), "/cacert.pem"));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error
error: Could not compile `habitat_http_client`.
warning: build failed, waiting for other jobs to finish...
error: build failed
gmake: *** [Makefile:178: build-hab] Error 101
And in fact, it is NOT a UTF-8 file:
# file /root/habitat/target/debug/build/habitat_http_client-0b153eeb838571ed/out/cacert.pem
/root/habitat/target/debug/build/habitat_http_client-0b153eeb838571ed/out/cacert.pem: ISO-8859 text
And this appears to be because of an invalid character sequence:
# iconv -t UTF-8 /root/habitat/target/debug/build/habitat_http_client-0b153eeb838571ed/out/cacert.pem
... snip ...
Policy: X509v3 Any Policy
CPS: http://www.certicamara.com/dpc/
User Notice:
iconv: iconv(): Illegal byte sequence
Explicit Text: Limitaciones de garantroot@freebsd-11-2:~/habitat #
(copied as-is, I’m guessing the error is at Limitaciones and some accent that the word uses?)
So, I’m stumped… any thoughts, comments, guesses, or ideas?
Thanks!