Compiling an application for Solaris 9 on a Solaris 10 system

Hi,
I was wondering if it's possible to compile an application Solaris 10 in such a way that it will run on Solaris 9.
I'm building a set of library tools and they need to run on Solaris 9 and 10, but it'd be nice if I could build this on a Solaris 10 box.
Is this possible, and if so, how do you do it?
thanks,
Trevor

I'm working on this same issue. Unfortunetly, it appears that my only option is to compile on a Solaris 10 box for running on a Solaris 8 box. Thankfully this doesn't look too bad because after doing a 'ldd', I get that the only file I'm missing is the libm.so.2. If I can specify in the makefile to use libm.so.1 only, then all should be ok.
So I guess my question would be: What exactly do I need to do in my makefile to explicitly link to libm.so.1? I've tried the following with no luck.
/opt/SUNWspro/bin/cc -xCC -Bdynamic -g \
/usr/lib/libm.so.1 \
/opt/mylibs/my_compiled_lib.lib \
first_obj.o \
second_obj.o \
-o my_program
The above returns:
ld: fatal: file /usr/lib/libm.so.1: open failed: No such file or directory
ld: fatal: File processing errors. No output written to macsruntime
However, if I change my link to /usr/lib/libm.so everything works but it is linked with the /usr/lib.libm.so.2. Any help would be appreciated.

