Subject: Re: libssh2-1.8.0 Compilation failed on Z/OS V2R1

Re: libssh2-1.8.0 Compilation failed on Z/OS V2R1

From: Kirk Wolf <kirk_at_dovetail.com>
Date: Mon, 5 Nov 2018 06:22:13 -0600

Have you done much porting of open source to z/OS?
I don't actually know if the libssh2 upstream can be configured for z/OS
(#ifdef __MVS__).
It is often a challenge, since:

- the shell is a "posix" ksh variant,
- make isn't gmake,
- the compiler isn't gcc,
- the library isn't libc,
- the system codepage is EBCDIC (IBM-1047),
- etc, etc, etc.

Rocket Software (a vendor of lots of z/OS software) has ported lots of open
source tools, including libssh2 that they make available for free (and sell
support).
https://www.rocketsoftware.com/zos-open-source/tools

It looks like they currently have 1.4.3, but you might at least start there.

Kirk Wolf
Dovetailed Technologies
http://dovetail.com

On Fri, Nov 2, 2018 at 10:45 AM Manikandan J <jmani.20_at_gmail.com> wrote:

> Hi,
>
> We have compiled the libssh2-1.8.0 source on windows & Linux platform. It
> is working fine. But when we try to compile the same on Z/OS V2R1 platform,
> got the following error message,
>
> Failure is happening while the configuration particularly while creating
> *./config.status*
>
> *checking whether `alloca.c' needs Cray hooks... no*
> *checking stack direction for C alloca... -1*
> *checking for an ANSI C-conforming const... yes*
> *checking for inline... __inline__*
> *checking non-blocking sockets style... O_NONBLOCK*
> *checking that generated files are newer than configure... done*
> *configure: creating ./config.status*
> *./configure 20275: FSUM7330 << unclosed*
> *gmake[1]: *** [../libssh2-1.8.0/Makefile] Error 1*
> *gmake[1]: Target `all' not remade because of errors.*
>
> We have used the below c89 compiler options for the compilation,
>
> LPATHIDX=0
>
> ARGS[0]="c89"
>
> ARGS[1]="-Wc,target(zOSV2R1),langlvl(extended),halton(CCN3296),longname,rent,enum(int),float(ieee),noansialias,exportall,dll,xplink,norostring"
> ARGS[2]="-Wl,compat=ZOSV2R1,xplink"
> ARGS[3]="-D_XOPEN_SOURCE=600"
> ARGS[4]="-D_XOPEN_SOURCE_EXTENDED"
> ARGS[5]="-D_LARGEFILE_SOURCE"
> ARGS[6]="-D_LARGEFILE64_SOURCE"
> ARGS[7]="-DMVS"
> ARGS[8]="-D_OE_SOCKETS"
> ARGS[9]="-O2"
> ARGIDX=${#ARGS[@]}
>
> Please help me to resolve this.
> Thanks in advance!!!
>
>
> --
>
> *Thanks and Regards,*
>
> *Manikandan J *
>
> *Please consider Environment before printing this Email.*
> _______________________________________________
> libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
>

_______________________________________________
libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2018-11-05