summaryrefslogtreecommitdiffstats
path: root/INSTALL
blob: 9c6245a19c95e5e75aad405a77b541904c50adb0 (plain)
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
 Irssi installation instructions
 -------------------------------

To compile Irssi you need:

- meson-0.49 build system with ninja-1.5 or greater
- glib-2.32 or greater
- openssl (for ssl support)
- perl-5.8 or greater (for building, and optionally Perl scripts)
- terminfo or ncurses (for text frontend)

For most people, this should work just fine:

 meson Build
 ninja -C Build
 su
 ninja -C Build install
 
For the moment, autotools is also supported:

 ./autogen.sh     (for people who just cloned the repository)
 ./configure      (if this script already exists, skip ./autogen.sh)
 make
 su
 make install     (not _really_ required except for perl support)

configure options

  These options can be given to meson or ./configure.
  The first syntax is for meson, the 2nd for ./configure
  
  For a complete list of options, run
   meson configure   /   ./configure --help

  --prefix

  Specifies the path where Irssi will be installed.
  YES, you can install Irssi WITHOUT ROOT permissions
  by using --prefix=/home/dir

  -Dwith-proxy=yes   /   --with-proxy

  Build the Irssi proxy (see startup-HOWTO).

  -Dwith-perl=[yes|no]   /   --with-perl=[yes|no|module]

  Enable Perl support
  yes    enable builtin (default)
  no     disable
  module enable as module

  -Dwith-perl-lib=[site|vendor|DIR]   /   --with-perl-lib=[site|vendor|DIR]

  Specify installation dir for Perl libraries
  site   install in dir for site-specific modules (default)
  vendor install in dir for vendor-specific modules
  DIR    install in DIR

  [N/A]   /   --with-socks

  Build with socks library

  -Dwith-bot=yes   /   --with-bot

  Build irssi-bot

  -Dwithout-textui=yes   /   --without-textui

  Build without text frontend

If anything is in non-standard path, you can just give the paths in
the -Dc_args and -Dc_link_args options variable, eg.:

  meson Build -Dc_args='-I/opt/openssl/include' -Dc_link_args='-L/opt/openssl/lib'



 Perl problems
 -------------

Perl support generates most of the problems. There's quite a many
things that can go wrong:

 - Compiling fails if you compile irssi with GCC in a system that has
   perl compiled with some other C compiler. Very common problem with
   non-Linux/BSD systems. You'll need to edit src/perl/*/Makefile files
   and remove the parameters that gcc doesn't like. Mostly you'll just
   need to keep the -I and -D parameters and add -fPIC.
 - If there's any weird crashing at startup, you might have older irssi's
   perl libraries installed somewhere, and you should remove those.
 - Dynamic libraries don't want to work with some systems, so if your
   system complains about some missing symbol in Irssi.so file, configure
   irssi with --with-perl-staticlib option (NOT same as --with-perl=static).
 - If configure complains that it doesn't find some perl stuff, you're
   probably missing libperl.so or libperl.a. In debian, you'll need to do
   apt-get install libperl-dev
 - For unprivileged home directory installations, you probably do not want 
   to specify --with-perl-lib=(site|vendor). Instead, you can use the 
   default perl installation target (below the irssi prefix). If you are
   using local::lib you can also choose to install there by specifying
   --with-perl-lib=$PERL_LOCAL_LIB_ROOT/lib/perl5

You can verify that the perl module is loaded and working with "/LOAD"
command. It should print something like:

Module               Type    Submodules
...
perl                 static  core fe


 System specific notes
 ---------------------

 Android

When cross compiling Irssi for Android, you can specify the path of
the cross-perl in the cross file.

You may not have a cross-perl available. In that case, you will have
to manually supply the required Perl arguments in the cross file. See
the commented properties in the example cross file.

An example cross file can be found in the docs folder. To use it, you
would call:

  meson Build --cross-file cross-android-aarch64.txt \
    --prefix /data/data/com.termux/files/usr \
    --libdir lib \
    -Dfhs-prefix=/data/data/com.termux/files/usr \


 Cygwin

Getting perl scripting to work needs a few things:

 - configure with --with-perl-staticlib

 - libperl.dll is required in linking and running irssi, it's normally
   located somewhere around /usr/lib/perl5/5.6.1/cygwin/CORE/libperl5_6_1.dll
   copy it to eg. /usr/bin/libperl.dll

 - -DUSEIMPORTLIB is needed to be defined while compiling src/perl directory.
   It doesn't hurt to be defined everywhere, so configure irssi with:

     CFLAGS='-DUSEIMPORTLIB' ./configure --with-perl-staticlib


 Apple MacOS / Darwin

At the time of writing, meson has an open issue with correctly linking
libraries on macos.

See docs/meson-macos-ar.txt for a workaround.