eb85 has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to install GD module in Cygwin, and I can't seem to figure out why 'make' keeps failing. Any thoughts? Thanks in advance.
$ cpan install GD Going to read '/home/me/.cpan/Metadata' Database was generated on Mon, 29 Dec 2014 12:41:02 GMT Running install for module 'GD' Running make for L/LD/LDS/GD-2.56.tar.gz Checksum for /home/me/.cpan/sources/authors/id/L/LD/LDS/GD-2.56.tar.gz + ok CPAN.pm: Going to build L/LD/LDS/GD-2.56.tar.gz Configuring for libgd version 2.1.0. Checking for stray libgd header files...none found. Included Features: GD_JPEG GD_FREETYPE GD_PNG GD_GIF GD_GIFAN +IM GD_OPENPOLYGON GD library used from: /usr/local Created MYMETA.yml and MYMETA.json Creating new 'Build' script for 'GD' version '2.56' Building GD Extracting Image.pm (with variable substitutions) gcc -I/usr/local/include -I/usr/lib/perl5/5.14/x86_64-cygwin-threads/C +ORE -DXS_VERSION="2.56" -DVERSION="2.56" -DHAVE_JPEG -DHAVE_FT -DHAVE +_GIF -DHAVE_PNG -c -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fno-stri +ct-aliasing -pipe -fstack-protector -O3 -o lib/GD.o lib/GD.c ExtUtils::Mkbootstrap::Mkbootstrap('blib/arch/auto/GD/GD.bs') g++ --shared -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--e +nable-auto-image-base -fstack-protector -o blib/arch/auto/GD/GD.dll l +ib/GD.o /usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE/libperl.dll.a +-L/usr/local/lib -L/usr/local/lib -ljpeg -lz -L/usr/local/lib -lpng16 + -L/usr/local/lib -lfreetype -lgd lib/GD.o:GD.c:(.text+0xd7b): undefined reference to `gdImageCreateFrom +Gd2Ptr' lib/GD.o:GD.c:(.text+0xd7b): relocation truncated to fit: R_X86_64_PC3 +2 against undefined symbol `gdImageCreateFromGd2Ptr' lib/GD.o:GD.c:(.text+0xf4c): undefined reference to `gdImageCreateFrom +Gd2Ptr' lib/GD.o:GD.c:(.text+0xf4c): relocation truncated to fit: R_X86_64_PC3 +2 against undefined symbol `gdImageCreateFromGd2Ptr' lib/GD.o:GD.c:(.text+0x1bfc): undefined reference to `gdImageCreateFro +mGd2Part' lib/GD.o:GD.c:(.text+0x1bfc): relocation truncated to fit: R_X86_64_PC +32 against undefined symbol `gdImageCreateFromGd2Part' lib/GD.o:GD.c:(.text+0x39b8): undefined reference to `gdImageGd2Ptr' lib/GD.o:GD.c:(.text+0x39b8): relocation truncated to fit: R_X86_64_PC +32 against undefined symbol `gdImageGd2Ptr' lib/GD.o:GD.c:(.text+0x3c16): undefined reference to `gdImageGd2Ptr' lib/GD.o:GD.c:(.text+0x3c16): relocation truncated to fit: R_X86_64_PC +32 against undefined symbol `gdImageGd2Ptr' lib/GD.o:GD.c:(.text+0x3e4f): undefined reference to `gdImagePngPtrEx' lib/GD.o:GD.c:(.text+0x3e4f): relocation truncated to fit: R_X86_64_PC +32 against undefined symbol `gdImagePngPtrEx' lib/GD.o:GD.c:(.text+0x3f0f): undefined reference to `gdImagePngPtr' lib/GD.o:GD.c:(.text+0x3f0f): relocation truncated to fit: R_X86_64_PC +32 against undefined symbol `gdImagePngPtr' lib/GD.o:GD.c:(.text+0x40df): undefined reference to `gdImageJpegPtr' lib/GD.o:GD.c:(.text+0x40df): relocation truncated to fit: R_X86_64_PC +32 against undefined symbol `gdImageJpegPtr' lib/GD.o:GD.c:(.text+0x12699): undefined reference to `gdImageCreateFr +omPng' lib/GD.o:GD.c:(.text+0x12699): relocation truncated to fit: R_X86_64_P +C32 against undefined symbol `gdImageCreateFromPng' lib/GD.o:GD.c:(.text+0x128d9): undefined reference to `gdImageCreateFr +omJpeg' lib/GD.o:GD.c:(.text+0x128d9): relocation truncated to fit: R_X86_64_P +C32 against undefined symbol `gdImageCreateFromJpeg' lib/GD.o:GD.c:(.text+0x12e65): undefined reference to `gdImageCreateFr +omPngCtx' lib/GD.o:GD.c:(.text+0x12e65): additional relocation overflows omitted + from the output lib/GD.o:GD.c:(.text+0x13145): undefined reference to `gdImageCreateFr +omJpegCtx' collect2: error: ld returned 1 exit status error building blib/arch/auto/GD/GD.dll from lib/GD.o at /usr/lib/perl +5/5.14/ExtUtils/CBuilder/Base.pm line 310. LDS/GD-2.56.tar.gz ./Build -- NOT OK Running Build test Can't test without successful make Running Build install Make had returned bad status, install seems impossible $ cpan > force install GD Configuring for libgd version 2.1.0. Checking for stray libgd header files...none found. lib/GD.o:GD.c:(.text+0xd7b): undefined reference to `gdImageCreateFrom +Gd2Ptr' lib/GD.o:GD.c:(.text+0xd7b): relocation truncated to fit: R_X86_64_PC3 +2 against undefined symbol `gdImageCreateFromGd2Ptr' lib/GD.o:GD.c:(.text+0xf4c): undefined reference to `gdImageCreateFrom +Gd2Ptr' lib/GD.o:GD.c:(.text+0xf4c): relocation truncated to fit: R_X86_64_PC3 +2 against undefined symbol `gdImageCreateFromGd2Ptr' lib/GD.o:GD.c:(.text+0x1bfc): undefined reference to `gdImageCreateFro +mGd2Part' lib/GD.o:GD.c:(.text+0x1bfc): relocation truncated to fit: R_X86_64_PC +32 against undefined symbol `gdImageCreateFromGd2Part' lib/GD.o:GD.c:(.text+0x39b8): undefined reference to `gdImageGd2Ptr' lib/GD.o:GD.c:(.text+0x39b8): relocation truncated to fit: R_X86_64_PC +32 against undefined symbol `gdImageGd2Ptr' lib/GD.o:GD.c:(.text+0x3c16): undefined reference to `gdImageGd2Ptr' lib/GD.o:GD.c:(.text+0x3c16): relocation truncated to fit: R_X86_64_PC +32 against undefined symbol `gdImageGd2Ptr' lib/GD.o:GD.c:(.text+0x3e4f): undefined reference to `gdImagePngPtrEx' lib/GD.o:GD.c:(.text+0x3e4f): relocation truncated to fit: R_X86_64_PC +32 against undefined symbol `gdImagePngPtrEx' lib/GD.o:GD.c:(.text+0x3f0f): undefined reference to `gdImagePngPtr' lib/GD.o:GD.c:(.text+0x3f0f): relocation truncated to fit: R_X86_64_PC +32 against undefined symbol `gdImagePngPtr' lib/GD.o:GD.c:(.text+0x40df): undefined reference to `gdImageJpegPtr' lib/GD.o:GD.c:(.text+0x40df): relocation truncated to fit: R_X86_64_PC +32 against undefined symbol `gdImageJpegPtr' lib/GD.o:GD.c:(.text+0x12699): undefined reference to `gdImageCreateFr +omPng' lib/GD.o:GD.c:(.text+0x12699): relocation truncated to fit: R_X86_64_P +C32 against undefined symbol `gdImageCreateFromPng' lib/GD.o:GD.c:(.text+0x128d9): undefined reference to `gdImageCreateFr +omJpeg' lib/GD.o:GD.c:(.text+0x128d9): relocation truncated to fit: R_X86_64_P +C32 against undefined symbol `gdImageCreateFromJpeg' lib/GD.o:GD.c:(.text+0x12e65): undefined reference to `gdImageCreateFr +omPngCtx' lib/GD.o:GD.c:(.text+0x12e65): additional relocation overflows omitted + from the output lib/GD.o:GD.c:(.text+0x13145): undefined reference to `gdImageCreateFr +omJpegCtx' collect2: error: ld returned 1 exit status error building blib/arch/auto/GD/GD.dll from lib/GD.o at /usr/lib/perl +5/5.14/ExtUtils/CBuilder/Base.pm line 310. $ make -v GNU Make 4.0 Built for x86_64-pc-cygwin Copyright (C) 1988-2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gp +l.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
Also to add...
** Configuration summary for libgd 2.1.0: Support for Zlib: yes Support for PNG library: yes Support for JPEG library: yes Support for VPX library: no Support for TIFF library: no Support for Freetype 2.x library: yes Support for Fontconfig library: no Support for Xpm library: no Support for pthreads: yes

Replies are listed 'Best First'.
Re: GD module 'make' failure in Cygwin
by nlwhittle (Beadle) on Dec 30, 2014 at 18:50 UTC
    Do you have the gd library installed from the Cygwin installation package?
      Yes; gd 2.0.36 and libgd

        Well, I'm not an expert, but I believe there is a problem with the version of the gd library that Cygwin provides. It looks like the install routine is looking for version 2.1.0, but Cygwin only provides 2.0.36.

        Looking at the "Issues" list on Meta::CPAN, it seems like version conflicts with this library have been an ongoing issue for a long time. Sorry I couldn't help more.

        Update: See my next post farther down. I managed to get GD running on my Cygwin setup.

        --Nick

        Yes; gd 2.0.36 and libgd

        Where is it installed (what files)?