-
Notifications
You must be signed in to change notification settings - Fork 326
/
INSTALL
246 lines (178 loc) · 7.73 KB
/
INSTALL
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
########################################################################
# This file describes how to compile and install libgphoto2.
########################################################################
Follow these steps to build and install libgphoto2 from the source
code. You don't have to run most of these steps as root, except when
explicitly required. In fact, you really shouldn't.
In order to get libgphoto2 running after installation, you will
probably want to read The gPhoto2 Manual. It is available from the
homepage:
http://gphoto.org/
http://gphoto.com/
http://gphoto.sourceforge.net/
At lease one of these should work at any time.
===============================
Step 0: Preparing configuration
===============================
If you have obtained your copy of gphoto2 packaged from a .tar.gz or
.tar.bz2 tarball, SKIP THIS STEP.
If you have obtained libgphoto2 source using Git, then you will
have to prepare for step 1 (the configuration of the sources) by running
the autoreconf program.
For autoreconf to succeed, you require the following tools:
automake
autoconf
pkg-config (to detect additional library dependencies)
autopoint (needed if installing from github)
gettext (possibly from -dev or -devel package)
libtool (possibly from -dev or -devel package)
in versions compatible with each other and with libgphoto2. Most
combinations on current GNU/Linux systems work, whereas BSD systems
tend to have some compatibility problems.
We recommend you call autoreconf like this:
$ autoreconf --install --symlink
=============================
Step 1: Configure the sources
=============================
$ ./configure --prefix=/usr/local
to prepare a tarball source tree for installation in (e.g.) /usr/local
or run ./configure --help in order to find out about more
configuration parameters.
See Appendix A at the end of this file for some hints on configuring
for certain platforms.
The following software components are optional, and will improve the
libraries' and/or command-line client's functionality if present:
libusb (ver. >= 0.1.6a) -- Universal Serial Bus camera support
<URL:http://www.sourceforge.net/projects/libusb/>
gettext (ver. >= 0.10.40) -- internationalization using shared library
gtk-doc -- documentation built in doc/api/
(Debian package name gtk-doc-tools)
libexif - EXIF tag support
<URL:http://www.sourceforge.net/projects/libexif>
Please check the output of the configure script for whether all
desired libraries have been detected correctly. E.g., you might
have to add the path where libusb-config resides to your PATH
before running configure.
===========================
Step 2: Compile the program
===========================
You will probably be best off running GNU make. On GNU/Linux linux
systems, you can run "make", on other systems (such as *BSD), you
will have to run "gmake" or something similar.
The classic way to compile the program is just to run
$ make
or
$ make -jN (if you have N CPU cores)
and wait until the source is built.
If you want to compile only one or two specific camlibs, run something like
$ make -C camlibs canon.la ptp2.la
==============================
Step 3: Installing the program
==============================
To install the stuff you just compiled by running "make", you can just
run
$ make install
now. If installing to a directory which is not writable by your
current user, you will have to run it as root.
This installs the software and documentation into the proper
directories on your system.
If you want to install only one or two specific camlibs, run something like
$ make GP_CAMLIB_SET="canon.la ptp2.la" install-camlibs
On Linux, the installed libtool .la files are not needed and can be removed.
====================================================
Step 4: Installation is finished - now what do I do?
====================================================
Note that libgphoto2 is not designed to be run by a setuid/setgid
program. Running ANY libgphoto2 frontend as root or setuid root or in
a similar fashion will open up a SECURITY HOLE in your system!
If you run into problems, please read the FAQ (at the website) first.
For more general information about how to configure libgphoto2, read
The gPhoto2 Manual (at the website).
If you have permission problems when accessing your camera, read
the chapter on Permission Setup -- you will probably want to create a
new user group for the users that are to have camera access and change
the permissions of the serial or USB device to match.
===============================================
Appendix A: Platform specific compilation hints
===============================================
libgphoto2 has been successfully used on many system. Some systems
where it has been reported to successfully compile are listed
below. Not all, or even any, camera libraries have been tested on
these systems, so there may be endian other issues that prevent
some camera libraries from working.
Please report any changes to this list to the gphoto developer mailing
list. As of this writing, USB support is only available on Linux and
FreeBSD as those are the only systems on which libusb is available.
General Hints:
- If you have build problems in the intl or po directories, try
re-running configure with the --disable-nls flag.
- If configure stops due to an error with 'test', try re-running
configure with the --without-usb flag.
- If 'make' reports an error, try using GNU make (often called gmake
or gnumake) instead of the make that comes with your system.
- If one camera driver (camlib) has compilation errors, re-run
configure with an appropriate --with-camlibs= flag to prevent that
specific camlib from being compiled.
The list of working systems is a little outdated as of 2002-11-20, but
we have still left it here as a reference.
i386:
Debian GNU/Linux 2.2
Red Hat Linux 7.1
Red Hat Linux 4.2
TurboLinux 6.5
Slackware Linux 8.0
FreeBSD 4.3
Try the following to configure the optional libraries:
env CFLAGS="-I/usr/local/include" CPPFLAGS="-I/usr/local/include" \
LDFLAGS="-I/usr/local/lib" ./configure
(you may also need to append the flag --disable-nls).
Use GNU make to build (gmake).
Alpha:
Debian GNU/Linux 2.2
OpenBSD 3.0
NetBSD 1.5.1
Configure with this command:
./configure --disable-nls
Use GNU make to build (gmake).
Tru64 5.1A
Configure with this command:
env CFLAGS='-D__STDC_VERSION__=0' ./configure --disable-nls
Use GNU make to build (gnumake).
PowerPC:
Debian GNU/Linux 2.2
Apple Darwin/OS X
Need dlcompat from <URL:http://fink.sourceforge.net>
Configure with this command:
env CFLAGS="-I/path/to/dlcompat -no-cpp-precomp" \
LDFLAGS="-L/path/to/dlcompat" ./configure --disable-nls
Need libtool ver. >= 1.4.2a
Sparc:
Debian GNU/Linux 2.2
Solaris 8 (gcc)
Configure with this command:
./configure --without-usb
and use GNU make to build (gmake).
StrongARM:
Intimate+Debian iPAQ GNU/Linux (native gcc)
Linux (cross-compiled gcc)
Itanium:
Red Hat Linux 7.1 (gcc)
The following systems have some problems compiling, but may be made to
work with some effort:
Itanium:
Red Hat Linux 7.1 (Intel ecc)
There is a bug in ver. 5.0.1 of this compiler tickled by gphoto2 that
prevents full compilation.
Need better libtool support (newer than version 1.4.2).
Red Hat Linux 7.1 (sgicc)
Need better libtool support (newer than version 1.4.2).
Sparc:
Solaris 8 (cc)
Sun's cc doesn't support #warning or # or ## macro features, which
occur several times in the code.
MIPS:
IRIX (cc)
MIPSpro C doesn't support #warning.
Thanks go to SourceForge for their compile farm, and Compaq for their
TestDrive program which allowed gphoto2 to be tested on many of these
systems.