BUILDING VNC ON HP/UX ------------------------------------------------------------------------ Stephen Walton (swalton@galileo.csun.edu) Posted to VNC Mailing List on Mon, 13 Sep 1999 12:53:16 -0700 (PDT) Last Update 5 Feb 2001 ------------------------------------------------------------------------ My system: HP-UX 10.20, pretty up to date on patches, HP ANSI C. This compiler comes with the X developer's package. In particular, Imake gets put in /opt/imake and the Xaw and Xmu header files and libraries in /usr/contrib/X11R6. SPECIAL NOTE: As of VNC 3.3.3r2, you must install the Jan 2001 X11R6 Developer's Patch for these instructions to work. The patch number is PHSS_22945 for HP-UX 10.20, PHSS_22947 for HP-UX 11.00 32-bit, PHSS_22949 for HP-UX 64-bit (and presumably others for other OS versions). A caution: HP ANSI C uses the value of the CCOPTS environment variable in addition to any flags specified in the Makefile, and ld(1) uses the value of the LDOPTS variable similarly. So you should probably make sure that you have a vanilla setup by checking (as appropriate) $HOME/.profile, $HOME/.kshrc, $HOME/.login, $HOME/.cshrc, /etc/profile, /etc/csh.cshrc (tcsh only), and /etc/csh.login to make sure you or your sysadmin isn't setting these values for you. Simply unsetting them at the command line before typing "make" won't work, because make uses the system(2) call to run the compiler & linker, and thus the startup files will get reread. If your sysadmin has these set in the system files, try to get her to remove them. Unpack the archive, cd vnc_unixsrc and apply the two HP-UX patches on the Web site. I find they still apply to 3.3.3 without changes required, and that the patches have to be in the parent of vnc_unixsrc, so the specific commands will be something like: $ cd vnc_unixsrc $ patch -p1 < ../vnc-3.3.2r3_unix.ukd-hpux_specific-patch.txt $ patch -p1 < ../vnc-3.3.2r3_unix.ukd-kh-hpux-patch This is with GNU Patch version 2.1. I added the following lines to vncviewer/Imakefile to pick up the Xaw and Xmu files: #if defined(HPArchitecture) INCLUDES = -I/usr/include/X11R6 -I/usr/contrib/X11R6/include \ -I../include -I. #else INCLUDES = -I../include -I. #endif following which I did % xmkmf; setenv LDOPTS -L/usr/contrib/X11R6/lib; make World in the vnc_unixsrc directory. I was unable to find a clean way to add this -L option to the vncviewer Imakefile, but it is necessary to find the Xaw and Xmu libraries. "make World" completes in the Xvnc directory with no trouble and with no CCOPTS or LDOPTS settings required. Once this is done, "sh ./vncinstall /usr/local/bin" executed in the vnc_unixsrc directory will finish the installation. Perl on HP's: /usr/contrib/bin/perl is the one distributed with HP-UX 10.20 but it is pretty old (version 4.0). You should plan on putting the latest version on your system and editing your local copy of vncserver accordingly. I changed the first line to #!/usr/bin/env perl which should find the same copy of perl as "which perl" prints on pretty much all Unix systems. So, that's how I did it. I hope it helps someone else. --- Stephen Walton, Professor of Physics and Astronomy, California State University, Northridge stephen.walton@csun.edu