forked from rockowitz/rockowitz.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
building.md~
101 lines (76 loc) · 3.27 KB
/
building.md~
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
## Building From Source
### Building from tarball
**ddcutil** can be built from its [tarball](ddcutil-0.6.0.tar.gz) in the usual way.
Unpack the tar file, change to its directory, and issue the commands:
~~~
# ./configure
# make
# sudo make install
~~~
Note that additional steps are required to build **ddcutil** with *ADL* support.
See [ADL support](adl.md).
### **configure** options
The **configure** script has several custom options. Some reflect features under development.
The currently supported options are:
|Option | Purpose
|-------------|--------------
|--with-adl <directory> | Build with support for ADL connected monitors. See below
|--disable-usb | Do not build with support for USB connected monitors. Reduces size and package requirements. (Default is --enable-usb.)
### Required packages
Because of the variation among distributions, only general guidelines can be
given for some ddcutil prerequisites.
ddcutil requires the following packages for both building and execution:
- i2c-tools
- glib-2.0 (Note: glib-2.0 can be packaged with different names, e.g. libglib2.0-0, and may entail installing multiple packages.)
On most platforms, development related files (e.g. headers files) are in separate packages having a
"-dev" or similar suffix in their names. ddcutil needs development packages for:
- glib2.0 (e.g. libglib2.0-0)
- xrandr (e.g. libxrandr-dev)
- hidapi
- lsusb (e.g. libusb-1_0-devel, libusb-1.0-0-dev)
- hidraw
- udev (e.g. libudev-devel, libudev-dev)
- python-all-dev
At least on Ubuntu, the i2c.h header file is found in a separate package.
If the following package exists, it is required to build ddcutil.
- libi2c-dev
Error messages in this regard from autoconf can be misleading. If autoconf complains that a package
is not found but it seems to be installed, it's likely that the associated development package
(with a suffix like "-dev") needs to be installed.
### Building from git
The git repository for **ddcutil** is [here](http://www.github.com/rockowitz/ddcutil)
- Building **ddcutil** from git requires that the *autotools* related packages be installed.
The exact packages vary from distribution to distribution. On Ubuntu, these include:
- autoconf
- automake
- autotools-dev
- libtool
- m4
- pkg-config
To configure the build, change to the main **ddcutil** directory and execute the file:
~~~
# ./autogen.sh
~~~
Or issue the individual commands:
~~~
# aclocal
# autoconf
# automake
~~~
Then to configure, build, and install **ddcutil**:
~~~
# ./configure
# make
# sudo make install
~~~
Common issues:
- Building with support for the AMD proprietary video driver (fglrx) requires that *configure* be executed using
the *-with-adl-headers* argument. See [ADL support](adl.md).
- If you see a message "required file './ltmain.sh.' not found", run *libtoolize*
(See https://www.gnu.org/software/automake/manual/html_node/Error-required-file-ltmain_002esh-not-found.html)
- May get the following warning when running automake
~~~
src/Makefile.am:38: warning: compiling 'cmdline/cmd_parser_aux.c' in subdir requires 'AM_PROG_CC_C_O' in 'configure.ac'
~~~
This is an autotools versioning issue. It appears that this warning can be ignored.
- (need notes on other warnings that can be ignored)