9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Building P9P for multiple architectures from the same source tree?
@ 2007-12-21  5:29 6o205zd02
  2007-12-27 16:09 ` Russ Cox
  0 siblings, 1 reply; 2+ messages in thread
From: 6o205zd02 @ 2007-12-21  5:29 UTC (permalink / raw)
  To: 9fans

Is it possible to build P9P for multiple architectures (e.g. linux i386 and amd64) in the same tree?  I looked at the documentation but didn't see anything.

In my work environment I can't install in /usr/local/plan9 because I don't control the machines, so I install in my (NFS mounted) home directory.  This has worked fine up until now because all the machines are running i386 linux.  Unfortunately, we are now starting to have some machines running amd64 linux, so I need to build an amd64 version of P9P.  I would like to avoid having two complete copies of the tree if possible.

Does anybody have any suggestions.

    thanks,
    Peter Canning
PS: I imagine I could solve this nicely with namespaces if I was running real plan9.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9fans] Building P9P for multiple architectures from the same source tree?
  2007-12-21  5:29 [9fans] Building P9P for multiple architectures from the same source tree? 6o205zd02
@ 2007-12-27 16:09 ` Russ Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Russ Cox @ 2007-12-27 16:09 UTC (permalink / raw)
  To: 9fans

> Is it possible to build P9P for multiple architectures (e.g.
> linux i386 and amd64) in the same tree?  I looked at the
> documentation but didn't see anything.
> 
> In my work environment I can't install in /usr/local/plan9 because
> I don't control the machines, so I install in my (NFS mounted)
> home directory.  This has worked fine up until now because all
> the machines are running i386 linux.  Unfortunately, we are now
> starting to have some machines running amd64 linux, so I need
> to build an amd64 version of P9P.  I would like to avoid having
> two complete copies of the tree if possible.

The easiest thing to do is to create a second tree that 
symlinks back to the first for all top-level directories
except bin and lib.  

The right thing to do is change $PLAN9/src/mkhdr to
change BIN and LIBDIR to something like

	BIN=$PLAN9/bin/$OBJTYPE
	LIBDIR=$PLAN9/lib/$OBJTYPE

and then also change the $PLAN9/bin/9l script to use
the right -L argument.  There are likely to be other 
places that "know" the paths of those directories and
will need to be fixed too.  This will be more work than
the sleazy symlink fix.

Russ


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-12-27 16:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-21  5:29 [9fans] Building P9P for multiple architectures from the same source tree? 6o205zd02
2007-12-27 16:09 ` Russ Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).