: CommandLine Error: Option 'help-list' registered more than once! LLVM ERROR: inconsistency in registered CommandLine options - llvm

It seems there are llvm multiple versions, but how can I found exist installed versions?
[root#localhost ~]# rpm -qa|grep -i llvm
llvm-12.0.1-2.module_el8.5.0+918+ed335b90.x86_64
llvm-libs-12.0.1-2.module_el8.5.0+918+ed335b90.x86_64

There is an issue with LLVM 12. https://github.com/iovisor/bpftrace/issues/1855

Related

OpenCV WebAssembly

I try to run this tutorial, http://videocortex.io/2017/opencv-web-app/, to build and try out OpenCV WebAssembly. But I can´t get over step "The Build System" I´ve build emscripten 1.38.21, installed Python 2.7.5.3_64bit and CMAKE 3.13.2 but get an error in the end:
Did I missed something?
When I run emcc -v I get some error´s also:
WARNING:root:LLVM version appears incorrect (seeing "6.0", expected
"3.7") ERROR:root:Emscripten, llvm and clang versions do not match,
this is dangerous (1.35.0, "1.38.21", "1.38.21") ERROR:root:Make sure
to use the same branch in each repo, and to be up-to-date on each. See
http://kripken.github.io/emscripten-site/docs/building_from_source/LLVM-Backend.html
INFO:root:(Emscripten: Running sanity checks) emcc (Emscripten
gcc/clang-like replacement + linker emulating GNU ld) 1.35.0 clang
version 6.0.1 (emscripten 1.38.21 : 1.38.21) Target:
x86_64-pc-windows-msvc Thread model: posix InstalledDir:
D:\Repositories\emsdk\clang\e1.38.21_64bit WARNING:root:LLVM version
appears incorrect (seeing "6.0", expected "3.7")
ERROR:root:Emscripten, llvm and clang versions do not match, this is
dangerous (1.35.0, "1.38.21", "1.38.21") ERROR:root:Make sure to use
the same branch in each repo, and to be up-to-date on each. See
http://kripken.github.io/emscripten-site/docs/building_from_source/LLVM-Backend.html
INFO:root:(Emscripten: Running sanity checks)
Someone has successfully compiled OpenCV to WebAssembly. You can visit the GitHub repository and follow the steps:
Get the source code:
git clone https://github.com/ucisysarch/opencvjs.git
cd opencvjs
git clone https://github.com/opencv/opencv
cd opencv
git checkout 3.1.0
Install Emscripten:
./emsdk update
./emsdk install sdk-incoming-64bit --shallow
./emsdk activate sdk-incoming-64bit
source ./emsdk_env.sh
Build OpenCV to WebAssembly.
python make.py --wasm

Rcpp Rtools installed but error message g++ not found

I have consulted existing entries on SO related to my specific issue, but still could not resolve it.
I am trying to do this with my machine at work, where I have limited admin rights, but I can run Rtools.exe, so I installed it.
My setup for R is:
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
version.string R version 3.3.0 (2016-05-03)
I am RStudion Version 0.99.902. I installed Rtools version 3.3.0.1959.
All of R, Rstudio, and Rtools are installed in C:/WORK/, which is where I have some limited admin rights.
In my system ENV variable, I have set up:
C:\\WORK\\Rtools\\bin; C:\\WORK\\Rtools\\gcc- 4.6.3\\bin; C:\\WORK\\R-3.3.0\\bin\\x64;"
When I run
system('where make')
I get
C:\WORK\Rtools\bin\make.exe
When I run
system('g++ -v')
I get:
Using built-in specs.
COLLECT_GCC=C:\WORK\Rtools\GCC-46~1.3\bin\G__~1.EXE
COLLECT_LTO_WRAPPER=c:/WORK/rtools/gcc-46~1.3/bin/../libexec/gcc/i686-w64- mingw32/4.6.3/lto-wrapper.exe
Target: i686-w64-mingw32
Configured with: /data/gannet/ripley/Sources/mingw-test3/src/gcc/configure --host=i686-w64-mingw32 --build=x86_64-linux-gnu --target=i686-w64-mingw32 --with-sysroot=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/mingw32 --prefix=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/mingw32 --with-gmp=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/prereq_install --with-mpfr=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/prereq_install --with-mpc=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/prereq_install --disable-shared --enable-static --enable-targets=all --enable-languages=c,c++,fortran --enable-libgomp --enable-sjlj-exceptions --enable-fully-dynamic-string --disable-nls --disable-werror --enable-checking=release --disable-win32-registry --disable-rpath --disable-werror CFLAGS='-O2 -mtune=core2 -fomit-frame-pointer' LDFLAGS=
Thread model: win32
gcc version 4.6.3 20111208 (prerelease) (GCC)
When I compile, I get this error:
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created!
c:/Rtools/mingw_64/bin/g++: not found
My question is: why is R still looking for g++ in
c:/Rtools/mingw_64/bin/g++
Didn't I already set R to look for it in
C:/WORK/Rtools?
Even when I manually added
c:/WORK/Rtools/mingw_64/bin/g++
in the ENV variable, I still got the same error. (I cannot make Rtools folder in C:/ due to admin rights.)
Has anyone run into this specific issue?
The path c:/Rtools/mingw_64/bin/ is hard-coded into the file Makeconflocated somewhere in the R installation (in my case C:\Progs\R\R-3.4.1\etc\x64), as the value of the variable BINPREF.
The easiest thing to do is to change this path to your path C:/WORK/Rtools/bin (in my case was C:/Progs/RTools/3.4/mingw_64/bin/). That worked for me in a fresh installation of R-3.4.1 and Rtools3.4, and a minimal example.
What is happening is the need to be on RTools 34 and NOT 33 for R 3.3.x.
Remove the rtools install and then follow the guide here:
http://thecoatlessprofessor.com/programming/rcpp/install-rtools-for-rcpp/
#David, you need to remove all instances of C:\WORK\Rtools\<something> and any duplicates (e.g. C:\WORK\R-3.3.0\bin\x64 appears twice.) Then add:
c:\WORK\Rtools\bin;
c:\WORK\Rtools\mingw_32\bin;
I was hitting the same issue on Windows 10 with RStudio 1.3+ and RTools 4.0. After installing RTools and trying to install another package (that needed RTools) it kept throwing the error
c:/rtools40/mingw32/bin/g++: No such file or directory
It kept picking up the wrong path of the RTools installation on windows. After restarting RStudio it picked up the right path:
C:\RBuildTools\4.0\mingw32\bin
A plausible and easy way to do this is to choose "Full installation to build 32 or 64 bit" in the following promp.
I solved like this: Just copy the files needed in the path where it is looking for.
( my case, in C:\rtools40\mingw64\ copied the bin directory into the path he search for and worked !)

autotools syntax error with ax_check_compile_flag

I am using autotools for building my C++ application. In my configure.ac I have the following line:
AX_CHECK_COMPILE_FLAG([-Wall], [CPPFLAGS="$CPPFLAGS -Wall"])
which causes the following error when executing ./configure (after running autoreconf -i):
./configure: line 3825: syntax error near unexpected token `-Wall,'
./configure: line 3825: `AX_CHECK_COMPILE_FLAG(-Wall, CPPFLAGS="$CPPFLAGS -Wall")'
My system: Linux web 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1+deb7u2 x86_64 GNU/Linux
On my Ubuntu machine it works well, why do I get this error?
autoreconf isn't magic (though I encounter package maintainers who obviously believe this). When you ran autoreconf, it failed to find the AX_CHECK_COMPILE_FLAG macro, and produced a corrupt configure script. Usually that produces an error/diagnostic message at the same time.
'AX_CHECK_COMPILE_FLAG` comes from the autoconf archive project, and Debian has a package which provides this, named autoconf-archive. Likely, you forgot to install it:
sudo apt-get install autoconf-archive

CUDA on Fedora compilation failure

After looking at installing CUDA 5.0 on my new Fedora19 system, I found that CUDA 5.5 was a better candidate, as it came in an rpm format. I followed the directions for installation found here, and everything was going great until I attempt to compile the samples. First off, it installs the samples to /usr/local/cuda/samples, and I had to make sure that my LD_LIBRARY_PATH included /usr/local/cuda/lib (not just the 5.5 version), but then I get the following two errors when I attempt to run the 'make all' command.
../../common/inc/exception.h: In constructor ‘Exception<Std_Exception>::Exception()’:
../../common/inc/exception.h:129:94: warning: delegating constructors only available with -std=c++11 or -std=gnu++11 [enabled by default]
Exception<Std_Exception>::Exception() :
I thought that C++11 was the default version? And then when I get to trying to compile the matrixMulDrv, I get the following error that really makes no sense:
/usr/local/cuda-5.5/bin/nvcc -ccbin g++ -m64 -o matrixMulDrv matrixMulDrv.o -L/usr/lib64/nvidia -lcuda
/bin/ld: cannot find -lcuda
collect2: error: ld returned 1 exit status
I was wondering if anybody else had any problems of this nature. I had moved to 5.5 so that I could use the current gcc compilers (4.8.1). When I look in /usr/lib64/nvidia, I see all of the files I supposedly need, including libcuda.so.1. Has anybody else seen this?
Regarding the first issue:
../../common/inc/exception.h: In constructor ‘Exception<Std_Exception>::Exception()’:
../../common/inc/exception.h:129:94: warning: delegating constructors only available with -std=c++11 or -std=gnu++11 [enabled by default]
Exception<Std_Exception>::Exception() :
These messages are only warnings, so compilation should still continue without problems.
Regarding the second issue:
/bin/ld: cannot find -lcuda
collect2: error: ld returned 1 exit status
have a look in /usr/lib64/nvidia and ensure that libcuda.so and libcuda.so.1 symlinks both exist and point to libcuda.so.[your driver version].
In my installation, the /usr/lib64/nvidia/libcuda.so symlink was not created, for whatever reason. If yours is also missing, then type (as root):
ln -s /usr/lib64/nvidia/libcuda.so.VERSION /usr/lib64/nvidia/libcuda.so
replacing VERSION with the version number of your nvidia driver (for example libcuda.so.319.32).
Does this solve your problem?
Fedora 18 with GCC 4.7.2/GLIBC 2.16 is an officially supported distro for CUDA 5.5 RC. Fedora 19 is not, nor is there any indication of support for GCC 4.8.x. I'm not surprised you're having trouble. The libcuda.so you see in /usr/lib64/nvidia was linked against a different version of GLIBC (2.16) than the one that is most likely on your machine (2.17).
The only way forward with Fedora 19 that I can imagine would be to downgrade your (i.e. install an alternate) GCC/GLIBC to the one that comes with Fedora 18. It might be easier just to switch to Fedora 18.
CUDA is highly specific to the Linux kernel version. For example, CUDA 6.5 is only guaranteed to work with Fedora 20 kernel 3.12.
# Install kernel 3.16.2
sudo yum -y install https://kojipkgs.fedoraproject.org/packages/kernel/3.16.2/201.fc20/x86_64/kernel-3.16.2-201.fc20.x86_64.rpm
sudo yum -y install https://kojipkgs.fedoraproject.org/packages/kernel/3.16.2/201.fc20/x86_64/kernel-devel-3.16.2-201.fc20.x86_64.rpm
sudo yum -y install libvdpau-devel
sudo reboot
# Install cuda 6.5
wget http://developer.download.nvidia.com/compute/cuda/6_5/rel/installers/cuda_6.5.14_linux_64.run
sudo bash cuda_6.5.14_linux_64.run --override
It can be helpful to downgrade your kernel to match the version specified in the CUDA System Requirements.

Problems while trying to build LLVM and Clang

I tried to build LLVM and Clang but am getting this error :
cp: cp: cp: cannot stat /home/saurabh/Build/clang-build/build/tools/clang/runtime/compiler-rt/clang_linux/asan-i386/libcompiler_rt.a'cannot stat/home/saurabh/Build/clang-build/build/tools/clang/runtime/compiler-rt/clang_linux/ubsan-x86_64/libcompiler_rt.a'cannot stat `/home/saurabh/Build/clang-build/build/tools/clang/runtime/compiler-rt/clang_linux/ubsan-i386/libcompiler_rt.a': No such file or directory
: No such file or directory: No such file or directory
I went through Cannot build LLVM and Clang but it doesn't seem to have any reasons why he had gotten a similar error (hence I am asking it again). I have tried to remove the -Werror flags in compiler-rt/make/ relevant files, since before that, it was stopping on this error :
/home/saurabh/Build/clang-build/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_mutex.cc:53:13: error:
comparison of constant 4294967295 with expression of type 'int' is always
false [-Werror,-Wtautological-constant-out-of-range-compare]
if (z == MutexTypeLeaf) {
~ ^ ~~~~~~~~~~~~~
1 error generated.
I had asked on #llvm and had been suggested that. Any ideas what could be causing this ?
Fwiw, I am on Ubuntu 12.10 64-bit.
You have to follow http://llvm.org/docs/GettingStarted.html#getting-started-quickly-a-summary. Be aware of the software dependencies you have to install. Also, check again if your --prefix=directory is set. If you cannot install Clang over LLVM (after you succeded to install LLVM), you can try install it using apt-get install clang and clang++. Therefore, you can compile your LLVM passes using this clang. For other corresponding packages, like VMkit for Java, you have to install ant and oracle jdk.
My LD_LIBRARY_PATH environment variable wasn't set properly. After I corrected it, this problem went away.