Solaris 2.4 SPARC

Aus Knowledgebase
Version vom 15. März 2019, 15:29 Uhr von Luna (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „'''Solaris 2.4 installation on a SPARCstation''' Install Solaris with everything + recommended patch cluster. There are bugs in some /usr/include files. Inst…“)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Zur Navigation springen Zur Suche springen

Solaris 2.4 installation on a SPARCstation


Install Solaris with everything + recommended patch cluster. There are bugs in some /usr/include files. Install patch 101925-02! Very important.


copy Sun compiler license to /opt/SUNWspro/license_dir/sunpro.lic,sp


.profile:

PATH=/usr/local/bin:/opt/SUNWspro/bin:/usr/ccs/bin:/usr/sbin:/usr/bin:/usr/openwin/bin export PATH

CFLAGS="-O -I/usr/local/include -L/usr/local/lib -R/usr/local/lib" CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib -R/usr/local/lib" export CFLAGS CPPFLAGS LDFLAGS

MANPATH=/usr/local/man:/opt/SUNWspro/man:/usr/share/man export MANPATH

CONFIG_SHELL=/usr/local/bin/bash export CONFIG_SHELL

root@aton:~# cat .bashrc

  1. set a fancy prompt

PS1='\u@\h:\w\$ ' export PS1


root@aton:/etc/init.d# cat sshd

  1. !/bin/sh

pid=`/usr/bin/ps -e | /usr/bin/grep sshd | /usr/bin/sed -e 's/^ *//' -e 's/ .*/ /'` case $1 in 'start')

       /usr/local/sbin/sshd                                                    

'stop')

       if [ "${pid}" != "" ]                                                   
       then                                                                    
               /usr/bin/kill ${pid}                                            
       fi                                                                      
       ;;                                                                      
  • )
       echo "usage: /etc/init.d/sshd {start|stop}"                             
       ;;                                                                      

esac


root@aton:/etc/init.d# cat prngd

  1. !/bin/sh

pid=`/usr/bin/ps -e | /usr/bin/grep prngd | /usr/bin/sed -e 's/^ *//' -e 's/ .* //'` case $1 in 'start')

       /usr/local/sbin/prngd /var/run/egd-pool                                 

'stop')

       if [ "${pid}" != "" ]                                                   
       then                                                                    
               /usr/bin/kill ${pid}                                            
       fi                                                                      
       ;;                                                                      
  • )
       echo "usage: /etc/init.d/prngd {start|stop}"                            
       ;;                                                                      

esac



mirror disks in SPARCstation 10 and 20:

disksuite

1. Copy the partition table of the first disk to its mirror.

prtvtoc /dev/rdsk/c0t3d0s2 | fmthard -s - /dev/rdsk/c0t1d0s2


2. Create at least 2 DiskSuite state database replicas on each disk. A state database replica contains DiskSuite configuration and state information.

metadb -a -f -c2 /dev/dsk/c0t1d0s3 /dev/dsk/c0t3d0s3


3. Mirror the root slice.

  1. metainit -f d10 1 1 c0t3d0s0
  2. metainit -f d20 1 1 c0t1d0s0
  3. metainit d0 -m d10
  4. metaroot d0 (Use this command only on the root slice!)


4. Mirror the swap slice.

  1. metainit -f d11 1 1 c0t3d0s1
  2. metainit -f d21 1 1 c0t1d0s1
  3. metainit d1 -m d11


5. Mirror the var slice.

  1. metainit -f d14 1 1 c0t3d0s4
  2. metainit -f d24 1 1 c0t1d0s4
  3. metainit d4 -m d14


6. Mirror the usr slice.

  1. metainit -f d15 1 1 c0t3d0s5
  2. metainit -f d25 1 1 c0t1d0s5
  3. metainit d5 -m d15


7. Mirror the opt slice.

  1. metainit -f d16 1 1 c0t3d0s6
  2. metainit -f d26 1 1 c0t1d0s6
  3. metainit d6 -m d16


8. Mirror the home slice.

  1. metainit -f d17 1 1 c0t3d0s7
  2. metainit -f d27 1 1 c0t1d0s7
  3. metainit d7 -m d17

