Discussion:
Can't solve error 2012 problem on Linux 2.4.21-4
(too old to reply)
s***@gmail.com
2005-08-10 15:21:06 UTC
Permalink
Getting it on my MQCONN call.
2012 MQRC_ENVIRONMENT_ERROR Call not valid in environment.
The call is not valid for the current environment.
The application is linked to the wrong libraries (threaded or
nonthreaded).

I am dynamically loading (C++) the libmqm_r.so library, fetching a
pointer to MQCONN and then calling it; then I get this error.
My app is multithreaded, hence why I use the _r variant.

If I switch to using libmqic_r.so and call MQCONNX then it works. That
seems to make no sense. If the multithreaded client library works, why
would the multithreaded server library not work?

But what is error 2012 really saying?
How is it that I would be linked to the wrong library?
What constitutes the check for this?
From my position I'd assume it means "link/load the _r lib variant if
your app has (or will potentially have) more than one thread, otherwise
use the regular non_r version".
Well, I'm doing that, so I don't understand why I'm getting the error.
Glenn Baddeley
2005-08-12 07:26:00 UTC
Permalink
Scott,

Before running your app, try export LD_ASSUME_KERNEL=2.4.19

MQ 5.3 uses the old LinuxThreads model, whereas your kernel uses the
new LNTP model.

See http://www-1.ibm.com/support/docview.wss?uid=swg21110096

Cheers,
Glenn.
Post by s***@gmail.com
Getting it on my MQCONN call.
2012 MQRC_ENVIRONMENT_ERROR Call not valid in environment.
The call is not valid for the current environment.
The application is linked to the wrong libraries (threaded or
nonthreaded).
I am dynamically loading (C++) the libmqm_r.so library, fetching a
pointer to MQCONN and then calling it; then I get this error.
My app is multithreaded, hence why I use the _r variant.
If I switch to using libmqic_r.so and call MQCONNX then it works.
That seems to make no sense. If the multithreaded client library
works, why would the multithreaded server library not work?
But what is error 2012 really saying?
How is it that I would be linked to the wrong library?
What constitutes the check for this?
From my position I'd assume it means "link/load the _r lib variant if
your app has (or will potentially have) more than one thread,
otherwise use the regular non_r version".
Well, I'm doing that, so I don't understand why I'm getting the error.
s***@gmail.com
2005-08-15 20:56:17 UTC
Permalink
That worked.
Thank you.
Post by Glenn Baddeley
Scott,
Before running your app, try export LD_ASSUME_KERNEL=2.4.19
MQ 5.3 uses the old LinuxThreads model, whereas your kernel uses the
new LNTP model.
See http://www-1.ibm.com/support/docview.wss?uid=swg21110096
Cheers,
Glenn.
Loading...