[Vm-dev] Re: Error while compiling

Guillermo Polito guillermopolito at gmail.com
Fri Jan 13 12:18:11 UTC 2012


The defaultExternalPlugins method used by CogUnixNoGLConfig is the one in
CogUnixConfig:

defaultExternalPlugins
    ^ #(
        B3DAcceleratorPlugin
        ThreadedIA32FFIPlugin "SqueakFFIPrims"
        "UUIDPlugin"
        "UnixOSProcessPlugin ?? "
    )

Mariano, yo mean removing the B3DAcceleratorPlugin from the defaults?  And
let the method stay like:

defaultExternalPlugins
    ^ #(
        ThreadedIA32FFIPlugin
    )

I tried that and It worked :)

On Fri, Jan 13, 2012 at 6:14 AM, Mariano Martinez Peck <
marianopeck at gmail.com> wrote:

>
>
>
> On Fri, Jan 13, 2012 at 1:56 AM, Igor Stasenko <siguctua at gmail.com> wrote:
>
>>
>> On 12 January 2012 22:44, Guillermo Polito <guillermopolito at gmail.com>
>> wrote:
>> >
>> > Compiling with CogUnixConfig works... are the class names ok? Or Maybe
>> the No in the NoGL means something different, hehe.
>> >
>>
>> because this config was focused more on building VM binary without
>> linkage to OpenGL libs,
>> so you can start VM without GL libs installed in your system.
>> And  B3DAcceleratorPlugin is built as external module, and there is no
>> restrictions on it.
>>
>> To avoid building it, you need to just exclude it from build, like:
>>
>> | conf |
>> conf := CogUnixNoGLConfig new.
>> conf externalPlugins: (conf externalPlugins copyWithout:
>> #B3DAcceleratorPlugin ).
>> conf generateSources;generate
>>
>
>
> This doesn't look good. The last time I tried this conf (time ago) it was
> working out of the box. If you have to explicitly put B3DAcceleratorPlugin
> as external, it starts to make less sense.
> Guille: if you can change  CogUnixNoGLConfig so that it puts
> B3DAcceleratorPlugin as external by default, and does what Igor mentions
> next..it would be nice!
> And please, if you do, update class comments ;)
>
>
>>
>> but there are some other things needs to be updated, like
>> #addDriver: sources:generator: method which now don't needs to be
>> overridden in subclass,
>> because it can only change #linkFlags
>>
>>
> Ok
>
>
>> > Thanks,
>> > Guille
>> >
>> > On Thu, Jan 12, 2012 at 6:37 PM, Guillermo Polito <
>> guillermopolito at gmail.com> wrote:
>> >>
>> >> BTW, what more annoys me is that I generated the sources with
>> CogUnixNoGLConfig, hehe
>> >>
>> >> Guille
>> >>
>> >>
>> >> On Thu, Jan 12, 2012 at 6:25 PM, Guillermo Polito <
>> guillermopolito at gmail.com> wrote:
>> >>>
>> >>> When I compile the last version of the Vm in my 32bit ubuntu, I get
>> the following:
>> >>>
>> >>> In file included from
>> /home/guille/Dev/Pharo/cogvm/coglinux/blessed/platforms/Cross/plugins/B3DAcceleratorPlugin/sqOpenGLRenderer.c:30:0:
>> >>>
>> /home/guille/Dev/Pharo/cogvm/coglinux/blessed/platforms/Cross/plugins/B3DAcceleratorPlugin/sqOpenGLRenderer.h:13:16:
>> error: redefinition of ‘struct glRenderer’
>> >>>
>> /home/guille/Dev/Pharo/cogvm/coglinux/blessed/platforms/unix/plugins/B3DAcceleratorPlugin/sqUnixOpenGL.h:6:16:
>> note: originally defined here
>> >>>
>> >>>
>> >>> Diving into the code, I found that in sqUnixOpenGL.h there is code
>> like:
>> >>>
>> >>> ...
>> >>>
>> >>> typedef struct glRenderer
>> >>> {
>> >>>   int      bufferRect[4];
>> >>>   int      viewport[4];
>> >>>   int      used;
>> >>>   void     *drawable;
>> >>>   void     *context;
>> >>> } glRenderer;
>> >>>
>> >>> #if defined(USE_X11_GLX) || defined (USE_QUARTZ_CGL)
>> >>>
>> >>> # define GL_RENDERER_DEFINED     1
>> >>> # define MAX_RENDERER        16
>> >>>
>> >>> # if defined(HAVE_GL_GL_H)
>> >>> #   include <GL/gl.h>
>> >>> # else
>> >>> #   if defined(HAVE_OPENGL_GL_H)
>> >>> #     include <OpenGL/gl.h>
>> >>> #   else
>> >>> #     error *** cannot find gl.h
>> >>> #   endif
>> >>> # endif
>> >>>
>> >>> #endif
>> >>>
>> >>> ...
>> >>>
>> >>> Shouldn't the typedef be written inside the #if and #endif?
>> >>> If so, how do I publish the fix?
>> >>>
>> >>> Cheers,
>> >>> Guille
>> >>
>> >>
>> >
>> >
>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko.
>>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20120113/2782da87/attachment.htm


More information about the Vm-dev mailing list