File: setup-build.html

package info (click to toggle)
hpoj 0.8-11
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,380 kB
  • ctags: 2,439
  • sloc: cpp: 10,139; ansic: 6,617; makefile: 290; sh: 202; perl: 163
file content (187 lines) | stat: -rw-r--r-- 8,053 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<html>

<head>
<title>hpoj: Compiling and installing the software</title>
</head>

<body>

<h1>Compiling and installing the software</h1>

This file documents the procedure for compiling and installing the
HP OfficeJet Linux driver (hpoj) package.

<h2>Build process: quick version</h2>

If you haven't already, issue <i>one</i> of the following commands to extract
the source code from the <tt>hpoj-0.<i>X</i>.tgz</tt> tarball:
<pre>
	tar xvfz hpoj-0.<i>X</i>.tgz                 # For GNU tar
	zcat hpoj-0.<i>X</i>.tgz | tar xvf -         # For non-GNU tar
</pre>

Enter the following commands at the shell prompt:
<pre>
	./configure
	make
	su                      # When prompted, enter the root password.
	make install
</pre>

By default, this causes the software to get installed under
<tt>/usr/local</tt>.  See the next section if you want to override this or
if the <tt>configure</tt> script has trouble finding other packages it needs.

<h2><tt>./configure</tt> script options</h2>

<tt>--prefix=<i>DIR</i></tt><br>
Overrides the default installation path of <tt>/usr/local</tt>.  The various
components are stored in the <tt>bin</tt>, <tt>doc/hpoj</tt>, <tt>etc</tt>,
<tt>include</tt>, <tt>lib</tt>, and <tt>sbin</tt>
subdirectories under the specified path.  Examples:
<pre>
	--prefix=/usr
	--prefix=/opt/hpoj
</pre>
Note that if you use this option, you may need to specify a
<tt>--with-ptal=<i>DIR</i></tt> option when you configure SANE.<p>

<tt>--with-qt=<i>DIR</i></tt><br>
Helps find the base of the QT tree.  The specified directory should
contain <tt>include</tt>, <tt>bin</tt>, and <tt>lib</tt> subdirectories
which contain the corresponding components of QT.  Examples:
<pre>
	--with-qt=/opt/qt-2.1.0
	--with-qt=/usr/lib/qt-1.45
</pre>

<tt>--with-snmp=<i>DIR</i></tt><br>
Helps find the location of the SNMP include files.  SNMP is needed to
fully support peripherals connected to an HP JetDirect print server.
You may need to install a package such as <tt>ucd-snmp-devel</tt>.
It is assumed that the SNMP library <tt>libsnmp.so</tt> is accessible in
standard places.  Example:
<pre>
	--with-snmp=/usr/include/ucd-snmp
</pre>

The above <tt>--with-<i>PACKAGE</i></tt> options may also take the form
<tt>--without-<i>PACKAGE</i></tt> to disable use of the selected package
when it otherwise would have been used.  Examples:<br>
<pre>
	--without-snmp
	--without-qt
</pre>

Additionally, if you experience compilation problems with
<a href="ptal-mlcd.html"><tt>ptal-mlcd</tt></a> (the low-level I/O driver),
you may give the <tt>--without-par</tt> or <tt>--without-usb</tt> switches
to disable parallel-port or USB support, respectively.
Note that these options prevent only a small amount of code from being
compiled, so there's little value in specifying them except as a
workaround for build problems.<p>

If you use one of the <tt>--without-<i>PACKAGE</i></tt> switches, or if the
corresponding package can't be found, then the rest of the hpoj package
should still build, minus the parts that depend on the missing
functionality.<p>

<h2>Troubleshooting</h2>

If during <tt>make</tt> or "<tt>make install</tt>" you get an error trying to
create a symbolic link, then you are probably compiling and/or installing on
a file system that doesn't support symlinks, such as MSDOS or VFAT.  Try
compiling and installing on a native Linux ext2 filesystem.

<h2>Post-installation steps</h2>

As long as you invoke "<tt>make install</tt>" as root, it should perform all
of the necessary post-installation steps for you on most distributions.
This section is provided for your information in case you can't install
as root, or in case your distribution uses a different (non-LSB)
file-system layout, such that the init script can't be installed.<p>

"<tt>make install</tt>" invoked as root looks for the directory
<tt>/etc/profile.d</tt> and adds the scripts <tt>hpoj.sh</tt> and
<tt>hpoj.csh</tt> to this directory if it exists.  These scripts add to
the <tt>PATH</tt> environment variable the <tt>bin</tt> and <tt>sbin</tt>
directories into which the hpoj software was installed.  You'll need to
log out and back in again for the new PATH to take effect.  If for whatever
reason these scripts couldn't be added, then enter the following command on
the command line, or add it to <tt>/etc/profile</tt> (for all users) or to
<tt>~/.bash_profile</tt> (for individual users), and adjust <tt>/usr/local</tt>
as necessary for the actual installation directory you specified:
<pre>
	export PATH=/usr/local/sbin:/usr/local/bin:$PATH
</pre>

If you don't run "<tt>make install</tt>" as root, then you will need to
manually create the directories <tt>/dev/ptal-mlcd</tt> and
<tt>/dev/ptal-printd</tt>, if you haven't already.  Set the ownership
and permissions as appropriate (probably <tt>0755</tt> and
<tt>root:root</tt>).<p>

"<tt>make install</tt>" as root tries to create a symlink to
<a href="ptal-init.html"><tt>ptal-init</tt></a> in your system's init
script directory, such as <tt>/etc/init.d</tt>, and run <tt>chkconfig</tt>
to create the runlevel-specific symlinks.  If init scripts are located
in a directory not known to the Makefile, or if <tt>chkconfig</tt> isn't
available on your system, then you will need to create these symlinks
by hand to ensure that <a href="ptal-init.html"><tt>ptal-init</tt></a> gets
started and stopped as appropriate.  Alternatively, you might be able to add
a line to some sort of "local" init script, such as
<tt>/etc/rc.d/rc.local</tt>, that invokes
"<a href="ptal-init.html"><tt>ptal-init start</tt></a>".
You'll probably need to specify the full path to
<a href="ptal-init.html"><tt>ptal-init</tt></a> in this case.<p>

<b>Caution:</b> RedHat 7.x invokes a <tt>checkpc</tt> command in its
<tt>lpd</tt> init script.  This command will hang, particularly during
bootup, if <a href="ptal-printd.html"><tt>ptal-printd</tt></a> is not
already running.  For this reason, be sure that
<a href="ptal-init.html"><tt>ptal-init</tt></a> runs before <tt>lpd</tt>
gets started.<p>

"<tt>make install</tt>" as root checks <tt>/etc/ld.so.conf</tt> for the
directory into which <tt>libptal.so</tt> was installed, and adds it and
runs <tt>ldconfig</tt> if necessary.  If you build and install several
times using <tt>--prefix=<i>DIR</i></tt> switches that differ only in extra
slashes in the path, then you run the risk of having redundant lines added
to this file.  It would probably be a good idea to inspect this file and make
corrections if necessary, and re-run <tt>ldconfig</tt> to make your changes
take effect.<p>

As an alternative to modifying <tt>/etc/ld.so.conf</tt>, you can set the
environment variable <tt>LD_LIBRARY_PATH</tt> to <tt>/usr/local/lib</tt> (or
wherever the libraries were installed) before running any of the
hpoj programs that depend on <tt>libptal.so</tt>.<p>

<h2>Cleaning up from old hpoj versions</h2>

If you're upgrading from an older hpoj version, whether released or from
CVS, then there may be outdated files on your system.  "<tt>make install</tt>"
checks for these under the installation directory and prints a message
asking you to delete any that it finds.  However, it will not find them
if you install into a different directory from previous versions; in
this case, it would be a good idea to delete all files installed by the
previous version(s).<p>

If you install the hpoj software into separate unique directories for
different versions, then you should also check <tt>/etc/ld.so.conf</tt>
and remove lines that point to old hpoj versions.  However, be careful not
to delete the line for the current version, or any line specifying a
path containing other libraries on your system that you want to continue
to be accessible.  Run <tt>ldconfig</tt> (again, as root) to make your
changes to this file take effect.<p>

<h2>Next steps</h2>

In case you ever need to refer back to this documentation, it is
by default installed under <tt>/usr/local/doc/hpoj</tt>.<p>

Now you're ready to <a href="setup-connect.html">set up basic device
connectivity</a>.

</body>

</html>