Forum Stats

  • 3,781,029 Users
  • 2,254,468 Discussions
  • 7,879,534 Comments

Discussions

Solaris 10 - Sun Studio 11 - libsocket.a static libraries

807578
807578 Member Posts: 13,959 Green Ribbon
Dear Developers,

Appreciate your valulable time and help. I am not a developer, but my developer getting below error while compliation, and asking me to put static libraries ( libsocket.a libnsl.a ..et..etc). I am aware that Solaris10 does not have a static lib (??).
------------------------
The errors from compiler were
ld: fatal: library -lnsl: not found
ld: fatal: library -lsocket: not found
ld: fatal: File processing errors. No output written to micro_inetd
make: *** [micro_inetd] Error 1
-------------------------
Highly appreciate if you help.
-Anand

Comments

  • 807578
    807578 Member Posts: 13,959 Green Ribbon
    That's right. Solaris 10 doesn't provide static libraries for any
    of these things. Can you explain why you can't dynamically link your
    application? Ask the developer to remove the -Bstatic flag and see
    if it links.
  • 807578
    807578 Member Posts: 13,959 Green Ribbon
    Solarsi 10 does not provide static versions of any system library. You must allow the program to link with the dynamic libraries.

    The reason for dropping static libraries is that we can't be sure that a program linked iwth a static system library will run on a Solaris installation that is not identical to the one on which it was created. (Not just the same Solaris version, but with all the same patches.)

    A program linked with dynamic system libraries will run on any Solaris installation that is the same version or later than the system on which is was created.
  • 807578
    807578 Member Posts: 13,959 Green Ribbon
    Thank you, the '-Bstatic' flag worked well. Developers are now happy :-)
This discussion has been closed.