Open- Solaris Vs Linux PART Ist
=========================
Configuring the dynamic linker search path
--------------------------------------------
File Name for editing paths:
Linux : /etc/ld.so.conf
Solaris: /var/ld/ld.config
If you have used Linux you might be used to add paths where librarys reside to /etc/ld.so.conf and run ldconfig afterwards.
Under Solaris there's a similar way to configure paths for the dynamic linker. Please note that it's only slightly better than setting LD_LIBRARY_PATH -- you can break things if you don't know exactly what you're doing.
Configuration files for the dynamic linker reside under /var/ld/ in solaris. Unlike under Linux you're not meant to edit those with your favourite editor(vi ,emacs etc). Simply running crle without arguments will give you something like this:
# crle
Default configuration file (/var/ld/ld.config) not found
Default Library Path (ELF): /lib:/usr/lib (system default)
Trusted Directories (ELF): /lib/secure:/usr/lib/secure (system default)
Now you can add a new path -- for example /usr/local/lib -- with crle -l 'path'. This might look like this:
# crle -l /lib:/usr/lib:/usr/local/lib
# crle
Configuration file [version 4]: /var/ld/ld.config
Default Library Path (ELF): /lib:/usr/lib:/usr/local/lib
Trusted Directories (ELF): /lib/secure:/usr/lib/secure (system default)
Command line:
crle -c /var/ld/ld.config -l /lib:/usr/lib:/usr/local/lib
Please note that you have to specify all directories, not just the one you'd like to add.otherwise system will not run since most system libraries (ie libc.so.1,libm.so.1 etc )resides /lib ,/usr/lib
OS x86 Solaris
===========
link-editor(Static Linker) : /usr/lib/
runtime linker/loader : /usr/lib/ld.so.1
configure : crle
config file: /var/ld/ld.config
cache file : /var/ld/ld.config
OS x86 Linux
===========
link-editor (Static Linker) : /usr/bin/ld
runtime linker/loader : /lib/ld-2.3.2.so (/lib/ld-linux.so.2)
configure : ldconfig
config file: /etc/ld.so.conf
cache file : /etc/ld.so.cache
----------------------------------Finish (Configuring ...)--------------------
Application Building on Linux and Solaris
============================
Using Make Files:
Both the Solaris OS and Linux provide the make utility, which can be used to build applications from its
source files. The make utility works recursively on a makefile that describes the relationship between
the target file and its dependencies.
On Linux, GNU make searches for the makefile in the following order:
1. ./GNUmakefile
2. ./makefile
3. ./Makefile
In addition, GNU make implicitly can extract a file from RCS/SCCS directories if necessary.
The Solaris make utility searches for the makefile in the following order:
1. Non-POSIX Mode
• ./makefile
• If ./SCCS/s.makefile is present, it tries to retrieve the most recent version of the makefile.
• ./Makefile
• If ./SCCS/s.Makefile is present, it tries to retrieve the most recent version of the makefile.
2. POSIX Mode
• ./makefile, ./Makefile
• s.makefile, SCCS/s.makefile
• s.Makefile, SCCS/s.Makefile
Both the versions of make have compatible command-line options.
=========================
Configuring the dynamic linker search path
--------------------------------------------
File Name for editing paths:
Linux : /etc/ld.so.conf
Solaris: /var/ld/ld.config
If you have used Linux you might be used to add paths where librarys reside to /etc/ld.so.conf and run ldconfig afterwards.
Under Solaris there's a similar way to configure paths for the dynamic linker. Please note that it's only slightly better than setting LD_LIBRARY_PATH -- you can break things if you don't know exactly what you're doing.
Configuration files for the dynamic linker reside under /var/ld/ in solaris. Unlike under Linux you're not meant to edit those with your favourite editor(vi ,emacs etc). Simply running crle without arguments will give you something like this:
# crle
Default configuration file (/var/ld/ld.config) not found
Default Library Path (ELF): /lib:/usr/lib (system default)
Trusted Directories (ELF): /lib/secure:/usr/lib/secure (system default)
Now you can add a new path -- for example /usr/local/lib -- with crle -l 'path'. This might look like this:
# crle -l /lib:/usr/lib:/usr/local/lib
# crle
Configuration file [version 4]: /var/ld/ld.config
Default Library Path (ELF): /lib:/usr/lib:/usr/local/lib
Trusted Directories (ELF): /lib/secure:/usr/lib/secure (system default)
Command line:
crle -c /var/ld/ld.config -l /lib:/usr/lib:/usr/local/lib
Please note that you have to specify all directories, not just the one you'd like to add.otherwise system will not run since most system libraries (ie libc.so.1,libm.so.1 etc )resides /lib ,/usr/lib
OS x86 Solaris
===========
link-editor(Static Linker) : /usr/lib/
runtime linker/loader : /usr/lib/ld.so.1
configure : crle
config file: /var/ld/ld.config
cache file : /var/ld/ld.config
OS x86 Linux
===========
link-editor (Static Linker) : /usr/bin/ld
runtime linker/loader : /lib/ld-2.3.2.so (/lib/ld-linux.so.2)
configure : ldconfig
config file: /etc/ld.so.conf
cache file : /etc/ld.so.cache
----------------------------------Finish (Configuring ...)--------------------
Application Building on Linux and Solaris
============================
Using Make Files:
Both the Solaris OS and Linux provide the make utility, which can be used to build applications from its
source files. The make utility works recursively on a makefile that describes the relationship between
the target file and its dependencies.
On Linux, GNU make searches for the makefile in the following order:
1. ./GNUmakefile
2. ./makefile
3. ./Makefile
In addition, GNU make implicitly can extract a file from RCS/SCCS directories if necessary.
The Solaris make utility searches for the makefile in the following order:
1. Non-POSIX Mode
• ./makefile
• If ./SCCS/s.makefile is present, it tries to retrieve the most recent version of the makefile.
• ./Makefile
• If ./SCCS/s.Makefile is present, it tries to retrieve the most recent version of the makefile.
2. POSIX Mode
• ./makefile, ./Makefile
• s.makefile, SCCS/s.makefile
• s.Makefile, SCCS/s.Makefile
Both the versions of make have compatible command-line options.
No comments:
Post a Comment