-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathINSTALL
More file actions
114 lines (75 loc) · 3.46 KB
/
Copy pathINSTALL
File metadata and controls
114 lines (75 loc) · 3.46 KB
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
# Installing *stringi*
In most cases, installing *stringi* is as simple as calling:
```r
install.packages("stringi")
```
However, due to the overwhelming complexity of the ICU4C library,
upon which *stringi* is based, and the diversity of environments
it operates on, you might still experience a few issues.
Hopefully, they can be resolved with the help of this short manual.
Below we also describe some available build process tweaks.
> To get the most out of stringi, you are strongly encouraged to rely
> on our custom ICU4C 74.1 bundle by calling:
>
> ```r
> install.packages("stringi", configure.args="--disable-pkg-config")
> ```
>
> This ensures maximum portability across all platforms
> (Windows and macOS users fetch the pre-compiled binaries
> from CRAN built precisely this way).
## ICU4C
The stringi package depends on the ICU4C >= 61 library.
ICU will be built together with stringi based on a customised
ICU4C 74.1 source bundle that is shipped with the package
if we install the package from sources and one of the following is true:
* this requirement is not met (check out <https://icu.unicode.org/download>,
the `libicu-devel` package on Fedora/CentOS/OpenSUSE,
`libicu-dev` on Ubuntu/Debian, etc.), or
* `pkg-config` fails to find appropriate build settings
for ICU-based projects, or
* `R CMD INSTALL` is called with the `--configure-args='--disable-pkg-config'`
argument, or the `STRINGI_DISABLE_PKG_CONFIG` environment variable
is set to non-zero or
`install.packages("stringi", configure.args="--disable-pkg-config")`
is executed.
## Customising the Build Process
Additional features and options of the `./configure` script:
* `--disable-icu-bundle`: Enforce system ICU.
* `--disable-pkg-config`: Disable `pkg-config`;
ICU4C will be compiled from sources.
* `--with-extra-cxxflags=FLAGS`: Additional C++ compiler flags.
* `--with-extra-cppflags=FLAGS`: Additional C++ preprocessor flags.
* `--with-extra-ldflags=FLAGS`: Additional linker flags.
* `--with-extra-libs=FLAGS`: Additional libraries to link against.
Some environment variables:
* `PKG_CONFIG_PATH`: An optional list of directories to search for
`pkg-config`'s `.pc` files.
* `R_HOME`: Override the R directory, e.g.,
`/usr/lib64/R`. Note that `$R_HOME/bin/R` point to the R executable.
* `CAT`: The `cat` command used to generate the list of source files to compile.
* `PKG_CONFIG`:The `pkg-config` command used to fetch the necessary compiler
flags to link to the existing `libicu` installation.
* `STRINGI_DISABLE_PKG_CONFIG`: Compile ICU from sources;
see also `--disable-pkg-config`.
* `STRINGI_DISABLE_ICU_BUNDLE`: Enforce system ICU;
see also `--disable-icu-bundle`.
* `STRINGI_CXXFLAGS`: see `--with-extra-cxxflags`.
* `STRINGI_CPPFLAGS`: see `--with-extra-cppflags`.
* `STRINGI_LDFLAGS`: see `--with-extra-ldflags`.
* `STRINGI_LIBS`: see `--with-extra-libs`.
## Getting Help
If you do not manage to set up a successful build, do not
hesitate to [file a bug report](https://github.com/gagolews/stringi/issues).
However, please check the list of archived (closed) issues first --
it is quite likely that a solution to your problem has already been posted.
To help diagnose your error further, please run (from the terminal)
the following commands and submit the output from `./configure`
as well as the contents of `config.log`.
```bash
cd /tmp
wget https://github.com/gagolews/stringi/archive/master.zip
unzip master.zip
cd stringi-master
./configure
```