igraph / rigraph

igraph R package
https://r.igraph.org
544 stars 201 forks source link

update.packages() Error: igraph needs strcasecmp() or _stricmp() #572

Closed lufuhao closed 2 years ago

lufuhao commented 2 years ago

Platform: ubuntu 22.04 gcc/g++ version: 11.2.0 R version: 4.2.1

Need help to run it through

Here is the log

checking for round... yes
checking for stpcpy... yes
checking for strcasecmp... yes
checking for _stricmp... no
checking for strdup... yes
checking for isfinite... no
...
gcc -I"/usr/share/R/include" -DNDEBUG -DUSING_R -I. -Icore -Iinclude -Ivendor -I/usr/include/libxml2 -DNDEBUG -DNTIMER -DNPRINT -DPACKAGE_VERSION=\"1.3.2.9019\" -DINTERNAL_ARPACK -DPRPACK_IGRAPH_SUPPORT -DIGRAPH_THREAD_LOCAL=/**/    -fvisibility=hidden -fpic  -g -O2 -ffile-prefix-map=/build/r-base-wSz8CH/r-base-4.2.1=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -c core/connectivity/separators.c -o core/connectivity/separators.o
gcc -I"/usr/share/R/include" -DNDEBUG -DUSING_R -I. -Icore -Iinclude -Ivendor -I/usr/include/libxml2 -DNDEBUG -DNTIMER -DNPRINT -DPACKAGE_VERSION=\"1.3.2.9019\" -DINTERNAL_ARPACK -DPRPACK_IGRAPH_SUPPORT -DIGRAPH_THREAD_LOCAL=/**/    -fvisibility=hidden -fpic  -g -O2 -ffile-prefix-map=/build/r-base-wSz8CH/r-base-4.2.1=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -c core/constructors/adjacency.c -o core/constructors/adjacency.o
gcc -I"/usr/share/R/include" -DNDEBUG -DUSING_R -I. -Icore -Iinclude -Ivendor -I/usr/include/libxml2 -DNDEBUG -DNTIMER -DNPRINT -DPACKAGE_VERSION=\"1.3.2.9019\" -DINTERNAL_ARPACK -DPRPACK_IGRAPH_SUPPORT -DIGRAPH_THREAD_LOCAL=/**/    -fvisibility=hidden -fpic  -g -O2 -ffile-prefix-map=/build/r-base-wSz8CH/r-base-4.2.1=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -c core/constructors/atlas.c -o core/constructors/atlas.o
gcc -I"/usr/share/R/include" -DNDEBUG -DUSING_R -I. -Icore -Iinclude -Ivendor -I/usr/include/libxml2 -DNDEBUG -DNTIMER -DNPRINT -DPACKAGE_VERSION=\"1.3.2.9019\" -DINTERNAL_ARPACK -DPRPACK_IGRAPH_SUPPORT -DIGRAPH_THREAD_LOCAL=/**/    -fvisibility=hidden -fpic  -g -O2 -ffile-prefix-map=/build/r-base-wSz8CH/r-base-4.2.1=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -c core/constructors/basic_constructors.c -o core/constructors/basic_constructors.o
gcc -I"/usr/share/R/include" -DNDEBUG -DUSING_R -I. -Icore -Iinclude -Ivendor -I/usr/include/libxml2 -DNDEBUG -DNTIMER -DNPRINT -DPACKAGE_VERSION=\"1.3.2.9019\" -DINTERNAL_ARPACK -DPRPACK_IGRAPH_SUPPORT -DIGRAPH_THREAD_LOCAL=/**/    -fvisibility=hidden -fpic  -g -O2 -ffile-prefix-map=/build/r-base-wSz8CH/r-base-4.2.1=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -c core/constructors/de_bruijn.c -o core/constructors/de_bruijn.o
gcc -I"/usr/share/R/include" -DNDEBUG -DUSING_R -I. -Icore -Iinclude -Ivendor -I/usr/include/libxml2 -DNDEBUG -DNTIMER -DNPRINT -DPACKAGE_VERSION=\"1.3.2.9019\" -DINTERNAL_ARPACK -DPRPACK_IGRAPH_SUPPORT -DIGRAPH_THREAD_LOCAL=/**/    -fvisibility=hidden -fpic  -g -O2 -ffile-prefix-map=/build/r-base-wSz8CH/r-base-4.2.1=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -c core/constructors/famous.c -o core/constructors/famous.o
In file included from core/constructors/famous.c:27:
core/internal/hacks.h:55:10: error: #error "igraph needs strcasecmp() or _stricmp()"
   55 |         #error "igraph needs strcasecmp() or _stricmp()"
      |          ^~~~~
make: *** [/usr/lib/R/etc/Makeconf:168: core/constructors/famous.o] Error 1
ERROR: compilation failed for package ‘igraph’
* removing ‘/home/lufuhao/P5820T1D2T/Programs/libraries/R_modules/igraph’
* restoring previous ‘/home/lufuhao/P5820T1D2T/Programs/libraries/R_modules/igraph’

The downloaded source packages are in
    ‘/tmp/RtmpcKVsNA/downloaded_packages’
Warning message:
In install.packages(update[instlib == l, "Package"], l, contriburl = contriburl,  :
  installation of package ‘igraph’ had non-zero exit status
ntamas commented 2 years ago

Which OS is this? strcasecmp() is pretty common, it's weird that your OS does not support it.

lufuhao commented 2 years ago

It's ubuntu22 LTS, upgrade from ubuntu 20 LTS. It's quite weird for me too. I can see the config:

checking for strcasecmp... yes checking for _stricmp... no

No idea why

lufuhao commented 2 years ago

Now it's done. It might caused by other libs in my library_path. Thank you so much for your help. please close this issue.

Have a good day.