<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'><div style="text-align: left;">sorry, that was with them symlinked in, from before the fix; maybe that's the problem<br>I'll see.<br><br> - Jay<br></div><br><br><br><br><blockquote><hr id="EC_stopSpelling">From: jayk123@hotmail.com<br>To: hosking@cs.purdue.edu<br>Date: Sat, 19 Apr 2008 15:46:31 +0000<br>CC: m3devel@elegosoft.com<br>Subject: Re: [M3devel] a hope for dynamic linking!<br><br>
<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
<style>
.ExternalClass .EC_hmmessage P
{padding:0px;}
.ExternalClass body.EC_hmmessage
{font-size:10pt;font-family:Tahoma;}
</style>
<div style="text-align: left;">I understand.<br><br>But when dynamic linking is actually used, -rpath/$ORIGIN might be a little better than having to modify LD_LIBRARY_PATH.<br> I realize it's not night and day. It doesn't make dynamic linking suddenly problem free, just maybe every so slightly better.<br>When that still isn't adequate and diskspace/memory not a concern, or there are issues of circular dependencies (cm3), build_standalone.<br> (I think cm3 is statically linked for subtle reasons I can't quite grasp at the moment. Not just so it can copy m3core.dll around while it is running, that<br> could probably be dealt with less severely.)<br><br>It looks like when gmp/mpfr source are in the gcc tree, it always does --disable-shared on them.<br>I'm testing some now.<br><br>libgcc seems to be a bit of a middle ground, like Modula3 stuff -- available both static and dynamic, and the need for dynamic varies.<br>libgcc I believe contains roughly:<br> 1) math helpers -- multiply/divide, 64 bit stuff <br> 2) exception handling <br><br>#1 is a case of kinda like, hey, I didn't make any function calls, why do I do need a .lib or .dll and no thank you on the dynamic linking headaches<br>#2 is similar, but rather than "no function calls", it's using language constructs that actually have heavy dependencies, and if people want to throw/catch exceptions across linkage boundaries, the exception handling implementation might need to be shared<br><br><br>building with the in-gcc-tree gmp/mpfr:<br><br> gcc -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_STDARG=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SETLOCALE=1 -DHAVE_GETTIMEOFDAY=1 -DMPFR_HAVE_FESETROUND=1 -DHAVE_ROUND=1 -DHAVE_TRUNC=1 -DHAVE_FLOOR=1 -DHAVE_CEIL=1 -DHAVE_NEARBYINT=1 -DHAVE_ATTRIBUTE_MODE=1 -DHAVE_ALLOCA_H=1 -I. -I../../gcc/mpfr -I/dev2/cm3/m3-sys/m3cc/PPC_DARWIN/./gmp -I/dev2/cm3/m3-sys/m3cc/PPC_DARWIN/./gmp/tune -g -MT remquo.lo -MD -MP -MF .deps/remquo.Tpo -c ../../gcc/mpfr/remquo.c -o remquo.o<br>./get_patches.sh > get_patches.c || rm -f get_patches.c<br>/bin/sh: line 1: ./get_patches.sh: No such file or directory<br>if /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_STDARG=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SETLOCALE=1 -DHAVE_GETTIMEOFDAY=1 -DMPFR_HAVE_FESETROUND=1 -DHAVE_ROUND=1 -DHAVE_TRUNC=1 -DHAVE_FLOOR=1 -DHAVE_CEIL=1 -DHAVE_NEARBYINT=1 -DHAVE_ATTRIBUTE_MODE=1 -DHAVE_ALLOCA_H=1 -I. -I../../gcc/mpfr -I/dev2/cm3/m3-sys/m3cc/PPC_DARWIN/./gmp -I/dev2/cm3/m3-sys/m3cc/PPC_DARWIN/./gmp/tune -g -MT get_patches.lo -MD -MP -MF ".deps/get_patches.Tpo" -c -o get_patches.lo get_patches.c; \<br>then mv -f ".deps/get_patches.Tpo" ".deps/get_patches.Plo"; else rm -f ".deps/get_patches.Tpo"; exit 1; fi<br> gcc -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_STDARG=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SETLOCALE=1 -DHAVE_GETTIMEOFDAY=1 -DMPFR_HAVE_FESETROUND=1 -DHAVE_ROUND=1 -DHAVE_TRUNC=1 -DHAVE_FLOOR=1 -DHAVE_CEIL=1 -DHAVE_NEARBYINT=1 -DHAVE_ATTRIBUTE_MODE=1 -DHAVE_ALLOCA_H=1 -I. -I../../gcc/mpfr -I/dev2/cm3/m3-sys/m3cc/PPC_DARWIN/./gmp -I/dev2/cm3/m3-sys/m3cc/PPC_DARWIN/./gmp/tune -g -MT get_patches.lo -MD -MP -MF .deps/get_patches.Tpo -c get_patches.c -o get_patches.o<br>powerpc-apple-darwin8-gcc-4.0.1: get_patches.c: No such file or directory<br><br>I'll investigate.<br>I was able to build them on another machine via apt-get source. Maybe you missed a file?<br>I'll look..<br><br> - Jay<br></div><br><br><blockquote><hr id="EC_EC_stopSpelling">CC: m3devel@elegosoft.com<br>From: hosking@cs.purdue.edu<br>To: jayk123@hotmail.com<br>Subject: Re: [M3devel] a hope for dynamic linking!<br>Date: Sat, 19 Apr 2008 11:34:38 -0400<br><br>Regular Modula-3 app stuff should build statically already, where it makes sense. build_standalone() achieves this. On some systems static libraries for certain system libraries are not available and cannot be assumed. We always build static Modula-3 libraries, so the current setup will link those statically even if other libraries are not available. For example, cm3 on I386_DARWIN gives: <div><br></div><div><div>hosking$ otool -L /usr/local/cm3/bin/cm3</div><div>/usr/local/cm3/bin/cm3:</div><div> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.0.0)</div><div> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)</div><div><br></div><div>Notice that all the M3 libraries are static, but libgcc and friends are dynamic.</div><div><br></div><div>So, I don't know what you are attempting to do. Did you try --disable-shared for m3cc configuration?</div><div><br></div><div><div>On Apr 19, 2008, at 11:10 AM, Jay wrote:<br class="EC_EC_Apple-interchange-newline"><blockquote><span class="EC_EC_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; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div class="EC_EC_hmmessage" style="font-size: 10pt; font-family: Tahoma;"><div style="text-align: left;">(ok, actually I meant maybe for cm3cg but ok either way, there'd only be one use of "/usr/local/cm3/bin/libgmp.so" so might as well be static)<br></div><br><br><br><br><blockquote><hr id="EC_EC_EC_stopSpelling">From:<span class="EC_EC_Apple-converted-space"> </span><a href="mailto:jayk123@hotmail.com">jayk123@hotmail.com</a><br>To:<span class="EC_EC_Apple-converted-space"> </span><a href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</a><br>Date: Sat, 19 Apr 2008 15:02:44 +0000<br>CC:<span class="EC_EC_Apple-converted-space"> </span><a href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>Subject: Re: [M3devel] a hope for dynamic linking!<br><br><div style="text-align: left;">I mean for the "regular" Modula-3 "app" stuff, not cm3cg.<br><br>It looks like it is already static, good.<br><br>1)<span class="EC_EC_Apple-converted-space"> </span><a href="http://gcc.gnu.org/ml/gcc/2006-10/msg00141.html" target="_blank">http://gcc.gnu.org/ml/gcc/2006-10/msg00141.html</a><br><br>2) The current code:<br><br>m3-sys/m3cc/gcc/Makefile.in:<br><br>configure-gmp:<span class="EC_EC_Apple-converted-space"> </span><br>...<br> echo Configuring in $(HOST_SUBDIR)/gmp; \<br>...<br> $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \<br> --target=none-${host_vendor}-${host_os} $${srcdiroption} --disable-shared \<br> || exit 1<br>@endif gmp<br><br><br>configure-mpfr:<span class="EC_EC_Apple-converted-space"> </span><br>...<br> echo Configuring in $(HOST_SUBDIR)/mpfr; \<br>...<br> $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \<br> --target=none-${host_vendor}-${host_os} $${srcdiroption} --disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp \<br> || exit 1<br>@endif mpfr<br><br><br>Let me test it and then I'll remove the Quake code related to this.<br><br><br> - Jay<br></div><br><br><blockquote><hr id="EC_EC_EC_EC_stopSpelling">CC:<span class="EC_EC_Apple-converted-space"> </span><a href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>From:<span class="EC_EC_Apple-converted-space"> </span><a href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</a><br>To:<span class="EC_EC_Apple-converted-space"> </span><a href="mailto:jayk123@hotmail.com">jayk123@hotmail.com</a><br>Subject: Re: [M3devel] a hope for dynamic linking!<br>Date: Sat, 19 Apr 2008 10:50:04 -0400<br><br><div><span class="EC_EC_EC_EC_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; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div><span class="EC_EC_EC_EC_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; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span class="EC_EC_EC_EC_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; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span class="EC_EC_EC_EC_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; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span class="EC_EC_EC_EC_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; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span class="EC_EC_EC_EC_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; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span class="EC_EC_EC_EC_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; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span class="EC_EC_EC_EC_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; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span class="EC_EC_EC_EC_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; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div>Hold on! I am strongly in favor of static linking for cm3cg/m3cgc1 so that it is a standalone executable. Should be easy enough with gcc configure.</div></span></span></span></span></span></span></span></span></div></span></div><br><div>On Apr 19, 2008, at 10:31 AM, Jay wrote:<br class="EC_EC_EC_EC_Apple-interchange-newline"><blockquote><span class="EC_EC_EC_EC_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; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div class="EC_EC_EC_EC_hmmessage" style="font-size: 10pt; font-family: Tahoma;"><div style="text-align: left;"><a href="http://www.eyrie.org/%7Eeagle/notes/rpath.html" target="_blank">http://www.eyrie.org/~eagle/notes/rpath.html</a><br><a href="http://people.debian.org/%7Eche/personal/rpath-considered-harmful" target="_blank">http://people.debian.org/~che/personal/rpath-considered-harmful</a><br><br><br>but yet:<br><br><a href="http://www.scons.org/wiki/UsingOrigin" target="_blank">http://www.scons.org/wiki/UsingOrigin</a><br><br></div>So you can either colocate executables and .sos in the same directory or, like<br> /cm3/bin<span class="EC_EC_EC_EC_Apple-converted-space"> </span><br> /cm3/lib/m3core.so<span class="EC_EC_EC_EC_Apple-converted-space"> </span><br><br>and vary the install root.<br><br>We should be using this where available -- Linux, Solaris, Irix.<br>Too bad not supported elsewhere.<br>On Windows you can colocate; the .exe's directory is always searched.<br><br> - Jay<br></div></span></blockquote></div><br></blockquote></blockquote></div></span><br class="EC_EC_Apple-interchange-newline"></blockquote></div><br></div></div></blockquote>
</blockquote></body>
</html>