Error building llvm 3.0 - llvm

I was trying to get llvm 3.0 on my machine, but I get the following errors when I give make -k.
chethan#ubuntu:~/llvm-3.0$ make
make[1]: Entering directory `/home/chethan/llvm-3.0/lib/Support'
llvm[1]: Compiling APFloat.cpp for Release build
In file included from APFloat.cpp:15:
In file included from /home/chethan/llvm-3.0/include/llvm/ADT/APFloat.h:104:
In file included from /home/chethan/llvm-3.0/include/llvm/ADT/APInt.h:18:
In file included from /home/chethan/llvm-3.0/include/llvm/ADT/ArrayRef.h:13:
In file included from /home/chethan/llvm-3.0/include/llvm/ADT/SmallVector.h:17:
/home/chethan/llvm-3.0/include/llvm/Support/type_traits.h:20:10: fatal error: 'utility' file not found
#include <utility>
^
1 error generated.
make[1]: *** [/home/chethan/llvm-3.0/lib/Support/Release/APFloat.o] Error 1
make[1]: Leaving directory `/home/chethan/llvm-3.0/lib/Support'
make: *** [all] Error 1
I follow these steps to build llvm on my machine.
Get the llvm source zip file from llvm download page and unzipped to folder llvm-3.0
cd /home/chethan/llvm-3.0
./configure
make -k
Although in this case, I just gave 'make' so that it stops on first error. I have llvm-gcc 4.2 installed on my machine.
I followed the same steps today morning in my home machine, and llvm-3.0 built successfully! Any idea what might be missing here?

configure with CC=gcc CXX=g++. It looks like the configure script is finding a version of clang that isn't actually set up correctly to compile C++ code.

Related

can't compile a code with -m32 flag in makefile - missing opensslconf-i386.h centos 7

I am trying to compile a code that uses openssl libraries. however, if I compile with -m32 flag, I get the following error:
make > make.txt
In file included from /usr/include/openssl/e_os2.h:56:0,
from /usr/include/openssl/bio.h:62,
from /home/dolf/gsoap-linux-2.7.17/stdsoap2.h:665,
from obj/../otamStub.h:13,
from obj/../otamH.h:10,
from obj/../otamC.cpp:13:
/usr/include/openssl/opensslconf.h:13:30: fatal error: opensslconf-i386.h: No such file or directory
#include "opensslconf-i386.h"
^
compilation terminated.
make[1]: *** [obj/otamC.o] Error 1
make: *** [all] Error 2
I have CentOS version 7.9.2009
I have installed openssl-devel, openssl, openssl-libs, openssl-devel-1.0.2k-25.el7_9.x86_64
those packages should installed the header file I am missing.
any clue on how to fix such issue?
thanks,
Dolf

Omnet++ fatal error: 'inet/.../something.h' file not found

I am trying to create a new project from Windows 10/11 in Omnet++ 5.7 referenced to inet (Right Clicked on First Project - > Properties - > Project References - > Marked Inet) but it fails because it can't find the inet's classes.
I tried to recompile everything (including inet after adding my .cc files), but nothing seems to work.
That's a sample of how I included the files in my .cc classes:
#include "inet/common/INETDefs.h"
#include "inet/common/geometry/common/Coord.h"
#include "inet/common/packet/Packet.h"
This is my error:
23:26:01 **** Incremental Build of configuration release for project project ****
make MODE=release all
cd src && /usr/bin/make
make[1]: Entering directory '/c/Users/cyb/Desktop/omnetpp-5.7/samples/project/src'
gpsr/Gpsr.cc
In file included from gpsr/Gpsr.cc:22:
gpsr/Gpsr.h:23:10: fatal error: 'inet/common/INETDefs.h' file not found
#include "inet/common/INETDefs.h"
^~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[1]: *** [Makefile:112: ../out/clang-release/src/gpsr/Gpsr.o] Error 1
make[1]: Leaving directory '/c/Users/cyb/Desktop/omnetpp-5.7/samples/project/src'
make: *** [Makefile:2: all] Error 2
"make MODE=release all" terminated with exit code 2. Build might be incomplete.
23:26:04 Build Failed. 3 errors, 0 warnings. (took 2s.194ms)
I've already tried to recreate a new "makemake" file, but still this error occurs.
I also tried the suggestions I found here Omnet++ inet::EtherAppCli not found and here Omnet++ fatal error: 'inet/common/INETDefs.h' file not found . Same error occurs when I create a new project from 0 or even if I use a different version of Omnet++/Inet (I tried omnet 4,5 and 6) or O.S (such as Windows or Linux). Anyone could help me?

