Salman Mohsin <[EMAIL PROTECTED]> writes: > >That's where the problem started. When I changed my code, compiled/linked >it, and then tried to run it, it core dumped at MQCONN(). Somehow even if >you don't have any Perl related code embedded in your code but still you >linked it with embedded perl, it'd core dump at the 1st MQSeries call. I'm >compiling & linking by adding (as appropriately suggested by "perlembed") >`perl -MExtUtils::Embed -e ccopts` and `perl -MExtUtils::Embed -e ldopts` >to my existing compiler and linker commands respectively. This also makes >sure that I'm incorporating/linking Perl into my code exactly the way >actual Perl executable has been built on our system. > >Has anyone else seen this problem of perl and MQSeries??
I don't even know what MQSeries is but here is my â0.02 anyway. 1. It is possible that ccopts has provied some -D flags that change things. In paticular things like: -D_LARGEFILE_SOURCE can mean that structs get an "off_t" that is now 64-bit and mis-match with libraries expectation of 32-bit. 2. Most likely though is that ldopts has added something like -lpthreads or some network library which behaves differently. 3. Even if libaries are okay together the _order_ of libraries on final LD line can be vital. 4. ldopts often adds -L/usr/local/lib. It is not unknown for /usr/local/lib to be full of junk. Given 2..4 it would be helpful to see what your ldopts are, and the before/after adding ldopts. >Can someone shed >some light on it? Is there someone who's been successful in getting >MQSeries and embedded perl work?? > >I'm kinda lost here and if I'm not able to get this resolved, I'd have to >(horrors!) try the whole thing in C (which anyone won't really want, >especially when having already done that so easily in Perl). > >Any help would be greatly appreciated. > >Thanks, >Salman