Need help with software compiled on Sparc20 Solaris 5.4 running on Sun 450 Solaris 5.6

Need help with software compiled on Sparc20 Solaris 5.4 running on Sun 450 Solaris 5.6

Post by Salm » Sat, 17 Aug 2002 23:32:11



Hello,

I'm working on a project for a client and I seem to be stuck. They've
got an old Financial and ERP terminal-based application made by a
company called "Just In Time Resources International, Inc." in Austin,
TX. The software is from the late 80s to mid 90s. Apparently the
company is no longer in business. If anyone reading this is familiar
with the company or their software, PLEASE contact me via email.

The problem I'm having is this. The software, called CIMJIT, was
running on a Sparc20 before the system crashed and some data was lost.
The backend is Oracle and they are running 7.3.* for data, while the
apps are 7.2.*. The program is mainly Pro*C compiled with Sun's C
compiler and some included custom libraries. After the Sparc20
crashed, they moved everything to a Sun Enterprise 450. The Oracle
databases were moved over and data was restored. The application data
and files were moved over to the new system and the application works
fine interactively. They have shell scripts which call some of the C
program modules of the application to do things like Automatic Invoice
printing, etc. These scripts have not worked after moving to the new
system. The problem is not with the shell scripts, but happens in the
C programs. It seems that certain command line arguments are not being
passed or received in the right order. In this case, the C program
terminates because the CRT (terminal type) is not available in one of
the other programs called by this first one, and the program ends
without the desirable result.

My first question is that will programs compiled on SunOS 4.1 on
Sparc20 work on a Sun 450 running SunOS 5.6 ie Solaris 6? What
determines the compatibility? Is it the architecture, ie sun4m and
sun4u, or the Solaris version, or both? I'm trying to eliminate as
many possibilities as I can. I would really appreciate any
input/feedback because I can't seem to move forward. Thanks in
advance.

Salman

 
 
 

Need help with software compiled on Sparc20 Solaris 5.4 running on Sun 450 Solaris 5.6

Post by Casper H.S. Di » Sun, 18 Aug 2002 00:59:42



>My first question is that will programs compiled on SunOS 4.1 on
>Sparc20 work on a Sun 450 running SunOS 5.6 ie Solaris 6? What
>determines the compatibility? Is it the architecture, ie sun4m and
>sun4u, or the Solaris version, or both? I'm trying to eliminate as
>many possibilities as I can. I would really appreciate any
>input/feedback because I can't seem to move forward. Thanks in
>advance.

SunOS 4.1 didn't run on SS20s, did you mean 5.4 (as the subject
seems to imply)?

Basically, if it's a SPARC binary it will run on both architectures,
with the following restrictions:

        Binaries generated on one OS will only run on that OS
        and newer OSes. (Since 5.6 > 5.4 that should work;
        SunOS 4.1 binaries should work but can be problematic)

        Binaries generated for specific SPARC hardware will only
        run on that hardware or hardware that is a superset (i.e.,
        usually newer hardware).  (sun4m binaries will run on sun4u
        hardware which is newer; UltraSPARC specific binaries will
        not run on an SS20).

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

 
 
 

Need help with software compiled on Sparc20 Solaris 5.4 running on Sun 450 Solaris 5.6

Post by Paul Pluzhniko » Sun, 18 Aug 2002 12:04:52



> I'm working on a project for a client and I seem to be stuck. They've
> got an old Financial and ERP terminal-based application made by a
> company called "Just In Time Resources International, Inc." in Austin,
> TX. The software is from the late 80s to mid 90s. Apparently the
> company is no longer in business. If anyone reading this is familiar
> with the company or their software, PLEASE contact me via email.

Note that some contracts specify that should the provider go
out of business, all clients receive system source, which may be
held by an escrow agent. Thus it may still be possible to recover
system source.

Quote:> These scripts have not worked after moving to the new
> system. The problem is not with the shell scripts, but happens in the
> C programs. It seems that certain command line arguments are not being
> passed or received in the right order.

That is an *extremely* unlikely explanation.

Quote:> I would really appreciate any input/feedback because I can't seem
> to move forward.

One option you have is to contract somebody experienced with
debugging at the SPARC assembly and system call level.

He may be able to tell you what is *really* going wrong, and fix
the problem.

Another option is to simply rewrite non-working pieces --
this is an SQL database, and as Fred Brooks wrote over 25 years ago:

  Representation Is the Essence of Programming.
  ... Show me your flowcharts and conceal your tables, and
  I shall continue to be mystified. Show me your tables, and
  I won't usually need your flowcharts; they'll be obvious. ...

Cheers,
--
In order to understand recursion you must first understand recursion.

 
 
 

Need help with software compiled on Sparc20 Solaris 5.4 running on Sun 450 Solaris 5.6

Post by Salm » Tue, 20 Aug 2002 02:42:55


Thanks for your response, Casper. I've seen your postings on these
groups over the years and I do appreciate your reply. Yes, I was
infact talking about SunOS 5.4 and not 4.1. That was a typo. The
client basically copies the filesystem over to the new 450 and the app
seems to run fine. I've managed to find all the source files, I think,
with the makefiles so I can possibly try recompiling the program on
the older Sparc20 after upgrading it to 5.6. If that fixes it then
I'll just recompile on the newer machine. That is my last resort.
Right now I'm still following the trail trying to find exactly where
the problem is and why.

I wanted to know the answer to the most obvious question first which
was the different architecture, ie. sun4m and sun4u, and the different
Solaris versions.

Salman



> >My first question is that will programs compiled on SunOS 4.1 on
> >Sparc20 work on a Sun 450 running SunOS 5.6 ie Solaris 6? What
> >determines the compatibility? Is it the architecture, ie sun4m and
> >sun4u, or the Solaris version, or both? I'm trying to eliminate as
> >many possibilities as I can. I would really appreciate any
> >input/feedback because I can't seem to move forward. Thanks in
> >advance.

> SunOS 4.1 didn't run on SS20s, did you mean 5.4 (as the subject
> seems to imply)?

> Basically, if it's a SPARC binary it will run on both architectures,
> with the following restrictions:

>    Binaries generated on one OS will only run on that OS
>    and newer OSes. (Since 5.6 > 5.4 that should work;
>    SunOS 4.1 binaries should work but can be problematic)

>    Binaries generated for specific SPARC hardware will only
>    run on that hardware or hardware that is a superset (i.e.,
>    usually newer hardware).  (sun4m binaries will run on sun4u
>    hardware which is newer; UltraSPARC specific binaries will
>    not run on an SS20).

> Casper

 
 
 

Need help with software compiled on Sparc20 Solaris 5.4 running on Sun 450 Solaris 5.6

Post by Anthony Mandi » Tue, 20 Aug 2002 05:42:56



> They have shell scripts which call some of the C
> program modules of the application to do things like Automatic Invoice
> printing, etc. These scripts have not worked after moving to the new
> system. The problem is not with the shell scripts, but happens in the
> C programs. It seems that certain command line arguments are not being
> passed or received in the right order.

        This is where you should direct your attention. I don't think
        the issue is architecture related. Some debugging with truss
        will be in order.

Quote:> In this case, the C program
> terminates because the CRT (terminal type) is not available in one of
> the other programs called by this first one, and the program ends
> without the desirable result.

        It sounds like a can't write to tty error. Can you post the
        exact error message and an example of the program call from
        the shell scripts.

-am     ? 2002

 
 
 

Need help with software compiled on Sparc20 Solaris 5.4 running on Sun 450 Solaris 5.6

Post by Salm » Tue, 20 Aug 2002 22:57:42


Thanks for your response, Anthony. The script is quite simple. It sets
the environment and then calls the program at the end. The program
takes 4 arguments including the terminal type, in this case, VT220.
The program seems to have its own termcap kind of file, nf_tcl, and
looks up the terminal entry in that file. I've looked at the file, and
VT220 exists. The error message is as follows:

* Error From CIMJIT...Invalid CRT Specified:
Unable to Locate Entry in CRT File: nf_tcl
Press <Return> to Continue.

