[comp.unix.i386] Trying to compile with XENIX libs under 386/ix

greg@halexii.uucp (Gregory F. Hogg) (01/13/90)

Hello,

	I have a set of XENIX libraries that I need to use in a program
I have on my 386/IX system.  I have tryed to just use them but that did
not work. The XENIX library must be in some different format.  Is there
anyway to do this or must I buy the XENIX development system?  What I
have is the INFORMIX Rapid Development System for XENIX but I am
running it under is 386/ix.  I need to create a new version of the db
runner and that is when I need to relink with XENIX libraries.  Anyone
got any ideas?


				Greg Hogg

			COMPANY	: HOGG'S SOFTWARE
			VOICE	: 301-538-7241
			EMAIL	: uunet!halexii!greg



-- 

				Greg Hogg

			COMPANY	: HOGG'S SOFTWARE

bt455s10@uhccux.uhcc.hawaii.edu (Carl "Art" McIntosh) (01/14/90)

One possibility is to use the Xenix filesystem support of 386/ix
and install the Xenix development system there.  Then you can compile
with the Xenix cc and link in the Xenix libraries.  I know that 386/ix
can run Xenix binaries, however it may not have support for the .o
file format.

Art Neilson
Bank of Hawaii Tech Support
ARPA: manapua!pilikia!root@trout.nosc.mil
UUCP: {uunet,ucbvax,dcdwest}!ucsd!nosc!manapua!pilikia!root

cpcahil@virtech.uucp (Conor P. Cahill) (01/14/90)

In article <6161@uhccux.uhcc.hawaii.edu>, bt455s10@uhccux.uhcc.hawaii.edu (Carl "Art" McIntosh) writes:
> One possibility is to use the Xenix filesystem support of 386/ix
> and install the Xenix development system there.  Then you can compile
> with the Xenix cc and link in the Xenix libraries.  I know that 386/ix
> can run Xenix binaries, however it may not have support for the .o
> file format.

You don't need the xenix file system support.  You can install the 
xenix development system within a given directory hierarchy and then
chroot to the root of that file system and develope away.  The only 
problem is that if you copy the entire xenix distribution into that 
directory, you must replace the 8086 binaries with the 386/ix versions of the
same binaries because Xenix support in 386/ix (SysV 3.2 in general) does
not include support for running 8086 binaries.

Someone else suggested another solution which was to include the xenix compiler 
and associated support utilities in thier proper place in the 386/ix file 
system (renaming the utilities that collide - I think cc was one of the
only ones that did since the library naming convention is different).
I did not try this, but the guy who told me about it had been using it
for a while.

The problem with using xenix development tools is that they generate
xenix binaries which run fine.  However, if you get a core dump Xenix
development tools do not understand 386/ix's core file and 386/ix development
tools do not understand xenix binaries so you are left out to dry as
far as debugging tools are considered.

Good luck.
-- 
+-----------------------------------------------------------------------+
| Conor P. Cahill     uunet!virtech!cpcahil      	703-430-9247	!
| Virtual Technologies Inc.,    P. O. Box 876,   Sterling, VA 22170     |
+-----------------------------------------------------------------------+

eric@mks.com (Eric Gisin) (01/15/90)

> Someone else suggested another solution which was to include the xenix compiler 
> and associated support utilities in thier proper place in the 386/ix file 
> system (renaming the utilities that collide - I think cc was one of the
> only ones that did since the library naming convention is different).
> I did not try this, but the guy who told me about it had been using it
> for a while.

I have done this but have not used it much.
Everything from the Xenix /lib except cpp can be copied to /lib.
I copied /usr/include to /usr/include/xenix, and modified /etc/default/cc:
	FLAGS = -X -I/usr/include/xenix
From /bin (and /usr/bin) I copied the following to a directory /bin/xenix:
	adb ar as cc cc286 cc386 cpp hdr ld nm ranlib sdb size strip
cc286 and cc386 have /bin/ld hardwired into them, so I patched
them with adb changing it to /bin/xl and linking /bin/xenix/ld to /bin/xl.
To do Xenix development just prepend /bin/xenix to $PATH.

joe@junkyard.UUCP (Joseph Sarkes) (01/16/90)

As I recall from when I had an AT (286) with xenix, they use the
MICROSOFT object module format (altered intel object module format)
instead of coff. These same object modules could potentially be used
with a dos linker if the memory model was correct. Unix 386 (not xenix)
uses a TOTALLY different object module format. ==> you NEED the xenix
development stuff if you hope to use xenix libraries.

Joseph Sarkes	(junkyard!joe)