I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2010-06-01 10:28:38.231285-07 by gwfran
Can not compile...

Running ActivePerl 5.10. Perl makefile.pl seems to run fine (libraries found). Nmake compile dies:

C:\WINNT\nmake.exe -f Makefile all -nologo Skip ..\blib\lib\Imager\CountColor.pm (unchanged) C:/Perl/site/bin/gcc.exe -c -I.. -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRI CT -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_C ONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -DHASATTRIBUTE -fn o-strict-aliasing -mms-bitfields -O2 -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\ " "-IC:\Perl\lib\CORE" CountColor.c Running Mkbootstrap for Imager::CountColor () C:\Perl\bin\perl.exe -MExtUtils::Command -e "chmod" -- 644 CountColor.bs dlltool --def CountColor.def --output-exp dll.exp C:\Perl\site\bin\g++.exe -o ..\blib\arch\auto\Imager\CountColor\CountCol or.dll -Wl,--base-file -Wl,dll.base -mdll -L"C:\Perl\lib\CORE" CountColor.o -Wl, --image-base,0x372c0000 C:\Perl\lib\CORE\perl510.lib -lkernel32 -luser32 -lgdi3 2 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luui d -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lmsvcrt dll.exp g++.exe: CountColor.o: No such file or directory NMAKE : fatal error U1077: 'C:\WINNT\system32\cmd.exe' : return code '0x1' Stop. NMAKE : fatal error U1077: 'C:\WINNT\system32\cmd.exe' : return code '0x2' Stop.

I've been trying for three days to get Imager to serve up jpegs for Perl 5.10 is it did swimmingly in Perl 5.8.

Direct Responses: 12738 | Write a response
Posted on 2010-06-02 01:07:22.26878-07 by tonyc in response to 12736
Re: Can not compile...

I just downloaded ActivePerl, installed the MinGW package using PPM (which also installed dmake), and successfully built Imager.


I see you're using g++ but yet using nmake - typically if you're building perl or perl modules using the GNU toolset on Windows, you need to use dmake as the make tool. If you installed MinGW using ppm it should have also installed dmake.


As to the jpeg issues, please let me know where you got the jpeg libraries and headers you're using - you can't just copy a libjpeg DLL and expect Imager to build JPEG support from that, Imager needs to find the headers and link libraries at Makefile.PL and make time.


When you run Makefile.PL you'll see a summary like:


done. gif: includes found - libraries found ungif: includes found - libraries found jpeg: includes found - libraries found png: configured via `pkg-config libpng ...` tiff: includes found - libraries found freetype2: configured via freetype-config T1-fonts: includes found - libraries found TT-fonts: includes found - libraries found

If the jpeg line reads like the above, then Makefile.PL found what it needs, if it reads like:


jpeg: includes not found - libraries not found

Then you're either missing libraries/headers, or you need to tell Makefile.PL where to find them.


To add to the include search path, supply a --incpath option, eg --incpath=c:\some\path


To add to the library search path, supply a --libpath option, eg --libpath=c:\some\path


Please let me know how you go with this.


Tony

Direct Responses: 12740 | Write a response
Posted on 2010-06-02 09:16:39.79327-07 by gwfran in response to 12738
Re: Can not compile...

Hi Tony - thanks for your help!

I've used a couple of different JPEG libraries. Right now I'm using the libraries available from GNUWin. The JPEG includes and libraries are all found in the make by setting the incpath and libpath.

For example:

Set up gcc environment - 3.4.5 (mingw-vista special r3 done. gif: includes not found - libraries not found ungif: includes not found - libraries not found jpeg: includes found - libraries found png: includes not found - libraries not found tiff: includes not found - libraries not found freetype2: includes not found - libraries not found freetype2: not available T1-fonts: includes not found - libraries not found TT-fonts: includes not found - libraries not found w32: includes not found - libraries not found EXIF support enabled Checking if your kit is complete... Looks good Note (probably harmless): No library found for -ljpeg Writing Makefile for Imager::CountColor Writing Makefile for Imager::Filter::DynTest Writing Makefile for Imager::Filter::Flines Writing Makefile for Imager::File::ICO Writing Makefile for Imager::Filter::Mandelbrot Writing Makefile for Imager::File::SGI Writing Makefile for Imager::plugins Writing Makefile for Imager

I had originally tried DMAKE, but got the following error:

dmake.exe: Error: -- `C:\Perl\libConfig.pm' not found, and can't be made
Thanks again!
Direct Responses: 12753 | Write a response
Posted on 2010-06-07 01:21:21.194361-07 by tonyc in response to 12740
Re: Can not compile...

Sorry for the delay.

That error from dmake is strange - which directory did you install ActivePerl to?

I installed to c:\perl and that file exists.

The error you're seeing building with nmake indicates that nmake isn't building the prerequisites for CountColor.dll - CountColor.o in this case.

On the jpeg side, it looks like EU::MM is being too smart and dropping -ljpeg because it couldn't find it, which might explain your jpeg issues.

Direct Responses: Write a response