Yup, I had to do a couple of fixes to the GNU utilities to get around
size limitations, for example when the size limit to ADDBNDDIRE (not
qar) is reached, then to split the request and make multiple calls.

G.

________________________________

From: owner-openssl-us...@openssl.org
[mailto:owner-openssl-us...@openssl.org] On Behalf Of Pankaj Aggarwal
Sent: 07 April 2010 12:52
To: openssl-users@openssl.org
Subject: Re: OpenSSL on IBMi


I got the icc problem resolved by writing shell script. 

Building static libraries get stuck at following point ( I guess the
object limit of qar is hit)


 qar -cuv ../../libcrypto.a a_object.o a_bitstr.o a_utctm.o a_gentm.o
a_time.o    a_int.o a_octet.o a_print.o a_type.o a_set.o a_dup.o
a_d2i_fp.o a_i2d_fp.o a   _enum.o a_utf8.o a_sign.o a_digest.o
a_verify.o a_mbstr.o a_strex.o x_algor.o
 x_val.o x_pubkey.o x_sig.o x_req.o x_attrib.o x_bignum.o x_long.o
x_name.o x   _x509.o x_x509a.o x_crl.o x_info.o x_spki.o nsseq.o
d2i_pu.o d2i_pr.o i2d_pu.   o i2d_pr.o t_req.o t_x509.o t_x509a.o
t_crl.o t_pkey.o t_spki.o t_bitst.o tas   n_new.o tasn_fre.o tasn_enc.o
tasn_dec.o tasn_utl.o tasn_typ.o f_int.o f_stri   ng.o n_pkey.o f_enum.o
a_hdr.o x_pkey.o a_bool.o x_exten.o asn1_gen.o asn1_pa   r.o asn1_lib.o
asn1_err.o a_meth.o a_bytes.o a_strnid.o evp_asn1.o asn_pack.o
p5_pbe.o p5_pbev2.o p8_pkey.o asn_moid.o
command = CRTBNDDIR BNDDIR(OPENSSL/LIBCRYPTO)
TEXT('ecofr/openssl-0.9.8e/cryp   to/asn1/../../libcrypto.a')
command = ADDBNDDIRE BNDDIR(OPENSSL/LIBCRYPTO) OBJ((OPENSSL/A_OBJECT0
*MODULE   ) (OPENSSL/A_BITSTR0 *MODULE) (OPENSSL/A_UTCTM0 *MODULE)
(OPENSSL/A_GENTM0 *M   ODULE) (OPENSSL/A_TIME0 *MODULE) (OPENSSL/A_INT0
*MODULE) (OPENSSL/A_OCTET0 *   MODULE) (OPENSSL/A_PRINT0 *MODULE)
(OPENSSL/A_TYPE0 *MODULE) (OPENSSL/A_SET0    *MODULE) (OPENSSL/A_DUP0
*MODULE) (OPENSSL/A_D2I_FP0 *MODULE) (OPENSSL/A_I2D_
 FP0 *MODULE) (OPENSSL/A_ENUM0 *MODULE) (OPENSSL/A_UTF80 *MODULE)
(OPENSSL/A_S   IGN0 *MODULE) (OPENSSL/A_DIGEST0 *MODULE)
(OPENSSL/A_VERIFY0 *MODULE) (OPENSS   L/A_MBSTR0 *MODULE)
(OPENSSL/A_STREX0 *MODULE) (OPENSSL/X_ALGOR0 *MODULE) (OP   ENSSL/X_VAL0
*MODULE) (OPENSSL/X_PUBKEY0 *MODULE) (OPENSSL/X_SIG0 *MODULE) (O
PENSSL/X_REQ0 *MODULE) (OPENSSL/X_ATTRIB0 *MODULE) (OPENSSL/X_BIGNUM0
*MODULE   ) (OPENSSL/X_LONG0 *MODULE) (OPENSSL/X_NAME0 *MODULE)
(OPENSSL/X_X5090 *MODUL   E) (OPENSSL/X_X509A0 *MODULE) (OPENSSL/X_CRL0
*MODULE) (OPENSSL/X_INFO0 *MODU   LE) (OPENSSL/X_SPKI0 *MODULE)
(OPENSSL/NSSEQ0 *MODULE) (OPENSSL/D2I_PU0 *MODU   LE) (OPENSSL/D2I_PR0
*MODULE) (OPENSSL/I2D_PU0 *MODULE) (OPENSSL/I2D_PR0 *MOD   ULE)
(OPENSSL/T_REQ0 *MODULE) (OPENSSL/T_X5090 *MODULE) (OPENSSL/T_X509A0 *MO
DULE) (OPENSSL/T_CRL0 *MODULE) (OPENSSL/T_PKEY0 *MODULE)
(OPENSSL/T_SPKI0 *MO   DULE) (OPENSSL/T_BITST0 *MODULE)
(OPENSSL/TASN_NEW0 *MODULE) (OPENSSL/TASN_FR   E0 *MODULE)
(OPENSSL/TASN_ENC0 *MODULE) (OPENSSL/TASN_DEC0 *MODULE) (OPENSSL/
TASN_UTL0 *MODULE) (OPENSSL/TASN_TYP0 *MODULE) (OPENSSL/F_INT0 *MODULE)
(OPEN
 SSL/F_STRING0 *MODULE) (OPENSSL/N_PKEY0 *MODULE) (OPENSSL/F_ENUM0
*MODULE) (O   PENSSL/A_HDR0 *MODULE) (OPENSSL/X_PKEY0 *MODULE)
(OPENSSL/A_BOOL0 *MODULE) (O   PENSSL/X_EXTEN0 *MODULE)
(OPENSSL/ASN1_GEN0 *MODULE) (OPENSSL/ASN1_PAR0 *MODU   LE)
(OPENSSL/ASN1_LIB0 *MODULE) (OPENSSL/ASN1_ERR0 *MODULE) (OPENSSL/A_METH0
*MODULE) (OPENSSL/A_BYTES0 *MODULE) (OPENSSL/A_STRNID0 *MODULE)
(OPENSSL/EVP_   ASN10 *MODULE) (OPENSSL/ASN_PACK0 *MODULE)
(OPENSSL/P5_PBE0 *MODULE) (OPENSSL   /P5_PBEV20 *MODULE)
(OPENSSL/P8_PKEY0 *MODULE) (OPENSSL/ASN_MOID0 *MODULE) )    

UPDBNDDIRE error


GMAKE[2]: *** [lib] Error 1

  GMAKE[2]: Leaving directory `/home/qsecofr/openssl-0.9.8e/crypto/asn1'

GMAKE[1]: *** [subdirs] Error 1
GMAKE[1]: Leaving directory `/home/qsecofr/openssl-0.9.8e/crypto'
GMAKE: *** [build_crypto] Error 1



Building shared library, make do_os400-shared is giving the following
error

 
( :; SHAREDFLAGS="${SHARED_LDFLAGS} ${EXTRA_LDFLAGS}"; liblist -af
OPENSSL   ; echo system DLTSRVPGM SRVPGM\($OUTPUTDIR/$SRVPGM\); system
DLTSRVPGM SRVPGM   \($OUTPUTDIR/$SRVPGM\); ld ${SHAREDFLAGS} -o $SHLIB
$SHOBJECTS; liblist -d OP   ENSSL; ) && if [ -n "$INHIBIT_SYMLINKS" ];
then :; else prev=$SHLIB$SHLIB_SOV   ER$SHLIB_SUFFIX; if [ -n
"$SHLIB_COMPAT" ]; then for x in $SHLIB_COMPAT; do (    :; rm -f
$SHLIB$x$SHLIB_SUFFIX; ln -s $prev $SHLIB$x$SHLIB_SUFFIX ); prev=$S
HLIB$x$SHLIB_SUFFIX; done; fi; if [ -n "$SHLIB_SOVER" ]; then ( :; rm -f
$SHL   IB$SHLIB_SUFFIX; ln -s $prev $SHLIB$SHLIB_SUFFIX ); fi; fi; \
fi;


system DLTSRVPGM SRVPGM(OPENSSL/libssl)


 CPF2105:  Object LIBSSL in OPENSSL type *SRVPGM not found.

