building Cog / FFiPrims plgin on windows

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

building Cog / FFiPrims plgin on windows

Alain rastoul
Hi

I downloaded the Cog trunk , the last FFI version from Monticello, used the
workspace script to generate the source and build Cog on Windows with
cygwin (gcc 4.5.1).
Every thing is ok, but the FFI plugin doesn't work.
When I evaluate Win32Window class>>coloredEllipses
I have SmallInteger(Object)>>doesNotUnderstand: #getHDCDuring:
Win32Window getFocus evaluates to a integer handle, not a Win32Window.
I did
(Smalltalk at: #ExternalType) initialize.
(Smalltalk at: #ExternalStructure) compileAllFields.
and also tryed to build only the plugin with Mingw gcc 2.95.2
but I have allways the same problem

Is  the FFI plugin functional ? am I missing something ?
What version of gcc is ok ?
(the make  CC=gcc-3 LD=gcc-3 DLLWRAP='dllwrap -mno-cygwin --driver-name
gcc-3'
doesn't work)


Thanks,

Regards,
Alain




Reply | Threaded
Open this post in threaded view
|

Re: building Cog / FFiPrims plgin on windows

Levente Uzonyi-2
On Sat, 30 Oct 2010, Alain_Rastoul wrote:

> Hi
>
> I downloaded the Cog trunk , the last FFI version from Monticello, used the
> workspace script to generate the source and build Cog on Windows with
> cygwin (gcc 4.5.1).

The Cog VMMaker image includes a different FFI implementation (with
compatible API), so if you don't load FFI from source.squeak.org then
you'll get a working FFI.


Levente

> Every thing is ok, but the FFI plugin doesn't work.
> When I evaluate Win32Window class>>coloredEllipses
> I have SmallInteger(Object)>>doesNotUnderstand: #getHDCDuring:
> Win32Window getFocus evaluates to a integer handle, not a Win32Window.
> I did
> (Smalltalk at: #ExternalType) initialize.
> (Smalltalk at: #ExternalStructure) compileAllFields.
> and also tryed to build only the plugin with Mingw gcc 2.95.2
> but I have allways the same problem
>
> Is  the FFI plugin functional ? am I missing something ?
> What version of gcc is ok ?
> (the make  CC=gcc-3 LD=gcc-3 DLLWRAP='dllwrap -mno-cygwin --driver-name
> gcc-3'
> doesn't work)
>
>
> Thanks,
>
> Regards,
> Alain
>
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: building Cog / FFiPrims plgin on windows

Alain rastoul
Thanks Levente,
I have seen lot of discussions about alien FFI, is it what you are talking
about ?
or is there another Cog FFI package somewhere else ?

Just to mention it, I had to modify some (few minors) incorrect
declarations in sq.h, HostWindowPlugin.h and sqWin32Backtrace.c in order to
compile
with gcc 4.5.


"Levente Uzonyi" <[hidden email]> a écrit dans le message de news:
[hidden email]...

> On Sat, 30 Oct 2010, Alain_Rastoul wrote:
>
>> Hi
>>
>> I downloaded the Cog trunk , the last FFI version from Monticello, used
>> the
>> workspace script to generate the source and build Cog on Windows with
>> cygwin (gcc 4.5.1).
>
> The Cog VMMaker image includes a different FFI implementation (with
> compatible API), so if you don't load FFI from source.squeak.org then
> you'll get a working FFI.
>
>
> Levente
>
>> Every thing is ok, but the FFI plugin doesn't work.
>> When I evaluate Win32Window class>>coloredEllipses
>> I have SmallInteger(Object)>>doesNotUnderstand: #getHDCDuring:
>> Win32Window getFocus evaluates to a integer handle, not a Win32Window.
>> I did
>> (Smalltalk at: #ExternalType) initialize.
>> (Smalltalk at: #ExternalStructure) compileAllFields.
>> and also tryed to build only the plugin with Mingw gcc 2.95.2
>> but I have allways the same problem
>>
>> Is  the FFI plugin functional ? am I missing something ?
>> What version of gcc is ok ?
>> (the make  CC=gcc-3 LD=gcc-3 DLLWRAP='dllwrap -mno-cygwin --driver-name
>> gcc-3'
>> doesn't work)
>>
>>
>> Thanks,
>>
>> Regards,
>> Alain
>>
>>
>>
>>
>>
>
>




Reply | Threaded
Open this post in threaded view
|

Re: building Cog / FFiPrims plgin on windows

Levente Uzonyi-2
On Sun, 31 Oct 2010, Alain_Rastoul wrote:

> Thanks Levente,
> I have seen lot of discussions about alien FFI, is it what you are talking
> about ?
> or is there another Cog FFI package somewhere else ?

For building CogVM you should use the existing plugin code in the Cog
VMMaker image (so don't load anything there).
To use FFI you should load the code available at
http://source.squeak.org/FFI .
Cog FFI is not Alien FFI, AFAIK it's a modified/extended version of the
original FFI.

>
> Just to mention it, I had to modify some (few minors) incorrect
> declarations in sq.h, HostWindowPlugin.h and sqWin32Backtrace.c in order to
> compile
> with gcc 4.5.

I doubt anyone tested it using gcc 4.5, so there may be problems. The
"official" windows build uses gcc 3.4.4. You can get the current latest
build here:
http://www.mirandabanda.org/files/Cog/VM/VM.r2316/cogwin.zip .


Levente

snip

Reply | Threaded
Open this post in threaded view
|

Re: building Cog / FFiPrims plgin on windows

Eliot Miranda-2
In reply to this post by Alain rastoul
Hi Alain,

On Sun, Oct 31, 2010 at 10:16 AM, Alain_Rastoul <[hidden email]> wrote:
Thanks Levente,
I have seen lot of discussions about alien FFI, is it what you are talking
about ?
or is there another Cog FFI package somewhere else ?

As Levente explained Cog has a different but compatible implementation.  You should use the source produced by the ReentrantIA32FFIPlugin (which will still produce code in src/plugins/SqueakFFIPrims/SqueakFFIPrims.c and depends on the support code only in http://www.squeakvm.org/svn/squeak/branches/Cog/platforms/Cross/plugins/SqueakFFIPrims, not the platform-specigic directories (e.g. platforms/unix/plugins/SqueakFFIPrims platforms/win32/plugins/SqueakFFIPrims which is not used).
 

Just to mention it, I had to modify some (few minors) incorrect
declarations in sq.h, HostWindowPlugin.h and sqWin32Backtrace.c in order to
compile
with gcc 4.5.

can you send me these changes?

TIA
Eliot
 


"Levente Uzonyi" <[hidden email]> a écrit dans le message de news:
[hidden email]...
> On Sat, 30 Oct 2010, Alain_Rastoul wrote:
>
>> Hi
>>
>> I downloaded the Cog trunk , the last FFI version from Monticello, used
>> the
>> workspace script to generate the source and build Cog on Windows with
>> cygwin (gcc 4.5.1).
>
> The Cog VMMaker image includes a different FFI implementation (with
> compatible API), so if you don't load FFI from source.squeak.org then
> you'll get a working FFI.
>
>
> Levente
>
>> Every thing is ok, but the FFI plugin doesn't work.
>> When I evaluate Win32Window class>>coloredEllipses
>> I have SmallInteger(Object)>>doesNotUnderstand: #getHDCDuring:
>> Win32Window getFocus evaluates to a integer handle, not a Win32Window.
>> I did
>> (Smalltalk at: #ExternalType) initialize.
>> (Smalltalk at: #ExternalStructure) compileAllFields.
>> and also tryed to build only the plugin with Mingw gcc 2.95.2
>> but I have allways the same problem
>>
>> Is  the FFI plugin functional ? am I missing something ?
>> What version of gcc is ok ?
>> (the make  CC=gcc-3 LD=gcc-3 DLLWRAP='dllwrap -mno-cygwin --driver-name
>> gcc-3'
>> doesn't work)
>>
>>
>> Thanks,
>>
>> Regards,
>> Alain
>>
>>
>>
>>
>>
>
>







Reply | Threaded
Open this post in threaded view
|

Re: Re: building Cog / FFiPrims plgin on windows

Alain rastoul
Thanks Eliot
 
I'll try this
 
The changes are perhaps not the best one, (although it works except FFI)
there may be a problem elsewhere:
sq.h line 480, changed  usqInt desiredHeapSize to: sqInt desiredHeapSize
(may be it should have been changed in gcc3x-cointerp.c)
 
sqWin32BackTrace.c : misplaced declarations in the body of functions
in get_modules , compute_dll_symbols and compute_exe_symbols
 
in HostWindowPlugin.h changed unsigned char *dispBitsIndex to unsigned  *dispBitsIndex.
(not sure this is good place to change here too)
 
Regards,
Alain
 
"Eliot Miranda" <[hidden email]> a écrit dans le message de news: [hidden email]...
Hi Alain,

On Sun, Oct 31, 2010 at 10:16 AM, Alain_Rastoul <[hidden email]> wrote:
Thanks Levente,
I have seen lot of discussions about alien FFI, is it what you are talking
about ?
or is there another Cog FFI package somewhere else ?

As Levente explained Cog has a different but compatible implementation.  You should use the source produced by the ReentrantIA32FFIPlugin (which will still produce code in src/plugins/SqueakFFIPrims/SqueakFFIPrims.c and depends on the support code only in http://www.squeakvm.org/svn/squeak/branches/Cog/platforms/Cross/plugins/SqueakFFIPrims, not the platform-specigic directories (e.g. platforms/unix/plugins/SqueakFFIPrims platforms/win32/plugins/SqueakFFIPrims which is not used).
 

Just to mention it, I had to modify some (few minors) incorrect
declarations in sq.h, HostWindowPlugin.h and sqWin32Backtrace.c in order to
compile
with gcc 4.5.

can you send me these changes?

TIA
Eliot
 


"Levente Uzonyi" <[hidden email]> a écrit dans le message de news:
[hidden email]...
> On Sat, 30 Oct 2010, Alain_Rastoul wrote:

>
>> Hi
>>
>> I downloaded the Cog trunk , the last FFI version from Monticello, used
>> the
>> workspace script to generate the source and build Cog on Windows with
>> cygwin (gcc 4.5.1).
>
> The Cog VMMaker image includes a different FFI implementation (with
> compatible API), so if you don't load FFI from source.squeak.org then
> you'll get a working FFI.
>
>
> Levente
>
>> Every thing is ok, but the FFI plugin doesn't work.
>> When I evaluate Win32Window class>>coloredEllipses
>> I have SmallInteger(Object)>>doesNotUnderstand: #getHDCDuring:
>> Win32Window getFocus evaluates to a integer handle, not a Win32Window.
>> I did
>> (Smalltalk at: #ExternalType) initialize.
>> (Smalltalk at: #ExternalStructure) compileAllFields.
>> and also tryed to build only the plugin with Mingw gcc 2.95.2
>> but I have allways the same problem
>>
>> Is  the FFI plugin functional ? am I missing something ?
>> What version of gcc is ok ?
>> (the make  CC=gcc-3 LD=gcc-3 DLLWRAP='dllwrap -mno-cygwin --driver-name
>> gcc-3'
>> doesn't work)
>>
>>
>> Thanks,
>>
>> Regards,
>> Alain
>>
>>
>>
>>
>>
>
>










HostWindowPlugin.h (4K) Download Attachment
sq.h (23K) Download Attachment
sqWin32Backtrace.c (16K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Re: building Cog / FFiPrims plgin on windows

Alain rastoul
In reply to this post by Levente Uzonyi-2
Thank you Levente

I've loaded FFI with monticello repository from the place you mentioned.
I didn't know that the cygwin toolchain was here, I download it and I'll try
again.

Thanks again

Alain

"Levente Uzonyi" <[hidden email]> a écrit dans le message de news:
[hidden email]...

> On Sun, 31 Oct 2010, Alain_Rastoul wrote:
>
>> Thanks Levente,
>> I have seen lot of discussions about alien FFI, is it what you are
>> talking
>> about ?
>> or is there another Cog FFI package somewhere else ?
>
> For building CogVM you should use the existing plugin code in the Cog
> VMMaker image (so don't load anything there).
> To use FFI you should load the code available at
> http://source.squeak.org/FFI .
> Cog FFI is not Alien FFI, AFAIK it's a modified/extended version of the
> original FFI.
>
>>
>> Just to mention it, I had to modify some (few minors) incorrect
>> declarations in sq.h, HostWindowPlugin.h and sqWin32Backtrace.c in order
>> to
>> compile
>> with gcc 4.5.
>
> I doubt anyone tested it using gcc 4.5, so there may be problems. The
> "official" windows build uses gcc 3.4.4. You can get the current latest
> build here: http://www.mirandabanda.org/files/Cog/VM/VM.r2316/cogwin.zip .
>
>
> Levente
>
> snip
>
>




Reply | Threaded
Open this post in threaded view
|

Re: Re: building Cog / FFiPrims plgin on windows

Alain rastoul
I didn"t understood your last message there was not toolchain here .. this
turn to be an obsession ;-).
but  it is interesting, the last build of cog/ff has the same problem than
my build:

When I evaluate Win32Window class>>coloredEllipses
I have SmallInteger(Object)>>doesNotUnderstand: #getHDCDuring:

Win32Window getFocus evaluates to a integer handle, not a Win32Window.
:o(


Regards,

Alain


"Alain_Rastoul" <[hidden email]> a écrit dans le message de news:
iakprr$ln1$[hidden email]...

> Thank you Levente
>
> I've loaded FFI with monticello repository from the place you mentioned.
> I didn't know that the cygwin toolchain was here, I download it and I'll
> try again.
>
> Thanks again
>
> Alain
>
> "Levente Uzonyi" <[hidden email]> a écrit dans le message de news:
> [hidden email]...
>> On Sun, 31 Oct 2010, Alain_Rastoul wrote:
>>
>>> Thanks Levente,
>>> I have seen lot of discussions about alien FFI, is it what you are
>>> talking
>>> about ?
>>> or is there another Cog FFI package somewhere else ?
>>
>> For building CogVM you should use the existing plugin code in the Cog
>> VMMaker image (so don't load anything there).
>> To use FFI you should load the code available at
>> http://source.squeak.org/FFI .
>> Cog FFI is not Alien FFI, AFAIK it's a modified/extended version of the
>> original FFI.
>>
>>>
>>> Just to mention it, I had to modify some (few minors) incorrect
>>> declarations in sq.h, HostWindowPlugin.h and sqWin32Backtrace.c in order
>>> to
>>> compile
>>> with gcc 4.5.
>>
>> I doubt anyone tested it using gcc 4.5, so there may be problems. The
>> "official" windows build uses gcc 3.4.4. You can get the current latest
>> build here: http://www.mirandabanda.org/files/Cog/VM/VM.r2316/cogwin.zip 
>> .
>>
>>
>> Levente
>>
>> snip
>>
>>
>
>
>
>
>




Reply | Threaded
Open this post in threaded view
|

Re: Re: building Cog / FFiPrims plgin on windows

Levente Uzonyi-2
On Mon, 1 Nov 2010, Alain_Rastoul wrote:

> I didn"t understood your last message there was not toolchain here .. this
> turn to be an obsession ;-).

I didn't mention any toolchain, but you only need cygwin.

> but  it is interesting, the last build of cog/ff has the same problem than
> my build:
>
> When I evaluate Win32Window class>>coloredEllipses
> I have SmallInteger(Object)>>doesNotUnderstand: #getHDCDuring:
>
> Win32Window getFocus evaluates to a integer handle, not a Win32Window.
> :o(

Erm. If you loaded the FFI from monticello as you described in your last
mail, then it won't work. You should not load any FFI into the Cog VMMaker
image. The image contains a working FFI. If you load another, then it will
break.


Levente

>
>
> Regards,
>
> Alain
>
>
> "Alain_Rastoul" <[hidden email]> a écrit dans le message de news:
> iakprr$ln1$[hidden email]...
>> Thank you Levente
>>
>> I've loaded FFI with monticello repository from the place you mentioned.
>> I didn't know that the cygwin toolchain was here, I download it and I'll
>> try again.
>>
>> Thanks again
>>
>> Alain
>>
>> "Levente Uzonyi" <[hidden email]> a écrit dans le message de news:
>> [hidden email]...
>>> On Sun, 31 Oct 2010, Alain_Rastoul wrote:
>>>
>>>> Thanks Levente,
>>>> I have seen lot of discussions about alien FFI, is it what you are
>>>> talking
>>>> about ?
>>>> or is there another Cog FFI package somewhere else ?
>>>
>>> For building CogVM you should use the existing plugin code in the Cog
>>> VMMaker image (so don't load anything there).
>>> To use FFI you should load the code available at
>>> http://source.squeak.org/FFI .
>>> Cog FFI is not Alien FFI, AFAIK it's a modified/extended version of the
>>> original FFI.
>>>
>>>>
>>>> Just to mention it, I had to modify some (few minors) incorrect
>>>> declarations in sq.h, HostWindowPlugin.h and sqWin32Backtrace.c in order
>>>> to
>>>> compile
>>>> with gcc 4.5.
>>>
>>> I doubt anyone tested it using gcc 4.5, so there may be problems. The
>>> "official" windows build uses gcc 3.4.4. You can get the current latest
>>> build here: http://www.mirandabanda.org/files/Cog/VM/VM.r2316/cogwin.zip
>>> .
>>>
>>>
>>> Levente
>>>
>>> snip
>>>
>>>
>>
>>
>>
>>
>>
>
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: building Cog / FFiPrims plgin on windows

Alain rastoul
I wanted to load ODBC package and ExternalStructure was undefined so
I loaded FFI that contains it.
How can I load this package ?

Thank you for your answer

alain


"Levente Uzonyi" <[hidden email]> a écrit dans le message de news:
[hidden email]...
On Mon, 1 Nov 2010, Alain_Rastoul wrote:

> I didn"t understood your last message there was not toolchain here .. this
> turn to be an obsession ;-).

I didn't mention any toolchain, but you only need cygwin.

> but  it is interesting, the last build of cog/ff has the same problem than
> my build:
>
> When I evaluate Win32Window class>>coloredEllipses
> I have SmallInteger(Object)>>doesNotUnderstand: #getHDCDuring:
>
> Win32Window getFocus evaluates to a integer handle, not a Win32Window.
> :o(

Erm. If you loaded the FFI from monticello as you described in your last
mail, then it won't work. You should not load any FFI into the Cog VMMaker
image. The image contains a working FFI. If you load another, then it will
break.


Levente

>
>
> Regards,
>
> Alain
>
>
> "Alain_Rastoul" <[hidden email]> a écrit dans le message de news:
> iakprr$ln1$[hidden email]...
>> Thank you Levente
>>
>> I've loaded FFI with monticello repository from the place you mentioned.
>> I didn't know that the cygwin toolchain was here, I download it and I'll
>> try again.
>>
>> Thanks again
>>
>> Alain
>>
>> "Levente Uzonyi" <[hidden email]> a écrit dans le message de news:
>> [hidden email]...
>>> On Sun, 31 Oct 2010, Alain_Rastoul wrote:
>>>
>>>> Thanks Levente,
>>>> I have seen lot of discussions about alien FFI, is it what you are
>>>> talking
>>>> about ?
>>>> or is there another Cog FFI package somewhere else ?
>>>
>>> For building CogVM you should use the existing plugin code in the Cog
>>> VMMaker image (so don't load anything there).
>>> To use FFI you should load the code available at
>>> http://source.squeak.org/FFI .
>>> Cog FFI is not Alien FFI, AFAIK it's a modified/extended version of the
>>> original FFI.
>>>
>>>>
>>>> Just to mention it, I had to modify some (few minors) incorrect
>>>> declarations in sq.h, HostWindowPlugin.h and sqWin32Backtrace.c in
>>>> order
>>>> to
>>>> compile
>>>> with gcc 4.5.
>>>
>>> I doubt anyone tested it using gcc 4.5, so there may be problems. The
>>> "official" windows build uses gcc 3.4.4. You can get the current latest
>>> build here: http://www.mirandabanda.org/files/Cog/VM/VM.r2316/cogwin.zip
>>> .
>>>
>>>
>>> Levente
>>>
>>> snip
>>>
>>>
>>
>>
>>
>>
>>
>
>
>
>
>


--------------------------------------------------------------------------------


>
>




Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: building Cog / FFiPrims plgin on windows

Levente Uzonyi-2
On Tue, 2 Nov 2010, Alain_Rastoul wrote:

> I wanted to load ODBC package and ExternalStructure was undefined so
> I loaded FFI that contains it.
> How can I load this package ?

Open your image and evaluate this script:

Installer squeak
  project: 'FFI';
  install: 'FFI-Pools';
  install: 'FFI-Kernel';
  install: 'FFI-Tests';
  install: 'FFI-Win32';
  install: 'FFI-MacOS';
  install: 'FFI-Unix'.
Installer squeaksource
  project: 'ODBC';
  install: 'ODBC'.


Levente

>
> Thank you for your answer
>
> alain
>
>
> "Levente Uzonyi" <[hidden email]> a écrit dans le message de news:
> [hidden email]...
> On Mon, 1 Nov 2010, Alain_Rastoul wrote:
>
>> I didn"t understood your last message there was not toolchain here .. this
>> turn to be an obsession ;-).
>
> I didn't mention any toolchain, but you only need cygwin.
>
>> but  it is interesting, the last build of cog/ff has the same problem than
>> my build:
>>
>> When I evaluate Win32Window class>>coloredEllipses
>> I have SmallInteger(Object)>>doesNotUnderstand: #getHDCDuring:
>>
>> Win32Window getFocus evaluates to a integer handle, not a Win32Window.
>> :o(
>
> Erm. If you loaded the FFI from monticello as you described in your last
> mail, then it won't work. You should not load any FFI into the Cog VMMaker
> image. The image contains a working FFI. If you load another, then it will
> break.
>
>
> Levente
>
>>
>>
>> Regards,
>>
>> Alain
>>
>>
>> "Alain_Rastoul" <[hidden email]> a écrit dans le message de news:
>> iakprr$ln1$[hidden email]...
>>> Thank you Levente
>>>
>>> I've loaded FFI with monticello repository from the place you mentioned.
>>> I didn't know that the cygwin toolchain was here, I download it and I'll
>>> try again.
>>>
>>> Thanks again
>>>
>>> Alain
>>>
>>> "Levente Uzonyi" <[hidden email]> a écrit dans le message de news:
>>> [hidden email]...
>>>> On Sun, 31 Oct 2010, Alain_Rastoul wrote:
>>>>
>>>>> Thanks Levente,
>>>>> I have seen lot of discussions about alien FFI, is it what you are
>>>>> talking
>>>>> about ?
>>>>> or is there another Cog FFI package somewhere else ?
>>>>
>>>> For building CogVM you should use the existing plugin code in the Cog
>>>> VMMaker image (so don't load anything there).
>>>> To use FFI you should load the code available at
>>>> http://source.squeak.org/FFI .
>>>> Cog FFI is not Alien FFI, AFAIK it's a modified/extended version of the
>>>> original FFI.
>>>>
>>>>>
>>>>> Just to mention it, I had to modify some (few minors) incorrect
>>>>> declarations in sq.h, HostWindowPlugin.h and sqWin32Backtrace.c in
>>>>> order
>>>>> to
>>>>> compile
>>>>> with gcc 4.5.
>>>>
>>>> I doubt anyone tested it using gcc 4.5, so there may be problems. The
>>>> "official" windows build uses gcc 3.4.4. You can get the current latest
>>>> build here: http://www.mirandabanda.org/files/Cog/VM/VM.r2316/cogwin.zip
>>>> .
>>>>
>>>>
>>>> Levente
>>>>
>>>> snip
>>>>
>>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>>
>
>
> --------------------------------------------------------------------------------
>
>
>>
>>
>
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: building Cog / FFiPrims plgin on windows

Alain rastoul
(back from work)
After having installed the Installer package, the installation didn't work .
I changed the line in your script with (Installer monticello http:
'http://source.squeak.org/' ;
) because it seems that is no package at squeasource  but at source.squeak
(?)
BTW is did nothing, the same for ODBC,
so I downloaded the files and loaded them with a File List browser.
But It still gives me the same error (SmallInteger does not undestand
getHDCDuring ...)
I wonder if there are some initializations missing when loading files
instead of an Installer package.

Thanks again for the time you spend answering me.

Regards
Alain

"Levente Uzonyi" <[hidden email]> a écrit dans le message de news:
[hidden email]...
On Tue, 2 Nov 2010, Alain_Rastoul wrote:

> I wanted to load ODBC package and ExternalStructure was undefined so
> I loaded FFI that contains it.
> How can I load this package ?

Open your image and evaluate this script:

Installer squeak
  project: 'FFI';
  install: 'FFI-Pools';
  install: 'FFI-Kernel';
  install: 'FFI-Tests';
  install: 'FFI-Win32';
  install: 'FFI-MacOS';
  install: 'FFI-Unix'.
Installer squeaksource
  project: 'ODBC';
  install: 'ODBC'.


Levente

>
> Thank you for your answer
>
> alain
>
>
> "Levente Uzonyi" <[hidden email]> a écrit dans le message de news:
> [hidden email]...
> On Mon, 1 Nov 2010, Alain_Rastoul wrote:
>
>> I didn"t understood your last message there was not toolchain here ..
>> this
>> turn to be an obsession ;-).
>
> I didn't mention any toolchain, but you only need cygwin.
>
>> but  it is interesting, the last build of cog/ff has the same problem
>> than
>> my build:
>>
>> When I evaluate Win32Window class>>coloredEllipses
>> I have SmallInteger(Object)>>doesNotUnderstand: #getHDCDuring:
>>
>> Win32Window getFocus evaluates to a integer handle, not a Win32Window.
>> :o(
>
> Erm. If you loaded the FFI from monticello as you described in your last
> mail, then it won't work. You should not load any FFI into the Cog VMMaker
> image. The image contains a working FFI. If you load another, then it will
> break.
>
>
> Levente
>
>>
>>
>> Regards,
>>
>> Alain
>>
>>
>> "Alain_Rastoul" <[hidden email]> a écrit dans le message de news:
>> iakprr$ln1$[hidden email]...
>>> Thank you Levente
>>>
>>> I've loaded FFI with monticello repository from the place you mentioned.
>>> I didn't know that the cygwin toolchain was here, I download it and I'll
>>> try again.
>>>
>>> Thanks again
>>>
>>> Alain
>>>
>>> "Levente Uzonyi" <[hidden email]> a écrit dans le message de news:
>>> [hidden email]...
>>>> On Sun, 31 Oct 2010, Alain_Rastoul wrote:
>>>>
>>>>> Thanks Levente,
>>>>> I have seen lot of discussions about alien FFI, is it what you are
>>>>> talking
>>>>> about ?
>>>>> or is there another Cog FFI package somewhere else ?
>>>>
>>>> For building CogVM you should use the existing plugin code in the Cog
>>>> VMMaker image (so don't load anything there).
>>>> To use FFI you should load the code available at
>>>> http://source.squeak.org/FFI .
>>>> Cog FFI is not Alien FFI, AFAIK it's a modified/extended version of the
>>>> original FFI.
>>>>
>>>>>
>>>>> Just to mention it, I had to modify some (few minors) incorrect
>>>>> declarations in sq.h, HostWindowPlugin.h and sqWin32Backtrace.c in
>>>>> order
>>>>> to
>>>>> compile
>>>>> with gcc 4.5.
>>>>
>>>> I doubt anyone tested it using gcc 4.5, so there may be problems. The
>>>> "official" windows build uses gcc 3.4.4. You can get the current latest
>>>> build here:
>>>> http://www.mirandabanda.org/files/Cog/VM/VM.r2316/cogwin.zip
>>>> .
>>>>
>>>>
>>>> Levente
>>>>
>>>> snip
>>>>
>>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>>
>
>
> --------------------------------------------------------------------------------
>
>
>>
>>
>
>
>
>
>


--------------------------------------------------------------------------------


>
>




Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: building Cog / FFiPrims plgin on windows

Levente Uzonyi-2
On Tue, 2 Nov 2010, Alain_Rastoul wrote:

> (back from work)
> After having installed the Installer package, the installation didn't work .

Isn't Installer in your image? Which image do you use?

> I changed the line in your script with (Installer monticello http:
> 'http://source.squeak.org/' ;
> ) because it seems that is no package at squeasource  but at source.squeak
> (?)
> BTW is did nothing, the same for ODBC,
> so I downloaded the files and loaded them with a File List browser.
> But It still gives me the same error (SmallInteger does not undestand
> getHDCDuring ...)
> I wonder if there are some initializations missing when loading files
> instead of an Installer package.

Which VM do you use?


Levente

snip

Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: building Cog / FFiPrims plgin onwindows

Alain rastoul
The VM image/changes  files have been downloaded from the Cog trunk
(http://www.squeakvm.org/svn/squeak/branches/Cog/image)
and I use the Croquet.exe I've built (I had the same problem with the distro
link you
gave : http://www.mirandabanda.org/files/Cog/VM/VM.r2316/cogwin.zip .).
and there is no Installer (SarInstaller and MczInstaller but different
methhods)

Another very simple test that fails is
Win32Utils getEnvironmentVariable: 'windir'

Regards


"Levente Uzonyi" <[hidden email]> a écrit dans le message de news:
[hidden email]...

> On Tue, 2 Nov 2010, Alain_Rastoul wrote:
>
>> (back from work)
>> After having installed the Installer package, the installation didn't
>> work .
>
> Isn't Installer in your image? Which image do you use?
>
>> I changed the line in your script with (Installer monticello http:
>> 'http://source.squeak.org/' ;
>> ) because it seems that is no package at squeasource  but at
>> source.squeak
>> (?)
>> BTW is did nothing, the same for ODBC,
>> so I downloaded the files and loaded them with a File List browser.
>> But It still gives me the same error (SmallInteger does not undestand
>> getHDCDuring ...)
>> I wonder if there are some initializations missing when loading files
>> instead of an Installer package.
>
> Which VM do you use?
>
>
> Levente
>
> snip
>
>




Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: building Cog / FFiPrims plgin onwindows

Igor Stasenko
On 3 November 2010 22:45, Alain_Rastoul <[hidden email]> wrote:

> The VM image/changes  files have been downloaded from the Cog trunk
> (http://www.squeakvm.org/svn/squeak/branches/Cog/image)
> and I use the Croquet.exe I've built (I had the same problem with the distro
> link you
> gave : http://www.mirandabanda.org/files/Cog/VM/VM.r2316/cogwin.zip .).
> and there is no Installer (SarInstaller and MczInstaller but different
> methhods)
>
> Another very simple test that fails is
> Win32Utils getEnvironmentVariable: 'windir'
>

That image is used mainly to host Cog VMMaker, and not much userful
for anything else than just building VM.
Please, use 'official' squeak images , like here:
http://ftp.squeak.org/current_stable/
or here:
http://ftp.squeak.org/trunk/

> Regards
>
>
> "Levente Uzonyi" <[hidden email]> a écrit dans le message de news:
> [hidden email]...
>> On Tue, 2 Nov 2010, Alain_Rastoul wrote:
>>
>>> (back from work)
>>> After having installed the Installer package, the installation didn't
>>> work .
>>
>> Isn't Installer in your image? Which image do you use?
>>
>>> I changed the line in your script with (Installer monticello http:
>>> 'http://source.squeak.org/' ;
>>> ) because it seems that is no package at squeasource  but at
>>> source.squeak
>>> (?)
>>> BTW is did nothing, the same for ODBC,
>>> so I downloaded the files and loaded them with a File List browser.
>>> But It still gives me the same error (SmallInteger does not undestand
>>> getHDCDuring ...)
>>> I wonder if there are some initializations missing when loading files
>>> instead of an Installer package.
>>
>> Which VM do you use?
>>
>>
>> Levente
>>
>> snip
>>
>>
>
>
>
>
>



--
Best regards,
Igor Stasenko AKA sig.

Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Re: building Cog / FFiPrims plginonwindows

Alain rastoul
Thank you

"Igor Stasenko" <[hidden email]> a écrit dans le message de news:
AANLkTik1c7t53Qdv3+1PDzNmcyC=[hidden email]...
On 3 November 2010 22:45, Alain_Rastoul <[hidden email]> wrote:

> The VM image/changes files have been downloaded from the Cog trunk
> (http://www.squeakvm.org/svn/squeak/branches/Cog/image)
> and I use the Croquet.exe I've built (I had the same problem with the
> distro
> link you
> gave : http://www.mirandabanda.org/files/Cog/VM/VM.r2316/cogwin.zip .).
> and there is no Installer (SarInstaller and MczInstaller but different
> methhods)
>
> Another very simple test that fails is
> Win32Utils getEnvironmentVariable: 'windir'
>

That image is used mainly to host Cog VMMaker, and not much userful
for anything else than just building VM.
Please, use 'official' squeak images , like here:
http://ftp.squeak.org/current_stable/
or here:
http://ftp.squeak.org/trunk/

> Regards
>
>
> "Levente Uzonyi" <[hidden email]> a écrit dans le message de news:
> [hidden email]...
>> On Tue, 2 Nov 2010, Alain_Rastoul wrote:
>>
>>> (back from work)
>>> After having installed the Installer package, the installation didn't
>>> work .
>>
>> Isn't Installer in your image? Which image do you use?
>>
>>> I changed the line in your script with (Installer monticello http:
>>> 'http://source.squeak.org/' ;
>>> ) because it seems that is no package at squeasource but at
>>> source.squeak
>>> (?)
>>> BTW is did nothing, the same for ODBC,
>>> so I downloaded the files and loaded them with a File List browser.
>>> But It still gives me the same error (SmallInteger does not undestand
>>> getHDCDuring ...)
>>> I wonder if there are some initializations missing when loading files
>>> instead of an Installer package.
>>
>> Which VM do you use?
>>
>>
>> Levente
>>
>> snip
>>
>>
>
>
>
>
>



--
Best regards,
Igor Stasenko AKA sig.





Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Re: building Cog / FFiPrims plginonwindows

Alain rastoul
In reply to this post by Igor Stasenko
Many thanks Levente, Igor and Elliot !!!
I restarted from the standard image and finally have a working FFI/ODBC with
Cog
(note still Win32Window coloredEllipses doesn't work)

It thought it was better to start from the trunk image and it was a mistake.
Then I loaded NecessaryImageChanges, FFI and ODBC in my squeak 4.1
OneClickImage
and now, I can load data from MSSQL with Cog
it's really super cool
:o)))

Thanks again

Best regards

Alain

"Igor Stasenko" <[hidden email]> a écrit dans le message de news:
AANLkTik1c7t53Qdv3+1PDzNmcyC=[hidden email]...
On 3 November 2010 22:45, Alain_Rastoul <[hidden email]> wrote:

> The VM image/changes files have been downloaded from the Cog trunk
> (http://www.squeakvm.org/svn/squeak/branches/Cog/image)
> and I use the Croquet.exe I've built (I had the same problem with the
> distro
> link you
> gave : http://www.mirandabanda.org/files/Cog/VM/VM.r2316/cogwin.zip .).
> and there is no Installer (SarInstaller and MczInstaller but different
> methhods)
>
> Another very simple test that fails is
> Win32Utils getEnvironmentVariable: 'windir'
>

That image is used mainly to host Cog VMMaker, and not much userful
for anything else than just building VM.
Please, use 'official' squeak images , like here:
http://ftp.squeak.org/current_stable/
or here:
http://ftp.squeak.org/trunk/

> Regards
>
>
> "Levente Uzonyi" <[hidden email]> a écrit dans le message de news:
> [hidden email]...
>> On Tue, 2 Nov 2010, Alain_Rastoul wrote:
>>
>>> (back from work)
>>> After having installed the Installer package, the installation didn't
>>> work .
>>
>> Isn't Installer in your image? Which image do you use?
>>
>>> I changed the line in your script with (Installer monticello http:
>>> 'http://source.squeak.org/' ;
>>> ) because it seems that is no package at squeasource but at
>>> source.squeak
>>> (?)
>>> BTW is did nothing, the same for ODBC,
>>> so I downloaded the files and loaded them with a File List browser.
>>> But It still gives me the same error (SmallInteger does not undestand
>>> getHDCDuring ...)
>>> I wonder if there are some initializations missing when loading files
>>> instead of an Installer package.
>>
>> Which VM do you use?
>>
>>
>> Levente
>>
>> snip
>>
>>
>
>
>
>
>



--
Best regards,
Igor Stasenko AKA sig.





Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Re: building Cog / FFiPrims plginonwindows

Levente Uzonyi-2
On Thu, 4 Nov 2010, Alain_Rastoul wrote:

> Many thanks Levente, Igor and Elliot !!!
> I restarted from the standard image and finally have a working FFI/ODBC with
> Cog
> (note still Win32Window coloredEllipses doesn't work)
>
> It thought it was better to start from the trunk image and it was a mistake.

Why was it a mistake?


Levente

> Then I loaded NecessaryImageChanges, FFI and ODBC in my squeak 4.1
> OneClickImage
> and now, I can load data from MSSQL with Cog
> it's really super cool
> :o)))
>
> Thanks again
>
> Best regards
>
> Alain

snip

Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Re: building Cog / FFiPrims plginonwindows

Levente Uzonyi-2
On Thu, 4 Nov 2010, Levente Uzonyi wrote:

> On Thu, 4 Nov 2010, Alain_Rastoul wrote:
>
>> Many thanks Levente, Igor and Elliot !!!
>> I restarted from the standard image and finally have a working FFI/ODBC
>> with
>> Cog
>> (note still Win32Window coloredEllipses doesn't work)
>>
>> It thought it was better to start from the trunk image and it was a
>> mistake.
>
> Why was it a mistake?

When you say "trunk image" do you mean the Cog VMMaker image from svn, or
an image available here: http://ftp.squeak.org/trunk/


Levente

>
>
> Levente
>
>> Then I loaded NecessaryImageChanges, FFI and ODBC in my squeak 4.1
>> OneClickImage
>> and now, I can load data from MSSQL with Cog
>> it's really super cool
>> :o)))
>>
>> Thanks again
>>
>> Best regards
>>
>> Alain
>
> snip
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Re: Re: building Cog / FFiPrimsplginonwindows

Alain rastoul
Hi Levente

trunk image means the VMMaker image I checked out  with svn

Regards
Alain

"Levente Uzonyi" <[hidden email]> a écrit dans le message de news:
[hidden email]...

> On Thu, 4 Nov 2010, Levente Uzonyi wrote:
>
>> On Thu, 4 Nov 2010, Alain_Rastoul wrote:
>>
>>> Many thanks Levente, Igor and Elliot !!!
>>> I restarted from the standard image and finally have a working FFI/ODBC
>>> with
>>> Cog
>>> (note still Win32Window coloredEllipses doesn't work)
>>>
>>> It thought it was better to start from the trunk image and it was a
>>> mistake.
>>
>> Why was it a mistake?
>
> When you say "trunk image" do you mean the Cog VMMaker image from svn, or
> an image available here: http://ftp.squeak.org/trunk/
>
>
> Levente
>
>>
>>
>> Levente
>>
>>> Then I loaded NecessaryImageChanges, FFI and ODBC in my squeak 4.1
>>> OneClickImage
>>> and now, I can load data from MSSQL with Cog
>>> it's really super cool
>>> :o)))
>>>
>>> Thanks again
>>>
>>> Best regards
>>>
>>> Alain
>>
>> snip
>>
>>
>
>