GD - make test problem - freebsd - pthread_mutex_unlock - undefined symbol

Posted on Mon Sep 11 15:58:04 2006 by jessereynolds
make test problem - freebsd - pthread_mutex_unlock - undefined symbol
Hello I have an old gd installed on my FreeBSD 4.6.2 system. I have compiled and installed gd-2.0.33 unde +r /usr/local/gd-2.0.33 and am now trying to install GD 2.35 perl module into a perl 5.8.4 located +under /usr/local/perl-5.8.4 ... gd-2.0.33 wouldn't compile unless I specified "-pthread" in CFLAGS so that gcc knows to use the lib +c_r library, which is where the POSIX thread functions are located on this OS. Now the problem with make test is that perl doesn't know to look in libc_r for posix_mutex_unlock e +tc for some reason, and so it says the following when doing 'make test': Can't load './blib/arch/auto/GD/GD.so' for module GD: /usr/local/gd-2.0.33/lib/libgd.so.2: Undefine +d symbol "pthread_mutex_unlock" at /usr/local/perl-5.8.4/lib/5.8.4/i386-freebsd/DynaLoader.pm line + 230. How can I get around this? I've tried meddling with Makefile.PL but can't work out where I might ad +d a similar "-pthread" flag to the compiler... More output is below, including the 'perl Makefile.PL' step, the 'make' step, and the 'make test' s +tep. Any help would be very much appreciated! Thanks very much Jesse Influential environment variables:
PERL=/usr/local/perl-5.8.4/bin/perl PATH=/usr/local/perl-5.8.4/bin:/usr/local/mysql/bin:/usr/local/mysql/bin:/sbin:/bin:/usr/sbin:/usr/ +bin:/usr/games:/usr/local/bin:/usr/X11R6/bin:/home/jesse/bin CFLAGS=-pthread jesse@cabernet ~/src/GD-2.35 $ perl Makefile.PL NOTICE: This module requires libgd 2.0.28 or higher. If you are using Math::Trig 1.01 or lower, it has a bug that causes a "prerequisite not found" warning to be issued. You may safely ignore this warning. Type perl Makefile.PL -h for command-line option summary Where is libgd installed? [/usr/lib] /usr/local/gd-2.0.33 Please choose the features that match how libgd was built: Build JPEG support? [y] Build PNG support? [y] Build FreeType support? [y] Build GIF support? [y] Build support for animated GIFs? [y] If you experience compile problems, please check the @INC, @LIBPATH and @LIBS arrays defined in Makefile.PL and manually adjust, if necessary. Checking if your kit is complete... Looks good Writing Makefile for GD jesse@cabernet ~/src/GD-2.35 $ make /usr/local/perl-5.8.4/bin/perl5.8.4 "-Iblib/arch" "-Iblib/lib" GD/Image.pm.PLS GD/Image.pm Extracting Image.pm (with variable substitutions) cp GD/Polyline.pm blib/lib/GD/Polyline.pm cp qd.pl blib/lib/qd.pl cp GD/Image.pm blib/lib/GD/Image.pm cp GD.pm blib/lib/GD.pm AutoSplitting blib/lib/GD.pm (blib/lib/auto/GD) cp GD/Simple.pm blib/lib/GD/Simple.pm cp GD/Polygon.pm blib/lib/GD/Polygon.pm /usr/local/perl-5.8.4/bin/perl5.8.4 /usr/local/perl-5.8.4/lib/5.8.4/ExtUtils/xsubpp -typemap /usr/ +local/perl-5.8.4/lib/5.8.4/ExtUtils/typemap -typemap typemap GD.xs > GD.xsc && mv GD.xsc GD.c cc -c -I/usr/local/gd-2.0.33/include -I/usr/include -I/usr/include/gd -DHAS_FPSETMASK -DHAS_FLOAT +INGPOINT_H -fno-strict-aliasing -I/usr/local/include -O -DVERSION=\"2.35\" -DXS_VERSION=\"2.35 +\" -DPIC -fPIC "-I/usr/local/perl-5.8.4/lib/5.8.4/i386-freebsd/CORE" -DHAVE_JPEG -DHAVE_FT -DHAVE +_GIF -DHAVE_PNG -DHAVE_ANIMGIF GD.c Running Mkbootstrap for GD () chmod 644 GD.bs rm -f blib/arch/auto/GD/GD.so LD_RUN_PATH="/usr/local/gd-2.0.33/lib:/usr/local/lib:/usr/lib" cc -shared -L/usr/local/lib GD.o +-o blib/arch/auto/GD/GD.so -L/usr/local/gd-2.0.33/lib -L/usr/X11R6/lib -L/usr/lib -lgd -lfreetyp +e -ljpeg -lpng -lz -lm chmod 755 blib/arch/auto/GD/GD.so cp GD.bs blib/arch/auto/GD/GD.bs chmod 644 blib/arch/auto/GD/GD.bs cp bdf_scripts/bdf2gdfont.pl blib/script/bdf2gdfont.pl /usr/local/perl-5.8.4/bin/perl5.8.4 "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/bdf2gdfont.p +l Manifying blib/man1/bdf2gdfont.pl.1 Manifying blib/man3/GD::Polyline.3 Manifying blib/man3/GD::Image.3 Manifying blib/man3/GD::Simple.3 Manifying blib/man3/GD.3 Manifying blib/man3/GD::Polygon.3 jesse@cabernet ~/src/GD-2.35 $ make test PERL_DL_NONLAZY=1 /usr/local/perl-5.8.4/bin/perl5.8.4 "-MExtUtils::Command::MM" "-e" "test_harness( +0, 'blib/lib', 'blib/arch')" t/*.t t/GD..........Can't load './blib/arch/auto/GD/GD.so' for module GD: /usr/local/gd-2.0.33/lib/libgd. +so.2: Undefined symbol "pthread_mutex_unlock" at /usr/local/perl-5.8.4/lib/5.8.4/i386-freebsd/Dyna +Loader.pm line 230. at t/GD.t line 14 Compilation failed in require at t/GD.t line 14. BEGIN failed--compilation aborted at t/GD.t line 14. t/GD..........dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-12 Failed 12/12 tests, 0.00% okay t/Polyline....Can't load '/usr/home/jesse/src/GD-2.35/blib/arch/auto/GD/GD.so' for module GD: /usr/ +local/gd-2.0.33/lib/libgd.so.2: Undefined symbol "pthread_mutex_unlock" at /usr/local/perl-5.8.4/l +ib/5.8.4/i386-freebsd/DynaLoader.pm line 230. at /usr/home/jesse/src/GD-2.35/blib/lib/GD/Polyline.pm line 45 Compilation failed in require at /usr/home/jesse/src/GD-2.35/blib/lib/GD/Polyline.pm line 45. BEGIN failed--compilation aborted at /usr/home/jesse/src/GD-2.35/blib/lib/GD/Polyline.pm line 45. Compilation failed in require at t/Polyline.t line 10. BEGIN failed--compilation aborted at t/Polyline.t line 10. t/Polyline....dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED test 1 Failed 1/1 tests, 0.00% okay Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/GD.t 255 65280 12 23 191.67% 1-12 t/Polyline.t 255 65280 1 2 200.00% 1 Failed 2/2 test scripts, 0.00% okay. 13/13 subtests failed, 0.00% okay. *** Error code 2 Stop in /usr/home/jesse/src/GD-2.35.
Write a response