Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux install problems #21

Closed
kk-1 opened this issue Jun 25, 2018 · 9 comments
Closed

linux install problems #21

kk-1 opened this issue Jun 25, 2018 · 9 comments

Comments

@kk-1
Copy link

kk-1 commented Jun 25, 2018

Hello,
Using 64 bit linux and Rstudio.
R is version 3.5
I get error when I try to install writexl
Any idea why am I getting this error:
...
tmpfileplus/tmpfileplus.c:239:6: warning: assignment to ‘FILE *’ {aka ‘struct IO_FILE *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
fp = FDOPEN
(fd, "w+b");
^
tmpfileplus/tmpfileplus.c: In function ‘tmpfileplus’:
tmpfileplus/tmpfileplus.c:290:18: error: ‘P_tmpdir’ undeclared (first use in this function); did you mean ‘tmpdir’?
tempdirs[i++] = P_tmpdir;
^~~~~~~~
tmpdir
make: *** [/usr/lib64/R/etc/Makeconf:159: tmpfileplus/tmpfileplus.o] Error 1
ERROR: compilation failed for package ‘writexl’
...

Any help welcome.

@jeroen
Copy link
Member

jeroen commented Jun 25, 2018

Your version of R is probably not configured with the correct C flags. Can you show me the full output of the compiler before the error happens?

@kk-1
Copy link
Author

kk-1 commented Jun 25, 2018 via email

@jeroen
Copy link
Member

jeroen commented Jun 25, 2018

Looks like the problem first appears here:

tmpfileplus/tmpfileplus.c:159:46: error: ‘S_IFDIR’ undeclared (first
use in this function); did you mean ‘S_ISDIR’?
  if ((stat(path, &st) == 0) && (st.st_mode & S_IFDIR))
                                              ^~~~~~~
                                              S_ISDIR

This macro should be defined by your operating system in #include <sys/stat.h>. Which linux distro do you use?

@kk-1
Copy link
Author

kk-1 commented Jun 25, 2018 via email

@jeroen
Copy link
Member

jeroen commented Jun 25, 2018

Well it looks like there is something wrong with it. Which distribution is this?

@kk-1
Copy link
Author

kk-1 commented Jun 25, 2018 via email

@jeroen
Copy link
Member

jeroen commented Oct 11, 2018

Does this problem still exist? I think it is a bug in your linux installation.

@kk-1
Copy link
Author

kk-1 commented Oct 11, 2018

Thanks for your interest!
Long time ago I fixed it
It was simply a gcc version issue as far as I remember
I do not remember exactly how I did
But it may involve using clang or different gcc version
Hope that it helps

@jeroen
Copy link
Member

jeroen commented Oct 11, 2018

I have just installed the package in tumbleweed in docker and it works fine. I think it is a bug in your linux installation.

# Run docker
docker run -i -t opensuse/tumbleweed bash

# Run in container:
zypper update
zypper install R-devel gcc zlib-devel

#install writexl
R -e 'install.packages("writexl", repos = "https://cloud.r-project.org")'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants