I tried to install SFML with the help of this tutorial because I couldn't find a way to install it myself. After I did CTRL + B and Run build & debug I got this error:
⬤ Build & Run: Debug (target: sfml-vscode-boilerplate.exe)
src/PCH.hpp
In file included from src/PCH.hpp:66:0:
src/Utility/FileSystem.hpp:8:36: fatal error: experimental/filesystem: No such file or directory
#include <experimental/filesystem>
^
compilation terminated.
Makefile:313: recipe for target 'bin/Debug/obj/PCH.hpp.gch' failed
mingw32-make[1]: *** [bin/Debug/obj/PCH.hpp.gch] Error 1
Makefile:262: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
✘ Failed!
Review the compile errors above.
I'm using Windows 10, g++ version 6.3.0, SFML version 2.5.1, Visual Studo Code
Okay it was just bad version of GCC and G++
I'm trying to build LLDB as part of Clang/LLVM. LLVM, Clang, Compiler-RT and Extras build OK. However, LLVM has an issue when building with the other components.
The directory structure is set up according to LLVM/Clang/LLDB instructions. The docs on LLDB are located at Building LLDB. Below was run from the build directory, which lies next to the llvm directory (llvm is where all sources were unpacked):
$ cd build
$ ../llvm/configure --enable-optimized --enable-cxx11 --enable-libcpp --prefix=/usr/local
...
$ make -j4
...
llvm[4]: Compiling ARM_DWARF_Registers.cpp for Release+Asserts build
llvm[4]: Compiling KQueue.cpp for Release+Asserts build
llvm[4]: Compiling PseudoTerminal.cpp for Release+Asserts build
llvm[4]: Compiling Range.cpp for Release+Asserts build
llvm[4]: Compiling SharingPtr.cpp for Release+Asserts build
llvm[4]: Compiling StringExtractor.cpp for Release+Asserts build
llvm[4]: Compiling StringExtractorGDBRemote.cpp for Release+Asserts build
llvm[4]: Compiling TimeSpecTimeout.cpp for Release+Asserts build
llvm[4]: Building Release+Asserts Archive Library liblldbUtility.a
llvm[3]: Linking Release+Asserts Shared Library liblldb.dylib
Undefined symbols for architecture x86_64:
"SystemRuntimeMacOSX::Initialize()", referenced from:
lldb_private::Initialize() in liblldbInitAndLog.a(lldb.o)
"SystemRuntimeMacOSX::Terminate()", referenced from:
lldb_private::Terminate() in liblldbInitAndLog.a(lldb.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [/Users/jwalton/Clang-3.4.2/build/Release+Asserts/lib/liblldb.dylib] Error 1
make[2]: *** [all] Error 1
make[1]: *** [all] Error 1
make: *** [all] Error 1
EDIT: following Matt's instructions below, I was able to avoid Undefined symbols SystemRuntimeMacOSX::Initialize and SystemRuntimeMacOSX::Terminate. But the build still dies with:
llvm[4]: Compiling ARM_DWARF_Registers.cpp for Release+Asserts build
llvm[4]: Compiling KQueue.cpp for Release+Asserts build
llvm[4]: Compiling PseudoTerminal.cpp for Release+Asserts build
llvm[4]: Compiling Range.cpp for Release+Asserts build
llvm[4]: Compiling SharingPtr.cpp for Release+Asserts build
llvm[4]: Compiling StringExtractor.cpp for Release+Asserts build
llvm[4]: Compiling StringExtractorGDBRemote.cpp for Release+Asserts build
llvm[4]: Compiling TimeSpecTimeout.cpp for Release+Asserts build
llvm[4]: Building Release+Asserts Archive Library liblldbUtility.a
make[3]: *** No rule to make target `/Users/jwalton/Clang-3.4.2/build/Release+Asserts/lib/liblldbPluginSystemRuntimeMacOSX.a',
needed by `/Users/jwalton/Clang-3.4.2/build/Release+Asserts/lib/liblldb.dylib'. Stop.
The odd thing is, lldbPluginSystemRuntimeMacOSX is handled the same as other plugins like lldbPluginProcessMachCore. The same directives appear in the same places like Cmake.txt.
The host platform is OS X 10.8.5, x64, fully patched. Xcode version is 5.1.1 (5B1008) (which is the latest).
Does anyone know what magical steps I should perform to get lldb to compile with LLVM and Clang?
100 BOUNTY EDIT: There's a pastebin with my recipe in a shell script at Clang 3.4.2 recipe. The recipe uses Missing-Makefile, and Matt provides it below. The recipe patches the makefile, so you won't need to do it manually.
150 BOUNTY EDIT: Cos' answer was the final step. This question need both Matt's answer and Cos' answer. Cos provided an updated recipe. Its available at Clang 3.4.2 Recipe (Final).
You need to add following patch to your script:
sed -i '' '\|DIRS += Process/mach-core|a\
DIRS += SystemRuntime/MacOSX\
' llvm/tools/lldb/source/Plugins/Makefile
Your updated recipe
I believe that Jim's advice above is probably the best option. But, I also experienced this problem attempting to build llvm+clang+lldb 3.4.
I narrowed the problem down to one particular plugin, specific to OS X, not building at all via Make. This was a build system bug, fixed by this commit:
https://github.com/llvm-mirror/lldb/commit/7a53199e140843235d2bd2b12182ceb764419c8a
You can use the commit above as a guide. Only two changes actually need to be made to build successfully. I just patched my local copy.
lldb/lib/Makefile: "lldbPluginSystemRuntimeMacOSX.a" needs to be added after line 98
lldb/source/Plugins/SystemRuntime/MacOSX/Makefile needs to be created with the following contents:
##===- source/Plugins/SystemRuntime/MacOSX/Makefile ---------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LLDB_LEVEL := ../../../..
LIBRARYNAME := lldbPluginSystemRuntimeMacOSX
BUILD_ARCHIVE = 1
include $(LLDB_LEVEL)/Makefile
With all this done, I was able to finish the build and get a functioning version of liblldb.dylib, which is what I was after. Hope this helps!
I generally build using the Xcode project on MacOS X. Just get the lldb sources, and do:
cd lldb
xcodebuild -configuration Debug
or if you want to debug the Clang side of things as well:
xcodebuild -configuration DebugClang
You don't even need to get the llvm sources, the Xcode project will check them out for you if they aren't present (but won't override the version you have it you want to try to build against a branch or whatever...)
TOT lldb is building fine for me right now.
There are other folks on the lldb-dev mailing list who do use the Makefile build, if you want to build it this way for some reason, you might ask there.some
I'm getting this error while linking a C++ code.
I'm using g++ cross compiler for arm and building it on a Ubuntu machine.
Do I have to pass any flags or include some library?
I have just started to work with QT and am still getting familiar with the compilation process. Currently, I am trying to port an existing QT project to Mac. This app compiles and runs on Linux and Windows.
When I compile the project on Mac OSX 10.8.2 , I am getting this c++11 related error ,
#include ../xxx/pch.h:71:10: fatal error: 'atomic' file not found
#include <atomic>
^
1 error generated.
make[1]: *** [debug/xxx/objective-c++.pch] Error 1
make: *** [debug] Error 2
11:32:01: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project xxx (kit: Qt5.1.0)
When executing step 'Make'
I have included the below flags in the.pro file to enable c++11 ,
QMAKE_CXXFLAGS += -std=c++11
CONFIG += c++11
I am building the project with the pre-built QT5.1Beta package (Clang) which I believe has c++11 enabled.
I see the atomic header in the below locations
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/c++/v1/atomic
and in /usr/lib/c++/v1/atomic
I tried testing by including the complete path ,
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr//lib/c++/v1/atomic
I am getting the below error,
In file included from ../xxx/pch.h:71:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/atomic:535:2:
error: atomic is not implemented
In file included from ../xxx/pch.h:124:
../../../yyy.h:308:12: error: no type named 'atomic' in namespace 'std'
std::atomic<bool> m_signaled;
What am I missing here?
Add also
macx:QMAKE_CXXFLAGS += -stdlib=libc++
macx:QMAKE_LFLAGS += -stdlib=libc++
Maybe it is a bit late, but I fixed it using the -std=gnu++0x flag
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.