Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22002

`ld` error when installing hdp package in R

$
0
0

I am try to install the hdp package by Nicola Robers using the following command in R:

devtools::install_github("nicolaroberts/hdp", build_vignettes = TRUE)

This used to get compiled and installed fine when I had the R version 3.6.2 and gcc version 9.2.1 on an (Arch) Linux machine. After updating the system to R 4.0.0 and gcc 10.1.0, the installation fails with the following message:

* installing *source* package ‘hdp’ ...** using staged installation** libsgcc -I"/usr/include/R/" -DNDEBUG   -D_FORTIFY_SOURCE=2   -fpic  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt  -c R-base.c -o R-base.ogcc -I"/usr/include/R/" -DNDEBUG   -D_FORTIFY_SOURCE=2   -fpic  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt  -c R-conparam.c -o R-conparam.ogcc -I"/usr/include/R/" -DNDEBUG   -D_FORTIFY_SOURCE=2   -fpic  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt  -c R-dp.c -o R-dp.ogcc -I"/usr/include/R/" -DNDEBUG   -D_FORTIFY_SOURCE=2   -fpic  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt  -c R-hdp.c -o R-hdp.ogcc -I"/usr/include/R/" -DNDEBUG   -D_FORTIFY_SOURCE=2   -fpic  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt  -c R-hdpMultinomial_iterate.c -o R-hdpMultinomial_iterate.ogcc -I"/usr/include/R/" -DNDEBUG   -D_FORTIFY_SOURCE=2   -fpic  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt  -c R-multinomial.c -o R-multinomial.ogcc -I"/usr/include/R/" -DNDEBUG   -D_FORTIFY_SOURCE=2   -fpic  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt  -c R-utils.c -o R-utils.ogcc -I"/usr/include/R/" -DNDEBUG   -D_FORTIFY_SOURCE=2   -fpic  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt  -c randutils.c -o randutils.ogcc -shared -L/usr/lib64/R/lib -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -o hdp.so R-base.o R-conparam.o R-dp.o R-hdp.o R-hdpMultinomial_iterate.o R-multinomial.o R-utils.o randutils.o -L/usr/lib64/R/lib -lR/usr/bin/ld: R-conparam.o:(.bss+0x0): multiple definition of `DEBUG'; R-base.o:(.bss+0x0): first defined here/usr/bin/ld: R-dp.o:(.bss+0x0): multiple definition of `DEBUG'; R-base.o:(.bss+0x0): first defined here/usr/bin/ld: R-hdp.o:(.bss+0x0): multiple definition of `DEBUG'; R-base.o:(.bss+0x0): first defined here/usr/bin/ld: R-hdpMultinomial_iterate.o:(.bss+0x0): multiple definition of `DEBUG'; R-base.o:(.bss+0x0): first defined here/usr/bin/ld: R-multinomial.o:(.bss+0x0): multiple definition of `DEBUG'; R-base.o:(.bss+0x0): first defined here/usr/bin/ld: R-utils.o:(.bss+0x0): multiple definition of `DEBUG'; R-base.o:(.bss+0x0): first defined here/usr/bin/ld: randutils.o:(.bss+0x0): multiple definition of `DEBUG'; R-base.o:(.bss+0x0): first defined herecollect2: error: ld returned 1 exit statusmake: *** [/usr/share/R//make/shlib.mk:6: hdp.so] Error 1ERROR: compilation failed for package ‘hdp’

The individual files are compiling fine, but the linking seems to fail. Any idea on how to go about debugging what is missing?


Viewing all articles
Browse latest Browse all 22002

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>