You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Obrigado pela iniciativa de criar o pacote, muito útil!
Não estou conseguindo completar a instalação. Instalei o Rtools e rodei o código exatamente como você escreveu, mas estou tendo problemas com as dependências do RStem. Depois de tentar a instalação usando o código, recebo essa mensagem:
# Instalação do pacote de dependência
> install.packages("Rstem", repos = "http://www.omegahat.net/R")
Installing package into ‘C:/Users/hugom/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
Package which is only available in source form, and may need
compilation of C/C++/Fortran: ‘Rstem’
installing the source package ‘Rstem’
trying URL 'http://www.omegahat.net/R/src/contrib/Rstem_0.4-1.tar.gz'
Content type 'application/x-gzip' length 274336 bytes (267 KB)
downloaded 267 KB
* installing *source* package 'Rstem' ...
** using staged installation
** libs
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I. -I../Snowball/q -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c api.c -o api.o
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I. -I../Snowball/q -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c danish_stem.c -o danish_stem.o
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I. -I../Snowball/q -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c dutch_stem.c -o dutch_stem.o
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I. -I../Snowball/q -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c english_stem.c -o english_stem.o
english_stem.c: In function 'r_prelude':
english_stem.c:376:5: warning: label 'lab1' defined but not used [-Wunused-label]
376 | lab1:
| ^~~~
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I. -I../Snowball/q -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c finnish_stem.c -o finnish_stem.o
finnish_stem.c: In function 'r_case':
finnish_stem.c:448:21: warning: unused variable 'm' [-Wunused-variable]
448 | { int m = z->l - z->c; /* try, line 111 */
| ^
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I. -I../Snowball/q -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c french_stem.c -o french_stem.o
french_stem.c: In function 'french_stem':
french_stem.c:951:25: warning: unused variable 'm' [-Wunused-variable]
951 | { int m = z->l - z->c; /* try, line 225 */
| ^
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I. -I../Snowball/q -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c german_stem.c -o german_stem.o
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I. -I../Snowball/q -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c mytest.c -o mytest.o
mytest.c: In function 'S_stemWords':
mytest.c:59:10: error: 'PROBLEM' undeclared (first use in this function)
59 | PROBLEM "Cannot create a Snowball environment"
| ^~~~~~~
mytest.c:59:10: note: each undeclared identifier is reported only once for each function it appears in
mytest.c:59:17: error: expected ';' before string constant
59 | PROBLEM "Cannot create a Snowball environment"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| ;
In file included from mytest.c:3:
mytest.c:76:46: warning: pointer targets in passing argument 1 of 'Rf_mkChar' differ in signedness [-Wpointer-sign]
76 | SET_STRING_ELT(ans, i, COPY_TO_USER_STRING(buf));
| ^~~
| |
| symbol * {aka unsigned char *}
C:/PROGRA~1/R/R-42~1.1/include/Rdefines.h:182:39: note: in definition of macro 'COPY_TO_USER_STRING'
182 | #define COPY_TO_USER_STRING(x) mkChar(x)
| ^
In file included from C:/PROGRA~1/R/R-42~1.1/include/Rdefines.h:41,
from mytest.c:3:
C:/PROGRA~1/R/R-42~1.1/include/Rinternals.h:536:16: note: expected 'const char *' but argument is of type 'symbol *' {aka 'unsigned char *'}
536 | SEXP Rf_mkChar(const char *);
| ^~~~~~~~~~~~
mytest.c: In function 'getLanguageRoutine':
mytest.c:163:4: error: 'PROBLEM' undeclared (first use in this function)
163 | PROBLEM "both elements must be the addresses of native routines. See the function getNativeSymbolInfo()"
| ^~~~~~~
mytest.c:163:11: error: expected ';' before string constant
163 | PROBLEM "both elements must be the addresses of native routines. See the function getNativeSymbolInfo()"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| ;
mytest.c:176:13: error: expected ';' before string constant
176 | PROBLEM "Couldn't find dynamic symbol(s) for stemming"
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| ;
make: *** [C:/PROGRA~1/R/R-42~1.1/etc/x64/Makeconf:253: mytest.o] Error 1
ERROR: compilation failed for package 'Rstem'
* removing 'C:/Users/hugom/AppData/Local/R/win-library/4.2/Rstem'
Warning in install.packages :
installation of package ‘Rstem’ had non-zero exit status
Depois dessa etapa, quando tento prosseguir com a instalação, o seguinte acontece:
> # Instação do pacote sentimentBR
> devtools::install_github("jodavid/sentimentBR")
Downloading GitHub repo jodavid/sentimentBR@HEAD
Skipping 1 packages not available: Rstem
✔ checking for file 'C:\Users\hugom\AppData\Local\Temp\RtmpcRpmPQ\remotes3e98734b608f\Jodavid-sentimentBR-9599992/DESCRIPTION' (406ms)
─ preparing 'sentimentBR': (417ms)
✔ checking DESCRIPTION meta-information ...
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ looking to see if a 'data/datalist' file should be added
─ building 'sentimentBR_0.3.1.tar.gz'
Installing package into ‘C:/Users/hugom/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
ERROR: dependency 'Rstem' is not available for package 'sentimentBR'
* removing 'C:/Users/hugom/AppData/Local/R/win-library/4.2/sentimentBR'
Warning message:
In i.p(...) :
installation of package ‘C:/Users/hugom/AppData/Local/Temp/RtmpcRpmPQ/file3e9875c22b8/sentimentBR_0.3.1.tar.gz’ had non-zero exit status
> install.packages("Rstem", repos = "http://www.omegahat.net/R", type = "source")
Installing package into ‘C:/Users/hugom/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
trying URL 'http://www.omegahat.net/R/src/contrib/Rstem_0.4-1.tar.gz'
Content type 'application/x-gzip' length 274336 bytes (267 KB)
downloaded 267 KB
* installing *source* package 'Rstem' ...
** using staged installation
** libs
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I. -I../Snowball/q -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c api.c -o api.o
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I. -I../Snowball/q -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c danish_stem.c -o danish_stem.o
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I. -I../Snowball/q -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c dutch_stem.c -o dutch_stem.o
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I. -I../Snowball/q -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c english_stem.c -o english_stem.o
english_stem.c: In function 'r_prelude':
english_stem.c:376:5: warning: label 'lab1' defined but not used [-Wunused-label]
376 | lab1:
| ^~~~
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I. -I../Snowball/q -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c finnish_stem.c -o finnish_stem.o
finnish_stem.c: In function 'r_case':
finnish_stem.c:448:21: warning: unused variable 'm' [-Wunused-variable]
448 | { int m = z->l - z->c; /* try, line 111 */
| ^
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I. -I../Snowball/q -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c french_stem.c -o french_stem.o
french_stem.c: In function 'french_stem':
french_stem.c:951:25: warning: unused variable 'm' [-Wunused-variable]
951 | { int m = z->l - z->c; /* try, line 225 */
| ^
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I. -I../Snowball/q -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c german_stem.c -o german_stem.o
gcc -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I. -I../Snowball/q -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c mytest.c -o mytest.o
mytest.c: In function 'S_stemWords':
mytest.c:59:10: error: 'PROBLEM' undeclared (first use in this function)
59 | PROBLEM "Cannot create a Snowball environment"
| ^~~~~~~
mytest.c:59:10: note: each undeclared identifier is reported only once for each function it appears in
mytest.c:59:17: error: expected ';' before string constant
59 | PROBLEM "Cannot create a Snowball environment"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| ;
In file included from mytest.c:3:
mytest.c:76:46: warning: pointer targets in passing argument 1 of 'Rf_mkChar' differ in signedness [-Wpointer-sign]
76 | SET_STRING_ELT(ans, i, COPY_TO_USER_STRING(buf));
| ^~~
| |
| symbol * {aka unsigned char *}
C:/PROGRA~1/R/R-42~1.1/include/Rdefines.h:182:39: note: in definition of macro 'COPY_TO_USER_STRING'
182 | #define COPY_TO_USER_STRING(x) mkChar(x)
| ^
In file included from C:/PROGRA~1/R/R-42~1.1/include/Rdefines.h:41,
from mytest.c:3:
C:/PROGRA~1/R/R-42~1.1/include/Rinternals.h:536:16: note: expected 'const char *' but argument is of type 'symbol *' {aka 'unsigned char *'}
536 | SEXP Rf_mkChar(const char *);
| ^~~~~~~~~~~~
mytest.c: In function 'getLanguageRoutine':
mytest.c:163:4: error: 'PROBLEM' undeclared (first use in this function)
163 | PROBLEM "both elements must be the addresses of native routines. See the function getNativeSymbolInfo()"
| ^~~~~~~
mytest.c:163:11: error: expected ';' before string constant
163 | PROBLEM "both elements must be the addresses of native routines. See the function getNativeSymbolInfo()"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| ;
mytest.c:176:13: error: expected ';' before string constant
176 | PROBLEM "Couldn't find dynamic symbol(s) for stemming"
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| ;
make: *** [C:/PROGRA~1/R/R-42~1.1/etc/x64/Makeconf:253: mytest.o] Error 1
ERROR: compilation failed for package 'Rstem'
* removing 'C:/Users/hugom/AppData/Local/R/win-library/4.2/Rstem'
Warning in install.packages :
installation of package ‘Rstem’ had non-zero exit status
Alguma ideia do que pode estar acontecendo e como posso fazer o pacote funcionar? Agradeço desde já!
The text was updated successfully, but these errors were encountered:
Obrigado pela iniciativa de criar o pacote, muito útil!
Não estou conseguindo completar a instalação. Instalei o Rtools e rodei o código exatamente como você escreveu, mas estou tendo problemas com as dependências do RStem. Depois de tentar a instalação usando o código, recebo essa mensagem:
Depois dessa etapa, quando tento prosseguir com a instalação, o seguinte acontece:
Alguma ideia do que pode estar acontecendo e como posso fazer o pacote funcionar? Agradeço desde já!
The text was updated successfully, but these errors were encountered: