Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Strawberry and MQSeries Problem

by mpersico (Beadle)
on Sep 10, 2013 at 18:00 UTC ( #1053328=perlquestion: print w/ replies, xml ) Need Help??
mpersico has asked for the wisdom of the Perl Monks concerning the following question:

I've taken the latest version of MQSeries and a Strawberry 5.18 and put them on a Windows 2008 box.

I managed to get MQSeries to compile with two tweaks. One is described in rt://88555, the other in rt://88587.

Those gets me through the compile. However, the link promptly blew up as below. Any clues?

E:\strawberryBuild\5.18.0.1-64-20130905-bootstrap\data\.cpanplus\5.18. +0\build\MQSeries-1.34>dmake dlltool --def MQSeries.def --output-exp dll.exp g++.exe -o ..\blib\arch\auto\MQClient\MQSeries\MQSeries.dll -Wl,--base +-file -Wl,dll.base -mdll -s -L"E:\strawberryBuild\5.18.0.1-64- 20130905-bootstrap\perl\lib\CORE" -L"E:\strawberryBuild\5.18.0.1-64-20 +130905-bootstrap\c\lib" MQSeries.o constants.o E:\strawberry Build\5.18.0.1-64-20130905-bootstrap\perl\lib\CORE\libperl518.a E:\mq7 +1\Tools\lib\mqic.lib E:\mq71\Tools\lib\mqic32.lib E:\strawberr yBuild\5.18.0.1-64-20130905-bootstrap\c\x86_64-w64-mingw32\lib\libmold +name.a E:\strawberryBuild\5.18.0.1-64-20130905-bootstrap\c\x86 _64-w64-mingw32\lib\libkernel32.a E:\strawberryBuild\5.18.0.1-64-20130 +905-bootstrap\c\x86_64-w64-mingw32\lib\libuser32.a E:\strawber ryBuild\5.18.0.1-64-20130905-bootstrap\c\x86_64-w64-mingw32\lib\libgdi +32.a E:\strawberryBuild\5.18.0.1-64-20130905-bootstrap\c\x86_6 4-w64-mingw32\lib\libwinspool.a E:\strawberryBuild\5.18.0.1-64-2013090 +5-bootstrap\c\x86_64-w64-mingw32\lib\libcomdlg32.a E:\strawber ryBuild\5.18.0.1-64-20130905-bootstrap\c\x86_64-w64-mingw32\lib\libadv +api32.a E:\strawberryBuild\5.18.0.1-64-20130905-bootstrap\c\x8 6_64-w64-mingw32\lib\libshell32.a E:\strawberryBuild\5.18.0.1-64-20130 +905-bootstrap\c\x86_64-w64-mingw32\lib\libole32.a E:\strawberr yBuild\5.18.0.1-64-20130905-bootstrap\c\x86_64-w64-mingw32\lib\libolea +ut32.a E:\strawberryBuild\5.18.0.1-64-20130905-bootstrap\c\x86 _64-w64-mingw32\lib\libnetapi32.a E:\strawberryBuild\5.18.0.1-64-20130 +905-bootstrap\c\x86_64-w64-mingw32\lib\libuuid.a E:\strawberry Build\5.18.0.1-64-20130905-bootstrap\c\x86_64-w64-mingw32\lib\libws2_3 +2.a E:\strawberryBuild\5.18.0.1-64-20130905-bootstrap\c\x86_64 -w64-mingw32\lib\libmpr.a E:\strawberryBuild\5.18.0.1-64-20130905-boot +strap\c\x86_64-w64-mingw32\lib\libwinmm.a E:\strawberryBuild\5 .18.0.1-64-20130905-bootstrap\c\x86_64-w64-mingw32\lib\libversion.a E: +\strawberryBuild\5.18.0.1-64-20130905-bootstrap\c\x86_64-w64-m ingw32\lib\libodbc32.a E:\strawberryBuild\5.18.0.1-64-20130905-bootstr +ap\c\x86_64-w64-mingw32\lib\libodbccp32.a E:\strawberryBuild\5 .18.0.1-64-20130905-bootstrap\c\x86_64-w64-mingw32\lib\libcomctl32.a d +ll.exp MQSeries.o:MQSeries.c:(.text+0x150): undefined reference to `MQSTAT' MQSeries.o:MQSeries.c:(.text+0x15aa): undefined reference to `MQSETMP' MQSeries.o:MQSeries.c:(.text+0x2c28): undefined reference to `MQINQMP' MQSeries.o:MQSeries.c:(.text+0x3bad): undefined reference to `MQDLTMP' MQSeries.o:MQSeries.c:(.text+0x40ba): undefined reference to `MQDLTMH' MQSeries.o:MQSeries.c:(.text+0x45d3): undefined reference to `MQCRTMH' MQSeries.o:MQSeries.c:(.text+0x4f91): undefined reference to `MQSET' MQSeries.o:MQSeries.c:(.text+0x556c): undefined reference to `MQBEGIN' MQSeries.o:MQSeries.c:(.text+0x5888): undefined reference to `MQBACK' MQSeries.o:MQSeries.c:(.text+0x5a68): undefined reference to `MQCMIT' MQSeries.o:MQSeries.c:(.text+0x5c4d): undefined reference to `MQDISC' MQSeries.o:MQSeries.c:(.text+0x5eb7): undefined reference to `MQCLOSE' MQSeries.o:MQSeries.c:(.text+0x89a9): undefined reference to `MQGET' MQSeries.o:MQSeries.c:(.text+0x1040e): undefined reference to `MQPUT1' MQSeries.o:MQSeries.c:(.text+0x1635c): undefined reference to `MQPUT' MQSeries.o:MQSeries.c:(.text+0x17b21): undefined reference to `MQINQ' MQSeries.o:MQSeries.c:(.text+0x198b9): undefined reference to `MQOPEN' MQSeries.o:MQSeries.c:(.text+0x1ca72): undefined reference to `MQCONNX +' MQSeries.o:MQSeries.c:(.text+0x1cf8b): undefined reference to `MQCONN' e:/strawberrybuild/5.18.0.1-64-20130905-bootstrap/c/bin/../lib/gcc/x86 +_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.ex e: MQSeries.o: bad reloc address 0x0 in section `.pdata' e:/strawberrybuild/5.18.0.1-64-20130905-bootstrap/c/bin/../lib/gcc/x86 +_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.ex e: final link failed: Invalid operation collect2: ld returned 1 exit status dmake: Error code 129, while making '..\blib\arch\auto\MQClient\MQSer +ies\MQSeries.dll' dmake: Error code 255, while making 'subdirs' E:\strawberryBuild\5.18.0.1-64-20130905-bootstrap\data\.cpanplus\5.18. +0\build\MQSeries-1.34>

Comment on Strawberry and MQSeries Problem
Download Code
Re: Strawberry and MQSeries Problem
by VinsWorldcom (Priest) on Sep 10, 2013 at 18:59 UTC

    I've seen the "undefined reference" link errors when the DLL is not in sync with the link library. I've gotten around it by creating a new library from the DLL with 'dlltool'.

    The other thing based simply on filenames is that .lib libraries are generally for use with the MSVC compiler package. Strawberry expects .a libraries.

    I see your MQSeries specific libraries are here:

    E:\mq71\Tools\lib\mqic.lib E:\mq71\Tools\lib\mqic32.lib

    Where are the DLL's? Try this, replacing PATH_HERE with the proper path to the DLL's:

    pexports E:\PATH_HERE\mqic.dll > mqic.def dlltool --as-flags=--64 -m i386:x86-64 -k --output-lib libmqic.a --inp +ut-def mqic.def pexports E:\PATH_HERE\mqic32.dll > mqic.def dlltool --as-flags=--64 -m i386:x86-64 -k --output-lib libmqic32.a --i +nput-def mqic.def

    Make sure to rerun 'dmake' and check that the link step is referencing the new libmqic.a and libmqic32.a libraries instead of the .lib ones.

    I've done this successfully with WinPcap when compiling Net::Pcap.

      Turns out that the 64bit libs were in E:\mq71\Tools\lib64. Once I made that change in config, all was well. Thank you

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1053328]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (10)
As of 2014-08-22 13:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (158 votes), past polls