Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Hi ho, all!

I have code that uses Compress::Bzip2 on Solaris, Linux, and FreeBSD. Runs beautifully! But, now I need it on some Win32 boxen.

I grabbed BZip2 and built the executables and dll from the 1.0.1 source ( w/ some minor modifications to the makefile ... and using PPT's cmp! ). I grabbed Compress::Bzip2, modified Makefile.PL for my system's include and lib paths, and tried to nmake it. Below the readmore tag is the result. Please note that I am on a W2K SP2 box w/ VC++ 6 and AS perl 629 ( hense the need for VC++ and not MinGW gcc ). BTW, I also tried w/ the precompiled Win32 stuff from the BZip2 site, with no change in results.

I looked into Compress::Zlib for illumination, but the differences are many, and my attempts at reconsilling them failed miserably.

The CHANGES file from BZip2 says "Avoid library namespace pollution. Prefix all exported symbols with BZ2_.". I made the change to the Bzip2.xs file, with only cosmetic changes to the output below. I downreved the BZip2 to v.9, with negative results.

I don't program C on Win32, or at least not on M$ products since DOS 5. And, I tried to contact the module's author, but his email address seems defunct.

Anyone have advice on how to proceed ( please no CygWin or UWin answers, and I don't want to backtick if I can avoid it )? My guess is that it isn't seeing the libbz2.dll file, but I'm not certain.

C:\incoming\Compress-Bzip2-1.00>perl Makefile.PL Note (probably harmless): No library found for '-lbz2' Writing Makefile for Compress::Bzip2 C:\incoming\Compress-Bzip2-1.00>nmake Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. cp Bzip2.pm blib\lib\Compress\Bzip2.pm AutoSplitting blib\lib\Compress\Bzip2.pm (blib\lib\auto\Compress\Bzip2 +) C:\usr\bin\Perl.exe -IC:\usr\lib -IC:\usr\lib C:\usr\lib\ExtUt +ils/xsubpp -typemap C:\usr\lib\ExtUtils\typemap -typemap typemap Bzip2.xs > Bzi +p2.xsc && C:\usr\bin\Perl.exe -IC:\usr\lib -IC:\usr\lib -MExtUtils::Command -e m +v Bzip2.xs c Bzip2.c cl -c -I/usr/include -nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSO +LE -DNO_ST RICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DP +ERL_MSVCRT _READFIX -O1 -MD -DNDEBUG -DVERSION=\"1.00\" -DXS_VERSION=\"1.00\" + -IC:\usr \lib\CORE Bzip2.c Bzip2.c "Running Mkbootstrap for Compress::Bzip2 ()" C:\usr\bin\Perl.exe -IC:\usr\lib -IC:\usr\lib -MExtUtils::Comm +and -e chm od 644 Bzip2.bs C:\usr\bin\Perl.exe "-IC:\usr\lib" "-IC:\usr\lib" -MExtUtils:: +Mksymlists -e "Mksymlists('NAME' => 'Compress::Bzip2', 'DLBASE' => 'Bzip2', 'DL +_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);" link -out:blib\arch\auto\Compress\Bzip2\Bzip2.dll -dll -nologo + -nodefaul tlib -release -libpath:"C:\usr\lib\CORE" -machine:x86 Bzip2.obj C: +\usr\lib\C ORE\perl56.lib "C:\Program Files\Microsoft Visual Studio\VC98\lib\oldn +ames.lib" "C:\Program Files\Microsoft Visual Studio\VC98\lib\kernel32.lib" "C:\P +rogram Fil es\Microsoft Visual Studio\VC98\lib\user32.lib" "C:\Program Files\Micr +osoft Visu al Studio\VC98\lib\gdi32.lib" "C:\Program Files\Microsoft Visual Studi +o\VC98\lib \winspool.lib" "C:\Program Files\Microsoft Visual Studio\VC98\lib\comd +lg32.lib" "C:\Program Files\Microsoft Visual Studio\VC98\lib\advapi32.lib" "C:\P +rogram Fil es\Microsoft Visual Studio\VC98\lib\shell32.lib" "C:\Program Files\Mic +rosoft Vis ual Studio\VC98\lib\ole32.lib" "C:\Program Files\Microsoft Visual Stud +io\VC98\li b\oleaut32.lib" "C:\Program Files\Microsoft Visual Studio\VC98\lib\net +api32.lib" "C:\Program Files\Microsoft Visual Studio\VC98\lib\uuid.lib" "C:\Prog +ram Files\ Microsoft Visual Studio\VC98\lib\wsock32.lib" "C:\Program Files\Micros +oft Visual Studio\VC98\lib\mpr.lib" "C:\Program Files\Microsoft Visual Studio\VC +98\lib\win mm.lib" "C:\Program Files\Microsoft Visual Studio\VC98\lib\version.lib +" "C:\Prog ram Files\Microsoft Visual Studio\VC98\lib\odbc32.lib" "C:\Program Fil +es\Microso ft Visual Studio\VC98\lib\odbccp32.lib" "C:\Program Files\Microsoft Vi +sual Studi o\VC98\lib\msvcrt.lib" -def:Bzip2.def Creating library blib\arch\auto\Compress\Bzip2\Bzip2.lib and object + blib\arch \auto\Compress\Bzip2\Bzip2.exp Bzip2.obj : error LNK2001: unresolved external symbol _BZ2_bzBuffToBuf +fCompress@ 28 Bzip2.obj : error LNK2001: unresolved external symbol _BZ2_bzBuffToBuf +fDecompres s@24 Bzip2.obj : error LNK2001: unresolved external symbol _BZ2_bzlibVersio +n@0 blib\arch\auto\Compress\Bzip2\Bzip2.dll : fatal error LNK1120: 3 unres +olved exte rnals NMAKE : fatal error U1077: 'link' : return code '0x460' Stop.

HTH
--
idnopheq
Apply yourself to new problems without preparation, develop confidence in your ability to to meet situations as they arrise.


In reply to nmake-ing Compress::Bzip2 in Win32 errors fatally by idnopheq

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-04-24 10:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found