CGREEN compilation error: ‘assertion_tests’ does not name a type

When I try to compile cgreen unit testing framework in cygwin64 I get this error:
[ 34%] Building CXX object tests/CMakeFiles/cgreen_cpp_tests.dir/assertion_tests.cpp.o
/home/Administrator/cgreen/tests/assertion_tests.cpp:1:1: error: ‘assertion_tests’ does not name a type
assertion_tests.c
^~~~~~~~~~~~~~~
make[2]: *** [tests/CMakeFiles/cgreen_cpp_tests.dir/build.make:63: tests/CMakeFiles/cgreen_cpp_tests.dir/assertion_tests.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1615: tests/CMakeFiles/cgreen_cpp_tests.dir/all] Error 2 make: *** [Makefile:161: all] Error 2
I have searched on google with no result.
I am using cygwin64 with cmake 3.6.2 and gcc 7.3.0
Any help will be appreciated!
The assertion_tests.cpp file is a symlink, see github cgreen repo. Sadly, on windows symlink is converted into textfile with the path to the file it should link to. You need to convert the file into actual link, as well all the others links in the cgreen repo, and there are some. Some help on how to do it may be better found on this thread.

Building QtWebKit with QT 5.6 on Mac 10.11

I'm trying to build Qt 5.6.0 (new release) with Qt Webkit on Mac OS 10.11 and I have a compiling error when I try.
I downloaded the tar.gz source of 5.6.0, then I downloaded QtWebkit source from Community folder for 5.6.0. I added the qtwebkit folder in the same folder of qtbase like previous version. Anything else is needed?
I'm using this configure:
OPENSSL_LIBS='-L/usr/local/opt/openssl/lib -lssl -lcrypto' ./configure -nomake examples -opensource -openssl-linked -I /usr/local/opt/openssl/include
After a few hour of compilation, I have this error message:
.pch/debug/QtWebKitWidgets_debug/c++.pch
../include/QtWebKitWidgets/QtWebKitWidgetsDepends:7:10: fatal error: 'QtWebKit/QtWebKit' file not found
#include <QtWebKit/QtWebKit>
^
1 error generated.
make[4]: *** [.pch/debug/QtWebKitWidgets_debug/c++.pch] Error 1
make[3]: *** [debug-all] Error 2
make[2]: *** [sub-widgetsapi-pri-make_first-ordered] Error 2
make[1]: *** [sub-Source-QtWebKit-pro-make_first-ordered] Error 2
make: *** [module-qtwebkit-make_first] Error 2
Thanks for your help
I found the issue while searching some mailing: http://lists.qt-project.org/pipermail/development/2016-March/025358.html
The tarball was not properly made and the synqct step is missing.
To fix, create an empty .git folder (in qtwidget) and execute qmake, then manually execute syncqt for Qtwebkit:
cd qtwidget
mkdir .git
qmake
syncqt.pl Source -version 5.6.0

libQGLViewer installation on MacOS 10.7.2: Asking for Qt3 Support?

I am trying to install libQGLViewer2.3.13 (recent version) on MacOS 10.7.2 but it is giving me these errors after compiling some part of libqglviewer:
...
In file included from computerPlayer.cpp:33:
ui_computerPlayerInterface.Qt4.h:35:42: error: Qt3Support/Q3MimeSourceFactory:
No such file or directory
make[3]: *** [.obj/computerPlayer.o] Error 1
make[2]: *** [sub-Viewer-make_default] Error 2
make[1]: *** [sub-agora-make_default] Error 2
make: *** [sub-examples-contribs-make_default-ordered] Error 2
Can somebody please tell me how to resolve this issue?
Thank you!
Atlast I contacted QGLViewer Developers and they have fixed this problem. Please follow the instructions given on this link for installation:
http://www.libqglviewer.com/index.html
and to compile your own QGLViewer project please follow this link:
http://www.libqglviewer.com/compilation.html#pro
It explains how to create your own .pro file to generate the Makefile.