[Vm-dev] Re: Plugin not available externally so I try to build internally

David T. Lewis lewis at mail.msen.com
Sun Dec 13 16:52:27 UTC 2015


On Sun, Dec 13, 2015 at 11:27:57AM -0500, Robert Withers wrote:
>  
> Hi David,
> 
> I found a major focus of failure but not it's configured cause. Looking 
> at the generated Makefiles, in the build directory plugin 
> subdirectories, for a sample plugin and the 3 failure plugins, there is 
> a significant difference. The 3 failure plugins have no object file 
> targets, whereas the successful plugins, like SecurityPlugin, has these 
> targets. I don't know where, why or how, but that is the what of it.
> 
> I'm guessing and looking at the platform/unix/config directory, but it's 
> complex. Since you had success, it's just a teeny tiny thing in there 
> that is an issue. Since it is inside the configure phase then it is 
> those files or a subfile they contact.
> 
> I just tried again with a fresh checkout with the same failure. David, 
> how have you generate plugins for internal? Did you use the script below 
> [1]?

No, I am using the CMake based build (trunk VMMaker, but not relevant for
building a Spur VM). If the plugins work there, then they will also work
for Cog/Spur, although you may need to work out some glitches in the
autotools based build for Cog/Spur.

Dave

> 
> 
> Robert
> 
> 
> 
> SecurityPlugin:
> 
>    $(TARGET) : $(OBJS) Makefile
>             $(LINK) $(TARGET) $(OBJS) $(PLIBS)
>             $(RANLIB) $(TARGET)
> 
> 
> 
> 
>    SecurityPlugin$o :
>    /home/rabbit/tribe/cogvm/src/plugins/SecurityPlugin/SecurityPlugin.c
>             $(COMPILE) SecurityPlugin$o
>    /home/rabbit/tribe/cogvm/src/plugins/SecurityPlugin/SecurityPlugin.c
> 
>    sqUnixSecurity$o :
>    /home/rabbit/tribe/cogvm/platforms/unix/plugins/SecurityPlugin/sqUnixSecurity.c
>             $(COMPILE) sqUnixSecurity$o
>    /home/rabbit/tribe/cogvm/platforms/unix/plugins/SecurityPlugin/sqUnixSecurity.c
> 
>    .force :
> 
> 3 failure crypto plugins:
> 
>    $(TARGET) : $(OBJS) Makefile
>             $(LINK) $(TARGET) $(OBJS) $(PLIBS)
>             $(RANLIB) $(TARGET)
> 
>    #No targets!!!
> 
> 
>    .force :
> 
> 
> 
> I'll maintain a Positive mental attitude,
> Robert
> 
> 
> On 12/13/2015 10:15 AM, David T. Lewis wrote:
> >  
> >Hi Robert,
> >
> >Just to confirm: These plugins can all be compiled either external or
> >internal, and the primitives do show up when I do "nm -gC". No external
> >headers are required. I'm using a different build environment, so I
> >cannot directly answer your questions, but I expect that the issue is
> >something related to your build setup.
> >
> >You might want to double check the plugins.ext, plugins.int, and
> >plugins.exc files your build directory. Otherwise I can't think what
> >to suggest.
> >
> >Dave
> >
> >On Sun, Dec 13, 2015 at 09:57:00AM -0500, Robert Withers wrote:
> >>I found some more info and I am nearing the end of investigation without
> >>solution.
> >>
> >>The 3 plugins under inquiry are DESPlugin, MD5Plugin, and SHA256Plugin.
> >>These 3 are newly internal from being external all this time the past 9
> >>years. I don't think I necessarily need header files as the EXPORT
> >>statements are in the generated .c files.
> >>
> >>Here are a few details of these three plugins:
> >>1) there are no .o files
> >>2) there is a .excluded file in each plugin directory in the build
> >>directory.
> >>3) each .a file is 8 bytes = !<arch>\z
> >>4) only log in mvm output is the following:
> >>
> >>ar -rc DESPlugin.a
> >>ranlib DESPlugin.a
> >>
> >>So there is no compile statement being run...
> >>
> >>hmmmm...I am looking for Makefile.in fragments for the successful
> >>internal plugins, but I am not finding them. There must be a small
> >>additional piece, outside squeak, that makes them internal, but it is
> >>escaping me. I was up all night - I installed Ubuntu at least 7 times
> >>and Suse twice. I finally went 32-bit os and it works, kinda sorta.
> >>
> >>Alright then, Robert
> >>
> >>On 12/13/2015 09:34 AM, Robert Withers wrote:
> >>>Oh dear, they are exported symbols from th e .a file, but DESPlugin
> >>>has no symbols using nm -gC.  I am not sure the next step. I am open
> >>>ears.
> >>>
> >>>Thanks,
> >>>Robert
> >>>
> >>>On 12/13/2015 09:22 AM, Robert Withers wrote:
> >>>>I do believe I need to write some header files in
> >>>>platforms/Cross/plugins for these 3 plugins. I'll give that 3 tries
> >>>>for 12 points.
> >>>>
> >>>>
> >>>>On 12/13/2015 08:39 AM, Robert Withers wrote:
> >>>>>I built the vm with crypto plugins external but the running image/vm
> >>>>>cannot find or load them. They are not being used.  Therefore, I am
> >>>>>trying to build them internally[1]. After generating them for
> >>>>>internal, I ran around changing the examplePlugins.int/.ext, in
> >>>>>spursrc and src. Under the build.linux32x86/squeak.cog.spur I
> >>>>>changed the real plugins.int/.ext as well. The crypto plugins make
> >>>>>it on the internal side, but I get an error when I try to link
> >>>>>squeak[2]. The complaint is:
> >>>>>
> >>>>>undefined reference to `DESPlugin_exports'
> >>>>>
> >>>>>I don't recall how the internal plugin exports work. Might anyone
> >>>>>refresh my memory and explain how this all works?
> >>>>>
> >>>>>Thank you for all,
> >>>>>Robert
> >>>>>
> >>>>>
> >>>>>[1]
> >>>>>
> >>>>>VMMaker
> >>>>>    generate: CoInterpreter
> >>>>>    and: StackToRegisterMappingCogit
> >>>>>    with: #(ObjectMemory Spur32BitCoMemoryManager)
> >>>>>    to: (FileDirectory default pathFromURI: VMMaker sourceTree,
> >>>>>'/spursrc')
> >>>>>    platformDir: (FileDirectory default pathFromURI: VMMaker
> >>>>>sourceTree, '/platforms')
> >>>>>    including:#(    DESPlugin DSAPlugin MD5Plugin SHA256Plugin
> >>>>>AsynchFilePlugin FloatArrayPlugin RePlugin
> >>>>>                BalloonEnginePlugin FloatMathPlugin SecurityPlugin
> >>>>>BMPReadWriterPlugin
> >>>>>                IA32ABIPlugin SocketPlugin BitBltSimulation
> >>>>>JPEGReadWriter2Plugin SurfacePlugin
> >>>>>                JPEGReaderPlugin UUIDPlugin DropPlugin
> >>>>>LargeIntegersPlugin UnixOSProcessPlugin
> >>>>>                FileCopyPlugin Matrix2x3Plugin Win32OSProcessPlugin
> >>>>>FilePlugin MiscPrimitivePlugin)
> >>>>>
> >>>>>
> >>>>>[2]
> >>>>>
> >>>>>gcc -m32 -g -O2 -DNDEBUG -DDEBUGVM=0 -msse2 -D_GNU_SOURCE
> >>>>>-D_FILE_OFFSET_BITS=64 -DCOGMTVM=0 -DLSB_FIRST=1 -Wl,-z -Wl,now -o
> >>>>>squeak disabledPlugins.o version.o -Wl,--export-dynamic vm/vm.a
> >>>>>ADPCMCodecPlugin/ADPCMCodecPlugin.a AioPlugin/AioPlugin.a
> >>>>>AsynchFilePlugin/AsynchFilePlugin.a B2DPlugin/B2DPlugin.a
> >>>>>BitBltPlugin/BitBltPlugin.a
> >>>>>BMPReadWriterPlugin/BMPReadWriterPlugin.a
> >>>>>CroquetPlugin/CroquetPlugin.a ZipPlugin/ZipPlugin.a
> >>>>>DropPlugin/DropPlugin.a DESPlugin/DESPlugin.a DSAPrims/DSAPrims.a
> >>>>>MD5Plugin/MD5Plugin.a SHA256Plugin/SHA256Plugin.a
> >>>>>FFTPlugin/FFTPlugin.a FileCopyPlugin/FileCopyPlugin.a
> >>>>>FilePlugin/FilePlugin.a FloatArrayPlugin/FloatArrayPlugin.a
> >>>>>FloatMathPlugin/FloatMathPlugin.a IA32ABI/IA32ABI.a
> >>>>>JoystickTabletPlugin/JoystickTabletPlugin.a
> >>>>>JPEGReaderPlugin/JPEGReaderPlugin.a
> >>>>>JPEGReadWriter2Plugin/JPEGReadWriter2Plugin.a Klatt/Klatt.a
> >>>>>LargeIntegers/LargeIntegers.a Matrix2x3Plugin/Matrix2x3Plugin.a
> >>>>>MIDIPlugin/MIDIPlugin.a MiscPrimitivePlugin/MiscPrimitivePlugin.a
> >>>>>Mpeg3Plugin/Mpeg3Plugin.a RePlugin/RePlugin.a
> >>>>>SecurityPlugin/SecurityPlugin.a SerialPlugin/SerialPlugin.a
> >>>>>SocketPlugin/SocketPlugin.a SoundCodecPrims/SoundCodecPrims.a
> >>>>>SoundGenerationPlugin/SoundGenerationPlugin.a
> >>>>>SoundPlugin/SoundPlugin.a StarSqueakPlugin/StarSqueakPlugin.a
> >>>>>SurfacePlugin/SurfacePlugin.a
> >>>>>VMProfileLinuxSupportPlugin/VMProfileLinuxSupportPlugin.a -lutil
> >>>>>-ldl -lpthread -lm -lnsl -lpthread -luuid vm/vm.a
> >>>>>vm/vm.a(sqNamedPrims.o):(.data+0x2c): undefined reference to
> >>>>>`DESPlugin_exports'
> >>>>>vm/vm.a(sqNamedPrims.o):(.data+0x34): undefined reference to
> >>>>>`MD5Plugin_exports'
> >>>>>vm/vm.a(sqNamedPrims.o):(.data+0x38): undefined reference to
> >>>>>`SHA256Plugin_exports'
> >>>>>collect2: error: ld returned 1 exit status
> >>>>>Makefile:180: recipe for target 'squeak' failed
> >>>>>make: *** [squeak] Error 1
> >>>>>
> 



More information about the Vm-dev mailing list