ssl/*.o does not link to a module object


   GMAKE[1]: Leaving directory `/home/qsecofr/openssl-0.9.8e' 




On Tue, Apr 6, 2010 at 4:18 PM, Shaw Graham George <gs...@axway.com>
wrote:



        Hmm, my version of icc works with the default syntax, for
example:
        
        icc -I. -I.. -I../include -DOPENSSL_THREADS -D_MULTI_THREADED -v
-v -O4
        -DB_ENDI
        AN -DCHARSET_EBCDIC -DEBCDIC_500 -DNO_SYS_PARAM_H -D_ALL_SOURCE
        -DNO_SYSLOG -qTG
        TRLS=V5R1M0 -qTGTCCSID=500 -q"TERASPACE=*YES *TSIFC"   -c
cryptlib.c -o
        cryptlib
        .o
        
        command = CRTCMOD MODULE(OPENSSL/cryptlib) SRCSTMF('cryptlib.c')
        DEFINE('OPENSSL
        _THREADS' '_MULTI_THREADED' 'B_ENDIAN' 'CHARSET_EBCDIC'
'EBCDIC_500'
        'NO_SYS_PAR
        
        AM_H' '_ALL_SOURCE' 'NO_SYSLOG' ) OPTIMIZE(40)
        
        TEXT('sr/gesh/build/newDev/openss
        l/sdk/crypto/cryptlib.o')  SYSIFCOPT(*IFSIO) TGTRLS(V5R1M0)
        TGTCCSID(500) TERASP
        ACE(*YES *TSIFC) OPTION(*LOGMSG )
        
        
        So I must have fixed the problem in some way.
        
        Which doesn't help you, of course.
        
        Changing the order of arguments will mean messing with the
OpenSSL
        Makefiles, I guess, which is to be avoided if possible I would
have
        thought.
        
        Otherwise, if you can't get the source from IBM, I can send you
my copy,
        and my patched code for icc.  And then you can re-compile and
fix for
        yourself.
        

        G.
        
        
        -----Original Message-----
        From: owner-openssl-us...@openssl.org
        
        [mailto:owner-openssl-us...@openssl.org] On Behalf Of Shaw
Graham George
        Sent: 06 April 2010 10:53
        To: openssl-users@openssl.org
        
        Subject: RE: OpenSSL on IBMi
        
        
        -c is an option, not an argument, so I think you'll find that
the
        problem is that icc is objecting to the file-to-be-compiled is
not at
        the end of the command line - i.e. is it looking for a "-"
character in
        temp1/abc.c and failing.
        
        So:
        
          icc -c -o abc.o temp1/abc.c
        
        ... would also work.
        
        Like I said ... not very robust.
        
        Give me a short time to see if I can find how I worked around
this.
        
        Re PASE, you can execute PASE (AIX) libraries from ILE code, but
if you
        can avoid it I would.
        
        G.
        
        
        ________________________________
        
        From: owner-openssl-us...@openssl.org
        [mailto:owner-openssl-us...@openssl.org] On Behalf Of Pankaj
Aggarwal
        Sent: 06 April 2010 09:59
        To: openssl-users@openssl.org
        Subject: Re: OpenSSL on IBMi
        
        
        I am able to narrow down on the icc option that is causing the
problem.
        
         icc -c temp1/abc.c -o abc.o
        
        QAPTL/ICC: Unexpected exception MCH3601
        
        $
        
        > icc -o abc.o -c temp1/abc.c
        
        $
        
        So, specifying -c option before -o option (which is the case
while
        compiling openssl) results in error.
        If I swap this, icc works fine.
        
        Next, I need to swap this in openssl, any quick way of doing
this?
        
        My project involves using the openssl libraries in OS.400 native
        environment to create libraries on top of it which will be used
by ILE
        Code. I believe that I won't be able to use PASE libraries in
native
        environment, right?
        
        Pankaj
        
        
        
        
        On Tue, Apr 6, 2010 at 1:20 PM, Shaw Graham George
<gs...@axway.com>
        wrote:
        
        
        
               OK, one step forward.  I guess that previously you had a
path
        error
               because you need to create a link (correctly) to point to
your
        gmake
               program.
        
               And the CCSID of the delivered tools package is
unimportant -
        it's the
               CCCSID of the unpacked programs that is important.
        
               Hmmm.
        
                Message ID . . . . . . . . . :   MCH3601
                Message file . . . . . . . . :   QCPFMSG
                 Library  . . . . . . . . . :     QSYS
                Message text . . . . . . . . :   Pointer not set for
location
               referenced.
        
        
               So the delivered icc is not as robust as it should be ...
As I
        said
               before, I had to re-compile mine for CCSID 500, so had
the
        source, so I
               was able to easily track down problems such as this.
        
               I'm looking at my source, and the only changes that I
made to
        icc look
               relatively trivial - but these are changes from 9 years
ago, so
        my
               memory may not be 100% accurate.  And I suspect that the
testing
        that
               I've done has been using my version of icc - while it
executes
        as CCSID
               500, it can be used to make binaries of any CCSID.
        
               You have a couple of options, I think.  The techie option
is to
        get the
               source for icc and find and fix the pointer error.  Icc
is just
        a
               wrapper program that translates compile requests from a
        UNIX-like string
               to the correct OS/400 command (as you can see from the
output).
        So it
               is easy to debug.
        
               The more difficult option is to try to determine which
argument
        is
               upsetting icc empirically, and then work around that - it
does
        work out
               of the box, but as you can see, is a little
temperamental.
        
               Unfortunately, I don't think that IBM offer support for
the GNU
               utilities - I don't know if they still offer the source
code.
        If you
               prefer the techie option, and they don't, then I can
probably
        send you
               the source package (at your own risk).
        
               BTW.  I'm not sure what your requirements are, but
OpenSSL will
        run on
               the AS/400 as AIX binaries under the PASE environment.
Which
        could be a
               simpler option.
        
               Good luck.
        
               G.
        
        
               ________________________________
        
        
               From: owner-openssl-us...@openssl.org
               [mailto:owner-openssl-us...@openssl.org] On Behalf Of
Pankaj
        Aggarwal
        
               Sent: 05 April 2010 14:51
        
               To: openssl-users@openssl.org
               Subject: Re: OpenSSL on IBMi
        
        
               Got it working !
               Stuck in another error in openssl/crypto :-(
        
               icc -I. -I.. -I../include -DOPENSSL_THREADS
-D_MULTI_THREADED -v
        -O4
               -DB_ENDI   AN -DCHARSET_EBCDIC -DNO_SYS_PARAM_H
-D_ALL_SOURCE
               -DNO_SYSLOG -qTGTRLS=*CURR   ENT -qTGTCCSID=37   -c
cryptlib.c
        -o
               cryptlib.o                                 command =
CRTCMOD
               MODULE(CRYPTO/CRYPTLIB) SRCSTMF('cryptlib.c')
DEFINE('OPENS
               SL_THREADS' '_MULTI_THREADED' 'B_ENDIAN' 'CHARSET_EBCDIC'
               'NO_SYS_PARAM_H' '_   ALL_SOURCE' 'NO_SYSLOG' )
OPTIMIZE(40)
               TEXT('/home/qsecofr/openssl-0.9.8e/crypto/cryptlib.o')
               SYSIFCOPT(*IFSIO) TGTRLS(*CURRENT) TGTCCSID(37)
OPTION(*LOG>
        iMSG )
        
        
               AQAPTL/ICC: Unexpected exception MCH3601
        
        
               On Mon, Apr 5, 2010 at 4:06 PM, Pankaj Aggarwal
               <pankaj.aggar...@gmail.com> wrote:
               > Hi Shaw,Q
               >
               > I do have the qsh porting tools installed (which
include icc,
        gmake
               > etc.). I checked the CCSID for these tools. it's 1200.
               > Now since my openssl files have been extracted from tar
in
        qsh
               > environment, they have the CCSID of 37. Should I get
the IBM
        tools for
               > CCSID 37?
               >
               > I tried to set the QIBM_CSSID variable in qsh
environment to
        1200, but
               > the extracted openssl files still have CCSID of 37.
               >
               > Pankaj
               >
               >
               > On Sun, Apr 4, 2010 at 8:23 PM, Shaw Graham George
        <gs...@axway.com>
               wrote:
               >>
               >> You should read the detail of the readme files for
this and
        maybe
               previous ports at rt.openssl.org.
               >>
               >> Firstly, for this port to work, you need to install
the IBM
        AS/400
               GNU utilities - it doesn't look like you have.  I'm not
sure of
        their
               current status, but at the time these were unsupported
utilities
        only
               obtainable from IBM.  They are delivered as CCSID 37
binaries,
        so you
               need to know what CCSID you wish to support.  I had to
get the
        source
               from IBM (by special request) and re-compile gmake to run
as
        CCSID 500.
               >>
               >> AFAIK (but I am a little out of date), any gmake
delivered
        with the
               AS/400 is a PASE binary.
               >>
               >> Regarding perl, I can't remember if perl (for CCSID
37) from
        CPAN
               worked.  I certainly failed to port CPAN perl to CCSID
500 (and
        ran out
               of time to investigate further).  But this made no
difference to
        me as I
               was building OpenSSL for about 13 platforms, so I could
run the
               configure option (that uses perl) on UNIX.
               >>
               >> If was looking again now, and looking for
        AS/400-independence, I'd
               investigate if I could run a PASE version of perl for the
        configure.
               >>
               >> G.
               >>
               >>
               >> -----Original Message-----
               >> From: owner-openssl-us...@openssl.org
               [mailto:owner-openssl-us...@openssl.org] On Behalf Of
Pankaj
        Aggarwal
               >> Sent: 04 April 2010 12:46
               >> To: openssl-users@openssl.org
               >> Subject: Re: OpenSSL on IBMi
               >>
               >> I used the patch on openssl 0.9.8e. on firing
./Configure
        OS400-icc I
               am getting the following error:
               >>
               >> qsh: 001-0014 Command
/home/qsecofr/openssl/QAPTL/GMAKE not
        found.
               >> GMAKE: *** [links] Error 1
               >> $
               >>
               >> I have set the PATH environment variable as follows :
               >>
               >>
        
/qibm/ProdData/DeveloperTools/qsh/bin/:/usr/bin:.:/QOpenSys/usr/bin
               >>
               >> I am using the old perl binaries for OS400 from CPAN
site.
               >>
               >> Any idea where the problem is?
               >>
               >> On Sun, Apr 4, 2010 at 3:08 PM, Shaw Graham George
        <gs...@axway.com>
               wrote:
               >>>
               >>>
        
        
http://rt.openssl.org/Ticket/Display.html?id=1565&user=guest&pass=gues
               >>> t
               >>>
               >>> Only for 0.9.8e, though.
               >>>
               >>> G.
               >>>
               >>>
               >>> -----Original Message-----
               >>> From: owner-openssl-us...@openssl.org
               >>> [mailto:owner-openssl-us...@openssl.org] On Behalf Of
Pankaj
               Aggarwal
               >>> Sent: 04 April 2010 10:05
               >>> To: openssl-users@openssl.org
               >>> Subject: OpenSSL on IBMi
               >>>
               >>> Could somebody point me to the latest patch available
(with
               >>> instructions) for compiling openssl on IBMi (OS/400).
               >>>
               >>> Pankaj
               >>>
        
        
______________________________________________________________________
               >>> OpenSSL Project
               http://www.openssl.org
               >>> User Support Mailing List
               openssl-users@openssl.org
               >>> Automated List Manager
               majord...@openssl.org
               >>>
        
        
______________________________________________________________________
               >>> OpenSSL Project
               http://www.openssl.org
               >>> User Support Mailing List
               openssl-users@openssl.org
               >>> Automated List Manager
               majord...@openssl.org
               >>>
               >>
        
        
______________________________________________________________________
               >> OpenSSL Project
               http://www.openssl.org
               >> User Support Mailing List
               openssl-users@openssl.org
               >> Automated List Manager
               majord...@openssl.org
               >>
        
        
______________________________________________________________________
               >> OpenSSL Project
               http://www.openssl.org
               >> User Support Mailing List
               openssl-users@openssl.org
               >> Automated List Manager
               majord...@openssl.org
               >>
               >
        
        
        
        
______________________________________________________________________
               OpenSSL Project
        http://www.openssl.org
               User Support Mailing List
        openssl-users@openssl.org
               Automated List Manager
        majord...@openssl.org
        
        
        
        
______________________________________________________________________
        OpenSSL Project
http://www.openssl.org
        User Support Mailing List
openssl-users@openssl.org
        Automated List Manager
majord...@openssl.org
        
______________________________________________________________________
        OpenSSL Project
http://www.openssl.org
        User Support Mailing List
openssl-users@openssl.org
        Automated List Manager
majord...@openssl.org
        


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to