Re: Cannot load library *.so undefined symbol error
Karl Schopmeyer <[email protected]> Fri, 11 Apr 2014 10:26:13 -0500
| Newsgroups | gmane.network.open-pegasus.general |
|---|---|
| Message-ID | <[email protected]> |
We need more information here. It is clear that, however you are building, the resulting shared library has symbol problems and cannot resolve those symbols when it is loaded by OpenPegasus. The errors themselves are probably coming from the loader when it tries to load the shared library as a provider. Pegasus is largely just interpreting information that is being returned by the loader. Obviously, at least the symbol *CIMSoftwareIdentityBuldier *is expected to be linked as part of the load and it does not exist By the way, did you mean to have Builder mispelled as buldier??? Some questions: 1. OS your are building on 2. Tools you use to build your provider. 3. Language you are writing provider in and interface uses (C++, CMPI, etc.). 4. Compiler used and the cmd line options with which you are compiling the library. It is hard to dig to deep without looking further are your code and exactly what the environment is. There should be no problems in this are with OpenPegasus so lets leave that out. Loading providers has been In general, I suggest that restart with very basic provider version that copies some other providercode that uses same tools compiler, etc. but does almost nothing, just loads. It could even just return NOT_SUPPORTED for every function. This will confirm that you can get the basics to load and with your provider name, etc. So rather than try to debug this code itself, recreate just the very basics of the provider and make that successfully load. No matter which of the above options you use, there should be an example you could borrow and create the basics in a couple of hours. Then go back to your provider and fix it up to match what does load but with the full set of provider app. Karl On4/11/2014 06:34 AM, shubhra garg wrote: > _SUPPORTEHi Johnny/Jim/Schopmeyer, > > I need an urgent help. > Since, my mail are not reaching open pegasus community, so I am > writing it to you. > > I don't know how to debug and fix the issue. So, Kindly help. > > > I have written a cpp code. > When I am deploying that code after doing "make clean" and "make". > I am facing the below mentioned error: > > > Ran command: where A/b is a directory and root/das is a namespace. > ========================================================= > ./cimcli -s -n root/das -l 10.1.20.121 -u admin -p admin ei > das_SoftwareIdentity > cimcli CIMException: Cmd= ei Object= LHOS_SoftwareIdentity Code= 1 > CIM_ERR_FAILED: PGS04201: Provider LHOS_SoftwareIdentity_Provider in > file /A/B/data/debug/lib/libLHOSProviderLib.so *cannot load library. * > Error: /A/B/data/debug/lib/libLHOSProviderLib.so: undefined symbol: > *_ZTV26CIMSoftwareIdentityBuldier.* > > I did a little debugging and found the below: > ========================================== > > 1 Step : > objdump -T /A/B/data/debug/lib/libLHOSProviderLib.so | grep > _ZTV26CIMSoftwareIdentityBuilder > 0000000000000000 D *UND* 0000000000000000 > _ZTV26CIMSoftwareIdentityBuilder > > 2. Step: I ran the command ----> ldd -r > /A/B/data/debug/lib/libLHOSProviderLib.so > > > *undefined symbol: *_ZTV26CIMSoftwareIdentityBuilder (/A/B/data/debu > g/lib/libDASProviderLib.so) > *undefined symbol:* _ZNK8LeftHand14CIMEnvironment9getCBLOpsEv (/A/B/d > ata/debug/lib/libDASProviderLib.so) > *undefined symbol:* _ZN8LeftHand14CIMEnvironmentD1Ev (/A/B/data/debu > g/lib/libDASProviderLib.so) > *undefined symbol:* _ZN8LeftHand14CIMEnvironmentC1Ev (/A/B/data/debu > g/lib/libDASProviderLib.so) > *undefined symbol:* > _ZNK8LeftHand14CIMEnvironment19createCIMCBLContextERKSsS2_ ( > /A/B/data/debug/lib/libLHOSProviderLib.so) > *undefined symbol: > *_ZN26CIMSoftwareIdentityBuilderC1EPN6cimple22Enum_Instances_Ha > ndlerINS0_21DAS_SoftwareIdentityEEER11ICIMContext (/A/B/data/debu > g/lib/libDASProviderLib.so) > > > Thanks and Regards, > Shubhra