Re: [Lazarus] ./fpcup_linux_x64 won't create lazarus executable
On 24/02/2014 23:52, Allan E. Registos wrote: Anybody who is using fpcup on Ubuntu 12.04 64-bit? Tried installing lazarus through fpcup, it seems the fpcup installer is successful. While it manage to create a lazarus_fpcup shortcut at the desktop, it did not create the lazarus executable in ~/development/lazarus dir. I uninstalled all my fpc/lazarus installations to be sure and installed the required libraries and did a clean install two times but the same problem with no ~/development/lazarus/lazarus executable. Please download a new fpcup binary try again... works for me on x64 debian. Thanks. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] TRTLCriticalSection
Hi Folks. Lazarus 1.0.2, FPC 2.6.2, Win32 and Linux x86_64 Something goes wrong with TRTRCriticalSection. There is a difference between Windows and Linux. In a program which will run on Win32 and Linux x86_64, using threads and all this stuff I need to protect some code from multi-threading access. One critical section looks enough to do the job. So i code this in Win32 and Linux: Interface uses clause is: uses {$IFDEF LINUX} CThreads, {$ENDIF} syncobjs, {$IFDEF MSWINDOWS} windows, {$ENDIF} {$IFDEF LINUX} LCLIntf, {$ENDIF} Classes, IdContext, uSimplelogger, sitacom, MessageQ, autoupdateTCPthread, sqldb, SysUtils; FIniCriticalSection: TRTLCriticalSection; ... InitializeCriticalSection(FIniCriticalSection); - compilation error ... EnterCriticalSection(FIniCriticalSection); try ... do a lot of things finally LeaveCriticalSection(FIniCriticalSection); end ... On the above line marked as compilation error the compiler complains with the message autoupdateserverthread.pas(255,48) Error: Call by var for arg no. 1 has to match exactly: Got TRTLCriticalSection expected QWord *winapi.inc*(650,11) Hint: Found declaration: InitializeCriticalSection(var QWord); winapi ??? Why on Linux ? No way to get rid of this compilation error In Win32 the program compiles and runs without errors. Some help would be appreciated. Antonio. --- Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active. http://www.avast.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TRTLCriticalSection
On 25/02/14 12:22, Antonio Fortuny wrote: Hi Folks. Lazarus 1.0.2, FPC 2.6.2, Win32 and Linux x86_64 That's an old Lazarus version. Did you test with the most recent one? Something goes wrong with TRTRCriticalSection. There is a difference between Windows and Linux. In a program which will run on Win32 and Linux x86_64, using threads and all this stuff I need to protect some code from multi-threading access. One critical section looks enough to do the job. So i code this in Win32 and Linux: Interface uses clause is: uses {$IFDEF LINUX} CThreads, {$ENDIF} syncobjs, {$IFDEF MSWINDOWS} windows, {$ENDIF} {$IFDEF LINUX} LCLIntf, {$ENDIF} Classes, IdContext, uSimplelogger, sitacom, MessageQ, autoupdateTCPthread, sqldb, SysUtils; FIniCriticalSection: TRTLCriticalSection; ... InitializeCriticalSection(FIniCriticalSection); - compilation error ... EnterCriticalSection(FIniCriticalSection); try ... do a lot of things finally LeaveCriticalSection(FIniCriticalSection); end ... On the above line marked as compilation error the compiler complains with the message autoupdateserverthread.pas(255,48) Error: Call by var for arg no. 1 has to match exactly: Got TRTLCriticalSection expected QWord Try putting syncobjs after LCLIntf in the uses section. What you're seeing may be related to bug report http://bugs.freepascal.org/view.php?id=25187 *winapi.inc*(650,11) Hint: Found declaration: InitializeCriticalSection(var QWord); winapi ??? Why on Linux ? No way to get rid of this compilation error In Win32 the program compiles and runs without errors. Some help would be appreciated. This is odd. What is the output of View/IDE Internals/About FPC and About IDE? Stephano -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TRTLCriticalSection
On Tue, 25 Feb 2014 11:22:57 +0100 Antonio Fortuny a.fort...@sitasoftware.lu wrote: [...] FIniCriticalSection: TRTLCriticalSection; ... InitializeCriticalSection(FIniCriticalSection); - compilation error A TRTLCriticalSection is initialized with InitCriticalSection from the system unit. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TRTLCriticalSection
Am 25.02.2014 11:22, schrieb Antonio Fortuny: Hi Folks. Lazarus 1.0.2, FPC 2.6.2, Win32 and Linux x86_64 Something goes wrong with TRTRCriticalSection. There is a difference between Windows and Linux. In a program which will run on Win32 and Linux x86_64, using threads and all this stuff I need to protect some code from multi-threading access. One critical section looks enough to do the job. So i code this in Win32 and Linux: [snip] On the above line marked as compilation error the compiler complains with the message autoupdateserverthread.pas(255,48) Error: Call by var for arg no. 1 has to match exactly: Got TRTLCriticalSection expected QWord *winapi.inc*(650,11) Hint: Found declaration: InitializeCriticalSection(var QWord); winapi ??? Why on Linux ? No way to get rid of this compilation error In Win32 the program compiles and runs without errors. Some help would be appreciated. The function for initializing a TRTLCriticalSection is InitCriticalSection, not InitializeCriticalSection. If you wouldn't use the Windows unit you'd have seen this error on Windows as well. @Michael: maybe we should add a seealso for the Init-/Enter-/Leave-/DoneCriticalSection functions to the documentation of the TRTLCriticalSection type. Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TRTLCriticalSection
On Tue, 25 Feb 2014, Sven Barth wrote: Am 25.02.2014 11:22, schrieb Antonio Fortuny: Hi Folks. Lazarus 1.0.2, FPC 2.6.2, Win32 and Linux x86_64 Something goes wrong with TRTRCriticalSection. There is a difference between Windows and Linux. In a program which will run on Win32 and Linux x86_64, using threads and all this stuff I need to protect some code from multi-threading access. One critical section looks enough to do the job. So i code this in Win32 and Linux: [snip] On the above line marked as compilation error the compiler complains with the message autoupdateserverthread.pas(255,48) Error: Call by var for arg no. 1 has to match exactly: Got TRTLCriticalSection expected QWord winapi.inc(650,11) Hint: Found declaration: InitializeCriticalSection(var QWord); winapi ??? Why on Linux ? No way to get rid of this compilation error In Win32 the program compiles and runs without errors. Some help would be appreciated. The function for initializing a TRTLCriticalSection is InitCriticalSection, not InitializeCriticalSection. If you wouldn't use the Windows unit you'd have seen this error on Windows as well. @Michael: maybe we should add a seealso for the Init-/Enter-/Leave-/DoneCriticalSection functions to the documentation of the TRTLCriticalSection type. Will do. Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TRTLCriticalSection
Le 25/02/2014 12:04, Sven Barth a écrit : Am 25.02.2014 11:22, schrieb Antonio Fortuny: Hi Folks. Lazarus 1.0.2, FPC 2.6.2, Win32 and Linux x86_64 Something goes wrong with TRTRCriticalSection. There is a difference between Windows and Linux. In a program which will run on Win32 and Linux x86_64, using threads and all this stuff I need to protect some code from multi-threading access. One critical section looks enough to do the job. So i code this in Win32 and Linux: [snip] On the above line marked as compilation error the compiler complains with the message autoupdateserverthread.pas(255,48) Error: Call by var for arg no. 1 has to match exactly: Got TRTLCriticalSection expected QWord *winapi.inc*(650,11) Hint: Found declaration: InitializeCriticalSection(var QWord); winapi ??? Why on Linux ? No way to get rid of this compilation error In Win32 the program compiles and runs without errors. Some help would be appreciated. The function for initializing a TRTLCriticalSection is InitCriticalSection, not InitializeCriticalSection. If you wouldn't use the Windows unit you'd have seen this error on Windows as well. The windows unit is used in the Win32 box (look at the conditional uses clause) Antonio; @Michael: maybe we should add a seealso for the Init-/Enter-/Leave-/DoneCriticalSection functions to the documentation of the TRTLCriticalSection type. Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus --- Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active. http://www.avast.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TRTLCriticalSection
On 25/02/14 12:56, Mattias Gaertner wrote: On Tue, 25 Feb 2014 11:22:57 +0100 Antonio Fortuny a.fort...@sitasoftware.lu wrote: [...] FIniCriticalSection: TRTLCriticalSection; ... InitializeCriticalSection(FIniCriticalSection); - compilation error A TRTLCriticalSection is initialized with InitCriticalSection from the system unit. I didn't notice that difference. But what about http://bugs.freepascal.org/view.php?id=25187 ? LCLIntf's (winapi.h) EnterCriticalsection(TCriticalSection) always takes precedence in compilation although codetools show it defined in threadh.inc: EnterCriticalsection(TRTLCriticalSection). Stephano -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TRTLCriticalSection
Am 25.02.2014 12:14, schrieb Antonio Fortuny: Le 25/02/2014 12:04, Sven Barth a écrit : Am 25.02.2014 11:22, schrieb Antonio Fortuny: Some help would be appreciated. The function for initializing a TRTLCriticalSection is InitCriticalSection, not InitializeCriticalSection. If you wouldn't use the Windows unit you'd have seen this error on Windows as well. The windows unit is used in the Win32 box (look at the conditional uses clause) Yes, nevertheless you would get the same error as on Linux if you would *not* use the Windows unit on Win32. Because on Windows TRTLCriticalSection is the same as the Windows CRITICAL_SECTION thus InitializeCriticalSection will happily take an TRTLCriticalSection as argument. However on Linux TRTLCriticalSection is defined differently. That Lazarus additionally declared a different TCriticalSection and InitializeCriticalSection does not help of course... :/ Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TRTLCriticalSection
On Tue, 25 Feb 2014 13:22:41 +0200 patspiper patspi...@gmail.com wrote: [...] LCLIntf's (winapi.h) EnterCriticalsection(TCriticalSection) always takes precedence in compilation although codetools show it defined in threadh.inc: EnterCriticalsection(TRTLCriticalSection). The compiler is very strict and requires the overload keyword for multiple functions with the same name in various units. Codetools allows to see all overloads, no matter if the overload keyword is missing. It depends on the context if this is a feature or a bug. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TRTLCriticalSection
On Tue, 25 Feb 2014 13:22:41 +0200 patspiper patspi...@gmail.com wrote: [...] LCLIntf's (winapi.h) EnterCriticalsection(TCriticalSection) always takes precedence in compilation although codetools show it defined in threadh.inc: EnterCriticalsection(TRTLCriticalSection). I added overload to LCL Enter/LeaveCriticalSection. So you don't need to bother with unit order. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TRTLCriticalSection
Now I get it working on both platforms. Use InitCriticalSection and DoneCriticalsection (thanks Mattias) Using system.EnterCriticalSection and system.LeaveCriticalSection solves all the compilation problems and runs (thanks all) Thanks again Antonio. --- Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active. http://www.avast.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TRTLCriticalSection
On Tue, 25 Feb 2014 12:46:43 +0100 Sven Barth pascaldra...@googlemail.com wrote: Am 25.02.2014 12:14, schrieb Antonio Fortuny: Le 25/02/2014 12:04, Sven Barth a écrit : Am 25.02.2014 11:22, schrieb Antonio Fortuny: Some help would be appreciated. The function for initializing a TRTLCriticalSection is InitCriticalSection, not InitializeCriticalSection. If you wouldn't use the Windows unit you'd have seen this error on Windows as well. The windows unit is used in the Win32 box (look at the conditional uses clause) Yes, nevertheless you would get the same error as on Linux if you would *not* use the Windows unit on Win32. Because on Windows TRTLCriticalSection is the same as the Windows CRITICAL_SECTION thus InitializeCriticalSection will happily take an TRTLCriticalSection as argument. However on Linux TRTLCriticalSection is defined differently. That Lazarus additionally declared a different TCriticalSection and InitializeCriticalSection does not help of course... :/ This uses the widgetsets critical sections. I personally am satisfied with the RTL one. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TRTLCriticalSection
On 25/02/14 13:57, Mattias Gaertner wrote: On Tue, 25 Feb 2014 13:22:41 +0200 patspiper patspi...@gmail.com wrote: [...] LCLIntf's (winapi.h) EnterCriticalsection(TCriticalSection) always takes precedence in compilation although codetools show it defined in threadh.inc: EnterCriticalsection(TRTLCriticalSection). I added overload to LCL Enter/LeaveCriticalSection. So you don't need to bother with unit order. Thanks. I closed the bug report. Stephano -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus/FPC for Web Development only
El 24/02/2014 20:46, silvioprog escribió: 2014-02-23 17:09 GMT-03:00 Giuseppe glpu...@gmail.com mailto:glpu...@gmail.com: [...] Well, mainly my web development projects are based on corporative websites or eCommerce, not custom-made implementations. Here a CMS is the best option. Now I want to build a Web App. Are different kind of projects :P With Brook JTemplate you can make your own CMS. :) Plus to other comments like more demos, I think more important is to get more documentation for first steps (deploy, and some intial concepts). Maybe can throw some help here¿? http://forum.lazarus.freepascal.org/index.php/topic,19225.msg142132.html#msg142132 Regards. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus/FPC for Web Development only
2014-02-25 13:32 GMT-03:00 Giuseppe glpu...@gmail.com: El 24/02/2014 20:46, silvioprog escribió: 2014-02-23 17:09 GMT-03:00 Giuseppe glpu...@gmail.com: [...] Well, mainly my web development projects are based on corporative websites or eCommerce, not custom-made implementations. Here a CMS is the best option. Now I want to build a Web App. Are different kind of projects :P With Brook JTemplate you can make your own CMS. :) Plus to other comments like more demos, I think more important is to get more documentation for first steps (deploy, and some intial concepts). I agree. Are you interested in helping us in the documentation? So far, we are only three or four people documenting. Maybe can throw some help here¿? http://forum.lazarus.freepascal.org/index.php/topic,19225.msg142132.html#msg142132 Regards. Nice. I posted an answer there: http://forum.lazarus.freepascal.org/index.php/topic,19225.msg142140.html#msg142140 I rarely read the forum. :S -- Silvio Clécio My public projects - github.com/silvioprog -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus/FPC for Web Development only
El 25/02/2014, a las 19:14, silvioprog silviop...@gmail.com escribió: 2014-02-25 13:32 GMT-03:00 Giuseppe glpu...@gmail.com: El 24/02/2014 20:46, silvioprog escribió: 2014-02-23 17:09 GMT-03:00 Giuseppe glpu...@gmail.com: [...] Well, mainly my web development projects are based on corporative websites or eCommerce, not custom-made implementations. Here a CMS is the best option. Now I want to build a Web App. Are different kind of projects :P With Brook JTemplate you can make your own CMS. :) Plus to other comments like more demos, I think more important is to get more documentation for first steps (deploy, and some intial concepts). I agree. Are you interested in helping us in the documentation? So far, we are only three or four people documenting. I can try. Maybe can throw some help here¿? http://forum.lazarus.freepascal.org/index.php/topic,19225.msg142132.html#msg142132 Regards. Nice. I posted an answer there: http://forum.lazarus.freepascal.org/index.php/topic,19225.msg142140.html#msg142140 Good questions, system is win8 64b, dll from SQLite site is 32b. I tried using embedded server (brookfclhttp...) without success. cGI I'm trying to test is blog from demos. Where can I download brook 3? I rarely read the forum. :S Exist some brook maillist or here is good place? Regards.-- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] [Brook] HTTP method not allowed for the requested resource
Hi all, I'm trying demos on Brook 3 (from github), and simple demos works fine, but with DB demos I get the error: Error 405 HTTP method not allowed for the requested resource. Some idea? Regards. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] ./fpcup_linux_x64 won't create lazarus executable
On Tuesday, 25 February, 2014 03:33 PM, brian wrote: On 02/24/2014 05:52 PM, Allan E. Registos wrote: Anybody who is using fpcup on Ubuntu 12.04 64-bit? Not Ubuntu, but its ancestor. I'm using 64-bit Debian 7, and the last time I updated (about a week ago, I think) everything worked OK for me. Thanks for suggesting... I love Debian, and want to be a debian developer someday :). Downloading fpcup again Hoping it will work this time. Brian. Tried installing lazarus through fpcup, it seems the fpcup installer is successful. While it manage to create a lazarus_fpcup shortcut at the desktop, it did not create the lazarus executable in ~/development/lazarus dir. I uninstalled all my fpc/lazarus installations to be sure and installed the required libraries and did a clean install two times but the same problem with no ~/development/lazarus/lazarus executable. Regards, Allan -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus smime.p7s Description: S/MIME Cryptographic Signature -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus/FPC for Web Development only
2014-02-25 15:38 GMT-03:00 Giuseppe glpu...@gmail.com: El 25/02/2014, a las 19:14, silvioprog silviop...@gmail.com escribió: 2014-02-25 13:32 GMT-03:00 Giuseppe glpu...@gmail.com: El 24/02/2014 20:46, silvioprog escribió: 2014-02-23 17:09 GMT-03:00 Giuseppe glpu...@gmail.com: [...] Well, mainly my web development projects are based on corporative websites or eCommerce, not custom-made implementations. Here a CMS is the best option. Now I want to build a Web App. Are different kind of projects :P With Brook JTemplate you can make your own CMS. :) Plus to other comments like more demos, I think more important is to get more documentation for first steps (deploy, and some intial concepts). I agree. Are you interested in helping us in the documentation? So far, we are only three or four people documenting. I can try. Very nice. I can help you in this task, explaining about all Brook features. Maybe can throw some help here¿? http://forum.lazarus.freepascal.org/index.php/topic,19225.msg142132.html#msg142132 Regards. Nice. I posted an answer there: http://forum.lazarus.freepascal.org/index.php/topic,19225.msg142140.html#msg142140 Good questions, system is win8 64b, dll from SQLite site is 32b. I tried using embedded server (brookfclhttp...) without success. cGI I'm trying to test is blog from demos. To discover SQLite problem, please create a simple program and test that, without Brook. Use SQLdb directly please. It seems a problem in your environment. Where can I download brook 3? Using a nice tool like SmartGIT (I use it) or executing this command line in your terminal: $ git clone https://github.com/silvioprog/brookframework.git I rarely read the forum. :S Exist some brook maillist or here is good place? Not yet. But there are plans to be created with Brook itself ( https://github.com/silvioprog/brookframework/issues/29). -- Silvio Clécio My public projects - github.com/silvioprog -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] [Brook] HTTP method not allowed for the requested resource
2014-02-25 18:22 GMT-03:00 Giuseppe glpu...@gmail.com: Hi all, I'm trying demos on Brook 3 (from github), and simple demos works fine, but with DB demos I get the error: Error 405 HTTP method not allowed for the requested resource. Some idea? Regards. Oh, is you Giu of Lazarus forum? Sorry, I could only see it now hehe... Please delete all old files, like .ppu etc. These examples are working fine, I tested it on Windows and Linux. If problem persists, please say step by step how you are doing the test as well as your environment. -- Silvio Clécio My public projects - github.com/silvioprog -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus