When I try to install writexl in R 3.5.2, I get a compilation error. I noticed that another issue (#21) describes problems with compilation that may have been related to compilation flags, but with no clear resolution. My compilation error is not the same as in that issue, however.
trying URL 'https://cran.r-project.org/src/contrib/writexl_1.1.tar.gz'
Content type 'application/x-gzip' length 209069 bytes (204 KB)
==================================================
downloaded 204 KB
* installing *source* package βwritexlβ ...
** package βwritexlβ successfully unpacked and MD5 sums checked
** libs
rm -f writexl.so libxlsxwriter/libstatxlsxwriter.a write_xlsx.o libxlsxwriter/app.o libxlsxwriter/format.o libxlsxwriter/theme.o libxlsxwriter/chart.o libxlsxwriter/hash_table.o libxlsxwriter/utility.o libxlsxwriter/content_types.o libxlsxwriter/packager.o libxlsxwriter/workbook.o libxlsxwriter/core.o libxlsxwriter/relationships.o libxlsxwriter/worksheet.o libxlsxwriter/custom.o libxlsxwriter/shared_strings.o libxlsxwriter/xmlwriter.o libxlsxwriter/drawing.o libxlsxwriter/styles.o tmpfileplus/tmpfileplus.o libxlsxwriter/chartsheet.o minizip/ioapi.o minizip/zip.o
/usr/bin/gcc -I"/home/viking/.Renv/versions/3.5.2/lib64/R/include" -DNDEBUG -Iinclude -DNOCRYPT -DNOUNCRYPT -I'/home/viking/.Renv/versions/3.5.2/include' -fvisibility=hidden -fpic -g -O2 -c write_xlsx.c -o write_xlsx.o
/usr/bin/gcc -I"/home/viking/.Renv/versions/3.5.2/lib64/R/include" -DNDEBUG -Iinclude -DNOCRYPT -DNOUNCRYPT -I'/home/viking/.Renv/versions/3.5.2/include' -fvisibility=hidden -fpic -g -O2 -c libxlsxwriter/app.c -o libxlsxwriter/app.o
/usr/bin/gcc -I"/home/viking/.Renv/versions/3.5.2/lib64/R/include" -DNDEBUG -Iinclude -DNOCRYPT -DNOUNCRYPT -I'/home/viking/.Renv/versions/3.5.2/include' -fvisibility=hidden -fpic -g -O2 -c libxlsxwriter/format.c -o libxlsxwriter/format.o
/usr/bin/gcc -I"/home/viking/.Renv/versions/3.5.2/lib64/R/include" -DNDEBUG -Iinclude -DNOCRYPT -DNOUNCRYPT -I'/home/viking/.Renv/versions/3.5.2/include' -fvisibility=hidden -fpic -g -O2 -c libxlsxwriter/theme.c -o libxlsxwriter/theme.o
/usr/bin/gcc -I"/home/viking/.Renv/versions/3.5.2/lib64/R/include" -DNDEBUG -Iinclude -DNOCRYPT -DNOUNCRYPT -I'/home/viking/.Renv/versions/3.5.2/include' -fvisibility=hidden -fpic -g -O2 -c libxlsxwriter/chart.c -o libxlsxwriter/chart.o
/usr/bin/gcc -I"/home/viking/.Renv/versions/3.5.2/lib64/R/include" -DNDEBUG -Iinclude -DNOCRYPT -DNOUNCRYPT -I'/home/viking/.Renv/versions/3.5.2/include' -fvisibility=hidden -fpic -g -O2 -c libxlsxwriter/hash_table.c -o libxlsxwriter/hash_table.o
/usr/bin/gcc -I"/home/viking/.Renv/versions/3.5.2/lib64/R/include" -DNDEBUG -Iinclude -DNOCRYPT -DNOUNCRYPT -I'/home/viking/.Renv/versions/3.5.2/include' -fvisibility=hidden -fpic -g -O2 -c libxlsxwriter/utility.c -o libxlsxwriter/utility.o
/usr/bin/gcc -I"/home/viking/.Renv/versions/3.5.2/lib64/R/include" -DNDEBUG -Iinclude -DNOCRYPT -DNOUNCRYPT -I'/home/viking/.Renv/versions/3.5.2/include' -fvisibility=hidden -fpic -g -O2 -c libxlsxwriter/content_types.c -o libxlsxwriter/content_types.o
/usr/bin/gcc -I"/home/viking/.Renv/versions/3.5.2/lib64/R/include" -DNDEBUG -Iinclude -DNOCRYPT -DNOUNCRYPT -I'/home/viking/.Renv/versions/3.5.2/include' -fvisibility=hidden -fpic -g -O2 -c libxlsxwriter/packager.c -o libxlsxwriter/packager.o
In file included from include/xlsxwriter/third_party/zip.h:59:0,
from include/xlsxwriter/packager.h:17,
from libxlsxwriter/packager.c:11:
include/xlsxwriter/third_party/ioapi.h:141:51: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode));
^~
include/xlsxwriter/third_party/ioapi.h:142:51: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size));
^~
include/xlsxwriter/third_party/ioapi.h:143:51: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
^~
include/xlsxwriter/third_party/ioapi.h:144:51: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream));
^~
include/xlsxwriter/third_party/ioapi.h:145:51: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream));
^~
include/xlsxwriter/third_party/ioapi.h:147:51: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream));
^~
include/xlsxwriter/third_party/ioapi.h:148:51: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin));
^~
include/xlsxwriter/third_party/ioapi.h:154:5: error: unknown type name βopen_file_funcβ
open_file_func zopen_file;
^~~~~~~~~~~~~~
include/xlsxwriter/third_party/ioapi.h:155:5: error: unknown type name βread_file_funcβ
read_file_func zread_file;
^~~~~~~~~~~~~~
include/xlsxwriter/third_party/ioapi.h:156:5: error: unknown type name βwrite_file_funcβ
write_file_func zwrite_file;
^~~~~~~~~~~~~~~
include/xlsxwriter/third_party/ioapi.h:157:5: error: unknown type name βtell_file_funcβ
tell_file_func ztell_file;
^~~~~~~~~~~~~~
include/xlsxwriter/third_party/ioapi.h:158:5: error: unknown type name βseek_file_funcβ
seek_file_func zseek_file;
^~~~~~~~~~~~~~
include/xlsxwriter/third_party/ioapi.h:159:5: error: unknown type name βclose_file_funcβ
close_file_func zclose_file;
^~~~~~~~~~~~~~~
include/xlsxwriter/third_party/ioapi.h:160:5: error: unknown type name βtesterror_file_funcβ
testerror_file_func zerror_file;
^~~~~~~~~~~~~~~~~~~
include/xlsxwriter/third_party/ioapi.h:164:51: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
typedef ZPOS64_T (ZCALLBACK *tell64_file_func) OF((voidpf opaque, voidpf stream));
^~
include/xlsxwriter/third_party/ioapi.h:165:51: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
typedef long (ZCALLBACK *seek64_file_func) OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin));
^~
include/xlsxwriter/third_party/ioapi.h:166:51: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
typedef voidpf (ZCALLBACK *open64_file_func) OF((voidpf opaque, const void* filename, int mode));
^~
include/xlsxwriter/third_party/ioapi.h:170:5: error: unknown type name βopen64_file_funcβ
open64_file_func zopen64_file;
^~~~~~~~~~~~~~~~
include/xlsxwriter/third_party/ioapi.h:171:5: error: unknown type name βread_file_funcβ
read_file_func zread_file;
^~~~~~~~~~~~~~
include/xlsxwriter/third_party/ioapi.h:172:5: error: unknown type name βwrite_file_funcβ
write_file_func zwrite_file;
^~~~~~~~~~~~~~~
include/xlsxwriter/third_party/ioapi.h:173:5: error: unknown type name βtell64_file_funcβ
tell64_file_func ztell64_file;
^~~~~~~~~~~~~~~~
include/xlsxwriter/third_party/ioapi.h:174:5: error: unknown type name βseek64_file_funcβ
seek64_file_func zseek64_file;
^~~~~~~~~~~~~~~~
include/xlsxwriter/third_party/ioapi.h:175:5: error: unknown type name βclose_file_funcβ
close_file_func zclose_file;
^~~~~~~~~~~~~~~
include/xlsxwriter/third_party/ioapi.h:176:5: error: unknown type name βtesterror_file_funcβ
testerror_file_func zerror_file;
^~~~~~~~~~~~~~~~~~~
include/xlsxwriter/third_party/ioapi.h:180:28: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
void fill_fopen64_filefunc OF((zlib_filefunc64_def* pzlib_filefunc_def));
^~
include/xlsxwriter/third_party/ioapi.h:181:26: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
^~
include/xlsxwriter/third_party/ioapi.h:187:5: error: unknown type name βopen_file_funcβ
open_file_func zopen32_file;
^~~~~~~~~~~~~~
include/xlsxwriter/third_party/ioapi.h:188:5: error: unknown type name βtell_file_funcβ
tell_file_func ztell32_file;
^~~~~~~~~~~~~~
include/xlsxwriter/third_party/ioapi.h:189:5: error: unknown type name βseek_file_funcβ
seek_file_func zseek32_file;
^~~~~~~~~~~~~~
include/xlsxwriter/third_party/ioapi.h:200:21: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
voidpf call_zopen64 OF((const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode));
^~
include/xlsxwriter/third_party/ioapi.h:201:22: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
long call_zseek64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin));
^~
include/xlsxwriter/third_party/ioapi.h:202:23: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
ZPOS64_T call_ztell64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream));
^~
In file included from include/xlsxwriter/packager.h:17:0,
from libxlsxwriter/packager.c:11:
include/xlsxwriter/third_party/zip.h:129:32: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
extern zipFile ZEXPORT zipOpen OF((const char *pathname, int append));
^~
include/xlsxwriter/third_party/zip.h:130:34: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
extern zipFile ZEXPORT zipOpen64 OF((const void *pathname, int append));
^~
include/xlsxwriter/third_party/zip.h:150:33: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
extern zipFile ZEXPORT zipOpen2 OF((const char *pathname,
^~
include/xlsxwriter/third_party/zip.h:155:36: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
extern zipFile ZEXPORT zipOpen2_64 OF((const void *pathname,
^~
include/xlsxwriter/third_party/zip.h:160:40: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
extern int ZEXPORT zipOpenNewFileInZip OF((zipFile file,
^~
include/xlsxwriter/third_party/zip.h:171:42: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
extern int ZEXPORT zipOpenNewFileInZip64 OF((zipFile file,
^~
include/xlsxwriter/third_party/zip.h:200:41: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
extern int ZEXPORT zipOpenNewFileInZip2 OF((zipFile file,
^~
include/xlsxwriter/third_party/zip.h:213:44: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
extern int ZEXPORT zipOpenNewFileInZip2_64 OF((zipFile file,
^~
include/xlsxwriter/third_party/zip.h:229:41: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
extern int ZEXPORT zipOpenNewFileInZip3 OF((zipFile file,
^~
include/xlsxwriter/third_party/zip.h:246:44: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
extern int ZEXPORT zipOpenNewFileInZip3_64 OF((zipFile file,
^~
include/xlsxwriter/third_party/zip.h:272:41: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
extern int ZEXPORT zipOpenNewFileInZip4 OF((zipFile file,
^~
include/xlsxwriter/third_party/zip.h:293:44: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
extern int ZEXPORT zipOpenNewFileInZip4_64 OF((zipFile file,
^~
include/xlsxwriter/third_party/zip.h:320:40: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
extern int ZEXPORT zipWriteInFileInZip OF((zipFile file,
^~
include/xlsxwriter/third_party/zip.h:327:38: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
extern int ZEXPORT zipCloseFileInZip OF((zipFile file));
^~
include/xlsxwriter/third_party/zip.h:332:41: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
extern int ZEXPORT zipCloseFileInZipRaw OF((zipFile file,
^~
include/xlsxwriter/third_party/zip.h:336:43: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
extern int ZEXPORT zipCloseFileInZipRaw64 OF((zipFile file,
^~
include/xlsxwriter/third_party/zip.h:346:29: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
extern int ZEXPORT zipClose OF((zipFile file,
^~
include/xlsxwriter/third_party/zip.h:353:44: error: expected β=β, β,β, β;β, βasmβ or β__attribute__β before βOFβ
extern int ZEXPORT zipRemoveExtraInfoBlock OF((char* pData, int* dataLen, short sHeader));
^~
libxlsxwriter/packager.c: In function βlxw_packager_newβ:
libxlsxwriter/packager.c:108:25: warning: implicit declaration of function βzipOpenβ; did you mean βpopenβ? [-Wimplicit-function-declaration]
packager->zipfile = zipOpen(packager->filename, 0);
^~~~~~~
popen
libxlsxwriter/packager.c:108:23: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
packager->zipfile = zipOpen(packager->filename, 0);
^
libxlsxwriter/packager.c: In function β_add_file_to_zipβ:
libxlsxwriter/packager.c:1021:13: warning: implicit declaration of function βzipOpenNewFileInZip4_64β [-Wimplicit-function-declaration]
error = zipOpenNewFileInZip4_64(self->zipfile,
^~~~~~~~~~~~~~~~~~~~~~~
libxlsxwriter/packager.c:1048:17: warning: implicit declaration of function βzipWriteInFileInZipβ [-Wimplicit-function-declaration]
error = zipWriteInFileInZip(self->zipfile,
^~~~~~~~~~~~~~~~~~~
libxlsxwriter/packager.c:1063:17: warning: implicit declaration of function βzipCloseFileInZipβ [-Wimplicit-function-declaration]
error = zipCloseFileInZip(self->zipfile);
^~~~~~~~~~~~~~~~~
libxlsxwriter/packager.c: In function βlxw_create_packageβ:
libxlsxwriter/packager.c:1177:17: warning: implicit declaration of function βzipCloseβ; did you mean βpcloseβ? [-Wimplicit-function-declaration]
zip_error = zipClose(self->zipfile, NULL);
^~~~~~~~
pclose
make: *** [/home/viking/.Renv/versions/3.5.2/lib64/R/etc/Makeconf:162: libxlsxwriter/packager.o] Error 1
ERROR: compilation failed for package βwritexlβ
* removing β/home/viking/.Renv/versions/3.5.2/lib64/R/library/writexlβ
The downloaded source packages are in
β/tmp/Rtmp7dBQJ8/downloaded_packagesβ
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("writexl", repos = "https://cran.r-project.org") :
installation of package βwritexlβ had non-zero exit status