Error while building LLVM/clang - c++

I was trying to build LLVM/clang in HOME directory without sudo access following this link (http://clang.llvm.org/get_started.html)
But when I type 'make' this happens
Error running link command: No such file or directory
make[2]: *** [lib/libLLVMSupport.a] Error 2
make[2]: Leaving directory `/home/skataka/porple_tools/build'
make[1]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/all] Error 2
make[1]: Leaving directory `/home/skataka/porple_tools/build'
make: *** [all] Error 2
$ Write failed: Broken pipe
I have used make VERBOSE=1 and it says CMAKE-AR NOT FOUND
Edit:
Changed CMakeCXXCompiler.cmake file - SET(CMAKE_AR "path to llvm-ar")
Now I am getting "Error running link command: Permission denied"
Help me with this !

Looks like your build directory generated by cmake is broken it seems to not be able to find the linker. I'd clobber the build directory and regenerate it with cmake paying attention to if it spits out any errors while configuring.

Related

Cannot "make" verlihub on Debian

I'm trying to create my own dchub on Debian using Verlihub. Everything works great when I'm using ./configure but when I'm trying to "make", it ends with an error! Please help!
./configure gives back:
Configure has completed successfully. Now you must run make.
If make fails with errors, please consult the forums and see
if anyone else has had the same issue. The forums are located
here http://forums.verlihub-project.org
Extensive documentation is also available at the project website
which can be found here http://www.verlihub-project.org
Please feel free to join and register at the Verlihub suport
hub located here dchub://hub.verlihub-project.org:7777
sudo make gives back:
stringutils.cpp: In function 'void nStringUtils::ExpandPath(std::string&)':
stringutils.cpp:127:31: error: 'get_current_dir_name' was not declared in this scope
make[2]: *** [stringutils.lo] Error 1
make[2]: Leaving directory `/verlihub-0.9.8e-r2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/verlihub-0.9.8e-r2'
make: *** [all] Error 2

Errors in building Qt Static 5.3.2

So I am attempting to build Qt Static 5.3.2. The build is being automated by a windowspowershell script I found at http://qt-project.org/wiki/Building_Qt_Desktop_for_Windows_with_MSVC. I am getting errors I don't fully understand, because I have verified the existence of the following files in the source, and I have checked to see if they have been copied to the correct directory and they are there.
copy /y C:\Qt\Static\src\qt-everywhere-opensource-src-5.3.2\qtbase\examples\widgets\widgets.pro C:\Qt\Static\5.3.2\examp
les\widgets
1 file(s) copied.
mingw32-make[3]: Target 'install' not remade because of errors.
mingw32-make[3]: Leaving directory 'C:/Qt/Static/src/qt-everywhere-opensource-src-5.3.2/qtbase/examples/widgets'
Makefile:415: recipe for target 'sub-widgets-install_subtargets' failed
mingw32-make[2]: *** [sub-widgets-install_subtargets] Error 2
copy /y C:\Qt\Static\src\qt-everywhere-opensource-src-5.3.2\qtbase\examples\README C:\Qt\Static\5.3.2\examples
1 file(s) copied.
mingw32-make[2]: Target 'install' not remade because of errors.
mingw32-make[2]: Leaving directory 'C:/Qt/Static/src/qt-everywhere-opensource-src-5.3.2/qtbase/examples'
Makefile:78: recipe for target 'sub-examples-install_subtargets' failed
mingw32-make[1]: *** [sub-examples-install_subtargets] Error 2
xcopy /s /q /y /i C:\Qt\Static\src\qt-everywhere-opensource-src-5.3.2\qtbase\doc\global C:\Qt\Static\5.3.2\doc\global
59 File(s) copied
mingw32-make[1]: Target 'install' not remade because of errors.
mingw32-make[1]: Leaving directory 'C:/Qt/Static/src/qt-everywhere-opensource-src-5.3.2/qtbase'
Makefile:75: recipe for target 'module-qtbase-install_subtargets' failed
mingw32-make: *** [module-qtbase-install_subtargets] Error 2
mingw32-make: Target 'install' not remade because of errors.
Try to output powershell script output (.\windows-build-qt-static.ps1 > out.txt) and find strings with error information to get more understanding.
I've had the same final error and when I've inspected script output, I've found out that WATCOM headers were used in the process of compilation.
...
Environment:
INCLUDE=
C:\WATCOM\H
C:\WATCOM\H\NT
C:\WATCOM\H\NT\DIRECTX
C:\WATCOM\H\NT\DDK
...
The source of the problem was INCLUDE environment variable that was set to WATCOM compiler headers
INCLUDE
C:\WATCOM\H;C:\WATCOM\H\NT;C:\WATCOM\H\NT\DIRECTX;C:\WATCOM\H\NT\DDK
I've modified it to point to MinGw headers
INCLUDE
C:\Qt\Qt5.3.1\Tools\mingw482_32\i686-w64-mingw32\include;C:\Qt\Qt5.3.1\Tools\mingw482_32\include
This solved problem for me.
This may be not your error, but the point is, you should look at script output.
May be you don't installed ActivePerl or Python. Try it. It helped me.

llvm: cannot run doxygen

I can't build docs.
I am doing all things in llvm source directory.
./configure --enable-doxygen
make
...
llvm[1]: Building doxygen documentation
error: configuration file /media/data/virtual/share/gsoc/llvm/docs/doxygen.cfg not found!
...
make[1]: *** [regendoc] Error 1
make[1]: Leaving directory `/media/data/virtual/share/gsoc/llvm/docs'
make: *** [install] Error 1
What am I doing wrong?
What am I doing wrong?
I have no ida, but you might try to create configuration file on your own, for example with
doxywizard

gcc 4.5 installation problem under ubuntu

I tried to install gcc 4.5 on ubuntu 10.04 but failed.
Here is a compile error that I don't know how to solve. Is there anyone successfully install the latest gcc on ubuntu?
Following is my steps and the error message, I'd like to know where is the problem....
Step1: download these files:
gcc-core-4.5.0.tar.gz
gcc-g++-4.5.0.tar.gz
gmp-4.3.2.tar.bz2
mpc-0.8.1.tar.gz
mpfr-2.4.2.tar.gz
Step2: Unzip above files
Step3: move gmp, mpc, mpfr to the gcc-4.5.0/ directory.
mv gmp-4.3.2 gcc-4.5.0/gmp
mv mpc-0.8.1 gcc-4.5.0/mpc
mv mpfr-2.4.2 gcc-4.5.0/mpfr
Step4: go to gcc-4.5.0 directory and do configuration:
sudo ./configure
Step5: compile and install
sudo make
sudo make install
The first 4 steps is OK, I can configure it successfully. However, when I try to compile it, following error message comes out, I cannot figure out what the problem is. Should I change the name from "gcc 4.5" to "gcc"?? It's a little strange that we need to do this by ourself. Is there anything I missed during the installation?
xxx#xxx-laptop:/media/Data/Tool/linux/gcc 4.5/gcc-4.5.0$ sudo make
[sudo] password for xxx:
[ -f stage_final ] || echo stage3 > stage_final
/bin/bash: line 2: test: /media/Data/Tool/linux/gcc: binary operator expected
/bin/bash: /media/Data/Tool/linux/gcc: No such file or directory
make[1]: Entering directory `/media/Data/Tool/linux/gcc 4.5/gcc-4.5.0'
make[2]: Entering directory `/media/Data/Tool/linux/gcc 4.5/gcc-4.5.0'
make[3]: Entering directory `/media/Data/Tool/linux/gcc 4.5/gcc-4.5.0'
rm -f stage_current
make[3]: Leaving directory `/media/Data/Tool/linux/gcc 4.5/gcc-4.5.0'
make[2]: Leaving directory `/media/Data/Tool/linux/gcc 4.5/gcc-4.5.0'
make[2]: Entering directory `/media/Data/Tool/linux/gcc 4.5/gcc-4.5.0'
Configuring stage 1 in host-x86_64-unknown-linux-gnu/intl
/bin/bash: /media/Data/Tool/linux/gcc: No such file or directory
make[2]: *** [configure-stage1-intl] Error 127
make[2]: Leaving directory `/media/Data/Tool/linux/gcc 4.5/gcc-4.5.0'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/media/Data/Tool/linux/gcc 4.5/gcc-4.5.0'
make: *** [all] Error 2
It might not be a good idea to have a space in your path - it's kind of rare and can easily mess up shell scripts that aren't specially designed to deal with it (which is a bad combination!)
Another potential problem is that you're running configure inside the gcc source directory - this isn't recommended (and didn't work at all for me on at least one version of gcc 4). Instead make an empty build directory, parallel to the source directory, so you have something like:
gcc 4.5 <- but might want to avoid the space
gcc-4.5.0
...
build
Then cd into build and run
../gcc-4.5.0/configure
You may also need to start from a freshly unzipped source directory, as the previous failed build may have broken it.

Installing Apache Kudu on WSL

I am trying to install Apache Kudu and run the C++ examples on my Ubuntu distribution (18.04) on WSL. I am following the instructions for Ubuntu at https://kudu.apache.org/docs/installation.html
Everything runs smoothly until I get to step 6 where I run
make -j4
I get the following errors
Exception in thread "main" java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:225)
at java.util.zip.ZipFile.<init>(ZipFile.java:155)
at java.util.zip.ZipFile.<init>(ZipFile.java:169)
at org.gradle.wrapper.Install.unzip(Install.java:235)
at org.gradle.wrapper.Install.access$900(Install.java:27)
at org.gradle.wrapper.Install$1.call(Install.java:81)
at org.gradle.wrapper.Install$1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63)
CMakeFiles/init_gradle.dir/build.make:60: recipe for target '../../java/gradle/wrapper/gradle-wrapper.jar' failed
make[2]: *** [../../java/gradle/wrapper/gradle-wrapper.jar] Error 1
make[2]: *** Deleting file '../../java/gradle/wrapper/gradle-wrapper.jar'
CMakeFiles/Makefile2:1708: recipe for target 'CMakeFiles/init_gradle.dir/all' failed
make[1]: *** [CMakeFiles/init_gradle.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 5%] Built target kudu_util_pb_util_proto
[ 5%] Built target kudu_util_hash_proto
[ 6%] Built target hms_thrift
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Image of error
Does anybody know what is causing the errors?
Happened to met same situation.
This exception is happened when building hms. And you can found verbose log by doing
cd <root_of_kudu>/java
./gradlew assemble
The problems I met is the zip of downloaded gradle seems wrong, so I cleaned ~/.gradle/wrapper/dists/gradle-6.2.2-all/2k4hz1yffuhb6ob9prdg10tx/gradle-6.2.2-all.zip and <root_of_kudu>/java/gradle/wrapper/gradle-wrapper.jar. And try to call make -j4 again.
Further more, if you happened to have same bad network like mine, you can download the gradle zip manually, by checking the content of <root_of_kudu>/java/gradlew, the line with curl tells you the download link, try to download it with a good network or a proxy and then place it to the first path you cleaned, it may work.