<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div><span class="Apple-style-span" style="font-size: medium; ">On 2 Jul 2009, at 14:41, Jay wrote:</span></div></span></span></span></span></span></span></span></span></div></span></div></span></div><div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">Before I explain, more options:<br><br> copy and commit the source to cm3 is viable<br></div></span></blockquote><div><br></div><div>I don't know what this sentence means.</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; "> heck, use a relative instead of absolute from ROOT<br></div></span></blockquote><div><br></div><div>ditto</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; "> go back to the old way (I'll explain)<br></div></span></blockquote><div><br></div><div>I think I understand the shortcomings here but Jay should explain.</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; "> There is also the option to relink or "fixup"<br> upon ship and/or install. Some platforms have a "fixup"<br> utility for exactly "these reasons".<br> MacOS X has one.<br></div></span></blockquote><div><br></div><div>Sounds feasible, but I worry about portability of this approach.</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; "> The question is:<br> <br>How does program foo find libbar.so?<br> At runtime.<br></div></span></blockquote><div><br></div><div>Right. rpaths in the executable should do the trick.</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">How does libbar.so find libfoo.so?<br></div></span></blockquote><div><br></div><div>Same again.</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; "> There are a bewildering array of choices.<br>They are combinable.<br>It varies somewhat from platform by platform, but not much really.<br></div></span></blockquote><div><br></div><div>Ideally we use the same approach for *all* platforms. So, what do all platforms have in common.</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">The main options are:<br> <br><br>1: A full path written into program foo<br>or libbar pointing to e.g. /usr/lib/libfoo.so.<br>Actually this is usually separate libfoo.so and<br>a list of directories that apply to all .so files.<br>There isn't generally a matching up of directory to file,<br>I think, but a "search path" aka "run path".<br></div></span></blockquote><div><br></div><div>i.e., rpath?</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; "> 2: A relative path written into program foo<br>or libbar.so point to e.g. $ORIGIN/../lib/libfoo.so.<br>Again, the directories are split from the files.<br></div></span></blockquote><div><br></div><div>Please explain the implications of this w.r. to hard links! I don't want hard links.</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; "> MacOS X doesn't have $ORIGIN by that name, but it<br>has three similar things, like @executable_path.<br>@executable_path goes way back and is presumably<br>relative to the primary main executable.<br></div></span></blockquote><div><br></div><div>Then we should avoid $ORIGIN. Use the linker options to specify rpaths (and if there is need for override use $LD_LIBRARY_PATH.</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">There are two other similar options.<br>One is new in 10.5. Presumably one is relative<br>to the reference. And maybe one is some concatenation<br>of all directories anything found in so far? I don't know.<br>The documenation was not clear to me.<br></div></span></blockquote><div><br></div><div>Again, I'd like to use the same approach on all platforms (except perhaps Windows).</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; "> NetBSD prior to 5.0 doesn't have $ORIGIN.<br></div></span></blockquote><div><br></div><div>A good reason not to use it.</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">NT searches $PATH always.<br>We put the .dlls in bin.<br>Cygwin same.<br></div></span></blockquote><div><br></div><div>OK, so things work fine there.</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; "> Approximately all other systems seem to support about the same $ORIGIN feature:<br> OpenBSD, FreeBSD, Linux, Solaris, NetBSD 5.0, even Interix, and others (Aix? Irix? HP-UX?)<br> The MacOS X feature is close enough to lump in.<br><br>3: Search $LD_LIBRARY_PATH or similar.<br> This has a few different names.<br> LD_LIBRARY_PATH32, LD_LIBRARY_PATH64, DYLD_SOMETHING.<br></div></span></blockquote><div><br></div><div>These are fallbacks for the situation when the default installed configuration needs overriding.</div><div><br></div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">Now, our historical implementation was<br> - record a full path /usr/local/cm3/pkg/foo/LINUX/libfoo.so,<br> a path for every dependency<br> The file formats are generally such that there are leaf file names<br> separate from an array of directories to look in. A "normal"<br> non-Modula-3 program would generally I assume have a prety small<br> such array of directories. A "normal" Modula-3 program would have<br> a fairly large array.<br></div></span></blockquote><div><br></div><div>But if everything goes in INSTALL_ROOT/lib we have only one directory, right?</div><div><br></div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; "> As well, doing builds for distribution would often leave you with /tmp/cm3<br> which is a possible security problem. This definitely did occur.<br></div></span></blockquote><div><br></div><div>Surely, building for a distro can build in the right path. Where did /tmp/cm3 come from? If you need to be able to override while building then use $LD_LIBRARY_PATH.</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">Now, again, there are many options, and they can be combined.<br>Portability is perhaps a concern, but perhaps not so much, given today's landscape.<br></div></span></blockquote><div><br></div><div>Elegance is also a concern.</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; "> Now, if we are to use relative paths, well, my understanding is that<br>the "real" files need to be in relatively few directories, e.g. /usr/local/cm3/lib,<br>and not /usr/local/cm3/pkg/foo/linux etc.<br></div></span></blockquote><div><br></div><div>I prefer this approach.</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">This way, files in lib and bin can point to $ORIGIN/../lib.<br></div></span></blockquote><div><br></div><div>Fair enough.</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">Now, keep in mind, that unshipped binaries sometimes people like to work,<br>as well, perhaps also programs (not shared libraies, as far as I know)<br>buried in the pkg store /usr/local/cm3/pkg/foo/linux/foo.<br>I know cm3 sits in there, though that copy isn't used.<br></div></span></blockquote><div><br></div><div>I don't know understand what you are trying to say here.</div><div><br></div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; "> I make no account for binaries buried in the package store.<br></div></span></blockquote><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; "><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="font-size: medium;"><br></span></font>I do make some account for unshipped binaries.<br><br>By default the run paths we are recording in current config files<span class="Apple-converted-space"> </span><br>are<br>$ORIGIN/../lib:/usr/local/cm3/lib<br>Not a bunch of paths into pkg, just two entries.<br> <br><br>The "security" issue still is present by default.<br>But the run path is "prettier" and probably more efficient.<br> <br><br>When you build a distribution however, you are expected to omit /usr/local/cm3/lib (it might be /tmp/cm3).<br>This is controled by an environment variable, which I set in Olaf's scripts, but oops<br>I think I set it too late. I'll fix that very very soon.<br></div></span></blockquote><div><br></div><div>The following is a bit rambling for me to respond to in detail. Perhaps someone else should weigh in.</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; "> <br><br>To recap:<br> - full paths<br> - relative paths from $ORIGIN<br> - LD_LIBRARY_PATH<br> <br>They each have advantages and disadvantages.<br>$ORIGIN provides for a "movable" install. I can install to /usr/local/cm3,<br>you can install to /opt/cm3. It'll just work. No need to change LD_LIBRARY_PATH.<br> <br><br>However if I want to move just some of the files, not the whole binary tree<br>together, then $ORIGIN breaks down.<br> <br><br>If really want one file here, another there, and another somewhere else, $ORIGIN doesn't do.<br>You are left with full paths or LD_LIBRARY_PATH.<br> <br><br>Oh, and moral equivalent of LD_LIBRARY_PATH, like /etc/ld.so.conf or such.<br>Look on birch for example, it is /usr/local/cm3/lib.<br>That tripped me up actually, because, you know, my cm3 is in $HOME/cm3 there.<br>This demonstrated another problem in this area!<br>$ORIGIN keeps things more tightly together, which you often want, sometimes might not not.<br>LD_LIBRARY_PATH lets things be spread around, again, sometimes you want that, sometimes not.<br>I figure tightly point is the more common, but imagine if you just want to replace one file.<br> Is that reasonable? You replace it by putting it elsewhere? (Imagine "patching" an install<br> this way.)<br><br> <br>So, here now I'm rambling.<br>I've laid out the options and /some/ of the disadvantages/advantages.<br> <br><br>There is no perfect solution, and the various solutions are combinable.<br>I find combining them though, I start to get confused.<br>Because you end up in a "probing" situation and you start wondering<br>which supercedes which, and you just hope there aren't any "duplicates"<br>so that the probe order is mostly moot (assuming there remain no duplicates).<br> <br> <br>Somewhat clear?<br> <br> <br>You run, e.g. elfdump -p foo | grep -i path or somesuch, or ldd foo or ldd -v or -V foo and<br>investigate the various options and their effects. Solaris has a very nice and verbose<br>ldd form.<br> <br> <br>Now, the files in pkg.<br>I consider it somewhat philosophically significant that "everything is in pkg".<br> There is a well structured "repository" not a randomly organized bunch of files.<br>I think. Maybe this is just a suggestion?<br>You know, if they are hardlinks and we don't really use the ones in pkg, is<br>there a point?<br> <br><br>Or, on the other hand, is the philosophy a big deal and we should go back to<br>lib symlinking to pkg to appease the philosophy?<br> <br> <br>"ship/install" certainly "likes" to put things in pkg.<br>I don't think the option of using lib and not pkg is doable without builder changes.<br>But that is doable.<br> <br> <br>A few other folks here did pipe up some on this in the recent past and<br>I think there was kinda sorta consensus that the old ways were not great<br>(particularly 1) the big runpath 2) the runpath into /tmp)<br>and the new ways maybe better, but I admit there was no clear consensus.<br>I acted somewhat unilaterally. You know, I'm impatient and arrogant so...<br>and Tinderbox is there to cause some restraint.<br> <br><br>There was definitely pushback on wanting unshipped binaries to keep working,<br>which they largely do as a result of the discussion/pushback.<br> <br><br>As well, any unshipped binaries that we know we use in the build, like PklFonts,<br>stubgen, m3bundle, we build standalone, to evade/avoid problems here,<br>since $ORIGIN/../lib won't work and the full paths are meant to be omitted.<br>I consider this not great.<br><br>I think, really, we should be able to dynamically link everything really,<br>including cm3. I don't think we should static link just to make up for<br>the need for a backup. There are plenty of backups available and you can<br>make plenty more. However this will have to wait and probably take<br>more arguing and maybe demonstration of its viability.<br>I will require some work to make work anyway.<br> <br> <br>At one point I was confused about the need for static linking so accepted it strongly.<br>Now I don't see it. If you just need backups, again, they exist, and you can make more.<br>Static linking isn't imho a substitute for backups.<br>There are technical problems to be solved though.<br> <br>Could be that these issues are related though. If your backup might<br>load the wrong m3core.so too easily, making it not a very reliable backup,<br>static linking could mitigate that. But $origin seems like a good mitigation.<br>I'm strongly considering add just plain $origin, in addition to $origin/../lib to runpath.<br>That way you can just put everything in one messy but easier to move/copy directory.<br> <br><br> - Jay<br><br><br><br><br> <br>> Date: Thu, 2 Jul 2009 20:04:36 +0200<br>> From:<span class="Apple-converted-space"> </span><a href="mailto:wagner@elegosoft.com">wagner@elegosoft.com</a><br>> To:<span class="Apple-converted-space"> </span><a href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>> Subject: Re: [M3devel] ROOT<br>><span class="Apple-converted-space"> </span><br>> Quoting Tony Hosking <<a href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</a>>:<br>><span class="Apple-converted-space"> </span><br>> > That sounds plausible. Is there anything in the current setup that<br>> > depends on the .so files being in pkg instead of lib?<br>><span class="Apple-converted-space"> </span><br>> I don't think so offhand. But I must admit that I've lost the overview<br>> in this area, too :-/<br>><span class="Apple-converted-space"> </span><br>> Olaf<br>><span class="Apple-converted-space"> </span><br>> > On 2 Jul 2009, at 13:34,<span class="Apple-converted-space"> </span><a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a><span class="Apple-converted-space"> </span>wrote:<br>> ><br>> >> How about we put .so files only in lib and not in pkg? Or symlink<span class="Apple-converted-space"> </span><br>> >> from pkg to lib instead of how it used to be the other way around?<span class="Apple-converted-space"> </span><br>> >> Those would also fix all this.<br>> >><br>> >> - Jay (phone)<br>> >><br>> >> On Jul 2, 2009, at 9:21 AM, Jay <<a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a>> wrote:<br>> >><br>> >>><br>> >>> Are you up to date in m3-libs/m3core?<br>> >>> Lots of builds have succeeded with this..<br>> >>> It isn't great, but that requirement to build from previous 5.4 release..<br>> >>><br>> >>> - Jay<br>> >>><br>> >>> ________________________________<br>> >>>> From:<span class="Apple-converted-space"> </span><a href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</a><br>> >>>> To:<span class="Apple-converted-space"> </span><a href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</a><br>> >>>> Date: Thu, 2 Jul 2009 11:54:51 -0400<br>> >>>> CC:<span class="Apple-converted-space"> </span><a href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>> >>>> Subject: Re: [M3devel] ROOT<br>> >>>><br>> >>>> If I define ROOT then I get the following error. I think this all<span class="Apple-converted-space"> </span><br>> >>>> needs reverting!<br>> >>>><br>> >>>> --- building in SOLgnu ---<br>> >>>><br>> >>>> ignoring ../src/m3overrides<br>> >>>><br>> >>>> "/.gollum/u110/u86/hosking/cm3/m3-sys/cm3/src/m3makefile", line<span class="Apple-converted-space"> </span><br>> >>>> 12: quake runtime error: unable to copy<span class="Apple-converted-space"> </span><br>> >>>> "~/cm3/m3-libs/m3core/src/ unix/Common/UnixLink.c" to<span class="Apple-converted-space"> </span><br>> >>>> "./UnixLink.c": errno=2<br>> >>>><br>> >>>> --procedure-- -line- -file---<br>> >>>> cp_if --<br>> >>>> include_dir 12 /.gollum/u110/u86/hosking/cm3/m3-sys/cm3/src/ m3makefile<br>> >>>> 6 /.gollum/u110/u86/hosking/cm3/m3-sys/cm3/SOLgnu/m3make.args<br>> >>>><br>> >>>> Fatal Error: package build failed<br>> >>>> n<br>> >>>><br>> >>>> On 2 Jul 2009, at 11:49, Tony Hosking wrote:<br>> >>>><br>> >>>> Where did variable ROOT come from? Do I really need to define it?<span class="Apple-converted-space"> </span><br>> >>>> Seems broken to me to depend on the source directory structure<span class="Apple-converted-space"> </span><br>> >>>> as it sets that structure in stone.<br>> >>>><br>> >>>><br>><span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>> --<span class="Apple-converted-space"> </span><br>> Olaf Wagner -- elego Software Solutions GmbH<br>> Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany<br>> phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95<br>><span class="Apple-converted-space"> </span><a href="http://www.elegosoft.com">http://www.elegosoft.com</a><span class="Apple-converted-space"> </span>| Geschäftsführer: Olaf Wagner | Sitz: Berlin<br>> Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194<br>><span class="Apple-converted-space"> </span><br></div></span></blockquote></div><br></body></html>