Re: [fpc-devel] Trunk does not compile on Linux x86-64
Are there available Lazarus snapshots, which are build using current trunk ? If I download Lazarus with FPC 2.7.1 ( for example: ftp://www.hu.freepascal.org/pub/lazarus/snapshots/Lazarus-0.9.31-33000-fpc-2.7.1-20111021-win32.exe ) it seems, that there are not current source files from trunk, but from begining of September ? Thanks -Laco. 2011/10/21 David Welch : is there an svn release number that does compile with 2.4.0 that will get me to 2.4.4 or better so that I can compile the trunk? Guaranteed: Compile http://svn.freepascal.org/svn/fpc/tags/release_2_4_2/ with fpc 2.4.0 to get fpc 2.4.2 Compile http://svn.freepascal.org/svn/fpc/tags/release_2_4_4/ with fpc 2.4.2 to get fpc 2.4.4 Compile http://svn.freepascal.org/svn/fpc/trunk with fpc 2.4.4 to get fpc 2.7.1 IIRC, you have a good chance to the first steps in one go: Compile http://svn.freepascal.org/svn/fpc/tags/release_2_4_4/ with fpc 2.4.0 to get fpc 2.4.4 Vincent ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Trunk does not compile on Linux x86-64
On 21 Oct 2011, at 07:54, Vincent Snijders wrote: > Guaranteed: > Compile http://svn.freepascal.org/svn/fpc/tags/release_2_4_2/ with fpc > 2.4.0 to get fpc 2.4.2 > Compile http://svn.freepascal.org/svn/fpc/tags/release_2_4_4/ with fpc > 2.4.2 to get fpc 2.4.4 > Compile http://svn.freepascal.org/svn/fpc/trunk with fpc 2.4.4 to get fpc > 2.7.1 The last step is currently broken on 64 bit platforms because of r19516 Jonas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Trunk does not compile on Linux x86-64
2011/10/21 LacaK : > Are there available Lazarus snapshots, which are build using current trunk ? > If I download Lazarus with FPC 2.7.1 ( for example: > ftp://www.hu.freepascal.org/pub/lazarus/snapshots/Lazarus-0.9.31-33000-fpc-2.7.1-20111021-win32.exe > ) > it seems, that there are not current source files from trunk, but from > begining of September ? > Thanks Should be fixed in a couple of hours. The working copy got locked and svn cleanup in the fpcbuild directory (executed as part of the build script) didn't unlock the fpcsrc directory, which is an svn:external. Vincent ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
[fpc-devel] cvarutil: convert variant array of bytes into ansistring ?
Hi, I am now working on fcl-db TBinaryField, which has Value: Variant property. As I understand documentation, this variant should be returned as variant array of bytes. Later when are assigning values of fields into params also this variant array is copied (into TParam). But when I want/need read parameter value as string (binary string) then "variant convert error" occurs. It is because in cvarutil.inc in Function VariantToAnsiString(const VargSrc : TVarData) is not supported conversion from variant array into string. So my question is if it is acceptable to add there support for converting byte array to string ? Something like attached diff. Please let me know, if this can be accepted/applied ? Thanks -Laco. --- cvarutil.inc.oriThu Apr 07 06:10:54 2011 +++ cvarutil.incFri Oct 21 11:04:44 2011 @@ -1415,7 +1415,12 @@ begin end else { pointer is nil } VariantTypeMismatch(vType, varString); else { array or something like that } - VariantTypeMismatch(vType, varString); + if (vType and varArray = varArray) and Assigned(vArray) then begin +SetLength(Result, vArray^.Bounds[0].ElementCount * vArray^.ElementSize); +Move(vArray^.Data^, Result[1], length(Result)*sizeof(AnsiChar)); + end + else +VariantTypeMismatch(vType, varString); end; {$IFDEF DEBUG_VARUTILS} if __DEBUG_VARUTILS then begin ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] cvarutil: convert variant array of bytes into ansistring ?
21.10.2011 13:47, LacaK пишет: Hi, I am now working on fcl-db TBinaryField, which has Value: Variant property. As I understand documentation, this variant should be returned as variant array of bytes. Later when are assigning values of fields into params also this variant array is copied (into TParam). But when I want/need read parameter value as string (binary string) then "variant convert error" occurs. It is because in cvarutil.inc in Function VariantToAnsiString(const VargSrc : TVarData) is not supported conversion from variant array into string. So my question is if it is acceptable to add there support for converting byte array to string ? Something like attached diff. Please let me know, if this can be accepted/applied ? It has to be done in a different and more complex way, by using VariantChangeTypeEx to convert the variant(array) to varOleString type, then converting latter to ansistring. This way, in Windows the job will be delegated to OS, which is Delphi compatible. For non-Windows, the relevant code ends up in VariantChangeTypeEx (varutils.inc). Also, you'll need to access the variant array with SafeArray* functions, and make checks that it is actually one-dimensional and its element type is eligible for conversion. Sergei ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
[fpc-devel] Trunk build broken @ mysqlconn.inc
Can't build ./trunk/FPC with starting compiler 2.4.4+ mysql40conn.pas mysqlconn.inc(700,37) Error: Incompatible types: got "pculong" expected "PLongWord" Please fix :-) ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
[fpc-devel] Wrong assembler generated?
Hi, I was experimenting with gtk3 a bit and a simple program was failing to execute properly. It's very simple: gtk_init(@argc, @argv); WType := gtk_window_get_type(); WinClass := g_type_class_ref( WType ); assembler is like so: WType is -0x20(%rbp) 1 004AD18E e875eafeff callq 0x49bc08 2 004AD193 e8a0e5 callq 0x4ab738 3 004AD198 488945e0mov%rax,-0x20(%rbp) 4 004AD19C 488b75e0mov-0x20(%rbp),%rsi 5 004AD1A0 488d7dd8lea-0x28(%rbp),%rdi 6 004AD1A4 e85f4b callq 0x4a1d08 7 004AD1A9 488b45d8mov-0x28(%rbp),%rax 8 004AD1AD 488945f0mov%rax,-0x10(%rbp) 9 004AD1B1 488b45f0mov-0x10(%rbp),%rax shouldn't line 4 be "mov-0x20(%rbp),%rdi" Line 5 shouldn't be there? Line 7 overwrites the returned value before we've copied it anywhere? Here's part of the assembly fpc generated: # [39] begin subq$280,%rsp .Lc7: # Var Win located in register rax # Var WinClass located in register rax # Var P2 located in register rsi # Var WType located in register rsi movq%rbx,264(%rsp) movq%r12,272(%rsp) .Ll12: # [40] gtk_init(@argc, @argv); movq$operatingsystem_parameter_argv,%rsi movq$operatingsystem_parameter_argc,%rdi callgtk_init .Ll13: # [41] WType := gtk_window_get_type(); callgtk_window_get_type movq%rax,%rsi .Ll14: # [42] WinClass:=PGtkWindowClass(g_type_class_ref(WType)); movq%rsp,%rdi callg_type_class_ref movq(%rsp),%rax I've got the same problem with fpc 2.5.1 and 2.7.1. I'll try 2.4.4 as soon as it's downloaded. Same result with 2.4.4 Regards, Andrew Haines ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel