Mcgovern, Matthew CIV NAVAIR 521420E wrote: > The only option to configure was: --prefix=/usr/local/gccbuild. The prefix sets the root of the tree for the *installation* of the resulting program. By setting prefix to /usr/local/gccbuild you are saying that you want the 'make install' (which comes much later) to install the resulting files into the /usr/local/gccbuild directory. Reading your message I don't think that is what you intended. I think you were intending the build files to be put there. You need to do that in a different way. > I did a mkdir of "gccbuild", but the object directory is > /usr/local/gccobj. I used the "gccbuild" directory because of the > recommendation that the object directory not be in the same path as > the build directory, or vice versa. The source directory is in a > totally different path. I think what you are talking about here is what is known as "VPATH" builds where the source directory is not modified, could even be read-only, and the build happens outside of it in another directory. That can be useful but is not required. This is not the --prefix option. Instead call configure from the build directory. Here is a stylized example. tar xzvf gcc-X.Y.Z.tar.gz mkdir gcc-build cd gcc-build ../gcc-X.Y.Z/configure --other-options-... make ...other.stuff... Because configure is called using the path to the source it will know that it is setting up the build in the current directory. The build files will be there and the source will be untouched. Many people favor this build method. (I actually don't because I build from pristine source (tar xvf ...) every time and so don't care if the source is the build directory too.) > I don't know if I'm using the native HP C compiler. I don't think > it is installed on this system. Normally every HP-UX system would have a C compiler. PATH would include /usr/ccs/bin and /usr/ccs/bin/cc would be a symlink pointing to cc_bundled. That is the old K&R compiler from before 1989. The c89 and later compiler is in /usr/bin/cc as a symlink to /opt/ansi/bin/cc but that is an optional product and would need to be installed separately. I will assume that you are using the bundled compiler. You can test this by listing the directories. PATH should be set in /etc/profile to include /usr/ccs/bin and (hopefully) nothing is removing that particular path. It should be after /usr/bin. ls -ld /usr/bin/cc ls -ld /usr/ccs/bin/cc > I'm trying to install gcc so that I can upgrade/install Apache web > server (httpd 2.0). The Apache is not building and I think it's > because I don't have any compilers installed on the system. The OS > load was conducted using a proprietary set of tapes with proprietary > software, not by installing from a factory released build, so I > think they didn't install any compilers on the system. That would make it difficult. But if you don't have *any* compilers installed then you would not be able to compile gcc either. A bootstrapping chicken-or-the-egg issue. For now I would assume that apache requires a modern c89 or c99 or later compiler and only the old K&R one is available. I believe gcc can still bootstrap itself from the K&R compiler. I am sure someone on the mailing list will correct me if that is not the case. I have not tried it for years. > I don' t know what the bundled K&R compiler or the ANSI C compiler are. At one time all Unix machines included a C compiler as standard on the system. As time went by vendors make the ANSI standard compiler optional and charged an extra charge for it. But they still needed something to configure the operating system kernel. That is, they needed something themselves. The K&R compiler from pre-1989 days could be used to link the kernel and was enough basic functionality to do some things on the system (e.g. such as unshar uudecode compilation) but not sufficient for most things and so customers would then buy the ANSI compiler. Well actually most people installed gcc instead. My notes show me doing this on HP-UX to configure gcc for building. (This is mostly for the email archive.) # The first time around without gcc available use these: # CC=cc CFLAGS="-O" LIBCXXFLAGS="-g -O2 -fno-implicit-templates" # The second and later times with gcc available use these: # LIBCXXFLAGS="-g -O2 -fno-implicit-templates" LIBCFLAGS="-O2" LIBCXXFLAGS="-O2 -fno-implicit-templates" \ ./configure \ --prefix=/usr \ --mandir=\${prefix}/share/man \ --infodir=\${prefix}/share/info \ --program-suffix=-3.3 \ --with-as=/usr/bin/gas \ --with-gnu-as \ --enable-version-specific-runtime-libs \ --enable-languages=c,c++ \ --enable-cxx-flags='-fPIC' make -j2 bootstrap > As you can tell I'm not as knowledgeable as I should be, but I need to > upgrade my web server for security reasons. Well... You are basically putting yourself in the role of software distribution developer. And that means you would need to either have or develop some of those basic skills. It is not really very hard but you have to have the mind-set that you are going to need to figure out a lot of software development issues and to develop the tool-chain to support doing this. If you were using a GNU/Linux distribution then this would be done for you by the distro vendor. But you are not and so on HP-UX you have to build the tools to build the tools to build the tools yourself. After the whole machine gets built up and moving things work pretty well. But bootstrapping yourself up from first principles can be tedious and time consuming. What I would recommend is to search the web for precompiled gcc binaries. Looking for "HP-UX porting center" should google hit to a few places with precompiled binaries. I think one of those would meet your needs and avoid a lot of time and effort learning how to build up gcc on your platform. In fact I think from the hp.com website there are pointers to precompiled versions of gcc. But I have not looked for a while so I may be out of date. But using one of the versions recommended by hp would be reasonable. Because before building gcc you actually need to build up a tool chain to support the build which includes the GNU assembler (binutils) too. Both of those need GNU sed to configure. And GNU m4 may also be required, not sure. Additionally to do a good job of it you need libiconv, gettext, and texinfo. Whew! Lots of stuff. Probably more that I forgot about. I think you would be much better off getting a precompiled binary. At the very least you could use it to bootstrap yourself. The prebuild gcc could be used to build the new gcc. And binutils and so on. Look on the hp.com web site for a pointer to precompiled gcc binaries. I found these just a moment ago: http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,547,00.html http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,7663,00.html You might be able to find a prebuild apache2 for hpux as well. One issue about prebuild binaries is that everyone decides to install them in different places. Which means that almost certainly none will install where you want it to install. Oh well. Bob