Hello,

we’re using libssh and compiling it using Zig. Zig is its own language but it 
also offers a compilation pipeline for C and C++ projects like libssh. Zig 
basically wraps clang so you mostly get clang behavior but one of the areas in 
which Zig shines is cross-compilation because Zig ships libc headers for like 
tons of libc versions and platforms. You need to write a build.zig, equivalent 
to a cmake config file. That said, clang isn’t great for all ARM platforms 
(there are some with custom gcc builds), so if that’s the case, zig is not a 
good option I suppose.

We have our mirror of libssh - 
https://github.com/actonlang/libssh/tree/zig-build - it has a very basic 
build.zig and it’s a little outdated but I reckon a git rebase will work fine. 
I just found https://github.com/thomashn/libssh - which looks more complete and 
up to date. You could give it a try.

Kind regards,
   Kristian.

> On 25 Jul 2025, at 21:41, carl.mo...@l3harris.com wrote:
> 
> I appreciate the couple of suggestions.  Nothing has worked so far.
>  
> To try a different path – is there a way to disable the ABI detection?  I get 
> the following error:
>  
> “Detecting C compiler ABI info – failed”
>  
> I know my installation of the ARM toolchain is correct – I not only compiled 
> a “Hello World”, my application, spdlog, OpenSSL, and zlib – all with no 
> issues.  But, in order to use libssh, I need to get passed this error.
>  
> The A.I. engines keep offering suggestions on disabling this check – but none 
> have worked.
>  
> Please – any ideas would be much appreciated.
>  
> Carl
>  
> From: Mohre, Carl (US) - SAS <carl.mo...@l3harris.com>
> Sent: Thursday, July 17, 2025 6:18 PM
> To: libssh@libssh.org
> Cc: Mohre, Carl (US) - SAS <carl.mo...@l3harris.com>
> Subject: How do I change the compiler for libssh to a cross-compiler?
>  
> I only use Linux every 5th or 6th project – so I’m not very experienced with 
> the more complex cmake files.
>  
> I’m simply trying to change the compiler your build system uses to the 
> cross-compiler I need for my Enclustra SOM development kit.
>  
> Can you please help.
>  
> Thank you.
>  
> Carl L. Mohre II
> L5 Lead Electrical Engineer
> AHM IRAD Software Systems & Embedded Software Engineer
> SPACE & AIRBORNE SYSTEMS / L3HARRIS TECHNOLOGIES
> t +1 321 727 5794 / m +1 321 288 5266
> L3Harris.com / carl.mo...@l3harris.com <mailto:carl.mo...@l3harris.com>
> 2400 Palm Bay Rd NE / Palm Bay, FL 32905 / USA
> 
> <image001.png> <http://www.l3harris.com/>
>  
> 
>   
> CONFIDENTIALITY NOTICE: This email and any attachments are for the sole use 
> of the intended recipient and may contain material that is proprietary, 
> confidential, privileged or otherwise legally protected or restricted under 
> applicable government laws. Any review, disclosure, distributing or other use 
> without expressed permission of the sender is strictly prohibited. If you are 
> not the intended recipient, please contact the sender and delete all copies 
> without reading, printing, or saving.

Reply via email to