Similar Messages

  • Compiling C++ application for Solaris 5.8

    Hi,
    How can we build/compile C++ application to be deployed on Solaris 5.8 OS? Which compiler should be used for the same?
    We are exploring how this can be done. Request your help to identify the mechanism in which we can achieve this.
    We explored following but it didnt worked -
    - Using Studio 12 we build application on Solaris 10 but it is giving error at execution time
    ld.so.1: ./distmgr: fatal: libCrun.so.1: version `SUNW_1.5' not found (required by file ./distmgr)
    Questions -
    - Is Studio 12 supported on Solaris 5.8?
    - If ready made binaries are not available of Studio 12 then can be build this for 5.8? IS the source code of Studio 12 available?
    - Can Studio 12 on Solaris 10 cross complie for OS Solaris 5.8
    Thanks and Regards,
    vinit.

    I strongly advise against using WS62. Studio 11 is superior to WS6u2 by any reasonable measure. Valid source code that compiled with older compilers should continue to work correctly with later compilers. Any problems are usually due to invalid code that was incorrectly accepted by the earlier compiler. In some cases we provide compiler options to reproduce the old compiler behavior, but it is better to fix the code so that it is valid and has well-defined semantics.
    Consider also whether you would wind up mixing binaries built by WS6u2 with binaries built by a later compiler. If so, you must use the later (or latest) compiler involved to perform any link steps. That is, steps that create shared libraries or executable programs.
    We strive to maintain forward binary compatibility, meaning old binaries can be linked into new programs, but there are some issues with C++ compilers older than Studio 7 that can cause compatibility problems when the code is mixed with C++ code from newer compilers. In the worst case, a multi-threaded program can compile and link, but fail at run time, depending on compilation options used with WS6u2. It is safer to rebuild such old binaries using the newer compiler. Binaries created by Studio 7 or later compilers should not have that problem.
    I'm sorry to have to list so many caveats, but continuing to use obsolete software creates its own problems. We bring out new versions and retire old software for good reasons.

  • Build for solaris 8 on solaris 10 - possible?

    I want to build/compile an application for solaris 8, but I only have access to a machine running solaris 10. Can I compile for solaris 8 on a solaris 10 machine, and if so, what do I have to do to make it work?

    The short answer is generally no.
    The long answer is that it can be done but you will need to make sure that on the Solaris 10 machine you only use functions/headers/libraries that are available on Solaris 8 otherwise they will not be found and the software won't work.
    alan

  • Need to compile C code for Solaris 5.4 target

    Hi,
    I'm current on a project where the target platform is Solaris 5.4. I believe the SunOS version is 2.4. Unfortunately, there is no way I can get the customer to upgrade their server or OS.
    In my search so far I've been unsuccessful in finding a compiler for that platform. The oldest gcc I can find is for SunOS 2.5.
    What other options do I have?
    Will code compiled with the C compiler in the Sun Studio 12 be able to run on SunOS 2.4? If so, is there a command line option I need to set while compiling the code?

    No available Sun compiler can be used on, or to generate code for, SunOS 5.4 (Solaris 2.4). Even Sun Workshop 5.0, released in 1998, did not support Solaris 2.4.
    If you develop code to be run on Solaris 2.4, you need to compile on Solaris 2.4 (or earlier). Binaries created on a later version of Solaris will not in general run on an earlier version of Solaris. I think that Sun WorkShop 3.0 was the last version that supported Solaris 2.4, but it might have been WorkShop 2.0. Those antiques are not available from Sun.
    If I were in this situation, I would tell the customer that the OS and all support software are many years past End Of Service Life. No support is available, the software is no longer available, and I can't help them unless they are willing to upgrade to supported software. (I might also ask the customer if they still use Windows 3.1 on their PCs. The situation is comparable.)
    If you don't have that option, your next best hope is that the customer has a C compiler on their system. If so, find a way to use it. If it's a Sun compiler, you will have a problem acquiring a license to run it. You will probably have to run it on their system.
    If the customer doesn't have a compiler, I guess you have to keep trolling in newsgroups and forums, looking for a compiler that supports Solaris 2.4. Good luck.

  • Compiler directives to differetiate between solaris 9 and solaris 10

    i have an API which makes certain function calls which are different for solaris 9 and solaris 10. i cannot add my own defines, since that would mean that applications too would have to define them.
    does the Sun Workshop compiler provide any default directives to differentiate between solaris 9 and solaris 10? something like #ifdef __SunOS_5.10 or something like that?
    thanks.

    As explained in the C Users Guide, the compiler predefines several macros, one of which is represents the Solaris version number.
    The macro name is derived from the output of the commands
    uname -s and uname -r, starting with __, connected by _, and with dots replaced by _.
    Running on Solaris 9:
    % uname -s
    SunOS
    % uname -r
    5.9
    The defined macro name is __SunOS_5_9
    On Solaris 10 you get __SunOS_5_10
    __SunOS_5_9

  • Any alternatives for compiling of applications / libraries using C++11 Standard Headers not supported in Studio 12.4?

    Hi,
    As mentioned in Compiler Issues - Oracle® Solaris Studio 12.4: Release Notes, the following statement below has listed 4 headers which are unsupported in C++11 Mode (-std=c++11):
    C++11 Standard Headers
    The following headers are for concurrency features and are not supported in the Oracle Solaris Studio 12.4 release:
    <atomic>
    <future>
    <thread>
    <mutex>
    However, some applications / libraries (e.g. Mozilla Firefox) may require the use of unsupported C++11 Standard Headers, so what options do I have if I need to compile these applications / libraries using Studio 12.4 (I can use g++ compiler, but there are more errors during compilation using g++ as compared to CC, which is difficult to fix)? Plus, there are some performance issues (e.g. run-time) that I may take into consideration when compiling, which I may use CC for compilation as compared to g++.
    Regards,
    Brian

    If those headers are included, you get an error message saying they are not supported. (We intend to support them in a future release.) If the headers are included because features from the headers are needed by the program, you are out of luck. Otherwise, I suggest you modify the source code so that unsupported headers are not included. (Why include a header that you don't need?)
    We considered supplying stubs for the unsupported headers that would contain no declarations. That approach seemed like it would just lead to more questions and complaints. The header would appear to compile, but code using the header features would not.

  • Solaris 8 to Solaris 10 upgrade for oracle 11i

    Hi
    Need to upgrade my 11i (11.5.9) apps from Solaris 8 to Solaris 10
    It will also be a 32 bit to 64 bit conversion
    Has anyone done this before. or can specify the any major obstacles.
    Thanks

    Dear Bansi
    I did something similar on HP-UX but you can mainly follow this
    1- Check Certification matrix against Solaris 10
    2- Install 64 bit engine of 9iR2 using 9iR2 CD's without creation of a database
    3- Patch the engine with the same patch level your database on it [9.2.0.3 is standard DB level for 11.5.9 CD's ] If you want to update this level than the existing to be latest [ie 9.2.0.6 check notes and certification matrix] you should do this step after next step
    4- Attach your 11.5.9 database to that engine
    5- Copy configurations files from old engine to the new engine [appsutil]
    6- Copy Applications in similar locations [If migrate to another server using Solaris 10]
    7- If you will change any Application paths or database path consider changing context file and rerun autoconfig
    Regards,
    A.S.Salem

  • How to Maximize Memory usage for JDK 6 on Solaris 10.

    Hi there,
    I deployed jdk 6 & Tomcat 6 running on Solaris 10 with 8GB of RAM Sun Fire x64 x4100 M2 m/c.
    Its relatively fast. However, the java could allowed me to set the Max Java OPT to only 3GB. I don't understand and there isn't any extra applications. All are prior Solaris 10.
    Java will not be able to start if I set more than -J-Xmx3072m.
    Appreciate your advise and expertise.
    regards,
    jose(airqq)

    Hello Neville:
    I seem to be coming off as negative - not my usual approach.  However.......
    I am a retired webmaster and don't have Lion but I am impressed by your tip. Well written and researched. I think we should all do our bit to educate and encourage others to open applications and use the Terminal.
    a different point of view from someone who has been posting in these forums for many years.
    Almost all of the people who seek help here are not:
    1.  Retired webmasters.
    2.  Know anything about the arcane terminal commands and, more importantly, how much damage they can cause their system by a missing space or character.  Apple has spent a lot of time to develop OS X to a point where people do not need to learn about or understand Unix-like command language.
    I salute people who are technical enough to use terminal commands.  It is, however, IMHO, a real disservice to suggest to non-tecchie people that it is ever necessary (or desirable) to operate at that level.
    Having said all that, I respect your comment and point of view.   I would reiterate, however, that solving non-existent problems is a waste of time.  By non-existent, I mean that if there are no performance problems, it is irrelevant how much memory a program uses.  My current base-level iMac has 4 GB of memory and a Terabyte of HD space.
    Barry
    Message was edited by: Barry Hemphill

  • Java application getting killed automatically in Solaris

    Hi to all,
    I have developed a Java application for Solaris 10.
    But it is getting killed after some time.
    And at the terminal, I got message as Killed.
    I am new to Solaris.
    Can anybody help me?

    Nijai.Ashish wrote:
    Hi to all,
    I have developed a Java application for Solaris 10.
    But it is getting killed after some time.
    And at the terminal, I got message as Killed.
    I am new to Solaris.
    Can anybody help me?Are you hitting a resource limitation for your user account (e.g. only allotted a certain amount of CPU time)?

  • Help for running C at Solaris 10 using cc complier

    I have installed a Sun Studio 11 on Solaris 10. And when i use cc command to compile the c program then it is showing "C:language optional component is required".
    How can i run the c on solaris 10

    You have to set PATH so that Sun Studio C compiler (cc) is invoked.
    Currently you have /usr/ucb/cc ahead of Sun Studio cc. If you run
    echo $PATHand
    which ccyou will see why wrong C compiler starts.
    For example, if you installed Sun Studio under /opt/SUNWspro/ directory,
    you have to set PATH like this:
    csh
    setenv PATH /opt/SUNWspro/bin:$PATHBTW, Sun Studio 11 is an old release. It is better to use Sun Studio 12 update 1.
    Thanks.
    Nik

  • Application connection problems between linux & solaris?

    HI,
    Do you know if I can connect to a server on solaris with a java application and then I compile it on linux why cann't I get to the same application still runing on the solaris machine? A little fuzzy but ... I looked in the /etc/hosts but it looked ok (there were some ip addr there)...
    java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:320)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:133)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:120)
    at java.net.Socket.<init>(Socket.java:273)
    at java.net.Socket.<init>(Socket.java:100)

    Thank you all of you in advance,
    I found the problem : it just should have been the correct initialization.

  • Sun Java Application Server 8.1 Upgrade Solaris 9 to Solaris 10

    I have Sun Java Application Server 8.1 (version 8.1_02 (build b06-fcs) ) and HA which are currently installed on Solaris 9 box (Sparc).
    Now, I plan to upgrade Solaris 9 to Solaris 10. What should I need to do before and after migration?
    Thanks.

    Before I start, disclaimer -- I have no knowledge of Hibernate and the following comments are based on the stack trace you have included.
    I think your permissions might be set all right but you might have an error in the hibernate query. It looks like hibernate uses antlr to parse the queries. While parsing the query, antlr is encountering an exceptional condition and is trying to exit the VM (by calling System.exit()). Obviously, the hibernate code does not have that permission and therefore the exception is logged.
    My guess is if you fix the query such that hibernate/antlr can parse it, you will not run into this error.
    Hope this helps,

  • Docs needed for installing siebel in solaris 10 x86, Urgent..!!!!!!!!

    Docs needed for installing siebel in solaris 10 x86
    Thanks
    Kishore
    Edited by: Kishore P on Aug 11, 2010 6:03 PM

    If it's documentation you're after, always go straight to Siebel Bookshelf!
    http://download.oracle.com/docs/cd/E14004_01/books/SiebInstUNIX/SiebInstUNIXTOC.html

  • Mount options for ZFS filesystem on Solaris 10

    Do you know some recomendation
    about mount options for SAP on Oracle
    with data on ZFS filesystem?
    Also recomended block size required.
    We assume that file system with datafiles has 8kb block size
    and offline redologs has default (128kB).
    But what about ONLINE REDOLOGS?
    Best regards
    Andy

    SUN Czech installed new production HW for one Czech customer with ZFS filesystem on data-, redo- and archivelog files.
    Now we have performance problem and currently there is no SAP recomendation
    for ZFS file system.
    The HW which are by benchmark about tvice power has worst responses than
    old hardware.
    a) There is bug in Solaris 10 - ZFS buffers once allocated are not released
        (generally we do not want to use buffering due to prevence of double
         buffering)
    b) ZFS buffers takes about 20GB (32GB total) of memory on DB server
    and we are not able to define huge shared pool and db cache. (it may be possible
    to set special parameter in /etc/system to reduce maximum size of ZFS buffers to e.g. 4GB )
    c) We are looking for proven mount option for ZFS to enable asynchronious/concurent io for database filesystems
    d) There is no proven clear answer for support of ZFS/SOLARIS/Oracle/SAP.
    SAP says It is Oracle problem, Oracle does not certify filesystems from Jan2007
    any more and says ask your OS provider and SUN looks happy, but performance
    goes down and it is not so funny for system with 1TG DB with over 30GB grow
    per month.
    Andy

  • Error in compiling Flex application (1). Consult log file for details.

    Dear All,
    when i deploy the application from VC i am facing the below issue.
    Error in compiling Flex application (1). Consult log file for details.
    Please help us.
    Regards,
    Suman

    Hi Juan,
    Please look into the below issue.
    Error in compiling Flex application: java.lang.InternalError: Can't connect to X11 window server using '172.16.12.41:0.0' as the value of the DISPLAY variable.
       at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
       at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:175)
       at java.lang.J9VMInternals.initializeImpl(Native Method)
       at java.lang.J9VMInternals.initialize(J9VMInternals.java:192)
       at java.lang.Class.forNameImpl(Native Method)
       at java.lang.Class.forName(Class.java:119)
       at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:91)
       at macromedia.fonts.JREFontManager.initializeSystemFonts(JREFontManager.java:242)
       at macromedia.fonts.JREFontManager.createSetForSystemFont(JREFontManager.java:58)
       at macromedia.fonts.CachedFontManager$FontCache.fetch(CachedFontManager.java:109)
       at macromedia.util.LRUCache.get(LRUCache.java:114)
       at macromedia.fonts.JREFontManager.getEntryFromSystem(JREFontManager.java:186)
       at macromedia.swf.builder.tags.FontBuilder.<init>(FontBuilder.java:52)
       at macromedia.css.FontFaceRule.initialize(FontFaceRule.java:82)
       at macromedia.css.StyleDocumentHandler.endFontFace(StyleDocumentHandler.java:36)
       at org.apache.batik.css.parser.Parser.parseFontFaceRule(Unknown Source)
       at org.apache.batik.css.parser.Parser.parseStyleSheet(Unknown Source)
       at macromedia.css.StyleParser.init(StyleParser.java:165)
       at macromedia.css.StyleParser.<init>(StyleParser.java:89)
       at macromedia.css.StyleSheet.parse(StyleSheet.java:71)
       at flex.compiler.parser.MxmlParser$4.end(MxmlParser.java:1123)
       at flex.compiler.parser.MxmlParser.endElement(MxmlParser.java:402)
       at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
       at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
       at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
       at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
       at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
       at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
       at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
       at javax.xml.parsers.SAXParser.parse(Unknown Source)
       at javax.xml.parsers.SAXParser.parse(Unknown Source)
       at flex.compiler.parser.MxmlParser.parseDocument(MxmlParser.java:4363)
       at flex.compiler.MxmlLoader.parse(MxmlLoader.java:277)
       at flex.compiler.MxmlLoader.loadComponentType(MxmlLoader.java:178)
       at flex.compiler.MxmlLoader.loadComponent(MxmlLoader.java:204)
       at flex.compiler.CachedComponentLoader.getComponent(CachedComponentLoader.java:197)
       at flex.compiler.CachedComponentLoader.loadDefinition(CachedComponentLoader.java:101)
       at flex.compiler.CachedComponentLoader.getDefinition(CachedComponentLoader.java:263)
       at flex.compiler.CompositeLoader.getDefinition(CompositeLoader.java:54)
       at flex.compiler.linker.Loader.getType(Loader.java:266)
       at flex.compiler.linker.Loader.findType(Loader.java:248)
       at flex.compiler.CompilerPackageManager.loadType(CompilerPackageManager.java:629)
       at flex.compiler.MxmlCompiler.openDocument(MxmlCompiler.java:61)
       at flex.compiler.MxmlCompiler.compile(MxmlCompiler.java:234)
       at flex.tools.Mxmlc.main(Mxmlc.java:166)
    Regards,
    Suman

Maybe you are looking for