I’m trying to install Mender client to an armhf Debian (8) jessie system via deb packages but even the oldest one does not fit the because of the glibc version (mender requires at least 2.29 but jessie has 2.19).
Cross-compiling is also not working because of libtool and automake version incompatibility when building glib-2.0.
As the last chance I tried native compilation on the target device but it seems the golang version on the jessie 8 does not let me compile it.
I think I tried to cross-compile in Jessie once, too. And from my blurry memory I just remember it being quite a nightmare…
Cross-compile support in Debian had really improved in Debian Stretch and earlier, as you can easily configure apt to get packages for other architectures (namely libraries), but from your question I assume you need it to be Jessie.
So without and strong proof but I would suggest native compilation. If you try with an old Mender client you might be able to workaround the golang version requirement. Otherwise post us here the golang version you are using, and the compile error to see if it is possible to workaround by patching the code…
Unfortunately, I found out that Debian Jessie uses golang 1.3… which predates Mender 1.0. After adding some hacks to make the GOPAH find packages in the vendor/ folder (maybe this was not supported at the time of golang 1.3?) I came to simple errors like:
Yes, golang it a bit picky when it comes to paths. I seems like you have cloned it in a directory named “mender-1.5”? That won’t work… You need to clone mender in your GOPATH, following the project directory hierarchy and then checkout the version you want.
git clone https://github.com/mendersoftware/mender.git /root/go/src/github.com/mendersoftware/mender
cd /root/go/src/github.com/mendersoftware/mender
git checkout 1.7.0
make
Let me know if this does not solve the issue.
If using latest golang, I encourage you to try newer Mender versions though.
Thanks for the suggestions, they pushed me a bit more. After trying and fixing a couple of issues between the mender version and golang version here is the point that I got stuck.
go build -ldflags "-X github.com/mendersoftware/mender/conf.Version=2.4.2"
# github.com/mendersoftware/mender/vendor/github.com/mendersoftware/openssl
vendor/github.com/mendersoftware/openssl/conn.go:100:61: could not determine kind of name for C.X509_V_ERR_CA_KEY_TOO_SMALL
vendor/github.com/mendersoftware/openssl/conn.go:101:61: could not determine kind of name for C.X509_V_ERR_CA_MD_TOO_WEAK
vendor/github.com/mendersoftware/openssl/conn.go:103:61: could not determine kind of name for C.X509_V_ERR_DANE_NO_MATCH
vendor/github.com/mendersoftware/openssl/conn.go:105:61: could not determine kind of name for C.X509_V_ERR_EE_KEY_TOO_SMALL
vendor/github.com/mendersoftware/openssl/conn.go:106:61: could not determine kind of name for C.X509_V_ERR_EMAIL_MISMATCH
vendor/github.com/mendersoftware/openssl/conn.go:108:61: could not determine kind of name for C.X509_V_ERR_HOSTNAME_MISMATCH
vendor/github.com/mendersoftware/openssl/conn.go:109:61: could not determine kind of name for C.X509_V_ERR_INVALID_CALL
vendor/github.com/mendersoftware/openssl/conn.go:110:61: could not determine kind of name for C.X509_V_ERR_IP_ADDRESS_MISMATCH
vendor/github.com/mendersoftware/openssl/conn.go:111:61: could not determine kind of name for C.X509_V_ERR_NO_VALID_SCTS
vendor/github.com/mendersoftware/openssl/conn.go:116:49: could not determine kind of name for C.X509_V_ERR_PATH_LOOP
vendor/github.com/mendersoftware/openssl/conn.go:118:49: could not determine kind of name for C.X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION
vendor/github.com/mendersoftware/openssl/conn.go:119:49: could not determine kind of name for C.X509_V_ERR_STORE_LOOKUP
vendor/github.com/mendersoftware/openssl/conn.go:121:49: could not determine kind of name for C.X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256
vendor/github.com/mendersoftware/openssl/conn.go:122:49: could not determine kind of name for C.X509_V_ERR_SUITE_B_INVALID_ALGORITHM
vendor/github.com/mendersoftware/openssl/conn.go:123:49: could not determine kind of name for C.X509_V_ERR_SUITE_B_INVALID_CURVE
vendor/github.com/mendersoftware/openssl/conn.go:124:49: could not determine kind of name for C.X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM
vendor/github.com/mendersoftware/openssl/conn.go:125:49: could not determine kind of name for C.X509_V_ERR_SUITE_B_INVALID_VERSION
vendor/github.com/mendersoftware/openssl/conn.go:126:49: could not determine kind of name for C.X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED
Makefile:76: recipe for target 'mender' failed
make: *** [mender] Error 2
Using golang v1.12 (also tried with 1.10) and mender 2.4.2 (also tried with 2.5.x and 2.6.x).
Any idea on how I can proceed?
Edit:
Tried mender v1.7 and compiled it successfully. I’ll give it a shot first, then try to build v2.x.x if there are any missing functionalities.
The error you posted is an incompatibility with OpenSSL version,
I can see that OpenSSL version in Debian Jessie is 1.0.1t. Modern mender clients require OpenSSL 1.1.1 (I think 1.1.1k, but unsure about the exact version).
Mender client added OpenSSL dependency in 2.4.0 (see changelog here), so your best shot now is with Mender client 2.3.3.
1.7 is pretty old. If you can make it compile, 2.3 is much more feature rich. Mender client 2.3 is EOL as for this month, but 1.7 has been EOL for couple of years now…