<div dir="ltr">Hi Robert,<div class="gmail_extra"><br><div class="gmail_quote">On Sun, Dec 13, 2015 at 9:35 AM, Robert Withers <span dir="ltr">&lt;<a href="mailto:robert.w.withers@gmail.com" target="_blank">robert.w.withers@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
<br>
On 12/13/2015 11:52 AM, David T. Lewis wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  On Sun, Dec 13, 2015 at 11:27:57AM -0500, Robert Withers wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  Hi David,<br>
<br>
I found a major focus of failure but not it&#39;s configured cause. Looking<br>
at the generated Makefiles, in the build directory plugin<br>
subdirectories, for a sample plugin and the 3 failure plugins, there is<br>
a significant difference. The 3 failure plugins have no object file<br>
targets, whereas the successful plugins, like SecurityPlugin, has these<br>
targets. I don&#39;t know where, why or how, but that is the what of it.<br>
<br>
I&#39;m guessing and looking at the platform/unix/config directory, but it&#39;s<br>
complex. Since you had success, it&#39;s just a teeny tiny thing in there<br>
that is an issue. Since it is inside the configure phase then it is<br>
those files or a subfile they contact.<br>
<br>
I just tried again with a fresh checkout with the same failure. David,<br>
how have you generate plugins for internal? Did you use the script below<br>
[1]?<br>
</blockquote>
No, I am using the CMake based build (trunk VMMaker, but not relevant for<br>
building a Spur VM). If the plugins work there, then they will also work<br>
for Cog/Spur, although you may need to work out some glitches in the<br>
autotools based build for Cog/Spur.<br>
</blockquote>
<br></span>
Oh, I see, that is fairly different in the configure aspect, I&#39;m guessing.<br>
<br>
I just had a thought and it is building now after I regenerated the vm + internals.  The <a href="http://make.int.in" rel="noreferrer" target="_blank">make.int.in</a> fragment which sets the target must only be looking at the &#39;src&#39; directory for c-files to chew on. Since I generated into the &#39;spursrc&#39; directory, I am guessing that the fragment missed the target. Let me check...<br>
<br>
Yes! Success on build..but in testing, even though the DESPlugin.a was libtool into vm.a which was statically linked to the squeak binary, it still did not load this plugin when I ran the Crypto tests.<br>
<br>
issues:<br>
1) external: with a dynamic linked DESPlugin, it doesn&#39;t load the library<br>
2) internal: configure with <a href="http://make.int.in" rel="noreferrer" target="_blank">make.int.in</a> looks into the src, not spursrc (I am guessing, but it built)<br></blockquote><div><br></div><div>2) is not an issue.  This would have broken many things.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
3) internal: statically linked it still doesn&#39;t &#39;load&#39; the library.</blockquote><div><br></div><div>One thing to remember is that I have built all the configurations under the various build.*&#39;s successfully at some point in the past and that I regularly build most of them.  So these problems you&#39;re having are very likely to do with the new plugin, not with broken infrastructure.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888"><br>
<br>
Robert</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Dave<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Robert<br>
<br>
<br>
<br>
SecurityPlugin:<br>
<br>
    $(TARGET) : $(OBJS) Makefile<br>
             $(LINK) $(TARGET) $(OBJS) $(PLIBS)<br>
             $(RANLIB) $(TARGET)<br>
<br>
<br>
<br>
<br>
    SecurityPlugin$o :<br>
    /home/rabbit/tribe/cogvm/src/plugins/SecurityPlugin/SecurityPlugin.c<br>
             $(COMPILE) SecurityPlugin$o<br>
    /home/rabbit/tribe/cogvm/src/plugins/SecurityPlugin/SecurityPlugin.c<br>
<br>
    sqUnixSecurity$o :<br>
    /home/rabbit/tribe/cogvm/platforms/unix/plugins/SecurityPlugin/sqUnixSecurity.c<br>
             $(COMPILE) sqUnixSecurity$o<br>
    /home/rabbit/tribe/cogvm/platforms/unix/plugins/SecurityPlugin/sqUnixSecurity.c<br>
<br>
    .force :<br>
<br>
3 failure crypto plugins:<br>
<br>
    $(TARGET) : $(OBJS) Makefile<br>
             $(LINK) $(TARGET) $(OBJS) $(PLIBS)<br>
             $(RANLIB) $(TARGET)<br>
<br>
    #No targets!!!<br>
<br>
<br>
    .force :<br>
<br>
<br>
<br>
I&#39;ll maintain a Positive mental attitude,<br>
Robert<br>
<br>
<br>
On 12/13/2015 10:15 AM, David T. Lewis wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  Hi Robert,<br>
<br>
Just to confirm: These plugins can all be compiled either external or<br>
internal, and the primitives do show up when I do &quot;nm -gC&quot;. No external<br>
headers are required. I&#39;m using a different build environment, so I<br>
cannot directly answer your questions, but I expect that the issue is<br>
something related to your build setup.<br>
<br>
You might want to double check the plugins.ext, <a href="http://plugins.int" rel="noreferrer" target="_blank">plugins.int</a>, and<br>
plugins.exc files your build directory. Otherwise I can&#39;t think what<br>
to suggest.<br>
<br>
Dave<br>
<br>
On Sun, Dec 13, 2015 at 09:57:00AM -0500, Robert Withers wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I found some more info and I am nearing the end of investigation without<br>
solution.<br>
<br>
The 3 plugins under inquiry are DESPlugin, MD5Plugin, and SHA256Plugin.<br>
These 3 are newly internal from being external all this time the past 9<br>
years. I don&#39;t think I necessarily need header files as the EXPORT<br>
statements are in the generated .c files.<br>
<br>
Here are a few details of these three plugins:<br>
1) there are no .o files<br>
2) there is a .excluded file in each plugin directory in the build<br>
directory.<br>
3) each .a file is 8 bytes = !&lt;arch&gt;\z<br>
4) only log in mvm output is the following:<br>
<br>
ar -rc DESPlugin.a<br>
ranlib DESPlugin.a<br>
<br>
So there is no compile statement being run...<br>
<br>
hmmmm...I am looking for Makefile.in fragments for the successful<br>
internal plugins, but I am not finding them. There must be a small<br>
additional piece, outside squeak, that makes them internal, but it is<br>
escaping me. I was up all night - I installed Ubuntu at least 7 times<br>
and Suse twice. I finally went 32-bit os and it works, kinda sorta.<br>
<br>
Alright then, Robert<br>
<br>
On 12/13/2015 09:34 AM, Robert Withers wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Oh dear, they are exported symbols from th e .a file, but DESPlugin<br>
has no symbols using nm -gC.  I am not sure the next step. I am open<br>
ears.<br>
<br>
Thanks,<br>
Robert<br>
<br>
On 12/13/2015 09:22 AM, Robert Withers wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I do believe I need to write some header files in<br>
platforms/Cross/plugins for these 3 plugins. I&#39;ll give that 3 tries<br>
for 12 points.<br>
<br>
<br>
On 12/13/2015 08:39 AM, Robert Withers wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I built the vm with crypto plugins external but the running image/vm<br>
cannot find or load them. They are not being used.  Therefore, I am<br>
trying to build them internally[1]. After generating them for<br>
internal, I ran around changing the examplePlugins.int/.ext, in<br>
spursrc and src. Under the build.linux32x86/squeak.cog.spur I<br>
changed the real <a href="http://plugins.int/.ext" rel="noreferrer" target="_blank">plugins.int/.ext</a> as well. The crypto plugins make<br>
it on the internal side, but I get an error when I try to link<br>
squeak[2]. The complaint is:<br>
<br>
undefined reference to `DESPlugin_exports&#39;<br>
<br>
I don&#39;t recall how the internal plugin exports work. Might anyone<br>
refresh my memory and explain how this all works?<br>
<br>
Thank you for all,<br>
Robert<br>
<br>
<br>
[1]<br>
<br>
VMMaker<br>
    generate: CoInterpreter<br>
    and: StackToRegisterMappingCogit<br>
    with: #(ObjectMemory Spur32BitCoMemoryManager)<br>
    to: (FileDirectory default pathFromURI: VMMaker sourceTree,<br>
&#39;/spursrc&#39;)<br>
    platformDir: (FileDirectory default pathFromURI: VMMaker<br>
sourceTree, &#39;/platforms&#39;)<br>
    including:#(    DESPlugin DSAPlugin MD5Plugin SHA256Plugin<br>
AsynchFilePlugin FloatArrayPlugin RePlugin<br>
                BalloonEnginePlugin FloatMathPlugin SecurityPlugin<br>
BMPReadWriterPlugin<br>
                IA32ABIPlugin SocketPlugin BitBltSimulation<br>
JPEGReadWriter2Plugin SurfacePlugin<br>
                JPEGReaderPlugin UUIDPlugin DropPlugin<br>
LargeIntegersPlugin UnixOSProcessPlugin<br>
                FileCopyPlugin Matrix2x3Plugin Win32OSProcessPlugin<br>
FilePlugin MiscPrimitivePlugin)<br>
<br>
<br>
[2]<br>
<br>
gcc -m32 -g -O2 -DNDEBUG -DDEBUGVM=0 -msse2 -D_GNU_SOURCE<br>
-D_FILE_OFFSET_BITS=64 -DCOGMTVM=0 -DLSB_FIRST=1 -Wl,-z -Wl,now -o<br>
squeak disabledPlugins.o version.o -Wl,--export-dynamic vm/vm.a<br>
ADPCMCodecPlugin/ADPCMCodecPlugin.a AioPlugin/AioPlugin.a<br>
AsynchFilePlugin/AsynchFilePlugin.a B2DPlugin/B2DPlugin.a<br>
BitBltPlugin/BitBltPlugin.a<br>
BMPReadWriterPlugin/BMPReadWriterPlugin.a<br>
CroquetPlugin/CroquetPlugin.a ZipPlugin/ZipPlugin.a<br>
DropPlugin/DropPlugin.a DESPlugin/DESPlugin.a DSAPrims/DSAPrims.a<br>
MD5Plugin/MD5Plugin.a SHA256Plugin/SHA256Plugin.a<br>
FFTPlugin/FFTPlugin.a FileCopyPlugin/FileCopyPlugin.a<br>
FilePlugin/FilePlugin.a FloatArrayPlugin/FloatArrayPlugin.a<br>
FloatMathPlugin/FloatMathPlugin.a IA32ABI/IA32ABI.a<br>
JoystickTabletPlugin/JoystickTabletPlugin.a<br>
JPEGReaderPlugin/JPEGReaderPlugin.a<br>
JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.a Klatt/Klatt.a<br>
LargeIntegers/LargeIntegers.a Matrix2x3Plugin/Matrix2x3Plugin.a<br>
MIDIPlugin/MIDIPlugin.a MiscPrimitivePlugin/MiscPrimitivePlugin.a<br>
Mpeg3Plugin/Mpeg3Plugin.a RePlugin/RePlugin.a<br>
SecurityPlugin/SecurityPlugin.a SerialPlugin/SerialPlugin.a<br>
SocketPlugin/SocketPlugin.a SoundCodecPrims/SoundCodecPrims.a<br>
SoundGenerationPlugin/SoundGenerationPlugin.a<br>
SoundPlugin/SoundPlugin.a StarSqueakPlugin/StarSqueakPlugin.a<br>
SurfacePlugin/SurfacePlugin.a<br>
VMProfileLinuxSupportPlugin/VMProfileLinuxSupportPlugin.a -lutil<br>
-ldl -lpthread -lm -lnsl -lpthread -luuid vm/vm.a<br>
vm/vm.a(sqNamedPrims.o):(.data+0x2c): undefined reference to<br>
`DESPlugin_exports&#39;<br>
vm/vm.a(sqNamedPrims.o):(.data+0x34): undefined reference to<br>
`MD5Plugin_exports&#39;<br>
vm/vm.a(sqNamedPrims.o):(.data+0x38): undefined reference to<br>
`SHA256Plugin_exports&#39;<br>
collect2: error: ld returned 1 exit status<br>
Makefile:180: recipe for target &#39;squeak&#39; failed<br>
make: *** [squeak] Error 1<br>
<br>
</blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>