[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] RFC: Partially revert xen-unstable c/s 23071:a3466b005017



On Tue, 2011-10-25 at 17:11 +0100, Ian Jackson wrote:
> George Dunlap writes ("Re: [Xen-devel] RFC: Partially revert xen-unstable c/s 
> 23071:a3466b005017"):
> > Yes; it hard-codes the full path of the build tree library file.
> 
> That seems a strange thing for it to do.
> 
> > You're right, it's actually 23921 that caused the problem.  I just did
> > "hg annotate" and found 23071.
> 
> Reverting this part of 23921 will just bring back the previous bug,
> that the build system might pick up libraries in /usr (or somewhere
> else on the default compile-time linker search path).
> 
> Is there a way to get the ocaml linker stage to print out the complete
> link line it's using ?  If so it'll probably be possible to spot the
> difference between the link lines used for the ocaml libraries and
> those used elsewhere.  Then we might understand what to fix.

AIUI when you link an ocaml library it actually bakes in the literal
options which you gave into the result, in order that it can use them
again when you subsequently link an application against that library.
i.e. if you link with -lfoo then a literal "-lfoo" is stored in the
library and reused by the ocaml linker when it invokes gcc to link the
final application

Likewise if you use e.g.
"/home/ianc/devel/xen/tools/ocaml/libs/xc/../../../libxc/libxenctrl.so"
then that will also be baked verbatim into the ocaml library.

I don't see how this can ever be made to work without changing the ocaml
linker, you very much need to specify libraries differently when linking
users which are in tree vs. out of tree and short of teaching ocaml
about that distinction I don't know what we can do. I suppose we could
create two versions of the library (in and out) but that's horrible. But
then so is the whole scheme, iff I understand correctly and it really is
as I describe.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.