Notice how there is nothing after the "Invalid CRT Specified:"
portion. That shows me that whichever function/routine is printing
this is not getting anything for the CRT. Now here's another
interesting thing. If I change the command line arguments to the C
program at the end of the script to /user/ndms/arora/arivash CIMS/NDMS
instead of /user/ndms/arora/arivash 9999 CIMS 00 CIMS/NDMS VT220, I
get an error message like:

* Error From CIMJIT...Invalid CRT Specified: COBDIR=/ORA01/LIB/COBOL
Unable to Locate Entry in CRT File: nf_tcl
Press <Return> to Continue.

The COBDIR line exists in the shell script! So another question is,
when calling a C program from a shell script, what gets passed to the
program from the script? What is the program's environment? It seems
like its taking that line to fill in for the missing arguments. I'm
confused here. Here's the actual script:

#!/sbin/sh
DBROOT=dmdsun01:/opt/express/db/cdm; export DBROOT
LD_LIBRARY_PATH=/opt/express/lib:/usr/dt/lib:/usr/openwin/lib:/usr/lib:/usr/open
win/lib:/usr/dt/lib:/ora01/lib/cobol/coblib
PATH=/opt/express/bin:/usr/bin:/ora01/ora/product/7.3.4/bin:/usr/ccs/bin:/usr/uc
b:/usr/local/bin:/user/ndms:/home/bfd:/usr/bin:/usr/openwin/bin:/user/lwk/works/
bin:/user/lwk/works/ya/bin
express=/opt/express;export express
XVTPATH=${express}/resource; export XVTPATH
EXNOBANNER=1; export EXNOBANNER
ORACLE_BASE=/ora01/ora
ORACLE_HOME=${ORACLE_BASE}/product/7.3.4
ORACLE_DOC=${ORACLE_HOME}/doc
ORACLE_SID=M
COBDIR=/ora01/lib/cobol
ORATERMPATH=${ORACLE_HOME}/forms30/admin/resource
#TERM=vt220;export TERM
W=/ora01/lwk/works
export PATH LD_LIBRARY_PATH ORACLE_BASE ORACLE_HOME ORACLE_DOC
ORACLE_SID ORATER
MPATH COBDIR W TERM
touch /user/ndms/work/u9999.usr
cd /user/ndms
/user/ndms/arora/arivash CIMS/NDMS
#/user/ndms/arora/arivash 9999 CIMS 00 CIMS/NDMS VT220
#/user/ndms/arora/arivash 9999 CIMS 00 CIMS/NDMS VT220 >/dev/null
2>/dev/null
-----------------------------------------------------------------------------

Salman



> > They have shell scripts which call some of the C
> > program modules of the application to do things like Automatic Invoice
> > printing, etc. These scripts have not worked after moving to the new
> > system. The problem is not with the shell scripts, but happens in the
> > C programs. It seems that certain command line arguments are not being
> > passed or received in the right order.

>    This is where you should direct your attention. I don't think
>    the issue is architecture related. Some debugging with truss
>    will be in order.

> > In this case, the C program
> > terminates because the CRT (terminal type) is not available in one of
> > the other programs called by this first one, and the program ends
> > without the desirable result.

>    It sounds like a can't write to tty error. Can you post the
>    exact error message and an example of the program call from
>    the shell scripts.

> -am        ? 2002

 
 
 

Need help with software compiled on Sparc20 Solaris 5.4 running on Sun 450 Solaris 5.6

Post by Anthony Mandi » Wed, 21 Aug 2002 06:19:48



> Thanks for your response, Anthony. The script is quite simple. It sets
> the environment and then calls the program at the end. The program
> takes 4 arguments including the terminal type, in this case, VT220.

        If the hashed out lines are the real program invocation, I
        count 5 rather than 4. Is this correct?

Quote:> The program seems to have its own termcap kind of file, nf_tcl, and
> looks up the terminal entry in that file. I've looked at the file, and
> VT220 exists. The error message is as follows:

> * Error From CIMJIT...Invalid CRT Specified:
> Unable to Locate Entry in CRT File: nf_tcl
> Press <Return> to Continue.

        At this point, some debugging with truss might help. Someone
        with more truss debugging experience should guide you here
        but I'd check that the program is opening the file correctly
        (it may be a permission problem and its not testing for it
        and reporting it).

Quote:> Notice how there is nothing after the "Invalid CRT Specified:"
> portion. That shows me that whichever function/routine is printing
> this is not getting anything for the CRT.

        Could the be due to the arg count? I noted 5 args.

Quote:> Now here's another
> interesting thing. If I change the command line arguments to the C
> program at the end of the script to /user/ndms/arora/arivash CIMS/NDMS
> instead of /user/ndms/arora/arivash 9999 CIMS 00 CIMS/NDMS VT220, I
> get an error message like:

> * Error From CIMJIT...Invalid CRT Specified: COBDIR=/ORA01/LIB/COBOL
> Unable to Locate Entry in CRT File: nf_tcl
> Press <Return> to Continue.

> The COBDIR line exists in the shell script! So another question is,
> when calling a C program from a shell script, what gets passed to the
> program from the script? What is the program's environment? It seems
> like its taking that line to fill in for the missing arguments. I'm
> confused here.

        That does sound odd. You can also debug the shell script by setting
        the x option. See the sh man page for details on this (and file
        descriptor redirection - see below).

Quote:> Here's the actual script:

> #!/sbin/sh
...
> #TERM=vt220;export TERM

        I gather this commented out line was the original TERM setting?

Quote:> /user/ndms/arora/arivash CIMS/NDMS
> #/user/ndms/arora/arivash 9999 CIMS 00 CIMS/NDMS VT220

        Note that VT220 here is a literal rather than a variable.
        Is this correct?

Quote:> #/user/ndms/arora/arivash 9999 CIMS 00 CIMS/NDMS VT220 >/dev/null
> 2>/dev/null

        This redirection should really be " > /dev/null 2>&1".

-am     ? 2002

 
 
 

Need help with software compiled on Sparc20 Solaris 5.4 running on Sun 450 Solaris 5.6

Post by Salm » Wed, 21 Aug 2002 23:06:53


The program should be called with 5 args, so the correct invocation
is:
/user/ndms/arora/arivash 9999 CIMS 00 CIMS/NDMS VT220
That's fine and not part of the problem. The TERM variable was set
lower down in the script. I just moved it up to test it and then
commented it out. I also found out in a C FAQ somewhere, that when you
call a C program from a script, the environment of the shell actually
gets passed to the C program as the third optional argument to main!
That was news to me, and perhaps, might be to you, too. :) But I guess
I'm learning something new everyday. I'm quite familiar with shell
programming, and I would have used 2>&1 for stderr, but these scripts
were not written by me.

Anyways, I ran truss on the shell script and the program with it, and
I found something interesting. Unfortunately, I don't know for sure if
it's the problem because it appears in several places. I get an ENOTTY
error on ioctl calls. I've looked on the net and found several posts
about ENOTTY errors after printf statements, etc, but didn't find
anything conclusive.

I'll bounce some thoughts off you. Let me know what you think. The
original machine running this application was a Sparc20. That machine
crashed, I think losing the root disk, and that was when everything
was moved over to this E450 running Solaris 6. I think they either
recovered some data off the old disk because the old machine is
operational even though it's not being used. Now, the application IS
also sitting on the old machine, which runs 5.4, but it exhibits the
same problem when I run the app from there! I've been told by the
manager who hired me that everything worked fine before the crash. I
can't see how. I'm thinking either some file or files were lost or
something? I'm trying to deduce the most logical explanation for
what's going on.

What I'm thinking of doing now is trying to recompile the app (I think
I have all the source files and makefiles, but there are a lot of
other files, too) on this Solaris 6 machine from scratch and seeing if
that might fix it. Other than that, I'm pretty much out of ideas. I
have also considered patching up the box to the latest patch level for
Solaris 6. Thanks for your input so far.

Salman



> > Thanks for your response, Anthony. The script is quite simple. It sets
> > the environment and then calls the program at the end. The program
> > takes 4 arguments including the terminal type, in this case, VT220.

>    If the hashed out lines are the real program invocation, I
>    count 5 rather than 4. Is this correct?

> > The program seems to have its own termcap kind of file, nf_tcl, and
> > looks up the terminal entry in that file. I've looked at the file, and
> > VT220 exists. The error message is as follows:

> > * Error From CIMJIT...Invalid CRT Specified:
> > Unable to Locate Entry in CRT File: nf_tcl
> > Press <Return> to Continue.

>    At this point, some debugging with truss might help. Someone
>    with more truss debugging experience should guide you here
>    but I'd check that the program is opening the file correctly
>    (it may be a permission problem and its not testing for it
>    and reporting it).

> > Notice how there is nothing after the "Invalid CRT Specified:"
> > portion. That shows me that whichever function/routine is printing
> > this is not getting anything for the CRT.

>    Could the be due to the arg count? I noted 5 args.

> > Now here's another
> > interesting thing. If I change the command line arguments to the C
> > program at the end of the script to /user/ndms/arora/arivash CIMS/NDMS
> > instead of /user/ndms/arora/arivash 9999 CIMS 00 CIMS/NDMS VT220, I
> > get an error message like:

> > * Error From CIMJIT...Invalid CRT Specified: COBDIR=/ORA01/LIB/COBOL
> > Unable to Locate Entry in CRT File: nf_tcl
> > Press <Return> to Continue.

> > The COBDIR line exists in the shell script! So another question is,
> > when calling a C program from a shell script, what gets passed to the
> > program from the script? What is the program's environment? It seems
> > like its taking that line to fill in for the missing arguments. I'm
> > confused here.

>    That does sound odd. You can also debug the shell script by setting
>    the x option. See the sh man page for details on this (and file
>    descriptor redirection - see below).

> > Here's the actual script:

> > #!/sbin/sh
>  ...
> > #TERM=vt220;export TERM

>    I gather this commented out line was the original TERM setting?

> > /user/ndms/arora/arivash CIMS/NDMS
> > #/user/ndms/arora/arivash 9999 CIMS 00 CIMS/NDMS VT220

>    Note that VT220 here is a literal rather than a variable.
>    Is this correct?

> > #/user/ndms/arora/arivash 9999 CIMS 00 CIMS/NDMS VT220 >/dev/null
> > 2>/dev/null

>    This redirection should really be " > /dev/null 2>&1".

> -am        ? 2002

 
 
 

1. Installing Solaris 450 on a Sun 450 - help!

Hi all,

I am trying to install Solaris 10 on a Sun 450 for the second time. The
first time I succeeded but while applying patches the system crashed on me:

Applying patches
----------------------------------------------------------------------------
--
Applying 113886-32...done
Applying 113887-32...failed (Exit code 5)
Applying 116298-17...failed (Exit code 5)
Applying 118553-04...done (reboot required)
Applying 118666-04...failed (Exit code 5)
Applying 118667-04...done
Applying 119578-09... CRASH!

The filesystem was corrupt and every file on the system disk was in the
lost+found directory.

Now I try to reinstall the system from CDROM with a charavter console but
again and again I bump into an error after filling in all the screens:
Preparing system for Solaris install

ERROR: Could not reinitialize system state

mkdir: "/a/var/sadm/launcher": Read-only file system

Could not reinitialize system state

I need help on this, nothing to be found on Google or on the sun.com site.

Greets,

Peter

2. need help with remote access failures

3. problem compiling getaddrinfo on solaris 5.6, solaris 5.8

4. Error compile iBCS: ../include/ibcs/ibcs.h:53:function declaration isn't a prototype

5. Problems compiling glib (solaris 5.6, Sun Workshop C++ 5.0)

6. Uncompressing Files?

7. SunOS 5.6 vs Solaris 2.6 vs Solaris 7 vs Solaris 8

8. Ethernet Cards

9. Need help to run SUN Workshop 5.0 beta (problems to run solaris license manager)

10. Video problems with Sun 450, PGX32 Video Adapter and Solaris 2.6

11. TOP running on SOlaris 2.4 (5.4)

12. A way to know what patches are installed on a Solaris 2.6 or Solaris 5.6.

13. set prompt to "pwd" in csh for a Sun Solaris 5.6