Thread: Compiling Pl/Perl on Mac OSX
Hello all, Has anyone had any luck compiling the Pl/Perl language on Mac OSX (10.4)? I get the following error: *** Cannot build PL/Perl because libperl is not a shared library. *** You might have to rebuild your Perl installation. Refer to *** the documentation for details. If I modify Makefile.global and set "perl_useshrplib = true" I get the linker error: gcc -no-cpp-precomp -O2 -Wall -Wmissing-prototypes -Wpointer-arith - Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict- aliasing -bundle -multiply_defined suppress plperl.o spi_internal.o SPI.o -L/opt/local/lib -L/usr/local/lib -L/opt/local/lib/perl5/5.8.8/ darwin-2level/CORE -L../../../src/port -L/System/Library/Perl/5.8.6/ darwin-thread-multi-2level/CORE/ /opt/local/lib/perl5/5.8.8/ darwin-2level/auto/DynaLoader/DynaLoader.a -lperl -ldl -lm -lc - bundle_loader ../../../src/backend/postgres -o libplperl.0.0.so /usr/bin/ld: Undefined symbols: _PL_errgv _PL_markstack_max _PL_markstack_ptr _PL_na _PL_stack_base _PL_stack_max _PL_stack_sp _PL_sv_undef _PL_tmps_floor _PL_tmps_ix _PL_curpad _PL_op _PL_sv_yes collect2: ld returned 1 exit status make[3]: *** [libplperl.0.0.so] Error 1 make[2]: *** [all] Error 1 make[1]: *** [all] Error 2 make: *** [all] Error 2 Not super surprising, of course, but if I look for libperl, I find: /System/Library/Perl/5.8.6/darwin-thread-multi-2level/CORE/libperl.dylib /System/Library/Perl/lib/5.8/libperl.dylib Which seems like it should fit the bill. I can't seem to find any docs online that say one way or another how I can make this work. Any thoughts? Thanks! Logan Bowers
Attachment
Logan Bowers <logan@datacurrent.com> writes: > Has anyone had any luck compiling the Pl/Perl language on Mac OSX > (10.4)? I get the following error: Worksforme ... which Postgres version are you using exactly? > gcc -no-cpp-precomp -O2 -Wall -Wmissing-prototypes -Wpointer-arith - > Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict- > aliasing -bundle -multiply_defined suppress plperl.o spi_internal.o > SPI.o -L/opt/local/lib -L/usr/local/lib -L/opt/local/lib/perl5/5.8.8/ > darwin-2level/CORE -L../../../src/port -L/System/Library/Perl/5.8.6/ > darwin-thread-multi-2level/CORE/ /opt/local/lib/perl5/5.8.8/ > darwin-2level/auto/DynaLoader/DynaLoader.a -lperl -ldl -lm -lc - > bundle_loader ../../../src/backend/postgres -o libplperl.0.0.so Actually, I'm wondering about the references to /opt/local/lib/perl5/ there; I don't see those in my build --- here's my command for linking plperl: gcc -no-cpp-precomp -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels-fno-strict-aliasing -g -bundle -multiply_defined suppress plperl.o spi_internal.o SPI.o -L/usr/local/lib-L/System/Library/Perl/5.8.6/darwin-thread-multi-2level/CORE -L../../../src/port /System/Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DynaLoader/DynaLoader.a-lperl -ldl -lm -lc -bundle_loader ../../../src/backend/postgres -o libplperl.0.0.so I'm a bit suspicious that you have a non-shared-library build of Perl under /opt, and you've done something that makes Postgres find that instead of the Apple-supplied version. regards, tom lane