Q3: I am having trouble trying to get g++ and libg++ working.
Q8: I want to install wu-ftpd on my system. What are the steps?
Q9: I want to install TeX on my system. What are the steps?
Q10: I have read your discussion of creating packages in your pkgadd instructions, but I really want to create packages that can be placed in any directory I choose. How do I do this? See pkgadd instructions.
Q11: Is the software on this site Y2K compliant?
Q12: Where can I find programs for Solaris 2.4 or earlier?
pkgadd -d gzip-1.3.5.10-sol8-sparc-local
as root. This puts gzip and gunzip and other files in /usr/local/bin. If you then make sure /usr/local/bin is in your PATH, you can use gzip and gunzip to create or uncompress .gz files. If you have any problem, check the File Sizes link at the lower left of sunfreeware.com to make sure the file size is correct. Note, that if you download via a non-UNIX machine (like - ugh - Windows), you might get a corrupted file. I can only suggest you don't move files through any non-UNIX machine on the way to your Solaris machine. Some newer versions of Solaris already have a gzip/gunzip installed. You might not have to install this package.
I am having a problem! When I download the gcc-3.4.6-sparc-local.gz, it appears to download OK, but when attempting to use gunzip, it saysinvalid compressed data -- crc error!
or
pkgadd:ERROR:attempt to process datastream failed -bad format in datastream table-of-contents pkgadd:ERROR:could not process datastream fromwhen running pkgadd -d on the file.
What is wrong?
If you have .gz file but gzip says it is not in gzip format, it is likely that your browser downloaded the file and gunzipped it but did not take off the .gz. You can correct this problem by editing your browser's helper application for .gz files. For example, you might just need to do something like
mv gcc-3.4.6-sparc-local.gz gcc-3.4.6-sparc-local
pkgadd -d gcc-3.4.6-sparc-local (as root)
replacing the gcc file example with whatever file you are trying to work on.
As in the second example, is also possible that the file was downloaded and the .gz was removed, but the file was not gunzipped. In this case, you need to do
mv gcc-3.4.6-sparc-local gcc-3.4.6-sparc-local.gz gunzip gcc-3.4.6-sparc-local.gz pkgadd -d gcc-3.4.6-sparc-local (as root).
It is also possible that a .gz file was downloaded, but is not the correct size. Check the .gz file size with the file lists in the File Sizes link at the left on the sunfreeware.com page.
ld.so.1: xftp: fatal: libXm.so.3: Can't open file: errno=2 Killed
What is going wrong?
setenv LD_LIBRARY_PATH /usr/local/lib:/usr/openwin/lib:/usr/dt/lib
in your .login, .cshrc, or similar file depending on the shell you are using. Then either logout and login again or do a
source .login or
source .cshrc or
similar
in your home directory. In other programs, other libraries might not be found and you will need to find them and put their directories in the LD_LIBRARY_PATH. It is possible that your system might not contain the library you need if you did not install it when your operating system was installed.
If you run the command like
[28] bin> ldd ddd libXm.so.4 => /usr/lib/libXm.so.4 libXp.so.1 => /usr/openwin/lib/libXp.so.1 libXaw.so.5 => /usr/lib/libXaw.so.5 libXmu.so.4 => /usr/lib/libXmu.so.4 libXext.so.0 => /usr/lib/libXext.so.0 libXt.so.4 => /usr/lib/libXt.so.4 libSM.so.6 => /usr/lib/libSM.so.6 libICE.so.6 => /usr/lib/libICE.so.6 libX11.so.4 => /usr/lib/libX11.so.4 libsocket.so.1 => /usr/lib/libsocket.so.1 libnsl.so.1 => /usr/lib/libnsl.so.1 libcurses.so.1 => /usr/lib/libcurses.so.1 liby.so.1 => /usr/lib/liby.so.1 libstdc++.so.2.10.0 => /usr/local/lib/libstdc++.so.2.10.0 libm.so.1 => /usr/lib/libm.so.1 libc.so.1 => /usr/lib/libc.so.1 libdl.so.1 => /usr/lib/libdl.so.1 libmp.so.2 => /usr/lib/libmp.so.2 /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1You can see what libraries an executable like ddd expects to find. If you do not have these installed, you may get errors when starting a program.
Nathan Valentine at the University of Kentucky has pointed out a new feature in Solaris 8:
If you want to add a dir to the library search path under Solaris 8 you can use the crle command. This only works for Solaris 8. For earlier versions, you have to use LD_LIBRARY_PATH. According to a Sun SE with whom I talked, there is no equiv. to the Linux ld.so.conf for Solaris <= 7.
gcc: installation problem, cannot exec 'as' :No such file or directory.
/usr/ccs/bin/
You will need to add this to your UNIX PATH. If you cannot find this in the above directory, you may not have installed all of the Sun packages. See the next question also.
6.2) What about the linker, the assembler and make?
Solaris ships with everything you need, with the exception of the compiler itself. Solaris ships with the include files, make, an assembler, linker and libraries. All this stuff lives in /usr/ccs/bin (add it to your PATH before /usr/ucb if that's in your PATH as well) /usr/ccs/lib and /usr/include. If you still can't find it, make sure you have the following packages installed on your system:
for tools (sccs, lex, yacc, make, nm, truss, ld, as): SUNWbtool, SUNWsprot, SUNWtoo for libraries & headers: SUNWhea, SUNWarc, SUNWlibm, SUNWlibms, SUNWdfbh, SUNWcg6h, SUNWxwinc, SUNWolinc, SUNWxglh for 64 bit development: SUNWarcx, SUNWbtoox, SUNWdplx, SUNWscpux, SUNWsprox, SUNWtoox for ucb compat: SUNWsra, SUNWsrhThese packages are all on the Solaris 2.x CDs, except that some packages may only exist in some releases and not in others. Some packages may be on separate CDs, such as the "Desktop/CDE" CD, but all are part of the Solaris "bundle".
In file included from t.c:1: /opt/GCC2721/lib/gcc-lib/sparc-sun-solaris2.5/2.7.2.1/include/stdio.h:17: sys/feature_tests.h: No such file or directory.
There is no sys/feature_tests.h on my system.
This package is on the Solaris 2.x CD.
The packages on your site all installed in /usr/local/bin/. I don't like this. I want them in /opt/local/bin or /usr/gnu/bin.
What can be done by the end users to deal with the installation of a large number of the packages we provide? There are a number of different kinds of programs we must deal with:
Many of the programs are of type 1. This usually can be determined by looking at the directories. If there is no lib, help, or similar directory along with the bin directory, the program is probably of type 1. It is simple to test this by moving the program executable to /opt/local/bin and running it.
Programs of type 2 are usually linked in some way to the operating system. Programs like sendmail that replace programs shipped with Solaris and certain security programs must be put in /etc or some other place or at least linked to these directories. Great care must be taken in installing these programs.
gcc is the prime example of type 3. gcc itself might be moved to /opt/local/bin but its libraries cannot me moved. The location of these files is "hardwired" into gcc.
So what are the solutions? There are a number of options:
This is true for the man files as well. A user, Owen Birnie, has created a program that can be used to do the links. His shell program (modified by Marek Krawus and me) - used at your own risk - is listed here . Clearly this can be modified to do the links to directories other that in /usr/local.
No files are moved from the /opt directories.
If you come up with any other methods that work for your site, let me know.
I am getting responses to this.
Christopher Rabson sent this email:
Thanks Steve, I confess that I did not look at the FAQ very closely. I had already considered the symbolic links idea, but rejected it on the basis of the extra NFS load it would generate (among other things).http://www.robots.ox.ac.uk/~kit/pkgconv.htmlHowever, I have come up with a bit of a "hack" solution which may be of interest to users of the Solaris freeware site. It involves modifying the 'pkginfo' and 'pkgmap' files, after which the "-R /usr/local" option can be used with 'pkgadd'. Some files in the 'doc' directory do get over-written, but it's a solution that I am happy with. (I've cooked-up a script to go with it.)
If you would like to check it out, the URL is:
Christopher.
Peter Holmes has modified Christopher's script to help move the base directory from /usr/local say to some other directory. This will only work for some packages. His script is found here.
Jared Proudfoot pointed to the following solution:
On your Sun Freeware FAQ Page (http://sunfreeware.com/faq.html) you ask if there are any better solutions for question 7.
We use a GNU package called stow. What it does, basically, is create symlinks in /usr/local for packages that are in separate directories (/opt/FSFgcc for example).
Check it out at: http://www.gnu.ai.mit.edu/software/stow/stow.html.
Steve Krans added the suggestion:
Here's another /opt installation & path management solution: Using tcsh, you can use a wildcard feature like so:
set path=(/opt/*/bin)
to avoid having to edit your login rc files for every new package. There still might be shell variable problems, but for an average number of packages this works well.
Jim Roy comments on the above solutions:
I use Steve Krans solution for the path in TCSH, ie
set path =(opt/*/bin), but that seems not to work for
the manpath. Here's a bit of tcsh script that does the
trick, though.
--------
set opman = `/usr/bin/ls -dm /opt/*/man | sed 's/, /:/g' `
setenv MANPATH /your/other/man:${opman}:
unset $opman ------------
Randall Smith offers more information on package installation:
This addresses an alternative mechanism to relocate a package. pkgadd(1M) uses an administration file which contains properties for the packaging commands. By default, the properties are read from /var/sadm/install/admin/default.
One can override this with the -a command line option. One of the properties in this file basedir=default. The 'default' value means that the basedir will be specified in the package. To override the value in the package, one can specify a hardwired path, e.g., basedir=/usr/local/Networker, or basedir=ask, in which case, pkgadd will prompt for the basedir path.
So the relocation procedure is to make a local copy of /var/sadm/install/admin/default, edit the basedir value, and then run "pkgadd -a -d ." (if your package is located in the current working directory).
As you have noted in the FAQ, if the application is not designed to be relocated, then it will likely malfunction after relocation.
Nathan Chidester offers a similar view:
I looked at the solution for relocating packages provided by Christopher Rabson, where he modifies the pkginfo file and changes the BASEDIR variable and the package checksum.
Another, less involved solution would be to install the package and specify a different BASEDIR with a pkgadd admin file. You need to create a temporary file, such as /tmp/adminfile, and add a line "basedir=/opt", or wherever you want the new base directory to be.
Then run "pkgadd -a /tmp/adminfile -d . pkgfoo"
You can also use the default location and name for the adminfile, but this will apply to all pkagdds, so I'd consider it a little dangerous and unnecessary. It only saves having to use the "-a" flag.
Done this way, the pkgrm works normally, no matter where it was installed. This is an obvious advantage over moving the binaries to alternate locations after the package files have been installed elsewhere.
Jay Scott at gl@arlut.utexas.edu submitted another view of packages in
We have a package called opt_depot, a derivative of the depot package. (hmmm.... guess that's really two more ways.) opt_depot sets up /opt/bin, /opt/man, /opt/lib, and so on, and collects things there with soft links. Our version is 2.0.
http://www.arlut.utexas.edu/csd/opt_depot/opt_depot.html
Philip_Brown at phil@bolthole.com writes (November 8, 2001):
About relocating where the packages go -
There were some good answers about admin files. But here's two others, that
don't require fiddling with admin files:
1. For a one-time relocation, you can use
pkgadd -a none filename.pkg
2. To transform a particular package permenantly, use
http://www.bolthole.com/solaris/pkgreloc.ksh.
1. create directory: /opt/WUftpd 2. pkgadd -d wu-ftpd-2.4 3. vi /opt/WUftpd/etc/ftpaccess create the following lines: class all real,guest * guestgroup ftpguests to allow only ftp-access for real-user and guest-user, not for anonymous; the guest-user have to be a member of the group ftpguests 4. create the group "ftpguests" in /etc/group 5. create the user-account, the line in passwd-file has to look like: guestuser:x:1069:15:Guest FTP-user:/home/guestuser/./anydir:/bin/ksh - where 15 is the id of the group ftpguests - the directory /home/guestuser is the root directory of this user 6. vi /etc/inetd.conf change line: ftp stream tcp nowait root /usr/sbin/in.ftpd in.ftpd to: ftp stream tcp nowait root /opt/WUftpd/etc/ftpd ftpd -d 7. restart inetd 8. create the following directories and files: (you can copy them from /export/ftp) /home/guestuser/: total 8 dr-xr-xr-x 2 root other 512 Jun 4 09:01 bin dr-xr-xr-x 2 root other 512 Jun 4 09:01 dev dr-xr-xr-x 2 root other 512 Jun 4 09:01 etc dr-xr-xr-x 4 root other 512 Jun 4 09:40 usr /home/guestuser/bin: total 36 -r-xr-xr-x 1 root other 17500 Jun 4 09:44 ls /home/guestuser/dev: total 0 cr--r--r-- 1 root other 11, 42 Jun 4 09:01 tcp cr--r--r-- 1 root other 105, 1 Jun 4 09:01 ticotsord cr--r--r-- 1 root other 11, 41 Jun 4 09:01 udp cr--r--r-- 1 root other 13, 12 Jun 4 09:01 zero /home/guestuser/etc: total 4 -r--r--r-- 1 root other 37 Jun 4 09:01 group -r--r--r-- 1 root other 87 Jun 4 09:01 passwd /home/guestuser/usr: total 4 dr-xr-xr-x 2 root other 512 Jun 4 09:40 bin dr-xr-xr-x 2 root other 512 Jun 4 09:40 lib /home/guestuser/usr/bin: total 36 ---x--x--x 1 root other 17500 Jun 4 09:40 ls /home/guestuser/usr/lib: total 3192 -r-xr-xr-x 1 root other 24576 Jun 4 09:40 ld.so -r-xr-xr-x 1 root other 106768 Jun 4 09:40 ld.so.1 -r-xr-xr-x 1 root other 664048 Jun 4 09:40 libc.so.1 -r-xr-xr-x 1 root other 2568 Jun 4 09:40 libdl.so.1 -r-xr-xr-x 1 root other 15304 Jun 4 09:40 libintl.so.1 -r-xr-xr-x 1 root other 565500 Jun 4 09:40 libnsl.so.1 -r-xr-xr-x 1 root other 68780 Jun 4 09:40 libsocket.so.1 -r-xr-xr-x 1 root other 39340 Jun 4 09:40 libw.so.1 -r-xr-xr-x 1 root other 10796 Jun 4 09:40 nss_dns.so.1 -r-xr-xr-x 1 root other 21028 Jun 4 09:40 nss_files.so.1 -r-xr-xr-x 1 root other 24408 Jun 4 09:40 nss_nis.so.1 -r-xr-xr-x 1 root other 28848 Jun 4 09:40 nss_nisplus.so.1 -r-xr-xr-x 1 root other 9316 Jun 4 09:40 straddr.so.2
If you are using the teTex package for SPARC/Solaris 8, the click here for details. Otherwise: Do the following steps: 1) get texmf.tar.gz from the ftp or web site. 2) put it in /var/spool/pkg 3) gunzip it to get texmf.tar 4) run tar xvf texmf.tar 5) do pkgadd -d . (as root) 6) select the TeX entry and it should install in /usr/local/teTeX. The script asks questions. When it asks if you want to install it in /opt, say yes. When it asks if you want to install and administration users, say no. It asks again for a base directory - type /opt. At the end, type q to get out of pkgadd. You will notice a number of warning messages that should not be of concern. 7) put the /usr/local/teTeX/texmf/bin directory in our UNIX PATH. 8) put setenv TEXMF /usr/local/TeTeX/texmf in your .login or .cshrc file. 9) see Downloading/Installation link for further comments from Pierre MacKay - my friendly TeX brain.
Here are the steps I have tried to eliminate the need for putting things in a specific direction when creating a package. I have tested this and it works:
find . -print |pkgproto > prototype
put just
i pkginfo
in the top line of the prototype file, get rid of the lines with pkginfo and prototype (usually at the bottom), and change the file ownerships to what you want.
Sun's Year 2000 Information Site
The GNU people have a discussion of Year 2000 concepts with their software at
A wonderful document by Tom Christiansen about Perl and the Year 2000 problems -- Year 2000 Compliance: Lawyers, Liars, and Perl .
You can also go to places like
Yahoo! Computers and Internet:Year 2000 Problem
Yahoo Full Coverage - Year 2000 Problem
and search the sites there.
Post your question to a newsgroup -- see Other Useful Sites or do a search for newsgroup posts at Dejanews.
For questions about specific programs, look at the documentation and see if they mention the Y2K problem. If not, contact the authors of the software.
One checking method that you might start would include the steps:
Remember you are dealing with software that is free. It is excellent software by almost any standards. But, most of the people who write or support this software are extremely busy and may not be able to rewrite software or may not be able to do it quickly. Consider offering them help in making it compliant or offer to pay them or others to make it work for you.
If you do get an answer yes or no about a package on this site with regard to Y2K issues, email me so that I can include that information with the package. If you are a developer of one of the packages at this site and know the Y2K status, let me know so I can tell others.
This is freeware and most freeware including the compiled versions at this site is never guaranteed to work in all situations. But then again, commercial software is not exactly bug free or Y2K compliant. We will all know in the year 2000 what really works.
Some specific information can found at:
The Pine software Y2K information.
Info-ZIP page has Y2K comments.
If you are setting up a new machine, remember to make your /var partition larger than the default.
Another option to deal with a small /var file system that might be better for some (thanks to Jerry Yu for reminding me I wanted to mention this technique) is to use the -s option to pkgadd. Suppose we have a package program-1.00-local.gz that we have placed in /tmp. Can do the following as root:
#> cd /tmp (or where you put the program file)
#> gunzip program-1.00-local.gz
#> mkdir /tmp/spool (this can be any directory in a place with a lot
of disk space)
#> pkgadd -s /tmp/spool -d program-1.00-local
#> cd /tmp/spool
#> pkgadd -d .
Then answer the questions to finish the install.
There may be several reasons for this. The first is that you are using a font that is so large, the window with the software lists which is supposed to appear at the lower right, gets pushed off the bottom of the page. Try using a smaller font. Alternatively, as one user pointed out:
I'm using IE4 on a clone-PC. Changing the font size didn't work. However, what I found worked was this procedure:
(1) Right-click on the OS title;
(2) Choose 'Open in a new window'.
That will provide a list of the programs without the actual website.
If for some reason you have virus software for Solaris, then you probably need to tell your virus detector vendor that they need to look at their software and find out why it is giving false positives.
A user who had this problem points out:
I figured out that when I tried to open some packages they had been damaged and that the virus scanner plus using Internet Explorer was the culprit. I pulled the packages down using the command line ftp and then scanned them and there was no problem. I think that the Solaris code freaks out the virus scanner when it was being downloaded through Internet Explorer. This combination completely destroys the package rendering it useless.