forked from grodansparadis/vscp
/
BUILD_UNIX
170 lines (95 loc) · 5.45 KB
/
BUILD_UNIX
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
Check the more up to date version her also http://www.vscp.org/wiki/doku.php/howto/setup_linux
To build VSCP and friends type
There are detailed build instructions in the VSCP wiki for a copuple of different platforms. Look gete http://www.vscp.org/wiki/doku.php/howto
".configure"
(You can add "--enable-debug" to build a debug version.)
followed by
"make"
and "make install" as root user.
You can use ./configure --help to get help about available switches. Use --enable-debug to use the debug version
of wxWidgets and use --enable-unicode to use the unicode version (default=. The use of the unicode version is recommended.
To compile the package you need the wxWidgets libraries. The toolkit can be found at
http://www.wxwidgets.org. Either use the graphical version GTK2 (libgtk3.0-dev)
of the library (if you want to build the graphical components == vscpworks) or the base version.
If you want the MQTT driver to build you need to install and build the mosquitto-1.1.3.tar.gz or later
from here http://mosquitto.org/download/
You also need libssl-dev, and optional libpcap-dev for raw ethernet support.
Configuration files should be located in /etc/vscp and there are samples of configuration files here in the config_examples folder in the distribution root. You need vscpd.conf. make install will install files in /srv/vscp fir the webserver and for read/write cibfiguration files.
The names should be vscpd.conf for the daemon and vscpworks.conf for VSCP works. The daemon can be started with a path to a configuration file in another location using the -c switch.
Notes on making your own applications
-------------------------------------
If you build GUI application that use the vscp helper dll the wxUSE_GUI=1 should be in your preprocessor directives.
If you build non-guid components define wxUSE_GUI=0
Have Fun!
/Ake
<akhe@grodansparadis.com>
Common Problems and notes
=========================
vscpworks does not compile
==========================
Check that you configured the wxWidgets package with --enable-richtext. If you issue "wx-config --libs" you should see the richtext library.
Problems with missing libcrypto
===============================
Compile complains that it can't find openssl/md5.h
Solution: On Ubuntu at least install libssl-dev. libcurl2-opemssl-dev also works on debian etch.
Complains ‘class wxXmlNode’ has no member named ‘GetNodeContent’
================================================================
You need wxWidgets 2.8.0 or newer.
---------------------------------------------------------------------
Compile errors when issuing Make. This can be due to many things. One cause is that the wxBase version of the
wxWidgets library is used instead of the full library (wxGTK2 library). You can check if this is the cause of
the failure by looking in src/canal/cancmd/Makefile. The
Makefile should have a CXXFLAGS entry that looks something like below. if it have
-I/usr/local/lib/wx/include/base... the base library of the wxWidgets toolkit is installed and you should
install the full version instead.
CXXFLAGS = -g -O2 -I/usr/local/lib/wx/include/gtk2-ansi-debug-2.6 -I/usr/local/include/wx-2.6 -D__WXDEBUG__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA
Use "wx-config" to check wxWidgets configurations
Debian etch
===========
make sure libopenssl-debv and libgtk2.0-dev is installed. Fet wxWidgets-1.8.7 or later from the wxWidgets site
and configure with
./configure --enable-unicode
Unsure if --enable-richtext really is needed. If you get compiants about it add the switch.
Make the library with "make" and install it with "make install" if it compiled OK.
tiff, gif, and librarues are needed for wxWidgets to compile install them. You can seach the package names with
apt-cache search libxxx | grep libxx | less
Remember to add the path to /usr/local/lib to /etc/ld.so.conf.d/i486-linux-gnu.conf and then issue "ldconfig"
after installing the libs.
After this just build and install VSCP & Friends.
Fedora Core 4
=============
libwx_gtk2_xrc-2.6.so.0 is missing when you try to start cw. This means that the path to it cant be found. Add the path to /etc/ld.conf.d (new entry with /usr/local/lib) and the problem will be resolved.
Known configuration that compiles out of the box on Fedora Core 4 is 2.6, ansi, debug. Release build should also work.
The wx libraries was built with the following swithes
./configure --enable-debug --disable-unicode
"wx-config" gives the following output
wx-config --prefix
/usr/local
wx-config --exec-prefix
/usr/local
wx-config --release
2.6
wx-config --list
Default config is gtk2-ansi-debug-2.6
Default config will be used for output
Alternate matches:
base-ansi-debug-2.6
base-ansi-release-2.6
gtk2-ansi-release-2.6
wx-config --version
2.6.3
wx-config --basename
wx_gtk2d
wx-config --cc
gcc
wx-config --cppflags
-I/usr/local/lib/wx/include/gtk2-ansi-debug-2.6 -I/usr/local/include/wx-2.6 -D__WXDEBUG__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA
wx-config --cxxflags
-I/usr/local/lib/wx/include/gtk2-ansi-debug-2.6 -I/usr/local/include/wx-2.6 -D__WXDEBUG__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA
wx-config --libs
-L/usr/local/lib -pthread -L/usr/X11R6/lib -lwx_gtk2d_xrc-2.6 -lwx_gtk2d_qa-2.6 -lwx_gtk2d_html-2.6 -lwx_gtk2d_adv-2.6 -lwx_gtk2d_core-2.6 -lwx_based_xml-2.6 -lwx_based_net-2.6 -lwx_based-2.6
wx-config --cxx
g++
wx-config --ld
g++ -shared -fPIC -o
wx-config --linkdeps