RcppCWB v0.3.2 ‘Dune Ride’ ensures Apple Silicon compatibility.
Apple’s new M1 chip has deservedly raised significant attention. The new Mac minis and 13 inch Macbook Pros running on “Apple Silicon” are fast, energy-saving and affordable at the same time. No doubt an increasing number of polmineR users will work on an M1 machine. So we need to take care that everything works with the new generation of processors.
Technically, everything hinges on the RcppCWB package. The C code of the Corpus Workbench (CWB) included in the RcppCWB package and the C++ wrappers exposing CWB performance are the basis for everything that makes analysing corpora with polmineR fast. So the crucial question was whether RcppCWB would compile on M1 machines?
If you run R with the Rosetta emulator, everything is fine. But one issue arising with native M1 compiled code required our attention: If GLib-2.0, a dependency of the CWB, is not yet present, it would be downloaded from the libglib repository we host with GitHub. And GLib binaries for the new processor architecture were not there yet. And RcppCWB, which had been developed assuming that every Mac has Intel inside, would not look for M1-compatible dependencies either.
This is solved with RcppCWB v0.3.2 which has just made its way to CRAN. The functionality of the package remains unchanged. Working on the configure script anyway, I tried to make it more robust and verbose so that users could get a better idea what is wrong when facing an issue when compiling the package. For instance, there is now a warning when PCRE is present but has been compiled without Unicode support. Yet the primary focus of the new release is to ensure that RcppCWB (and polmineR, cwbtools etc) work seamlessly on the new Apple machines with M1 chips inside.
This has been achieved. Because it is just not possible to get one of the new machines really quickly (delivery takes a few weeks), we used a cloud solution offered by MacStadium to be able to adjust things and run tests now. This worked nicely, no complaints. Nevertheless, making the adjustments required some attention. This is why this release of RcppCWB is called “Dune Ride”.
You need further explanation? Dunes are made of sand, and processors are made of silicon, and silicon is made of sand, and so is the M1 chip, I guess, so rodeo with M1 is a dune ride, metaphorically.
If you face issues running RcppCWB/polmineR/cwbtools on M1, please use RcppCWB issues to let us know!
Subscribe via RSS