ropensci / bibtex

bibtex parser for R
https://docs.ropensci.org/bibtex/
36 stars 12 forks source link

Difficulty loading bibtex in R Studio #34

Open annaheff opened 4 years ago

annaheff commented 4 years ago

Hi!

I am having difficulty loading bibtex in R, I realized this while trying to install and load the "plm" package. I am working from a cloud environment, and have R version 3.6.3. I have been able to run plm before, so I am confused why this is now an issue. I get almost an identical error when I try to load from CRAN and from github. What I am simply trying to run:

install.packages("plm")
install.packages("bibtex")

Or

if(!requireNamespace("remotes", quietly = TRUE)) { install.packages("remotes") }
remotes::install_github("ropensci/bibtex")

This is the error I get:

bibparse.y: In function ‘xx_simple_value’:
bibparse.y:945: error: ‘for’ loop initial declarations are only allowed in C99 mode
bibparse.y:945: note: use option -std=c99 or -std=gnu99 to compile your code
bibparse.y: In function ‘xx_expand_abbrev’:
bibparse.y:1021: error: ‘for’ loop initial declarations are only allowed in C99 mode
bibparse.y: In function ‘asVector’:
bibparse.y:1145: error: ‘for’ loop initial declarations are only allowed in C99 mode
make: *** [bibparse.o] Error 1
ERROR: compilation failed for package ‘bibtex’

I have no idea why it is treating something as a for loop. I've tried to download archived versions of bibtext as well, with the same error message above. Please let me know if I can provide any more information. Thank you so much!