Using V9 C++ parser within shared library (Solaris)

I am trying to use the latest C++ version of XML parser within a shared library on Solaris (v8) but I am having a problem with an unresolved symbol when the shared library is loaded.
../bin/Release/xxsd: fatal: relocation error: file /space/xxs/bin/Release/libxxtOracle.so: symbol __0fJXMLParserHxmlinitPUcPFPvPCUcUi_vPvP6IxmlsaxcbTDTB: referenced symbol not found
Compiler is Forte V6.
We currently successfully use the previous version of the parser on Solaris (oraxml8) with same build settings within our application.
I am able to build and run the sample demo successfully.
Any suggestions as to what the problem is and how to get round it?.
Mike

All works fine!...
$ mkdir /tmp/xxx
$ cat > dllfile.c
$ cat > dlluser.c
$ gcc -fPIC -c dllfile.c
$ gcc -shared -W1,-soname,libdllfile.so.1 -o libdllfile.so dllfile.o
$ gcc -o prog dlluser.c -ldl
$ ls -l
total 56
-rw-r--r-- 1 xxxxxx users 80 Апр 8 17:04 dllfile.c
-rw-r--r-- 1 xxxxxx users 908 Апр 8 17:15 dllfile.o
-rw-r--r-- 1 xxxxxx users 368 Апр 8 17:03 dlluser.c
-rwxr-xr-x 1 xxxxxx users 5260 Апр 8 17:15 libdllfile.so
-rwxr-xr-x 1 xxxxxx users 6412 Апр 8 17:16 prog
$
$ file *
dllfile.c:     c program text
dllfile.o:     ELF 32-bit MSB relocatable SPARC Version 1
dlluser.c:     c program text
libdllfile.so:     ELF 32-bit MSB dynamic lib SPARC Version 1, dynamically linked, not stripped
prog:          ELF 32-bit MSB executable SPARC Version 1, dynamically linked, not stripped
$
$ su
Password:
# mkdir -p /root/shared_library/
# cp libdllfile.so /root/shared_library/
# exit
$ ./prog
With the changes
library loaded
Inside function
$