Update /etc/vfstab to mount the mirrors after boot.

like this: (from Solaris 2.5.1, different filesystems!)

  1. device device mount FS fsck mount mount
  2. to mount to fsck point type pass at boot options

fd - /dev/fd fd - no - /proc - /proc proc - no - /dev/md/dsk/d1 - - swap - no - /dev/md/dsk/d0 /dev/md/rdsk/d0 / ufs 1 no - /dev/md/dsk/d6 /dev/md/rdsk/d6 /usr ufs 1 no - /dev/md/dsk/d4 /dev/md/rdsk/d4 /var ufs 1 no - /dev/md/dsk/d7 /dev/md/rdsk/d7 /export ufs 2 yes - /dev/md/dsk/d5 /dev/md/rdsk/d5 /opt ufs 2 yes - swap - /tmp tmpfs - yes -


reboot the system. at last, attach the mirrors:

metattach d0 d20 metattach d1 d21 metattach d4 d24 metattach d5 d25 metattach d6 d26 metattach d7 d27


Solaris 2.5.1 and older won't cooperate with modern Linux NFSv4. Mount as version 2:

mount -F nfs -o vers=2 audrey:/export/binaries /mnt


configure gcc like this:

./../gcc-2.95.3/configure --enable-languages=c,c++,f77 --without-gnu-ld --with-ld=/usr/ccs/bin/ld --with-as=/usr/ccs/bin/as --without-gnu-as --with-libiconv-prefix=/usr/local --disable-nls

gcc version 2.95.3 and older cannot use binutils. However, there are bugs and limitation in Sun ld and nm. Build GNU binutils (2.12.1 works). gcc version 3.0.4 and later need c++filt, nm, and GNU ld from binutils. copy to /usr/local/bin/c++filt, /usr/local/bin/nm, and /usr/local/bin/gnuld manually. Do not do a "make install" for binutils.


getpagesize: undefined symbol

Solaris 2 does not have a proper getpagesize. It's a BSD compatibility function, which is not thread safe and not recommended.

"getpagesize()" can easily be replaced with "sysconf(_SC_PAGESIZE)".



gcc-3.1.1:

./../gcc-3.1.1/configure --enable-languages=c,c++,f77 --with-ld=/usr/local/bin/gnuld --with-gnu-ld --with-as=/usr/ccs/bin/as --without-gnu-as --with-libiconv-prefix=/usr/local --disable-nls --disable-threads && make bootstrap

gcc-3.1.1/gcc/config/sparc/sol2.h replace long size = getpagesize (); with long size = sysconf(_SC_PAGESIZE);

also replace getpagesize in gcc/cppfiles.c and gcc/gcc-page.c change getpagesize to sysconf. Rest builds fine after installing header patch

m4-1.4.8

tar-1.18: src/misc.c: undefined getpagesize - change to sysconf(_SC_PAGESIZE); src/system.c: undefined snprintf - use missing_snprintf.h


gcc-3.2.3: FAILs gcc/cppfiles.c gcc/ggc-page.c gcc/config/sparc/sol2.h

FAILs with asm error:

/usr/local/compile/gcc-3.2.3bin/gcc/xgcc -shared-libgcc -B/usr/local/compile/gcc-3.2.3bin/gcc/ -nostdinc++ -L/usr/local/compile/gcc-3.2.3bin/sparc-sun-solaris2.4/libstdc++-v3/src -L/usr/local/compile/gcc-3.2.3bin/sparc-sun-solaris2.4/libstdc++-v3/src/.libs -B/usr/local/sparc-sun-solaris2.4/bin/ -B/usr/local/sparc-sun-solaris2.4/lib/ -isystem /usr/local/sparc-sun-solaris2.4/include -nostdinc++ -I/usr/local/compile/gcc-3.2.3bin/sparc-sun-solaris2.4/libstdc++-v3/include/sparc-sun-solaris2.4 -I/usr/local/compile/gcc-3.2.3bin/sparc-sun-solaris2.4/libstdc++-v3/include -I../../.././../gcc-3.2.3/libstdc++-v3/libsupc++ -I../../.././../gcc-3.2.3/libstdc++-v3/libmath -I/usr/local/include/ncurses -I/usr/local/include -g -O2 -fno-implicit-templates -Wall -Wno-format -W -Wwrite-strings -Winline -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -g -c ../../.././../gcc-3.2.3/libstdc++-v3/src/globals.cc -fPIC -DPIC -o .libs/globals.o /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 715: error: unknown opcode ".symver" /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 715: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 715: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 715: error: statement syntax /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 723: error: unknown opcode ".symver" /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 723: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 723: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 723: error: statement syntax /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 731: error: unknown opcode ".symver" /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 731: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 731: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 731: error: statement syntax /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 739: error: unknown opcode ".symver" /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 739: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 739: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 739: error: statement syntax /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 747: error: unknown opcode ".symver" /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 747: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 747: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 747: error: statement syntax /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 755: error: unknown opcode ".symver" /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 755: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 755: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 755: error: statement syntax /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 763: error: unknown opcode ".symver" /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 763: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 763: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 763: error: statement syntax /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 771: error: unknown opcode ".symver" /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 771: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 771: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 771: error: statement syntax /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 779: error: unknown opcode ".symver" /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 779: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 779: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 779: error: statement syntax /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 793: error: unknown opcode ".symver" /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 793: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 793: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 793: error: statement syntax /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 794: error: unknown opcode ".symver" /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 794: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 794: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 794: error: statement syntax /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 802: error: unknown opcode ".symver" /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 802: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 802: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 802: error: statement syntax /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 810: error: unknown opcode ".symver" /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 810: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 810: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 810: error: statement syntax /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 818: error: unknown opcode ".symver" /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 818: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 818: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 818: error: statement syntax /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 826: error: unknown opcode ".symver" /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 826: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 826: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 826: error: statement syntax /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 834: error: unknown opcode ".symver" /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 834: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 834: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 834: error: statement syntax /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 842: error: unknown opcode ".symver" /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 842: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 842: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 842: error: statement syntax /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 862: error: unknown opcode ".symver" /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 862: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 862: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 862: error: statement syntax /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 863: error: unknown opcode ".symver" /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 863: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 863: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 863: error: statement syntax /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 864: error: unknown opcode ".symver" /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 864: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 864: error: invalid character (0x40) /usr/ccs/bin/as: "/var/tmp//ccfxtJOz.s", line 864: error: statement syntax make[4]: *** [globals.lo] Error 1 make[4]: Leaving directory `/usr/local/compile/gcc-3.2.3bin/sparc-sun-solaris2.4/libstdc++-v3/src' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/usr/local/compile/gcc-3.2.3bin/sparc-sun-solaris2.4/libstdc++-v3' make[2]: *** [all-recursive-am] Error 2 make[2]: Leaving directory `/usr/local/compile/gcc-3.2.3bin/sparc-sun-solaris2.4/libstdc++-v3' make[1]: *** [all-target-libstdc++-v3] Error 2 make[1]: Leaving directory `/usr/local/compile/gcc-3.2.3bin' make: *** [bootstrap] Error 2

FAILS apparently, Sun as does not correctly do symbol versioning.


openssl-1.0.1j: FAILs crypto/o_str.c: change strings.h to string.h FAILS in tests


gdbm-1.10 src/flatfile.c:

  1. include <sys/byteorder.h>

some tests fail, because we don't have proper diff and sort. the rest appears to work.

libsigsev-2.10

less-418

libxml-1.8.17

diffutils-3.2 lib/regex.c: change #include <strings.h> to <string.h>


pkg-config-0.25 some tests fails, because of issues with /bin/sh. change to /usr/local/bin/bash and tests work mostly. install anyway.


w3c-libwww-5.4.0

libidn-1.26: ./configure --with-libiconv-prefix=/usr/local --disable-nls --disable-threads && make


perl-5.16.2 ./Configure -Dcc=gcc

Any additional ld flags (NOT including libraries)? [ -L/usr/local/lib] -L/usr/local/lib -R/usr/local/lib