─ removing ‘/tmp/RtmpIAxlaX/devtools_install_1f7f1e7ab44e/flashlight’Įrror: System command 'R' failed, exit status: 1, stdout + stderr:Į> * installing *source* package ‘flashlight’. usr/share/R/share/make/shlib.mk:6: recipe for target 'flashlight.so' failedĮRROR: compilation failed for package ‘flashlight’ usr/local/lib/libflashlight.a: error adding symbols: Bad valueĬollect2: error: ld returned 1 exit status usr/bin/ld: /usr/local/lib/libflashlight.a(): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object recompile with -fPIC G++ -std=gnu++14 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o flashlight.so RcppExports.o Variable.o rcpp_hello_world.o -L/usr/local/lib -laf -lflashlight -Wl,-rpath,/usr/local/lib -L/usr/lib/R/lib -lR G++ -std=gnu++14 -I"/usr/share/R/include" -DNDEBUG -I./inst/include/ -I'/home/turgut/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c rcpp_hello_world.cpp -o rcpp_hello_world.o G++ -std=gnu++14 -I"/usr/share/R/include" -DNDEBUG -I./inst/include/ -I'/home/turgut/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c Variable.cpp -o Variable.o G++ -std=gnu++14 -I"/usr/share/R/include" -DNDEBUG -I./inst/include/ -I'/home/turgut/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c RcppExports.cpp -o RcppExports.o ─ installing *source* package ‘flashlight’. => roxygen2::roxygenize('.', roclets = c('rd', 'collate', 'namespace', 'vignette')) Can someone help, please? => Rcpp::compileAttributes() If you find liblua.I could not catch the proper way to recompile the lib in Makevars with -fPIC. You'd have compatibility issues maybe from inconsistent build flags (what you made and what else is on disk), so I think finding a liblua.so to match your currently built lua is the better option. The other, more pain in the ass one, is to rebuild lua, and liblua.a, with -fPIC. I don't know your distro, so I can't say how to get it. If you don't need it specifically and were thinking more that "this may be fun to play with later" you may be able to and not lose wanted features.Īnother is to get a dynamic version of liblua, liblua.so, one that can be referenced in your asterisk build. Besides, you're building a dynamic lib at that point, and Im sure you already have relocatable code flags such as -fPIC for the asterisk objects you're trying to pull together at that point. It's not your asterisk code objects that are incompatible (which -fPIC can affect), but liblua.a, specifically the objects carried by liblua.a (e.g lapi.o). It rejects this, since the lua objects in the static lib can not be relocated.īTW: this is why adding -fPIC to the asterisk build won't help. ![]() But you're using a static lib of lua, which was not built with -fPIC. Since it's bringing into a dynamic lib, it needs everything compiled PIC. The -fPIC flag means Position Independent Code, the code is made to be independent of load location - loaded anywhere.Īs part of this asterisk dynamic lib build, it's trying to bring in the Lua interpreter. Since this dynamic lib can be loaded at any memory location, everything needs to be relocatable. At this point in asterisk, you're trying to build a dynamic lib.
0 Comments
Leave a Reply. |