Similar Messages

  • How to use J2EE shared library in a team environment? Any help?

    Hi all,
    I've created two portal web projects one as a shared library to share my portal resources (a saparate project
    containging all the portlets) rather than the portal project that containing the other portal resources (portal look &
    feel & ...).
    I've followed the steps to create a J2EE shared library (for portlets for example) by modifying META-INF/MANIFEST.MF file with the following variables added to it:
    Extension-Name: MyPortalWebProject (as a shared library)
    Specification-Version: 1.0
    Implementation-Version: 1.0
    and exporting the WAR file from the project that contains my portlets to be imported into the other portal project.
    I can see the portlets available from the portal project but I can't use them as I get the following
    error:
    No such portlet with URI (Portlet Name).
    Did I miss any steps to be able to use the portlets from the shared library into another portal project?
    If anyone has another scenario for how to separate all portlets in a separate project and share this with the main
    portal project, please advice.
    Many Thanks in advance.
    Mohamed

    Hello, did you attempted to use by Stream Portal?

  • Use of deployment classpath or shared-libraries to pick-up "custom" classes

    Hi,
    I’m trying to determine an approach to dealing with how classes are found in a deployed ADF application via classpath, etc. I’ve tried to explain the situation below as best I can so it’s clear. If you have any comments/suggestions as to how this could be done, it would be much appreciated
    Current Application structure:
    Consists of an application initially deployed to OC4J 10.1.3.4 using an alesco-wss.ear file
    Application contains a single Web Module, initially deployed as wss.war file within the alesco-wss.ear file above.
    The Web Module (wss) was built in JDeveloper 10.1.3.4 using 2 projects, a Model and ViewController project, and uses ADFBC.
    The Model project seems to also generate an alesco-model.jar file in the /WEB-INF/lib/ folder, even though Model classes are in the /WEB-INF/classes/ folder below?
    Exploded structure of application on application server looks something like:
    applications/alesco-wss/META-INF/
    /application.xml <- specifies settings for the Application such as Web Module settings
    /wss/
    /app/ <- directory containing application .jspx pages protected by security
    /images/ <- directory containing application images
    /infrastructure/ <- directory containing .jspx files for login, logout and error reduced security
    /skins/ <- directory containing Skin image, CSS and other files
    /WEB-INF/
    /classes/ <- directory containing application runtime class files as per package sub-directories
    /lib/ <- JAR files used by application (could move some to shared-libaries?) – seems to contain alesco-model.jar
    /regions/ <- directory containing .jspx pages used for Regions within JSPX template page
    /templates/ <- directory containing template .jspx pages used for development (not really required for deployment)
    /adf-faces-config.xml
    /adf-faces-skins.xml
    /faces-config.xml
    /faces-config-backing.xml
    /faces-config-nav.xml
    /region-metadata.xml
    /web.xml
    testpage.jspx <- Publicly accessible page just to test
    The application runs successfully using the above deployment structure.
    We plan to use the exploded deployment structure so that updates to pages, etc. can be applied individually rather than requiring construction and re-deployment of complete .EAR or .JAR files.
    What I’m trying to determine/establish is whether there is a mechanism to cater for a customisation of a class, where such a class would be used instead of the original class, perhaps using a classpath mechanism or shared library?
    For example, say there is a class “talent2.alesco.model.libraries.ModelUtil.class”, this would in the above structure be found under:
    applications/alesco-wss/META-INF/classes/talent2/alesco/model/libraries/ModelUtil.class
    Classes using the above class would import “talent2.alesco.model.libraries.ModelUtil”, so they effectively use that full-reference to the class (talent2.alesco.model.libraries as a path, either expanded or within a JAR).
    From the Oracle Containers for J2EE Developer’s Guide 10.1.3 page 3-17, it lists the following:
    Table 3–1 Configuration Options Affecting Class Visibility
    Classloader Configuration Option
    Configured shared library <code-source> in server.xml
    <import-shared-library> in server.xml
    app-name.root <import-shared-library> in orion-application.xml
    <library> jars/directories in orion-application.xml
    <ejb> JARs in orion-application.xml
    RAR file: all JARs at the root.
    RAR file: <native-library> directory paths.
    Manifest Class-Path of above JARs
    app-name.web.web-mod-name WAR file: Manifest Class-Path
    WAR file: WEB-INF/classes
    WAR file: WEB-INF/lib/ all JARs
    <classpath> jars/directories in orion-web.xml
    Manifest Class-Path of above jars.
    search-local-classes-first attribute in orion-web.xml
    Shared libraries are inherited from the app root.
    We have reasons why we prefer not to use .JAR files for these “non-standard” or “replaced” classes, so prefer an option that doesn’t involve creating a .JAR file.
    Our ideal solution would be to have such classes placed in an alternate directory that is referred to in a classpath such that IF a class exists in that location, it will be used instead of the one in the WEB-INF/classes/ directories, and if not such class is found it would then locate it in the WEB-INF/classes/ directories.
    - Can a classpath be set to look for such classes in a directory?
    - Do the classes have to replicate the original package directory structure within that directory (<dir>/talent2/alesco/model/libraries)?
    - If the class were put in such a directory, without replicating the original package directory structure, I assume the referencing “import” statements would not locate it correctly.
    - Is the classpath mechanism “clever” enough to search the package directory structure to locate the class (i.e. just points to <dir>)?
    - Or would the classpath mechanism require each individual path replicating the package structure to be added (i.e. <dir>/talent2/alesco/model/libraries/ and any other such package path)?
    If we are “forced” to resort to the use of JAR files, does a JAR file used for the purpose of overwrite/extending a sub-set of classes in the original location need to contain ALL related package classes? Or does it effectively “superset” classes it finds in all JAR files, etc. in the whole classpath? That is, it finds talent2.alesco.model.libraries.ModelUtil in the custom.jar file and happily goes on to get the remainder of talent2.alesco.model.libraries classes in the other core JAR/location. Or does it need all of them to be in the first JAR file for that package?
    Any help would be appreciated to understand how these various class visibility mechanisms could be used to achieve what is required would be appreciated.
    Gene

    So, nobody's had any experience with deploying an ADF application, and providing a means for a client to place custom classes in such a way as they're used in preference to the standard application class, effectively to implement a customised class without overwriting the original "standard" class?
    Gene

  • Shared Library Linking Question

    I'm building my first site using a shared library swf file.
    I'm wondering about what elements have to be linked for everything
    to work properly. For example:
    In my shared library swf, I've got a menu movie clip built.
    Within it, there is another movieclip with 6 buttons, a couple
    motion tweens, and a couple graphics inside. So, in my menu
    movieclip folder, there are about 12 different elements (buttons,
    graphics, a couple movie clips, etc.
    In any other swf file that uses the menu from the shared
    library, do I just need to link and bring over the main menu
    movieclip, or do I need to link every element and bring it over to
    any swf that uses the menu? Or, is there even a better way to do
    all of this? I've got at least 6 different swfs that will use this
    menu. I'd only use it once on the master.swf, but it's nestled
    within layers on the other seperate swfs for visual
    purposes.

    plaing the menu in every .swf file will increase the size of
    each file. the shared library file will be larger than it needs to
    be.
    Why not just make one .swf that only contains the just the
    menu. Then you could create a master file that loads the menu.swf
    at a high enough level that it is always on top. The other movies
    (webpages) could be loaded inbetween the master.swf, which you'd
    probably put on level 1, and the menu.swf. That way only the bare
    essentials would need to be stored in the shared library keeping
    its size as small as possible.
    (see Shane Rebenschied's book,
    Flash MX 2004: Beyond the Bsasics)

  • Unable to create a shared library

    hi
    My name is Prabhu and i am new to this forum. I hope to be a constructive addition to the forum. But, i am starting of with a problem i am facing. :) I would be grateful if someone can provide some pointers for the same.
    I am trying to migrate a tool to SS11 compiler for solaris 5.9. Unfortunately, I am unable to build shared libraries. The linking fails saying
    ld: fatal: file tmp.o : section function(): has invalid sh_info: 0
    This tmp.o is a relocatable object file composed of many other object files. These leaf level object files were not compiled with -KPIC though as solaris actually creates relocatable object files. Is this correct? Previously, we used -KPIC to create the object files used as input to a shared library but I removed this on the basis of a suggestion given from someone.
    Can someone please let me know what could be the issue here? My email id is [email protected]
    Thanks in advance

    To add a jar file inJDeveloper, go to Tools -> Project Properties -> Libraries and click on Add Jar/Directory button to add desired jar files.
    Thanks
    Shree

  • Question about upgrading iTunes multiple computers with shared library

    Greetings,
    I have a question about upgrading to the current version of iTunes.
    Currently, my household uses 3 Mac computers (2 Powerbook 17in laptops and a Mack Mini). We are all (currently) on system 10.4.11 (with iTunes 9.2.1). Between the 3 computers we have a shared iTunes music and video library on a networked high capacity hard drive.
    We recently purchased an iPad. In order to make it easy for updates and to use media from our iTunes shared library I decided that we should upgrade the systems on our home computers to Snow Leopard. I have ensured that all the computers have at lease 2 Gb of RAM and adequate hard drive space.
    The only possible problem I see is that one of the Powerbook laptops uses the old Motorola processor. (This is one of the last Powerbooks to use that processor.) I don’t think this computer can be upgraded to Snow Leopard.
    My question is, if I upgrade 2 of the computers (and iTunes in the process), will I still be able to access the shared iTunes library using the older computer with the older system and iTunes? Will the upgrade process change the iTunes library in such a way that the one older computer will no longer be able to properly access that library?
    Are there any other problems I might encounter having a mixed system/iTunes environment?
    Thank you,
    Tim

    iantoole wrote:
    Just a thought. Should I somehow open iTunes on MBP2 using MBP1's Library file??
    both Macs can access the same library file, however, only one at a time !
    to do that, you would ideally have the entire iTunes folder (not just the iTunes music folder) on the external. then, on one Mac after the other, launch iTunes while holding the option key, click on +choose library+ when prompted, and select the iTunes folder on the external.
    or, you could have two separate libraries and keep those in sync using third party tools such as Syncopation, TuneRanger or SuperSync.
    for purchases from the iTunes store, you could set up _*Home Sharing*_ - it can be configured to automatically transfer new purchases to home shared libraries.
    Can I create a script to have MBP1 always save the iTunes Library file on the shared hard drive?
    no need.
    JGG

  • XFL-Based Author-Time Shared Library Workflow

    I'm creating a large project with many different FLAs using symbols pulled from a shared library FLA at author time. It works great, however, the workflow could be simplified (possibly) if the shared library were saved in XFL format.
    I saved a copy of the shared library FLA as XFL. Then, I tried to import a symbol to another FLA from the XFL as author-time symbol references. Flash recognized the XFL document as an accepted source, but did not offer a menu giving a selection of symbols.
    Has anyone tried this at all? Any luck? Is it a bug in CS5?

    Im having the same issue.  With an FLA, hitting the browse button brings up the symbol browser.  With an XFL, the symbol browser does not come up.  Nothing happens.
    Also, if you copy/paste from an FLA library, it will maintain the "Source" reference and have the option to Update the symbol.  If you copy/paste from an XFL, it loses its reference and the ability to update.  It looks like a bug with CS5...
    However,
    If you use runtime shared libraries it works.  This is probably the better approach anyways, since you only need to change and recompile a single shared asset.
    Watch out though, i've found a bug with CS5 and RSL...using the new TLF text fields will cause shared library swf files to fail to load!  So stay away from TLF in shared libraries.
    So for you, just take the symbols that you want to link from one XFL to another, and split them into their own shared assets XFL.  Now go to the symbol properties, and export as runtime shared library.  Enter the swf name as the URL.  Comp
    Now copy/paste the symbol into the second XFL or use the Import / Open External Library.

  • Runtime shared library in Flash CS5

    I'm trying to use OSMF as a runtime shared library in Flash CS5, but Flash keeps on crashing all the time I'm trying to change that swc from Merged into code to runtime shared library. Whatever URL / policy file Im using, Flash always crashes at compilation, and then after that there's no way to reopen the FLA without Flash crashing. Very annoying. I'm glad it's just a test project and not production files... Anyone already experienced the same kind of bug?
    UPDATE: just tested it on Win XP SP2, same behavior, same nasty result

    Funny, I have the same problem with a shared library (documentation on this site makes no sense to me, that is). And the Adobe Help desk refers me to this forum!
    What I know is that an item in a shared library cannot have names with spaces, so should be like "btn-up" and not "btn up".
    Further you should while activating the item in Libraries look for "Properties" (on the right hand side of the pull down of the Library) and define them as "Export for sharing" (my version is in Dutch and for Mac so these labels are named differently and in a different place).
    Then in the movie you want to use them in, you open import (under file) and open the .fla of your first document as external library.
    In the beginning it is as easy as that, but then creating a library in movies that are in use for an extended period of time (using spaces in their names, etc.) is a whole new ball game.
    Lucie

  • Creating simple shared library using gcc under Solaris 10

    Hi All:
    I apologize if this is too newbie a question but have seen nothing that works for me yet.
    I'm trying to create a shared library that contains a single object file using gcc (as installed on Solaris 10). I compiled the source code as follows:
    gcc -c -fPIC x.cpp -o x.o
    and got the x.o object file created and readable.
    I then tried (from sample code on line):
    gcc -shared -Wl,-soname,libMyLib.so.1 -o libMyLib.so.1.0.1 x.o
    and get the following errors:
    ld: warning: option -o appears more than once, first setting taken
    ld: fatal: file libMyLib.so.1: open failed: No such file or directory
    ld: fatal: File processing errors. No output written to x.o
    collect2: ld returned 1 exit status

    -soname is a GNU ld option. Use -h instead.
    NB:
    - you should use g++ not gcc to compile C++ code
    - this forum is about the Oracle C++ compiler, not gcc. With it, you would do:
    CC -c -KPIC x.cpp
    CC -G -h libMyLib.so.1 -o libMyLib.so.1.0.1 x.o

  • Problem with JNI in a Solaris shared library

    Hi,
    I have a problem.
    I have used JNI in my .dll on Windows & .so on Solaris . I have also used the same JNI code in a .exe on Windows & an executable on Solaris. 3 out of the above 4 combinations work & 1 doesen't. When I use JNI from a .so on Solaris 8(with/without the J2SE recommended patch), the JVM seems to have some exception & dumps core when I invoke CreateJavaVM(). See Below - I've included the output on the screen & the output from 'pstack core' :
    Unexpected Signal : 11 occurred at PC=0xFED29D44
    Function=[Unknown. Nearest: JVM_GetMethodIxExceptionIndexes+0x1994]
    Library=/usr/java/jre/lib/sparc/libjvm.so
    Current Java thread:
    Dynamic libraries:
    0x10000 SblSim
    0xff280000 /usr/lib/libnsl.so.1
    0xfec00000 /usr/java/jre/lib/sparc/libjvm.so
    0xff370000 /usr/lib/libpthread.so.1
    0xff350000 /usr/lib/librt.so.1
    0xff260000 /usr/lib/libsocket.so.1
    0xff390000 /usr/lib/libdl.so.1
    0xff230000 /usr/lib/libCrun.so.1
    0xff200000 /usr/lib/libm.so.1
    0xff340000 /usr/lib/libw.so.1
    0xff1b0000 /usr/lib/libthread.so.1
    0xff080000 /usr/lib/libc.so.1
    0xff180000 /usr/lib/libmp.so.2
    0xff160000 /usr/lib/libaio.so.1
    0xff1f0000 /usr/platform/SUNW,Sun-Blade-1000/lib/libc_psr.so.1
    0xfebd0000 /usr/j2se/jre/lib/sparc/native_threads/libhpi.so
    0xfeba0000 /usr/j2se/jre/lib/sparc/libverify.so
    0xfeb60000 /usr/j2se/jre/lib/sparc/libjava.so
    0xfeb40000 /usr/j2se/jre/lib/sparc/libzip.so
    0xfe920000 /usr/lib/locale/en_US.ISO8859-1/en_US.ISO8859-1.so.2
    0xf1400000 ./libaicd.so
    0xfc480000 ./libmttoolkit.so
    0xfdfe0000 ./libmttlogger.so
    0xfdfb0000 /usr/j2se/jre/lib/sparc/libnet.so
    Local Time = Tue Nov 12 09:51:37 2002
    Elapsed Time = 29
    # HotSpot Virtual Machine Error : 11
    # Error ID : 4F530E43505002D5 01
    # Please report this error at
    # http://java.sun.com/cgi-bin/bugreport.cgi
    # Java VM: Java HotSpot(TM) Client VM (1.4.0_01-b03 mixed mode)
    # An error report file has been saved as hs_err_pid3120.log.
    # Please refer to the file for further information.
    Abort(coredump)
    Below is the output of 'pstack core'
    $ pstack core
    core 'core' of 3120: SblSim libaicd.so 127.0.0.1 9999
    ----------------- lwp# 1 / thread# 1 --------------------
    ff1c9764 __sigprocmask (ff1cbf60, 0, 0, 565f8, ff1de000, 0) + 8
    ff1be110 _sigon   (565f8, ff1e5930, 6, ffbedba4, 565f8, 6) + d0
    ff1c1150 thrpkill (0, 1, 6, ff1de000, 1, ff140450) + f8
    ff0cb900 raise (6, 0, 0, ffffffff, ff1403bc, 4) + 40
    ff0b58ec abort (ff13c000, ffbedcf8, 0, fffffff8, 4, ffbedd19) + 100
    feee2700 ???????? (1, fef98e50, ffbedd98, 0, feffc130, feee1258)
    feee12c8 ???????? (60650, b, fed29d44, ffbeeab8, b, 0)
    fede77c0 ???????? (fed29d44, ffbeeab8, ffbee800, fed29d44, fed03744, 0)
    ff1cb824 __sighndlr (b, ffbeeab8, ffbee800, fede6f38, 5669c, 5668c) + c
    ff1c84d8 sigacthandler (b, 565f8, 0, 0, 0, ff1de000) + 708
    --- called from signal handler with signal 11 (SIGSEGV) ---
    fed29d44 ???????? (0, 60650, 0, 0, 0, 0)
    fed2d7d4 ???????? (606e4, 0, 0, ffbeed00, 0, 0)
    f172e818 __1cHJNIEnv_JNewObject6MpnH_jclass_pnK_jmethodID_E_pnI_jobject__ (606e4, 0, 0, ffbeed70, 39, 107f90) + 70
    f172dbf8 __1cGJEvent2t5B6M_v_ (107f60, f1a877f4, db088, ff0c1c44, 107f48, 0) + 80
    f16f2864 __1cGCEvent2t6Mii_v_ (107f60, 0, 1, ff13c000, 107f48, 0) + 7c
    f16e62e8 __1cVCISCHelperThreadMutex2t6M_v_ (107f50, 0, 560ac, 30f68, fefe4000, 0) + c0
    f16ddc34 __1cLinitGlobals6F_v_ (0, 1, 19a, f1a198ec, f1a198ec, 0) + 5c
    f16de4e4 CreateISCDriverInstance (0, 5cc40, 0, 57608, 565e8, 0) + 554
    00034f08 __1cJRunSblSim6F_v_ (1, ffbef322, ffbef32c, ff13fc70, 100d4, 0) + 320
    00035588 main (4, ffbef1dc, ffbef1f0, 55c00, 0, 0) + 1a8
    00018460 _start   (0, 0, 0, 0, 0, 0) + 108
    ----------------- lwp# 2 / thread# 2 --------------------
    ff11e958 _signotifywait (ff1de000, 59, 0, 0, 0, 0) + 8
    ff1c2030 thr_yield (0, 0, 0, 0, 0, 0) + 8c
    ----------------- lwp# 3 --------------------------------
    ff1c9774 private___lwp_cond_wait (ff075d70, ff1ded9c, ff1de000, 0, 0, 4) + 8
    ff11c554 doorreturn (ff075cb0, ff1ba740, 0, 0, 0, 0) + 68
    ----------------- lwp# 4 / thread# 4 --------------------
    ff11efbc ___lwp_cond_wait (60048, 60030, fe901ad0, 0, 0, fe901ac8) + 8
    ff116610 lwpcond_timedwait (1cb8c88, 3dd1157a, fe901ba4, 60030, 60048, 1) + 98
    fecfc7d8 ???????? (0, 1, 0, 581b8, feffa26c, 0)
    fecfcfd4 ???????? (ff00a15c, feffa4b8, feffa4b4, 0, 0, 0)
    fecfccc0 ???????? (d3980, 0, 0, 0, 0, 0)
    fecfcbd0 ???????? (d3980, ff1df688, 1, 1, ff1de000, 0)
    ff1cb728 threadstart (d3980, 0, 0, 0, 0, 0) + 40
    ----------------- lwp# 5 --------------------------------
    ff11c4fc doorreturn (4, ff1df688, ff1df6a0, 3, ff1de000, 1) + 10
    ff1ba740 lwpstart (fea95d70, 0, 6000, ff075b74, 0, 0) + 18
    ff1c2030 thr_yield (0, 0, 0, 0, 0, 0) + 8c
    ----------------- lwp# 6 / thread# 5 --------------------
    ff11efbc ___lwp_cond_wait (d5720, d5708, 0, fed10a40, 0, 0) + 8
    fed110d4 ???????? (d56c8, 0, 5000, 5210, d4d38, 4d24)
    fed10824 ???????? (fdf8172c, 0, 0, d4d38, d4d38, 30dec8)
    fed103b0 ???????? (d4dcc, fdf81824, 0, 0, 0, 0)
    fa40cc94 ???????? (f2000380, b6, fdf818a4, ffffffff, 0, fdf817c0)
    fa405da0 ???????? (f2000380, b6, fdf818a8, fa415444, 0, fdf81840)
    fa405da0 ???????? (fdf81938, 0, 0, fa4157a4, 2f4210, fdf818d8)
    fa400438 ???????? (fdf819c0, fdf81c08, a, f6050b68, fa40bc8c, fdf81b50)
    fecfe2f8 ???????? (fdf81c00, fdf81a88, fdf81b48, d4d38, d4d38, fdf81a9c)
    fed0ff90 ???????? (fefe4000, d5298, fdf81b3c, fdf81b38, fdf81b48, d4d38)
    fed0fdf0 ???????? (fdf81c00, fdf81bfc, fdf81bf0, fdf81be8, fdf81be0, d4d38)
    fed0fd78 ???????? (d4d38, d4d38, ac9a0, d5298, 2d4488, fed0fa60)
    fed0fa88 ???????? (d4d38, 0, 0, 0, 0, 0)
    fecfcbd0 ???????? (d4d38, ff1df688, 1, 1, ff1de000, 0)
    ff1cb728 threadstart (d4d38, 0, 0, 0, 0, 0) + 40
    ----------------- lwp# 7 / thread# 6 --------------------
    ff11efbc ___lwp_cond_wait (d7040, d7028, 0, 1, 0, 0) + 8
    fed110d4 ???????? (d6fe8, 0, 5000, 5210, d6658, 4d24)
    fed10824 ???????? (fa38169c, 0, 0, d6658, d6658, 30dec8)
    fed103b0 ???????? (d66ec, fa38179c, 0, 0, 0, 0)
    fa40cc94 ???????? (f2000490, b6, fa3817a0, fa414050, 0, fa381730)
    fa405da0 ???????? (f2000478, b6, fa3818b4, fa415444, 0, fa3817d8)
    fa405c4c ???????? (f2000478, b6, fa381934, fa415444, d6658, fa381858)
    fa405c4c ???????? (fa381938, 0, 0, fa38197c, 2f4210, fa3818d8)
    fa400438 ???????? (fa3819c0, fa381c08, a, f60520b8, fa40bc8c, fa381b50)
    fecfe2f8 ???????? (fa381c00, fa381a88, fa381b48, d6658, d6658, fa381a9c)
    fed0ff90 ???????? (fefe4000, d6bb8, fa381b3c, fa381b38, fa381b48, d6658)
    fed0fdf0 ???????? (fa381c00, fa381bfc, fa381bf0, fa381be8, fa381be0, d6658)
    fed0fd78 ???????? (d6658, d6658, ac9e0, d6bb8, 2d4488, fed0fa60)
    fed0fa88 ???????? (d6658, 0, 0, 0, 0, 0)
    fecfcbd0 ???????? (d6658, ff1df688, 1, 1, ff1de000, 0)
    ff1cb728 threadstart (d6658, 0, 0, 0, 0, 0) + 40
    ----------------- lwp# 8 / thread# 7 --------------------
    ff11d194 _poll    (0, 0, 0, fa281a28, ff13f1b4, fa281a28) + 8
    ff1cb134 select (0, a, 0, ff1de000, fa281e14, 0) + 34
    fed32afc ???????? (d8040, 0, a, 0, 0, 0)
    fed328b4 ???????? (d8040, 0, 0, 0, 0, 0)
    fecfcbd0 ???????? (d8040, ff1df688, 1, 1, ff1de000, 0)
    ff1cb728 threadstart (d8040, 0, 0, 0, 0, 0) + 40
    ----------------- lwp# 9 / thread# 8 --------------------
    ff11efbc ___lwp_cond_wait (5f998, 5f980, 2e7aa0, ff1de000, fa181e14, 0) + 8
    fecfc634 ???????? (5f950, 0, 0, 0, feffa26c, 0)
    fed3371c ???????? (3c00, 3f44, 0, 0, 0, 0)
    fecfcbd0 ???????? (d81a8, ff1df688, 1, 1, ff1de000, 0)
    ff1cb728 threadstart (d81a8, 0, 0, 0, 0, 0) + 40
    ----------------- lwp# 10 / thread# 9 --------------------
    ff11f008 lwpsema_wait (f1f81e30, ff1de000, 0, f1f81d70, ff3e2628, 0) + c
    ff1b94c0 _swtch   (f1f81d70, ffffffff, ff1de000, 5, 1000, 0) + 158
    ff1bcc64 sema_wait (ff020fe0, ff1e98e4, 5000, 10000, 534d, 1) + bc
    fed345c8 ???????? (0, 6, b, a, 1, 0)
    fed34254 ???????? (ff002ae4, ff00a5a0, ff00a5d4, dab90, 2d4488, fed0fa60)
    fed0fa88 ???????? (da630, 0, 0, 0, 0, 0)
    fecfcbd0 ???????? (da630, ff1df688, 1, 1, ff1de000, 0)
    ff1cb728 threadstart (da630, 0, 0, 0, 0, 0) + 40
    ----------------- lwp# 11 / thread# 10 --------------------
    ff11efbc ___lwp_cond_wait (604e8, 604d0, 2e7aa0, feffa26c, 106c40, 0) + 8
    fecfc88c ???????? (604a0, 0, 0, dbbd0, feffa26c, 0)
    fed349ac ???????? (db670, db670, dbfd0, dbbd0, 2d4488, fed0fa60)
    fed0fa88 ???????? (db670, 0, 0, 0, 0, 0)
    fecfcbd0 ???????? (db670, ff1df688, 1, 1, ff1de000, 0)
    ff1cb728 threadstart (db670, 0, 0, 0, 0, 0) + 40
    -------------------------- thread# 3 --------------------
    ff1bddbc reapwait (ff1e29e0, 20520, 0, ff1de000, 0, 0) + 38
    ff1bdb14 _reaper  (ff1dee30, ff1e4740, ff1e29e0, ff1dee08, 1, fe400000) + 38
    ff1cb728 threadstart (0, 0, 0, 0, 0, 0) + 40

    This is an update to the original message -
    I have tried both HotSpot & Server JVMs but still see the
    same behavior. I'm using 1.4 .
    I'd like to provide more information to those who can help
    me. I have a feeling there might be something wrong in my
    CC options. Thus you will find below what my CC statement
    looks like for one of the files in my project & for the
    linking of the final shared library. I also have
    provided the output of ldd on my shared library libaicd.so
    & for comparison the output of ldd on libjvm.so as that
    might provide some usefull information just incase
    something looks suspecious & might ring a bell.
    /opt/SUNWspro.cc6/bin/CC -c -KPIC -g -DDEBUG=DEBUG -
    D_DEBUG -mt -DSOLARIS -DSTD_STREAM -
    I/vob1/qwsrc/fw/include -I.-I/vob4/source/idl -
    I/vob4/source/mttoolkit -I/vob4/source/mttoolkit/tools -
    I/vob4/source/integrations/siebel/aicd -
    I/vob4/source/include -I/vob1/qwsrc/fw/include -
    I/vob4/source/source -I/vob4/source/mttoolkit -
    I/vob1/external/platform_neutral/siebel/scapi/include -
    I/external/sparc/Sun/jdk/1.3.1/include -
    I/external/sparc/Sun/jdk/1.3.1/include/solaris -
    I/vob4/source/idl -I/vob4/source/mttoolkit -
    I/vob4/source/mttoolkit/tools -
    I/vob4/source/mttoolkit/vnet -
    I/vob4/source/mttoolkit/bool -DUNIX -
    D_USE_MTTServerToolkit -D_JAVA_ WIAcceptTimeOut.cpp -
    o /space/users/janak/buildoutput/sparc/debug/obj/integratio s/siebel/aicd/WIAcceptTimeOut.o
    /opt/SUNWspro.cc6/bin/CC -G -
    o /space/users/janak/buildoutput/sparc/debug/lib/fw/libaicd.so
    /space/us
    ers/janak/buildoutput/sparc/debug/obj/integrations/siebel/ai
    cd/AgentService.o /space/users/janak/buildoutput/sparc/debug
    /obj/integrations/siebel/aicd/AgentServiceCmds.o /space/user
    s/janak/buildoutput/sparc/debug/obj/integrations/siebel/aicd
    /AgentServiceEvents.o /space/users/janak/buildoutput/sparc/d
    ebug/obj/integrations/siebel/aicd/AgentServiceICAReq.o /spac
    e/users/janak/buildoutput/sparc/debug/obj/integrations/siebe
    l/aicd/AgentServiceICEvents.o /space/users/janak/buildoutput
    /sparc/debug/obj/integrations/siebel/aicd/AgentServiceUtilit
    ies.o /space/users/janak/buildoutput/sparc/debug/obj/integra
    tions/siebel/aicd/AvMc.o /space/users/janak/buildoutput/spar
    c/debug/obj/integrations/siebel/aicd/InternationalStrings.o
    /space/users/janak/buildoutput/sparc/debug/obj/integrations/
    siebel/aicd/JEvent.o /space/users/janak/buildoutput/sparc/de
    bug/obj/integrations/siebel/aicd/JMultipleEvents.o /space/us
    ers/janak/buildoutput/sparc/debug/obj/integrations/siebel/ai
    cd/JNIObject.o /space/users/janak/buildoutput/sparc/debug/ob
    j/integrations/siebel/aicd/JObject.o /space/users/janak/buil
    doutput/sparc/debug/obj/integrations/siebel/aicd/JSemaphore.
    o /space/users/janak/buildoutput/sparc/debug/obj/integration
    s/siebel/aicd/JWorkerThread.o /space/users/janak/buildoutput
    /sparc/debug/obj/integrations/siebel/aicd/MultipleEvents.o /
    space/users/janak/buildoutput/sparc/debug/obj/integrations/s
    iebel/aicd/Param.o /space/users/janak/buildoutput/sparc/debu
    g/obj/integrations/siebel/aicd/ParamQueue.o /space/users/jan
    ak/buildoutput/sparc/debug/obj/integrations/siebel/aicd/RefC
    ount.o /space/users/janak/buildoutput/sparc/debug/obj/integr
    ations/siebel/aicd/SiebelDriver.o /space/users/janak/buildou
    tput/sparc/debug/obj/integrations/siebel/aicd/SiebelEvent.o
    /space/users/janak/buildoutput/sparc/debug/obj/integrations/
    siebel/aicd/SiebelWorkItem.o /space/users/janak/buildoutput/
    sparc/debug/obj/integrations/siebel/aicd/SingleEvent.o /spac
    e/users/janak/buildoutput/sparc/debug/obj/integrations/siebe
    l/aicd/SmartPtr.o /space/users/janak/buildoutput/sparc/debug
    /obj/integrations/siebel/aicd/StdAfx.o /space/users/janak/bu
    ildoutput/sparc/debug/obj/integrations/siebel/aicd/ThreadPoo
    l.o /space/users/janak/buildoutput/sparc/debug/obj/integrati
    ons/siebel/aicd/Utilities.o /space/users/janak/buildoutput/s
    parc/debug/obj/integrations/siebel/aicd/WIAcceptTimeOut.o -
    lnsl -lc -lCstd -
    L/space/users/janak/buildoutput/sparc/debug/lib/cti -
    lmttoolkit -
    L/space/users/janak/buildoutput/sparc/debug/lib/fw -
    lmttlogger -
    L/space/users/janak/buildoutput/sparc/debug/lib/fw -
    lqwlicmtt -
    L/external/sparc/Sun/jdk/1.3.1/jre/lib/sparc/server -
    Bdynamic -ljvm -mt -lpthread -lposix4
    $ ldd /usr/j2se/jre/lib/sparc/libjvm.so
    libCrun.so.1 => /usr/lib/libCrun.so.1
    libdl.so.1 => /usr/lib/libdl.so.1
    libthread.so.1 => /usr/lib/libthread.so.1
    libsocket.so.1 => /usr/lib/libsocket.so.1
    libnsl.so.1 => /usr/lib/libnsl.so.1
    libm.so.1 => /usr/lib/libm.so.1
    libw.so.1 => /usr/lib/libw.so.1
    libc.so.1 => /usr/lib/libc.so.1
    libmp.so.2 => /usr/lib/libmp.so.2
    /usr/platform/SUNW,Sun-Blade-1000/lib/libc_psr.so.1
    $ ldd libaicd.so
    libnsl.so.1 => /usr/lib/libnsl.so.1
    libc.so.1 => /usr/lib/libc.so.1
    libmttoolkit.so => ./libmttoolkit.so
    libmttlogger.so => ./libmttlogger.so
    libjvm.so => /usr/java/jre/lib/sparc/libjvm.so
    libpthread.so.1 => /usr/lib/libpthread.so.1
    librt.so.1 => /usr/lib/librt.so.1
    libdl.so.1 => /usr/lib/libdl.so.1
    libmp.so.2 => /usr/lib/libmp.so.2
    libCrun.so.1 => /usr/lib/libCrun.so.1
    libthread.so.1 => /usr/lib/libthread.so.1
    libsocket.so.1 => /usr/lib/libsocket.so.1
    libm.so.1 => /usr/lib/libm.so.1
    libaio.so.1 => /usr/lib/libaio.so.1
    libw.so.1 => /usr/lib/libw.so.1
    /usr/platform/SUNW,Sun-Blade-1000/lib/libc_psr.so.1

  • How to make the symbol to be resolved within the shared library ?

    I have two definitions of a symbol, one is in the main code, the other in a shared library. I want the symbol to be resolved within the shared library if it needed in the shared library.
    From the 'C++ User�s Guide', use the option '-Bsymbolic' to build the shared library is a choice. But it also said 'Never use -Bsymbolic with programs containing C++ code, use linker map files instead. So I have to try to use the map file, but I did not get more useful information from 'Linker and Libraries Guide'.
    I want to know what should be included in the map file and how to generate the map file?
    Additionally, from the 'Linker and Libraries Guide', the 'Direct Binding' also could resolve this problem. And I tried to build the shared library by the '-B direct' option, it works.
    Could anybody tell me what's the difference between the '-Bsymbolic' and '-B direct'?
    Any comments are appreciated.

    You didn't provide fun.h, and you didn't show all the commands that you must have used -- there are no commands that compile the source code into .o files. So I can't tell why the -xldscope option didn't work for you.
    Problems and errors that I see in your example:
    Functions func and swap are referenced from C code, but swap and one of the func functions are compiled by the C++ compiler and will get mangled names. If you compile a function with the C++ compiler that is to be called from C code, you need to declare the function as extern "C". But the extern "C" in a shared header needs to be guarded by +#ifdef __cplusplus+, since a C compiler won't understand the declaration.
    When you build a shared library, you must explicitly list the libraries it depends on, since no dependencies are created by default. For a C++ library, you need at least -lCrun -lc in that order. Otherwise, in a real-world program you can have program failures due to incorrect library initialization order. To be sure you have listed all needed libraries, use the -zdefs option, which causes the linker to complain about missing definitions.
    To be sure the shared library is picked up at run time, provide a RUNPATH via the -R option when you build the executable.
    The -xldscope option must appear on compile commands for the files where you want it to take effect. It has no effect on a link command, because the option affects how code is generated.
    Here is my rewrite:
    % cat fun.h
    #ifdef __cplusplus
    extern "C"
    #endif
    void func();
    #ifdef __cplusplus
    extern "C"
    #endif
    void swap();
    % cat fun.c
    #include <stdio.h>
    #include "fun.h"
    extern "C" void func()
        printf("func in the shared lib\n");
    extern "C" void swap()
        func();
    % cat fun_in.c
    #include <stdio.h>
    #include "fun.h"
    void func()
        printf("func in the main code\n");
    % cat main.c
    #include <stdio.h>
    #include "fun.h"
    int main()
        func();
        printf("invoke the swap:\n");
        swap();
    % CC -G -xldscope=symbolic fun.c -Kpic -o liboutside.so -lCrun -lc -zdefs
    % cc -o run main.c fun_in.c -L. -loutside -R .
    % ./run
    func in the main code
    invoke the swap:
    func in the shared libAs you can see, it works as advertised.
    Please note that the -xldscope option affects all functions in the module. If you need more fine-grained control, you must add declarations to the source code, or use a mapfile instead of -xldscope .

  • NT DLL to Solaris Shared Library;  C++ Exceptions

    I have written a "plugin" DLL for a third party product that runs on NT. In my plugin I use C++ exception handling and it works wonderfully :-)
    I am now trying to port my plugin so that it will work with the same third party product, but this time running on Solaris.
    I knew I was going to have to port my DLL to Solaris and so made sure I did not use any Win32 specific anything. My code compiles & links fine on Solaris. For the most part it even works correctly.
    The problem I have is that my code is not catching any of the exceptions it is throwing.
    Section 5.14 of the C++ Programming Guide says that for exception handling to work in a shared library, it must be loaded with the RTLD_GLOBAL flag passed to the dlopen() function used to load the shared library.
    Of course since the dlopen() function is in a third party product I have no way of knowing whether this parameter is being passed to the dlopen() function or not .. and more importantly I have no way of forcing it to be so.
    So ultimately I guess the question for the more experienced shared library writers is .. do you just not use C++ exception mechanism because you can not force your shared library to be opened with the proper parameter to dlopen() .. or is there something else I can do to enable C++ exceptions in my shared library.

    All works fine!...
    $ mkdir /tmp/xxx
    $ cat > dllfile.c
    $ cat > dlluser.c
    $ gcc -fPIC -c dllfile.c
    $ gcc -shared -W1,-soname,libdllfile.so.1 -o libdllfile.so dllfile.o
    $ gcc -o prog dlluser.c -ldl
    $ ls -l
    total 56
    -rw-r--r-- 1 xxxxxx users 80 &#1040;&#1087;&#1088; 8 17:04 dllfile.c
    -rw-r--r-- 1 xxxxxx users 908 &#1040;&#1087;&#1088; 8 17:15 dllfile.o
    -rw-r--r-- 1 xxxxxx users 368 &#1040;&#1087;&#1088; 8 17:03 dlluser.c
    -rwxr-xr-x 1 xxxxxx users 5260 &#1040;&#1087;&#1088; 8 17:15 libdllfile.so
    -rwxr-xr-x 1 xxxxxx users 6412 &#1040;&#1087;&#1088; 8 17:16 prog
    $
    $ file *
    dllfile.c:     c program text
    dllfile.o:     ELF 32-bit MSB relocatable SPARC Version 1
    dlluser.c:     c program text
    libdllfile.so:     ELF 32-bit MSB dynamic lib SPARC Version 1, dynamically linked, not stripped
    prog:          ELF 32-bit MSB executable SPARC Version 1, dynamically linked, not stripped
    $
    $ su
    Password:
    # mkdir -p /root/shared_library/
    # cp libdllfile.so /root/shared_library/
    # exit
    $ ./prog
    With the changes
    library loaded
    Inside function
    $

  • Building 64bit shared library on Solaris 10

    I'm trying to port a Java application that depends on BerkeleyDB from GNU/Linux to Solaris 10. The GNU/Linux version was just recently rebuilt against Sun Java 6. The 64bit version of the JVM for the AMD Opteron processor. It produced a 64bit shared library. All is well in GNU/Linux land.
    I try building BerkeleyDB on Solaris following the instructions in the documentation and it produces a 32bit shared library. So when the application starts up and tells the JVM to run in 64bit server mode it complains it cannot load a 32bit shared library. So my question is how do I force the build system to build a 64bit shared library in Solaris 10?
    I'm using the Sun Studio 11 compiler for building BDB. I'm also doing this on a T1000 so any T1000 specific flags would be appreciated.

    Hi,
    I am not familiar with your particular environment. The general method for building a 64 bit Berkeley DB library on Solaris is to pass the "-xarch=v9a" flag to the configure command.
    I hope this helps.
    - Alex Gorrod

  • Segfault when using shared library

    Hi,
    I have a little problem. I'm using a shared library in my program. It works fine under windows, but when I run my program under linux or solaris I get a segfault.
    When using the same library from a C/C++ program under soloris or linux I have no problem.
    Does someone have an idea ??
    Thanks.
    Vincent

    This is Java related ?
    Windows may not be as strict about memory pointers....
    Try running something like "BoundsChecker" against a debug version of your code.
    Years ago I used to use that, to detect pointer problems.
    You may be trying to access the contents of NULL in C/C++, or trying to read from a memory location
    which is no longer valid... eg. freed memory, or you return a pointer to a local variable to a calling routine.
    That stack space would be destroyed when the function returns, so you'd be trying to access memory
    that is no longer "valid".
    regards,
    Owen

  • Can allication reffer the shared library using STL?

    I want to make the shared library which using STL, and make application using this liblary.
    I suceed making shared liblary which using STL, but failed to building allication program. The error message is following ...
    /opt/SUNWspro/bin/CC -Kpic -g -mt -V -D_REENTRANT -DFSUN -D_DEBUG -I/export/home/efm/kawaha/EFCFEnv/include -o ./TestDriver.exe SampleDriver.cpp -L/export/home/efm/kawaha/EFCFEnv/lib -L/usr/j2se/jre/lib/sparc/server/ -L/opt/SUNWspro/lib -L/opt/SUNWspro/WS6U1/lib -lhtefcfenv -L/usr/j2se/jre/lib/sparc/server/
    CC: Sun WorkShop 6 update 1 C++ 5.2 2000/09/11
    ccfe: Sun WorkShop 6 update 1 C++ 5.2 2000/09/11
    CClink: Sun WorkShop 6 update 1 C++ 5.2 2000/09/11
    CC: Sun WorkShop 6 update 1 C++ 5.2 2000/09/11
    /opt/SUNWspro/bin/../WS6U1/bin/c++filt: Sun WorkShop 6 update 1 C++ 5.2 2000/09/11
    ld: Software Generation Utilities - Solaris-ELF (4.0)
    Undefined first referenced symbol in file
    __type_1 std::copy<EFCFMapValue**,EFCFMapValue**>(__type_0,__type_0,__type_1) /export/home/efm/kawaha/EFCFEnv/lib/libhtefcfenv.so
    unsigned __rwstd::__rb_tree<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::pair<const std::basic_string<char,std::char_traits<char>,std::allocator<char> >,EFCFMapValue*>,__rwstd::__select1st<std::pair<const std::basic_string<char,std::char_traits<char>,std::allocator<char> >,EFCFMapValue*>,std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<const std::basic_string<char,std::char_traits<char>,std::allocator<char> >,EFCFMapValue*> > >::count(const std::basic_string<char,std::char_traits<char>,std::allocator<char> >&)const /export/home/efm/kawaha/EFCFEnv/lib/libhtefcfenv.so
    ld: fatal: Symbol referencing errors. No output written to ./TestDriver.exe
    *** Error code 1
    make: Fatal error: Command failed for target `TestDriver.exe'
    Instanciated symble exit SunWS_cache. I did not know that how application to reffer this symbol.
    Can the applicaton reffer the shared library using STL?
    or
    Can the applicaton reffer the static library using STL?
    Mihoko

    It seems in ur application,u use STL,but not include the STL header files,just include the right STL header files and "usring namespace std;" in ur application,i think will solve ur problem.

Maybe you are looking for