IshidaMotohiro / RMeCab

Interface to MeCab
30 stars 10 forks source link

ERROR: compilation failed for package ‘RMeCab’ on Mac #25

Closed mela-dominguez closed 4 months ago

mela-dominguez commented 1 year ago

Can't download RMeCab using install.packages("RMeCab", repos = "http://rmecab.jp/R") or install.packages("remotes") remotes::install_github("IshidaMotohiro/RMeCab"). The error seems to be that RMeCab won't download. The error output I get on my Mac for Github is this:

install.packages("remotes") trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.2/remotes_2.4.2.tgz' Content type 'application/x-gzip' length 395161 bytes (385 KB)

downloaded 385 KB

The downloaded binary packages are in /var/folders/35/6zfy9rgj39s782gv0sl867d80000gn/T//Rtmp9Ru2QW/downloaded_packages

remotes::install_github("IshidaMotohiro/RMeCab") Downloading GitHub repo IshidaMotohiro/RMeCab@HEAD Running R CMD build...

  • checking for file ‘/private/var/folders/35/6zfy9rgj39s782gv0sl867d80000gn/T/Rtmp9Ru2QW/remotese60752fa43e/IshidaMotohiro-RMeCab-365af33/DESCRIPTION’ ... OK
  • preparing ‘RMeCab’:
  • checking DESCRIPTION meta-information ... OK
  • cleaning src
  • checking for LF line-endings in source and make files and shell scripts
  • checking for empty or unneeded directories
  • building ‘RMeCab_1.10.tar.gz’
  • installing source package ‘RMeCab’ ... using staged installation libs clang++ -arch arm64 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/arm64/include -fPIC -falign-functions=64 -Wall -g -O2 -c Ngram.cpp -o Ngram.o In file included from Ngram.cpp:3: ./RMeCab.h:25:10: error: 'mecab.h' file not found with include; use "quotes" instead

    include

    ^~~~~ "mecab.h" Ngram.cpp:187:8: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations] sprintf(target2, "%lc", wbuf[wz]);// Linux では sprintf ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here __deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.") ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'

    define deprecated_msg(_msg) attribute((deprecated__(_msg)))

    ^ Ngram.cpp:317:7: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations] sprintf(buf3, "%s", p);// 品詞情報の取得 ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here __deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.") ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'

    define deprecated_msg(_msg) attribute((deprecated__(_msg)))

    ^ Ngram.cpp:335:11: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations] sprintf(buf4, "%s", Ppos2[i].c_str());// 2011 03 10 // sprintf(buf4, "%s", Ppos[i]);
    ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here __deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.") ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'

    define deprecated_msg(_msg) attribute((deprecated__(_msg)))

    ^ Ngram.cpp:518:5: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations] sprintf(labelbuff, "%d", z+1); ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here __deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.") ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'

    define deprecated_msg(_msg) attribute((deprecated__(_msg)))

    ^ Ngram.cpp:617:5: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations] sprintf(labelbuff, "%d", z+1); ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here __deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.") ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'

    define deprecated_msg(_msg) attribute((deprecated__(_msg)))

    ^ 5 warnings and 1 error generated. make: *** [Ngram.o] Error 1 ERROR: compilation failed for package ‘RMeCab’

  • removing ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RMeCab’
  • restoring previous ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RMeCab’ Warning message: In i.p(...) : installation of package ‘/var/folders/35/6zfy9rgj39s782gv0sl867d80000gn/T//Rtmp9Ru2QW/filee60743bac674/RMeCab_1.10.tar.gz’ had non-zero exit status

Thank you for your time!

IshidaMotohiro commented 1 year ago

Is there any clue about this issue?

https://github.com/IshidaMotohiro/RMeCab/issues/13