[fpc-pascal] Re: Cross-compiling with FPC 2.5.1
make[4]: /home/me/Programs/fpc/cross_fpc/cross/bin/i686-cygwin-as: Command not found The error is very clear, do you have the assembler in the indicated directory? Make sure the result of building binutils have i686-cygwin- prefix. Otherwise, you have to specify -XP compiler option to specify the prefix used. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Cross-compiling-with-FPC-2-5-1-tp3236321p3236639.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Re: TPLY
I prefer doing this manually, syntax conversion is easy, but library design is totally different. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/TPLY-tp3235828p3236641.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] A bug in documentation?
Hi, Language Reference, Section 1.4 Identifiers says: Identifiers consist of between 1 and 127 significant characters (letters, digits and the underscore character), of which the first must be an alphanumeric character, or an underscore (_). Should alphanumeric be alphabetic here? Since alphanumeric = alphabetic + numeric it looks like starting an identifier with a number is valid, but it is not. (http://freepascal.org/docs-html/ref/refse4.html#x16-150001.4) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] A bug in documentation?
On Tue, 26 Oct 2010, Vladimir Zhirov wrote: Hi, Language Reference, Section 1.4 Identifiers says: Identifiers consist of between 1 and 127 significant characters (letters, digits and the underscore character), of which the first must be an alphanumeric character, or an underscore (_). Should alphanumeric be alphabetic here? Since alphanumeric = alphabetic + numeric it looks like starting an identifier with a number is valid, but it is not. (http://freepascal.org/docs-html/ref/refse4.html#x16-150001.4) You are correct. I will correct this. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Cross-compiling with FPC 2.5.1
On 10/26/2010 10:18 AM, leledumbo wrote: make[4]: /home/me/Programs/fpc/cross_fpc/cross/bin/i686-cygwin-as: Command not found The error is very clear, do you have the assembler in the indicated directory? Make sure the result of building binutils have i686-cygwin- prefix. Otherwise, you have to specify -XP compiler option to specify the prefix used. The buildcrossbinutils.sh script produces i686-mingw32- binaries only (no i686-cygwin-), and yet, FPC 2.4.2 cross compiles without any problem. What is different about 2.5.1? Have you crosscompiled 2.5.1 successfully? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Cross-compiling with FPC 2.5.1
2010/10/26 patspiper patspi...@yahoo.com The buildcrossbinutils.sh script produces i686-mingw32- binaries only (no i686-cygwin-), and yet, FPC 2.4.2 cross compiles without any problem. What is different about 2.5.1? Probably 2.5.1 contains assembler files, so it needs an assembler, 2.4.2 only pascal source fails, that the compiler can assemble. Maybe for 2.4.2 you don't need any binutils, except windres maybe. Maybe windres is not necessary either and fpcres is used. Vincent ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Widestring Questions
A bug may show anytime anywhere, but the built in ref counted string types are AFAIK thread safe what concerns the ref count per se. I suspect a subtle flaw in the client code is more probable. No, it is a compiler bug. The same code works 100% perfectly on Windows using Delphi, as well as on Mac OS X using FPC 2.2. Starting with FPC 2.4, it loses memory, which can be fixed by using UniqueString in a number of spots in the code. That is proof enough that the compiler has a bug. I am trying to isolate it today by finding out where exactly the UniqueString is necessary. Kind Regards, Tobias Giesen To avoid a reboot, make sure that no SuperFlexible or ExtremeSync processes are running in Task Manager before installing an update. Super Flexible Software Ltd. Co. KG Lessingstr. 42 48485 Neuenkirchen, Germany www.superflexible.com www.tgtools.com --- Registered at register court Steinfurt as HRA 5061 Liability / general partner: TGTools Ltd. Company No. 05513299 Registered in England and Wales Directors: Tobias Giesen and Claudia Giesen ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Widestring Questions
Am 26.10.2010 10:55, schrieb Tobias Giesen: A bug may show anytime anywhere, but the built in ref counted string types are AFAIK thread safe what concerns the ref count per se. I suspect a subtle flaw in the client code is more probable. No, it is a compiler bug. The same code works 100% perfectly on Windows using Delphi, as well as on Mac OS X using FPC 2.2. Starting with FPC 2.4, it loses memory, which can be fixed by using So without ref. counting it works. UniqueString in a number of spots in the code. That is proof enough that the compiler has a bug. It is possible, but it depends on the usage of the string. I am trying to isolate it today by finding out where exactly the UniqueString is necessary. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Widestring Questions
Hi, I was wrong, UniqueString does not help after all. I am now using an extended version of the heaptrc unit to show the reference count (and string value) for unfreed WideStrings and they usually have 1 as a reference count. Will keep you posted. Cheers, Tobias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Cross-compiling with FPC 2.5.1
On 10/26/2010 05:48 PM, Jonas Maebe wrote: On 26 Oct 2010, at 16:38, patspiper wrote: i686-mingw32-as is present in the crossbinutils bin folder. But the error concerns i686-cygwin-as...why would it ask for the assembler with a i686-cygwin prefix? Because that's probably the version that the person who added support for cross-assembling to Win32 used. You can change the prefix by adding the following to your make command line: OPT=-XPi686-mingw32- If that crossbinutils folder is not in your path, you also have to use OPT=-XPi686-mingw32- -FD/full/path/to/crossbinutils The wiki needs correction: binutils should be built for cygwin and not mingw32 as cygwin is hardcoded for win32 in the script buildcrossbinutils.sh. It so happens, as Vincent pointed out, that 2.4.2 did not need the binutils. I rebuilt the cross binutils for cygwin and both FPC 2.4.2 and 2.5.1 were crosscompiled successfully :) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Cross-compiling with FPC 2.5.1
On 26 Oct 2010, at 17:40, Marco van de Voort wrote: In our previous episode, Jonas Maebe said: OPT=-XPi686-mingw32- -FD/full/path/to/crossbinutils IIRC it is wiser to use the variables (CROSSBINDIR and CROSSBINUTILSPREFIX or so, see buildfaq), because these are then only applied to the relevant cycles of make crosscycle. That's true. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Widestring Questions
On 26 Oct 2010, at 21:28, Tobias Giesen wrote: Upon exit, the memory does seem to be freed correctly now according to heaptrc. But MacOS stops giving memory to the app after a while and then it quits. Could it be that the memory manager has been changed since FPC 2.2 and is now more susceptible to heap fragmentation? It has been changed, but if anything it should be less susceptible to heap fragmentation. Could there be any allocations that bypass heaptrc? Yes, if you call external code that uses libc's malloc() family of routines to allocate memory. The app is allocating hundreds of Megabytes of memory over time and I still don't know how it is happening. What you can try is a) add cmem to the uses clause of your program, to change from FPC's default heap manager to the libc memory manager. If that solves the problem, it's probably a heap fragmentation issue b) if that does not help (or not enough), disable heaptrc (but keep cmem) and run Valgrind's massif tool on your program. You can download Valgrind from http://valgrind.org/ and information about massif at http://valgrind.org/docs/manual/ms-manual.html Jonas___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Widestring Questions
Hi Jonas, thanks very much!!! I am sorry for the wrong things that I wrote. Now I can clearly see that the memory is not lost on the FPC heap. The total heap size doesn't even change at all. So there's no difference with CMem either. More work to do ... Cheers, Tobias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal