Running SCO binaries

Hi,
I'm not sure if I'm on the right track here but here goes.

I have a cobol application which runs on SCO Openserver 6.0 and I want, for various reasons, to get it to run on FreeBSD. When I installed FreeBSD I ticked a box to do with SCO binaries and I was hoping it would be a simple matter of just copying the application over and running it! Unfortunately that hasn't been the case but does anyone know if that would be possible? I'm talking about a cobol compiler here when I try and run it I just get an "Abort" message.
Look forward to hearing from someone.
Regards,
Jim.
 
Have you checked the svr4(4) man page? It sounds as if emulation is quite experimental and prone to not working for many binaries.

At the very least, you will likely need to create a /compat/svr4 environment.
 
I tried to do this many years ago and it was experimental then and I never got it to work, but if I recall correctly, you need to create something like /compat/sco or /compat/svr (I think it's more the directory structure then the name) and then you need to get all the required libraries for the binary and add them...someone explained it to me on the mailing list but as I said it was years ago between 3.3 and 4.0 release if you really want to search the mailing list archives :)
 
Hello there jcborland. I am a long time user of SCO binaries on FreeBSD. I use MS FoxPro Unix 2.6 running under FBSD 6.2. This is what I do:
Code:
3.3 Getting iBCS2 to work

Create these directories:
# mkdir /usr/compat/ibcs2
# mkdir /usr/compat/ibcs2/dev
Create links
# cd /usr/compat/ibcs2/dev
# ln -sf  /dev/null X0R (ecs nought arr)
# ln -sf socksys nfsd
# ln -sf /dev/null socksys
Make an empty file called null
# touch null
The section above is required in spite of what the official FAQ says.
Edit /boot/loader.conf. Add lines

ibcs2_load="YES"
ibcs2_coff_load="YES"
(compare with /boot/defaults/loader.conf)

Reboot
Check that ibcs2.ko and ibcs2_coff.ko are loaded with kldstat

Potential issue:
As a result of some system resource not being released, spurious locking may block operation after a longish uptime. Use crontab to create a 
periodic restart to release the resources.
	# crontab -e   -uroot                     
	Then create a file like this:
	# crontab for root
	# schedule a restart at 06:05 am
	5	6	*	*	*	/sbin/shutdown -r now

Now save and exit. Note the command must have the full path. 
Also note that the shutdown command must be complete, 
just /sbin/shutdown -r isn't enough! The crontab file format is:
minute	hour	day of month	month of year	day of 	week	command (tabs or spaces to seperate) * matches all 	instances - 'every 
day' or 'every hour' for example. d.o.w. and 	m.o.y. can be a three letter abbreviation.
I hope this helps.
 
Still can't run my SCO binaries

Hi Michael,
I tried all that and the ibcs comes up as loaded but when I run my SCO binary all I get is "Abort". Is there anything else I could try?
Thanks,
Jim.
 
Hello jc.

I'm sorry to hear that the 'faking socksys' stuff didn't help. The problem could be because OpenServer etc put libraries and other resources in different places to FBSD.

Also some resources available as standard on OpenServer have to be installed and configured in FBSD (I'm thinking of the terminfo database).

I'll add some specifics when I get back to work. 'Till then see if you can find any details of resources required and their default locations.

Regards, Michael.
 
(ecs nought arr)

Hi Michael,
Just to clarify something, when you said:

ln -sf /dev/null X0R (ecs nought arr)

In the X0R the 0 is a zero right?

So I just key in "ln -sf /dev/null X0R"

I tried with an oh and zero anyway and neither works for me but I just thought I'd check.

Thanks again.
Jim.
 
Do you need the terminfo database? If yes, because the built-in version is broken, do this:
install the ncurses port:
Code:
# cd /usr/ports/devel/ncurses 
Edit Makefile replacing '--with-hashed-db' with '--without-hashed-db'
# make
# make install
# make clean

The FBSD version of tic (terminfo compiler) puts the teminfo files in /usr/share/terminfo. OpenServer/OpenDesktop/Xenix programs expect to find the terminfo dir at /ust/lib/terminfo.

Now link the directory to /usr/lib/terminfo so OpenServer programs can find it
Code:
# ln -sf /usr/share/terminfo /usr/lib/terminfo [Enter]

N.B. Your ports tree must be up-to-date.

Check which libraries your application uses and create soft links to the default locations.
 
terminfo didn't help!

Hi Michael,
Thanks for the help but I still have no joy. The ncurses seems to have installed, but I still get "Abort trap" if I'm logged in as an ordinary user and just "Abort" if I'm logged in as root. Some of the binaries don't even use terminfo. I checked by renaming terminfo on my sco box and they still ran, some do need it but they give a meaningful error if it's not there.

I don't know what other libraries the application uses! How would I go about finding that out? Also I've read a little bit about "SVR4" compatability should I be looking in that direction? In fact there was a line in the loader.conf file which read 'svr4_load="NO"' I set that to "YES" but the system wouldn't boot after that!

Thanks again for the suggestions.

Regards,
Jim.
 
Hmm, tricky. I don't have an OpenServer box any more. There might be a way to check which libraries are being accessed on the OpenServer box, then create soft links on the FBSD box to provide the same services. As an experiment (and there are probably 'issues' with this) try copying the SCO libraries to the FBSD box wholesale, and see if that makes a difference.

Let me know what happens. Cheers. Oh by-the-way I'll be away from work for a week. Best of luck.
 
This 'broke' after 4.11, and I never found a way to make it work after that. I still have to use 4.11 on a server to run my legacy SCO programs. Installing 4.11 on a new PC is becoming increasingly difficult due to hardware concepts that didn't exist in those days.
 
Back
Top