[fpc-pascal] lmysqlclient not found again while compile in fedora 7
Sorry, i mean that i have made a symbolic link to /usr/lib/mysql/libmysqlclient_r.so.15.0.0 as lmysqlclient. But compiler said lmysqlclient not found. And then in separately, another one to /usr/lib/mysql/libmysqlclient.so.15.0.0, there's still not found. Until final i am confused because there are too many lmysqlclient.* that i don't know which the default is. These are files in my /usr/lib/mysql: -rw-r--r-- 1 root root 12218 2007-03-30 06:44 libdbug.a -rw-r--r-- 1 root root 50516 2007-03-30 06:44 libheap.a -rw-r--r-- 1 root root 376560 2007-03-30 06:44 libmyisam.a -rw-r--r-- 1 root root 30506 2007-03-30 06:44 libmyisammrg.a -rw-r--r-- 1 root root 1638736 2007-03-30 06:44 libmysqlclient.a -rw-r--r-- 1 root root 1650150 2007-03-30 06:44 libmysqlclient_r.a lrwxrwxrwx 1 root root 26 2007-09-18 15:34 libmysqlclient_r.so -> libmysqlclient_r.so.15.0.0 lrwxrwxrwx 1 root root 26 2007-09-11 23:35 libmysqlclient_r.so.15 -> libmysqlclient_r.so.15.0.0 -rwxr-xr-x 1 root root 1459164 2007-03-30 06:44 libmysqlclient_r.so.15.0.0 lrwxrwxrwx 1 root root 24 2007-09-18 15:34 libmysqlclient.so -> libmysqlclient.so.15.0.0 lrwxrwxrwx 1 root root 24 2007-09-11 23:35 libmysqlclient.so.15 -> libmysqlclient.so.15.0.0 -rwxr-xr-x 1 root root 1450644 2007-03-30 06:44 libmysqlclient.so.15.0.0 -rw-r--r-- 1 root root 1363940 2007-03-30 06:44 libmystrings.a -rw-r--r-- 1 root root 324994 2007-03-30 06:44 libmysys.a -rw-r--r-- 1 root root 15068 2007-03-30 06:44 libvio.a -rwxr-xr-x 1 root root 12394 2007-03-30 06:43 mysqlbug -rwxr-xr-x 1 root root5449 2007-03-30 06:43 mysql_config My question is how to make all of these simply, maybe for the next FPC version? I always found the same "...not found" error every upgrade to newest FPC. How if these complication made more user friendly? - Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] lmysqlclient not found again while compile in fedora 7
On 25 Sep 2007, at 04:37, Andi Purwito wrote: Sorry, i mean that i have made a symbolic link to /usr/lib/mysql/ libmysqlclient_r.so.15.0.0 as lmysqlclient. You should not make these symlinks manually. These should be made automatically when installing the "-dev" versions of the rpm/deb/ whatever packages you use. This does not just go for MySQL by the way, but for /any/ package you may want to use with fpc/gcc/gpc/compiler> under *nix. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] problem with threads and backgrounding, fpc 2.1.3 arm native
En/na Luca Olivetti ha escrit: En/na Luca Olivetti ha escrit: This is another test program that shows my problem with fork: as soon as I start the thread, the main program stops working (the thread *is* running, you can put a writeln in its loop to show it). Note that in this short example I don't close stdin,stdout,stderr, I don't block signals but it doesn't matter (I did it all and the result is the same). The same happens with the native compiler and the cross compiler. Now, if I remove the fork part, both the thread and the main loop work, but if I use crtl-z and then fg after the thread has started it will give an EAccessViolation, but this only with the native compiler (remind that the native compiler is 2.1.3 while the cross compiler is 2.0.4). Now tested with a self-built 2.1.4 and it does the same. Unfortunately I still cannot test with a newer kernel. [test program removed, original post available at: http://lists.freepascal.org/lists/fpc-pascal/2007-April/013558.html] Just tried again with the 2.2.0 compiler available at ftp://ftp.freepascal.org/pub/fpc/dist/arm-linux-2.2.0/ Without the fork everything seems to work ok, ctrl-z and then fg (or bg) doesn't cause the EAccessViolation anymore. With the fork the main loop stops as soon as the thread starts. Bye -- Luca ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] defining record at runtime
Hi, would it be possible to set up a memory structure according to fpc's aligning rules that will be accepted as a record typed variable? Or does fpc create some informational support items that would miss in this case? I'm in doubt, since it is normally not possible (AFAIK, tell me if this is wrong) to get structural information about a record type at runtime (no RTTI). TIA, Marc ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] defining record at runtime
On 25 Sep 2007, at 11:49, Marc Santhoff wrote: would it be possible to set up a memory structure according to fpc's aligning rules that will be accepted as a record typed variable? Or does fpc create some informational support items that would miss in this case? I'm in doubt, since it is normally not possible (AFAIK, tell me if this is wrong) to get structural information about a record type at runtime (no RTTI). Initialisation rtti is generated in case the record contains reference counted types. It will be easier to answer your question if you explain what you want to achieve and why. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] FPU Configuration inside a library
Hi, i posted this already under a differnt subject, but didn't get a feedback. A .dll written in fpc changes the configuration of the FPU (FPUCW). This might cause a strange behavior inside the loading program. If the loading program allows division by zero (1.0 / 0.0), it will crash after the .dll written in freepascal is loaded. What is really bad with this is, that the crash occurs at total different place and time inside the loading program (very hard to find). The initialization of fpc should only change the FPU configuration inside a program not inside a library. IMHO same should be true with other settings like LOCALE settings. Cheers, Adrian. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] lmysqlclient not found again while compile in fedora 7
I've found how Fedora handles this: edit /etc/ld.so.conf.d/mysqlclient14-i386.conf (-x86_64 for 64 bit) and change it to (for example) /lib/mysql4/mysql Then run ldconfig. If you want to link statically, you'll need the -dev-package. Note that this has nothing to do with fpc, but it's a fedora in combination with mysql-history/license-issue. Joost. Op maandag 24-09-2007 om 19:37 uur [tijdzone -0700], schreef Andi Purwito: > Sorry, i mean that i have made a symbolic link > to /usr/lib/mysql/libmysqlclient_r.so.15.0.0 as lmysqlclient. But > compiler said lmysqlclient not found. And then in separately, another > one to /usr/lib/mysql/libmysqlclient.so.15.0.0, there's still not > found. Until final i am confused because there are too many > lmysqlclient.* that i don't know which the default is. These are files > in my /usr/lib/mysql: > > -rw-r--r-- 1 root root 12218 2007-03-30 06:44 libdbug.a > -rw-r--r-- 1 root root 50516 2007-03-30 06:44 libheap.a > -rw-r--r-- 1 root root 376560 2007-03-30 06:44 libmyisam.a > -rw-r--r-- 1 root root 30506 2007-03-30 06:44 libmyisammrg.a > -rw-r--r-- 1 root root 1638736 2007-03-30 06:44 libmysqlclient.a > -rw-r--r-- 1 root root 1650150 2007-03-30 06:44 libmysqlclient_r.a > lrwxrwxrwx 1 root root 26 2007-09-18 15:34 libmysqlclient_r.so -> > libmysqlclient_r.so.15.0.0 > lrwxrwxrwx 1 root root 26 2007-09-11 23:35 libmysqlclient_r.so.15 > -> libmysqlclient_r.so.15.0.0 > -rwxr-xr-x 1 root root 1459164 2007-03-30 06:44 > libmysqlclient_r.so.15.0.0 > lrwxrwxrwx 1 root root 24 2007-09-18 15:34 libmysqlclient.so -> > libmysqlclient.so.15.0.0 > lrwxrwxrwx 1 root root 24 2007-09-11 23:35 libmysqlclient.so.15 > -> libmysqlclient.so.15.0.0 > -rwxr-xr-x 1 root root 1450644 2007-03-30 06:44 > libmysqlclient.so.15.0.0 > -rw-r--r-- 1 root root 1363940 2007-03-30 06:44 libmystrings.a > -rw-r--r-- 1 root root 324994 2007-03-30 06:44 libmysys.a > -rw-r--r-- 1 root root 15068 2007-03-30 06:44 libvio.a > -rwxr-xr-x 1 root root 12394 2007-03-30 06:43 mysqlbug > -rwxr-xr-x 1 root root5449 2007-03-30 06:43 mysql_config > > My question is how to make all of these simply, maybe for the next FPC > version? > I always found the same "...not found" error every upgrade to newest > FPC. How if these complication made more user friendly? > > > __ > Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: > mail, news, photos & more. > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal -- ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPU Configuration inside a library
On Tue, 25 Sep 2007, Adrian Veith wrote: > Hi, > > i posted this already under a differnt subject, but didn't get a feedback. > > A .dll written in fpc changes the configuration of the FPU (FPUCW). This might > cause a strange behavior inside the loading program. > > If the loading program allows division by zero (1.0 / 0.0), it will crash > after the .dll written in freepascal is loaded. What is really bad with this > is, that the crash occurs at total different place and time inside the loading > program (very hard to find). > > The initialization of fpc should only change the FPU configuration inside a > program not inside a library. This is not so easy. The compiler has no way of knowing what code will be executed in the initialization sections of the units inside the library. The ABI also makes no demand. I've seen much Delphi code which explictly saves and restores the FPU control word around a call to LoadLibrary... > IMHO same should be true with other settings like LOCALE settings. FPC does not change the locale settings. If the user does not change it, then neither does the library. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] defining record at runtime
Am Dienstag, den 25.09.2007, 11:56 +0200 schrieb Jonas Maebe: > On 25 Sep 2007, at 11:49, Marc Santhoff wrote: > > > would it be possible to set up a memory structure according to fpc's > > aligning rules that will be accepted as a record typed variable? Or > > does > > fpc create some informational support items that would miss in this > > case? > > > > I'm in doubt, since it is normally not possible (AFAIK, tell me if > > this > > is wrong) to get structural information about a record type at runtime > > (no RTTI). > > Initialisation rtti is generated in case the record contains > reference counted types. It will be easier to answer your question if > you explain what you want to achieve and why. I was a little fast in asking this question. It's about passing around arbitrary anonymous record consisting of atomic types and strings. But since in the end it all comes down to asking for a records members and field count I have to use additional typing info and doing the memory housekeeping by hand anyways. (If this hasn't changed since fpc 2.0.4) So forgat about it. Marc ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] defining record at runtime
An aproximation of what you want to accomplish is the usage of classes (descendants of TPersistent) with published properties accesed using RTTI. The "visible" fields you want to access are these published properties, all other information and methods can't be accessed using RTTI. TCustomer = class(TPersistent) private FAge: Integer; FName: string; published property Age: Integer read FAge write FAge; property Name: string read FName write FName; end; --- Marc Santhoff <[EMAIL PROTECTED]> wrote: > Am Dienstag, den 25.09.2007, 11:56 +0200 schrieb Jonas Maebe: > > On 25 Sep 2007, at 11:49, Marc Santhoff wrote: > > > > > would it be possible to set up a memory structure according to fpc's > > > aligning rules that will be accepted as a record typed variable? Or > > > does > > > fpc create some informational support items that would miss in this > > > case? > > > > > > I'm in doubt, since it is normally not possible (AFAIK, tell me if > > > this > > > is wrong) to get structural information about a record type at runtime > > > (no RTTI). > > > > Initialisation rtti is generated in case the record contains > > reference counted types. It will be easier to answer your question if > > you explain what you want to achieve and why. > > I was a little fast in asking this question. It's about passing around > arbitrary anonymous record consisting of atomic types and strings. > > But since in the end it all comes down to asking for a records members > and field count I have to use additional typing info and doing the > memory housekeeping by hand anyways. (If this hasn't changed since fpc > 2.0.4) > > So forgat about it. > > Marc > > > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > Need a vacation? Get great deals to amazing places on Yahoo! Travel. http://travel.yahoo.com/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] defining record at runtime
Am Dienstag, den 25.09.2007, 19:59 -0700 schrieb Leonardo M. RamX: > An aproximation of what you want to accomplish is the usage of classes > (descendants of > TPersistent) with published properties accesed using RTTI. The > "visible" fields you want to access > are these published properties, all other information and methods > can't be accessed using RTTI. I know, but since I need flat memory stroage structures this is not an option. And since there are no guarantees about internals I can't use the fact that objects are stored like records + VMT. I will use this approach at a higher level, I think. Thanks for pointing out, Marc ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] more questions on storage
Hi, having this definition: {$mode objfpc} {$longstrings on} type cmpstr = record ID: integer; Name: string; Value: single; end; var buf: array [0..MAX] of cmpstr; How does the memory layout of the buffer look like? I tried to get there with ddd but I couln't find out how the string inbetween is put into memory. For atomic types (integer, single) it's pretty clear, but longstrings do have a variable size. How is the buffer set up? TIA, Marc ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal