Обсуждение: compiling postgres on solaris and DBD::Pg
Hi. I've been able to compile postgresql on solaris 10. Now I want to install the perl DBD::Pg module but I get a complaint, namely: /~~~~~~~~~~~~~~~~~~~~~~~ [root@tickettest] # make rm -f blib/arch/auto/DBD/Pg/Pg.so LD_RUN_PATH="/usr/local/pgsql/lib" /opt/SUNWspro/bin/cc -G -xarch=generic64 -L/opt/SUNWspro/prod/lib/amd64 -L/lib/amd64 -L/usr/local/lib Pg.o dbdimp.o quote.o types.o -o blib/arch/auto/DBD/Pg/Pg.so \ -L/usr/local/pgsql/lib -lpq \ ld: fatal: file /usr/local/pgsql/lib/libpq.so: wrong ELF class: ELFCLASS32 ld: fatal: File processing errors. No output written to blib/arch/auto/DBD/Pg/Pg.so *** Error code 1 make: Fatal error: Command failed for target `blib/arch/auto/DBD/Pg/Pg.so' \_______________________ Any help to understand this appreciated. Kind regards. -- Luke Vanderfluit. Analyst/Programmer. Internode Systems Pty. Ltd.
On Thu, May 11, 2006 at 02:55:04PM +0930, Luke Vanderfluit wrote: > Hi. > > I've been able to compile postgresql on solaris 10. > Now I want to install the perl DBD::Pg module but I get a complaint, namely: > [root@tickettest] # make > rm -f blib/arch/auto/DBD/Pg/Pg.so > LD_RUN_PATH="/usr/local/pgsql/lib" /opt/SUNWspro/bin/cc -G > -xarch=generic64 -L/opt/SUNWspro/prod/lib/amd64 -L/lib/amd64 ^^^^^^^^^ ^^^^^ > -L/usr/local/lib Pg.o dbdimp.o quote.o types.o -o > blib/arch/auto/DBD/Pg/Pg.so \ > -L/usr/local/pgsql/lib -lpq \ > > ld: fatal: file /usr/local/pgsql/lib/libpq.so: wrong ELF class: ELFCLASS32 ^^^^^^^^^^ > ld: fatal: File processing errors. No output written to > blib/arch/auto/DBD/Pg/Pg.so At a guess, libpq is compiled as 32 bit and you're compile DBD::Pg as 64 bit. Find out how perl is compiled and make sure you've compiled libpq and DBD::Pg the same. The server can be either, that's independant of this. Have a nice day, -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to litigate.
Вложения
Hi Martijn.
Martijn van Oosterhout wrote:
Since libpq is under /usr/local/pgsql/lib/ doesn't that mean that it's part of the postgresql install? Isn't then the postgres install 32 bit and should be 64 bit?
I'm sure the perl install is 64 bit. I didn't compile and install it myself.
Is there a way to check?
Thanks 4ur help.
Kind regards.
Martijn van Oosterhout wrote:
Does this mean libpq is part of the perl install?On Thu, May 11, 2006 at 02:55:04PM +0930, Luke Vanderfluit wrote:Hi. I've been able to compile postgresql on solaris 10. Now I want to install the perl DBD::Pg module but I get a complaint, namely:[root@tickettest] # make rm -f blib/arch/auto/DBD/Pg/Pg.so LD_RUN_PATH="/usr/local/pgsql/lib" /opt/SUNWspro/bin/cc -G -xarch=generic64 -L/opt/SUNWspro/prod/lib/amd64 -L/lib/amd64^^^^^^^^^ ^^^^^-L/usr/local/lib Pg.o dbdimp.o quote.o types.o -o blib/arch/auto/DBD/Pg/Pg.so \ -L/usr/local/pgsql/lib -lpq \ ld: fatal: file /usr/local/pgsql/lib/libpq.so: wrong ELF class: ELFCLASS32^^^^^^^^^^ld: fatal: File processing errors. No output written to blib/arch/auto/DBD/Pg/Pg.soAt a guess, libpq is compiled as 32 bit and you're compile DBD::Pg as 64 bit. Find out how perl is compiled and make sure you've compiled libpq and DBD::Pg the same. The server can be either, that's independant of this.
Since libpq is under /usr/local/pgsql/lib/ doesn't that mean that it's part of the postgresql install? Isn't then the postgres install 32 bit and should be 64 bit?
I'm sure the perl install is 64 bit. I didn't compile and install it myself.
Is there a way to check?
Thanks 4ur help.
Kind regards.
-- Luke Vanderfluit. Analyst/Programmer. Internode Systems Pty. Ltd.
On Fri, May 12, 2006 at 08:25:26AM +0930, Luke Vanderfluit wrote: > Does this mean libpq is part of the perl install? > > Since libpq is under /usr/local/pgsql/lib/ doesn't that mean that it's > part of the postgresql install? Isn't then the postgres install 32 bit > and should be 64 bit? libpq is part of postgresql, yes. If you have perl as 64-bit, that means you have to compile libpq as 64-bit. You don't have to compile the server as 64-bit though. > I'm sure the perl install is 64 bit. I didn't compile and install it myself. > Is there a way to check? readelf -h <filename> The "Class" field is the one you want I think. Have a nice day, -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to litigate.