Makeing "Gated"

Keyvan Shirnia Pre Sales keyvan at pyra.co.uk
Thu Apr 11 18:39:29 AEST 1991


In article <128287 at uunet.UU.NET> rbj at uunet.UU.NET (Root Boy Jim) writes:
>
>The Tahoe distribution has memory.h.
>

Memory.h might well be there, however, this is a superset of the *MAIN STREAM*
UCB. I am not saying that Tahoe is not UCB, though :-) 

>>>I am not quite sure what kind of errors your are getting. However, the 
>>>first thing I would try out would be: (Type this in your ATT universe shell)
>>>
>>>cc -I/usr/.attinclude -I/usr/.ucbinclude gated.c -o gated /.ucblib/libc.a
>>>
>>>This line should pickup both the UCB and ATT include files. From the linking
>>>point of view, since you are already in ATT universe /.attlib/libc.a is
>>>automatically searched. But to be sure that you are not missing any UCB
>>>routines add /.ucblib/libc.a	.
>
>I am surprised someone from Pyramid suggested this, as it doesn't work.
>Pyramid put some nasty stuff to keep you from cross-linking.

I did try to say that this cc line *might* work. It is very difficult to figure
out exactly what library routines you need to compile a piece of unknown code.
You are right, however, that I should have stressed this fact!

>
>>	In general, DON'T DO THIS! Cross universe linking can get very messy.
>
>It's only messy because Pyramid made it so. I pulled out the memory
>stuff, getopt, and some string functions from Sequent's ATT libc.a
>and put them in the UCB libc.a because I was tire of dealing with it.

Well this is exactly what Sun have done. It's just another way of approaching
the problem. I myself have ported many programs to Pyramid, and used the 
cross linking of the universes. I have only once come across such a problem,
and that was with scanf().

>
>>Doing
>>the above (explicitly calling the ucb library) will cause all references
>>that can be resolved from the ucb library to be. This is not supported,
>>and can lead to very strange problems.

Cross-linking may not be supportable, however, the original question was
that the code did not compile under the att universe. I never said that
the cc line would work. (I only suggested that it might work, or give some
clues as to what the problem is) Programs  cross referencing different
universes are never portable. Neither is your own-built Sequent ucb libc.a 
which also contains some att routines. This it self is cross linking. The
syntax might have changed but semmantically it is the same.


>
>>	Note that occasionally this will work fine. You might not
>>get bitten. But it is simply wrong in the general case. Even extracting
>>the necessary modules from the other universe's library can be a 
>>problem - you need to check what referenced externals there are, and
>>make sure they won't have problems in the other universe.
>
>Yes, things can get tricky, but if one goes to all the trouble of
>doings so, one should not be thwarted by the vendors.

Again I stress the point that if you are the programmer you should take this
in to account. However, if you are trying to port a software across, then
surely you have no choice. Well you can always rewrite the software, I
guess! :-)

Best regards,
Keyvan

      -m------- Keyvan Shirnia		       Tel : +44 252 373035
    ---mmm----- Pre Sales Support 
  -----mmmmm--- Pyramid Technology Ltd.        keyvan at pyra.co.uk
-------mmmmmmm- Farnborough GU14 7NA, England.



More information about the Comp.sys.pyramid mailing list