Custom Search

Sunday, September 25, 2005

Build the System from Source - Building X

Here's an excerpt from the OpenBSD docs, pertaining to my earlier post: X uses a different build process than the rest of the OpenBSD tree, as it is based on imake, rather than the standard make(1) process. One consequence of this is there is no "obj" directory, generated binaries end up being intermixed with the source code, which can cause problems (or at least, excessive output) with cvs(1). A solution to this problem is to use lndir(1) to make a "shadow directory" consisting of symbolic links to the actual source directory for the XF4 tree. i386 only: XF86Setup, used to configure XF3 servers on the i386 platform (and ONLY the i386 platform) requires the "tcl" and "tk" packages be installed before building X (found in the ports tree at /usr/ports/lang/tcl/8.4/ and /usr/ports/x11/tk/8.4/. Installing the "tk" package will install "tcl" as a dependency). As usual, installing a package is much faster than installing these applications from source. Failing to install these packages before building X is somewhat frustrating, as the system will work for some time before erroring out. To compile X using the "shadow directory" of /usr/Xbld, use the following steps, compiling and installing new binaries into the proper directories, follow these steps: # rm -rf /usr/Xbld # mkdir -p /usr/Xbld # cd /usr/Xbld # lndir ../XF4 [...lots of output...] # make build [...lots of output...]"

Read the fine print!

Yep, it pays to do that even when you're not buying something, like when you're supposed to be reading the docs, but you're just casually scanning through, hitting the high spots, and then doing something like "make build". You know, something small and inconsequential. :-) Been working with OpenBSD on an extra computer I got back from my son, since coming back from the hurricane Katrina evacuation. Didn't realize how much I'd forgotten. As for the allusion to fine print, it had to do with XF4, building the xwindows stuff, after I had done a cvsup to get all new source, ports, docs & so forth. Built the new kernel. No problem. Did all the necessary prework and then built all the userland stuff. No problem. Did the after work stuff like httpd docs, mergemaster, & so on. No problem. Then I did the prework stuff you're supposed to do before you mess with XF4, but I failed to read the part about tk-8.4.7 and tcl-8.4.7p1 needing to be installed, or the XF4 build would fail, which it did. So, remember kiddies, READ THE FINE PRINT!