salass00Software DevPosted
1 month agoI just updated the AmigaOS 3.x/AROS fork of ssh2fs to libssh2 1.11.1 however I've only been able to compile and test the AmigaOS 3.x version so far.
While there are AmiSSL 4.12 binaries available on [url=https://arosarchives.os4depot.net/]AROS Archives[/url] for i386-aros and x86_64-aros the SDK files seem to be missing. I tried using the official AmiSSL 4.12 SDK files from https://github.com/jens-maus/amissl/releases/tag/4.12 as they seem to include AROS style inlines but this just leads to a load of compiler errors from <amissl/inline.h>.
Apparently I was able to compile ssh2fs for i386-aros in 28-Jun-2023 using AmiSSL 4.12 but I have no memory of how I managed it or where I got the SDK files from...
amigamiaAdminPosted
1 month agoHave you tried the SDK in AXRT.org?
[url]https://axrt.org/download/aros/v11/SDK-20250418-1-U3-any-x86_64-update.zip[/url]
[url]https://axrt.org/downloads-aros-64bit[/url]
I don't recall if Serk released a 64-bit version of AmiSSL, but version 1.1.0h of openssl is available in the contrib archive as linker libraries (not shared library). This is what I used when building latest Odyssey last year.
[url]https://www.axrt.org/download/aros/v11/AROS-20250418-1-any-x86_64-contrib.tar.bz2[/url]
salass00Software DevPosted
1 month agoI found what was causing all the compilation errors. It is the OPENSSL_sk_set_cmp_func in <defines/amissl.h> that returns a pointer to a callback (the previous one I presume) and this expands badly with the macros. If I change it to return a void pointer instead all the compiler errors just go away.
@salas00,
Thanks for your work on this! There is a Hollywood plugin called hurl.hwp which gives curl functionality given the presence of AmiSSL. RNOTransfer is a great Hollywood app that'd love to see on AROS but it wasn't included as a target because of the missing hurl.hwp support. Thanks.
NathanH
salass00Software DevPosted
1 month agoI have ssh2fs compiling and working for i386-aros now using my modified AmiSSL 4.12 headers. Initially the binary wasn't working because gcc was optimizing my calloc() replacement function so that it was recursively calling itself in an infinite loop but after adding -fno-builtin when compiling the file in question everything seems to be working as it should.
Next I will try to compile a binary for x86_64-aros...
salass00Software DevPosted
1 month agoAfter using sfdc to regenerate the defines/ headers so that they were using the AROS_LCxNR() macros for functions returning void I was able to get ssh2fs compiling for x86_64-aros, and after fixing the taglist varargs macros for 64-bit it is now opening and initializing AmiSSL without crashing. However it still causes a crash in AROSTCP which I will have to look into.
salass00Software DevPosted
1 month ago[quote]
However it still causes a crash in AROSTCP which I will have to look into.
[/quote]
This seems to be because AmiSSL is overwriting the errno pointer I set with SocketBaseTags() with a version of the same but with the upper 32-bit of the address masked out to zeros.
Looking at my rather old checkout of AmiSSL source code it has:
[code]
struct TagItem tags[] =
{
{ SBTM_SETVAL(SBTC_ERRNOLONGPTR), (ULONG)state->errno_ptr },
#if defined(__amigaos4__)
{ SBTM_SETVAL(SBTC_BREAKMASK), SIGBREAKF_CTRL_C },
#endif
{ TAG_DONE, 0 }
};
[/code]
which was maybe not fixed for the AROS port.
If I rewrite the errno pointer after the InitAmiSSL() it changes the crash to tlsf_freevec() in AROSTCP.