On Thu, Jul 23, 2009 at 1:24 PM, Peter Eisentraut<pete...@gmx.net> wrote: > > Which proves my point, because libpgport includes chkconfig.c. But this is > just a workaround. >
yeah! actually the problem i had was because we need to add the -lpgport to use pg_get_encoding_from_locale and that is something that this patch introduced the other unrelated problem i had is my little knowledge about the search path of libraries, the minimun i need to compile the test program with the correct libpq is this: gcc -o test-libpq test-libpq.o -Wl,-rpath,'/usr/local/pgsql/head/lib' -L /usr/local/pgsql/head/lib -lpq -lpgport so, at least, the second problem is a documentation one,our docs says: """ When linking the final program, specify the option -lpq so that the libpq library gets pulled in, as well as the option -Ldirectory to point the compiler to the directory where the libpq library resides. (Again, the compiler will search some directories by default.) For maximum portability, put the -L option before the -lpq option. For example: cc -o testprog testprog1.o testprog2.o -L/usr/local/pgsql/lib -lpq """ which is clearly not accurate, we also need to add the -Wl,rpath stuff -- Atentamente, Jaime Casanova Soporte y capacitación de PostgreSQL Asesoría y desarrollo de sistemas Guayaquil - Ecuador Cel. +59387171157 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers