Closed eddieschoute closed 4 years ago
Before make
, it is able to:
export CC=gcc
export CXX=g++
@xiangzhai I tried, but that gives the same error.
One thing to check in case you haven't already is that you have the proper Xcode developer tools installed.
Have you run
xcode-select --install
?
@ah744 Yes, I have. To verify:
~> xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
(There are also no update available)
Still working on replicating your bug. One thing to make sure is that you are using python 2.7 as primary on your path. We have not futurized to python3 yet, so that is a potential failure point.
All OK on that front:
~> python --version
Python 2.7.10
Can you dump your output of
ROOT/build/CMakeFiles/CMakeOutput.log
?
The specific error you are showing has to do with the interaction between the C++0x and C++11 compilers. One solution would be to make this change in line 131 in the file
ROOT/llvm/tools/bugpoint/ToolRunner.cpp
errs () << OS
to
errs() << OS.str()
I suspect that if the compiler is detecting the incorrect C++ version, then you will have other errors pop up after this one is fixed though.
Here you go: CMakeOutput.log
@eddieschoute reproduce the issue: use your clang-900.0.37
to build LLVM Release v3.1 whether or not failed to build OLD LLVM?
Try to modify the Makefile
if failed:
diff --git a/Makefile b/Makefile
index 41dda5d..8efb6d1 100644
--- a/Makefile
+++ b/Makefile
@@ -119,7 +119,7 @@ Clang: llvm build
@cd llvm/tools && /bin/rm -f clang && /bin/ln -s ../../clang;
@cd clang && /bin/rm -f build && /bin/ln -s ../build;
@if [ -z $(USE_GCC) ]; then \
- cd build && cmake ../llvm/ ;\
+ cd build && cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ ../llvm/ ;\
cp ../llvm/Intrinsics.gen include/llvm/ && make ; \
else \
mkdir -p build && cd build && ../llvm/configure --disable-debug-symbols CC=gcc CXX=g++ && make ; fi
And still export CC
and CXX
to GNU toolchain.
Or you can try scaff-llvm I have migrated to LLVM UPSTREAM.
I cloned LLVM from the official repository (http://llvm.org/git/llvm.git) checked out branch release_31
and then executed cmake ../llvm
in the build directory:
~/dev/llvmbuild> cmake ../llvm
-- The C compiler identification is AppleClang 9.0.0.9000038
-- The CXX compiler identification is AppleClang 9.0.0.9000038
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for argz.h
-- Looking for argz.h - not found
-- Looking for assert.h
-- Looking for assert.h - found
-- Looking for ctype.h
-- Looking for ctype.h - found
-- Looking for dirent.h
-- Looking for dirent.h - found
-- Looking for dl.h
-- Looking for dl.h - not found
-- Looking for dld.h
-- Looking for dld.h - not found
-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Looking for errno.h
-- Looking for errno.h - found
-- Looking for execinfo.h
-- Looking for execinfo.h - found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for limits.h
-- Looking for limits.h - found
-- Looking for link.h
-- Looking for link.h - not found
-- Looking for malloc.h
-- Looking for malloc.h - not found
-- Looking for malloc/malloc.h
-- Looking for malloc/malloc.h - found
-- Looking for memory.h
-- Looking for memory.h - found
-- Looking for ndir.h
-- Looking for ndir.h - not found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for setjmp.h
-- Looking for setjmp.h - found
-- Looking for signal.h
-- Looking for signal.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stdio.h
-- Looking for stdio.h - found
-- Looking for stdlib.h
-- Looking for stdlib.h - found
-- Looking for string.h
-- Looking for string.h - found
-- Looking for strings.h
-- Looking for strings.h - found
-- Looking for sys/dir.h
-- Looking for sys/dir.h - found
-- Looking for sys/dl.h
-- Looking for sys/dl.h - not found
-- Looking for sys/ioctl.h
-- Looking for sys/ioctl.h - found
-- Looking for sys/mman.h
-- Looking for sys/mman.h - found
-- Looking for sys/ndir.h
-- Looking for sys/ndir.h - not found
-- Looking for sys/param.h
-- Looking for sys/param.h - found
-- Looking for sys/resource.h
-- Looking for sys/resource.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for sys/uio.h
-- Looking for sys/uio.h - found
-- Looking for sys/wait.h
-- Looking for sys/wait.h - found
-- Looking for termios.h
-- Looking for termios.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for utime.h
-- Looking for utime.h - found
-- Looking for valgrind/valgrind.h
-- Looking for valgrind/valgrind.h - not found
-- Looking for windows.h
-- Looking for windows.h - not found
-- Looking for fenv.h
-- Looking for fenv.h - found
-- Looking for mach/mach.h
-- Looking for mach/mach.h - found
-- Looking for mach-o/dyld.h
-- Looking for mach-o/dyld.h - found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Looking for pthread_getspecific in pthread
-- Looking for pthread_getspecific in pthread - found
-- Looking for pthread_rwlock_init in pthread
-- Looking for pthread_rwlock_init in pthread - found
-- Looking for dlopen in dl
-- Looking for dlopen in dl - found
-- Looking for getpagesize
-- Looking for getpagesize - found
-- Looking for getrusage
-- Looking for getrusage - found
-- Looking for setrlimit
-- Looking for setrlimit - found
-- Looking for isatty
-- Looking for isatty - found
-- Looking for index
-- Looking for index - found
-- Looking for isinf
-- Looking for isinf - not found
-- Looking for isinf
-- Looking for isinf - found
-- Looking for finite
-- Looking for finite - not found
-- Looking for isnan
-- Looking for isnan - not found
-- Looking for isnan
-- Looking for isnan - found
-- Looking for ceilf
-- Looking for ceilf - found
-- Looking for floorf
-- Looking for floorf - found
-- Looking for fmodf
-- Looking for fmodf - found
-- Looking for longjmp
-- Looking for longjmp - found
-- Looking for setjmp
-- Looking for setjmp - found
-- Looking for siglongjmp
-- Looking for siglongjmp - found
-- Looking for sigsetjmp
-- Looking for sigsetjmp - found
-- Looking for writev
-- Looking for writev - found
-- Looking for nearbyintf
-- Looking for nearbyintf - found
-- Looking for mallinfo
-- Looking for mallinfo - not found
-- Looking for malloc_zone_statistics
-- Looking for malloc_zone_statistics - found
-- Looking for mkdtemp
-- Looking for mkdtemp - found
-- Looking for mkstemp
-- Looking for mkstemp - found
-- Looking for mktemp
-- Looking for mktemp - found
-- Looking for closedir
-- Looking for closedir - found
-- Looking for opendir
-- Looking for opendir - found
-- Looking for readdir
-- Looking for readdir - found
-- Looking for getcwd
-- Looking for getcwd - found
-- Looking for gettimeofday
-- Looking for gettimeofday - found
-- Looking for getrlimit
-- Looking for getrlimit - found
-- Looking for posix_spawn
-- Looking for posix_spawn - found
-- Looking for pread
-- Looking for pread - found
-- Looking for rindex
-- Looking for rindex - found
-- Looking for strchr
-- Looking for strchr - found
-- Looking for strcmp
-- Looking for strcmp - found
-- Looking for strdup
-- Looking for strdup - found
-- Looking for strrchr
-- Looking for strrchr - found
-- Looking for pthread_mutex_lock
-- Looking for pthread_mutex_lock - found
-- Looking for sbrk
-- Looking for sbrk - found
-- Looking for srand48
-- Looking for srand48 - found
-- Looking for lrand48
-- Looking for lrand48 - found
-- Looking for drand48
-- Looking for drand48 - found
-- Looking for strtoll
-- Looking for strtoll - found
-- Looking for strtoq
-- Looking for strtoq - found
-- Looking for strerror
-- Looking for strerror - found
-- Looking for strerror_r
-- Looking for strerror_r - found
-- Looking for strerror_s
-- Looking for strerror_s - not found
-- Looking for memcpy
-- Looking for memcpy - found
-- Looking for memmove
-- Looking for memmove - found
-- Looking for setenv
-- Looking for setenv - found
-- Looking for dlerror
-- Looking for dlerror - found
-- Looking for dlopen
-- Looking for dlopen - found
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - not found
-- Performing Test HAVE_INT64_T
-- Performing Test HAVE_INT64_T - Success
-- Performing Test HAVE_UINT64_T
-- Performing Test HAVE_UINT64_T - Success
-- Performing Test HAVE_U_INT64_T
-- Performing Test HAVE_U_INT64_T - Success
-- Performing Test HAVE_ERROR_T
-- Performing Test HAVE_ERROR_T - Failed
-- Performing Test LLVM_HAS_ATOMICS
-- Performing Test LLVM_HAS_ATOMICS - Success
-- Performing Test SUPPORTS_NO_VARIADIC_MACROS_FLAG
-- Performing Test SUPPORTS_NO_VARIADIC_MACROS_FLAG - Success
-- Target triple: x86_64-apple-darwin17.0.0
-- Native target architecture is X86
-- Threads enabled.
-- Performing Test SUPPORTS_FPIC_FLAG
-- Performing Test SUPPORTS_FPIC_FLAG - Success
-- Building with -fPIC
-- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG
-- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG - Success
-- Performing Test SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
-- Performing Test SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Success
-- Found PythonInterp: /usr/bin/python (found version "2.7.10")
-- Constructing LLVMBuild project information
-- Targeting ARM
-- Targeting CellSPU
-- Targeting CppBackend
-- Targeting Hexagon
-- Targeting Mips
-- Targeting MBlaze
-- Targeting MSP430
-- Targeting PowerPC
-- Targeting PTX
-- Targeting Sparc
-- Targeting X86
-- Targeting XCore
Migrating from a git-svn v1 layout...
Data from a previous version of git-svn exists, but
.git/svn
(required for this version (2.13.5 (Apple Git-94)) of git-svn) does not exist.
Done migrating from a git-svn v1 layout
-- Configuring done
CMake Warning (dev) at test/CMakeLists.txt:74 (add_dependencies):
Policy CMP0046 is not set: Error on non-existent dependency in
add_dependencies. Run "cmake --help-policy CMP0046" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.
The dependency target "json-bench" of target "check.deps" does not exist.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake
--help-policy CMP0042" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
MACOSX_RPATH is not specified for the following targets:
BugpointPasses
LLVMHello
LTO
profile_rt-shared
This warning is for project developers. Use -Wno-dev to suppress it.
-- Generating done
-- Build files have been written to: /Users/eddie/dev/llvmbuild
As far as I can see the build has no errors, so it succeeded. It succeeded, so what now?
@eddieschoute what about make
? did you get the following error as described:
[ 70%] Building CXX object tools/bugpoint/CMakeFiles/bugpoint.dir/ToolRunner.cpp.o
/Users/eddie/dev/ScaffCC/llvm/tools/bugpoint/ToolRunner.cpp:131:12: error: invalid operands to binary expression
('llvm::raw_ostream' and 'std::ostringstream' (aka 'basic_ostringstream<char>'))
errs() << OS;
~~~~~~ ^ ~~
ScaffCC didn't modify tools/bugpoint/ToolRunner.cpp
:
$ diff -Naur /data/project/xiangzhai/ScaffCC/llvm/tools/bugpoint/ToolRunner.cpp /data/project/xiangzhai/llvm-31/tools/bugpoint/ToolRunner.cpp
@xiangzhai I think there's some misunderstanding, because you said that I should build LLVM v3.1. And only if it failed modify the ScaffCC makefile (and build?). Could you explain again what you'd like me to do?
I cloned LLVM from the official repository (http://llvm.org/git/llvm.git) checked out branch release_31 and then executed cmake ../llvm in the build directory:
You might not executed make
after cmake
? alike GCC, NEW gcc (6.x) failed to build OLD gcc (4.x) without patches.
Ok, so I tried make
for LLVM v3.1 and indeed it failed. So then I modified the Makefile of ScaffCC as instructed, and performed:
export CC=gcc
export CXX=g++
I still get a build error:
~/dev/ScaffCC> make
CMake Error at CMakeLists.txt:3 (project):
The CMAKE_C_COMPILER:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
is not a full path to an existing compiler tool.
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
CMake Error at CMakeLists.txt:3 (project):
The CMAKE_CXX_COMPILER:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
is not a full path to an existing compiler tool.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "/Users/eddie/dev/ScaffCC/build/CMakeFiles/CMakeOutput.log".
See also "/Users/eddie/dev/ScaffCC/build/CMakeFiles/CMakeError.log".
-- The C compiler identification is AppleClang 9.0.0.9000038
-- The CXX compiler identification is AppleClang 9.0.0.9000038
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Target triple: x86_64-apple-darwin17.0.0
-- Native target architecture is X86
-- Threads enabled.
-- Building with -fPIC
-- Constructing LLVMBuild project information
-- Targeting ARM
-- Targeting CellSPU
-- Targeting CppBackend
-- Targeting Hexagon
-- Targeting Mips
-- Targeting MBlaze
-- Targeting MSP430
-- Targeting PowerPC
-- Targeting PTX
-- Targeting Sparc
-- Targeting X86
-- Targeting XCore
-- Clang version: 3.1
-- Configuring done
CMake Warning (dev) at test/CMakeLists.txt:74 (add_dependencies):
Policy CMP0046 is not set: Error on non-existent dependency in
add_dependencies. Run "cmake --help-policy CMP0046" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.
The dependency target "LLVMHello" of target "check.deps" does not exist.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at test/CMakeLists.txt:74 (add_dependencies):
Policy CMP0046 is not set: Error on non-existent dependency in
add_dependencies. Run "cmake --help-policy CMP0046" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.
The dependency target "json-bench" of target "check.deps" does not exist.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake
--help-policy CMP0042" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
MACOSX_RPATH is not specified for the following targets:
BugpointPasses
LLVMScaffold
LTO
libclang
profile_rt-shared
This warning is for project developers. Use -Wno-dev to suppress it.
-- Generating done
-- Build files have been written to: /Users/eddie/dev/ScaffCC/build
[ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/APFloat.cpp.o
[ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/APInt.cpp.o
[ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/APSInt.cpp.o
[ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Allocator.cpp.o
[ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/BlockFrequency.cpp.o
[ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/BranchProbability.cpp.o
[ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/circular_raw_ostream.cpp.o
[ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/CommandLine.cpp.o
[ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ConstantRange.cpp.o
[ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/CrashRecoveryContext.cpp.o
[ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/DataExtractor.cpp.o
[ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/DataStream.cpp.o
[ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Debug.cpp.o
[ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/DeltaAlgorithm.cpp.o
[ 1%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/DAGDeltaAlgorithm.cpp.o
[ 1%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Dwarf.cpp.o
[ 1%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ErrorHandling.cpp.o
[ 1%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/FileUtilities.cpp.o
[ 1%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/FoldingSet.cpp.o
[ 1%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/FormattedStream.cpp.o
[ 1%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/GraphWriter.cpp.o
[ 1%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Hashing.cpp.o
[ 1%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/IntEqClasses.cpp.o
[ 1%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/IntervalMap.cpp.o
[ 1%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/IntrusiveRefCntPtr.cpp.o
[ 1%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/IsInf.cpp.o
[ 1%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/IsNAN.cpp.o
[ 1%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Locale.cpp.o
[ 1%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/LockFileManager.cpp.o
[ 1%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ManagedStatic.cpp.o
[ 1%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/MemoryBuffer.cpp.o
[ 1%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/MemoryObject.cpp.o
[ 1%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/PluginLoader.cpp.o
[ 2%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/PrettyStackTrace.cpp.o
[ 2%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Regex.cpp.o
[ 2%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/SmallPtrSet.cpp.o
[ 2%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/SmallVector.cpp.o
[ 2%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/SourceMgr.cpp.o
[ 2%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Statistic.cpp.o
[ 2%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/StreamableMemoryObject.cpp.o
[ 2%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/StringExtras.cpp.o
[ 2%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/StringMap.cpp.o
[ 2%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/StringPool.cpp.o
[ 2%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/StringRef.cpp.o
[ 2%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/SystemUtils.cpp.o
[ 2%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Timer.cpp.o
[ 2%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ToolOutputFile.cpp.o
[ 2%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Triple.cpp.o
[ 2%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Twine.cpp.o
[ 2%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/YAMLParser.cpp.o
/Users/eddie/dev/ScaffCC/llvm/lib/Support/YAMLParser.cpp:493:8: warning: private field 'IsSimpleKeyRequired' is not used
[-Wunused-private-field]
bool IsSimpleKeyRequired;
^
1 warning generated.
[ 2%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/raw_os_ostream.cpp.o
[ 2%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/raw_ostream.cpp.o
[ 3%] Building C object lib/Support/CMakeFiles/LLVMSupport.dir/regcomp.c.o
[ 3%] Building C object lib/Support/CMakeFiles/LLVMSupport.dir/regerror.c.o
[ 3%] Building C object lib/Support/CMakeFiles/LLVMSupport.dir/regexec.c.o
[ 3%] Building C object lib/Support/CMakeFiles/LLVMSupport.dir/regfree.c.o
[ 3%] Building C object lib/Support/CMakeFiles/LLVMSupport.dir/regstrlcpy.c.o
[ 3%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Atomic.cpp.o
[ 3%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Disassembler.cpp.o
[ 3%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/DynamicLibrary.cpp.o
[ 3%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Errno.cpp.o
[ 3%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Host.cpp.o
[ 3%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/IncludeFile.cpp.o
[ 3%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Memory.cpp.o
[ 3%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Mutex.cpp.o
[ 3%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Path.cpp.o
[ 3%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/PathV2.cpp.o
[ 3%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Process.cpp.o
[ 3%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Program.cpp.o
[ 3%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/RWMutex.cpp.o
[ 3%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/SearchForAddressOfSpecialSymbol.cpp.o
[ 4%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Signals.cpp.o
[ 4%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/system_error.cpp.o
[ 4%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/TargetRegistry.cpp.o
[ 4%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ThreadLocal.cpp.o
[ 4%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Threading.cpp.o
[ 4%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/TimeValue.cpp.o
[ 4%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Valgrind.cpp.o
[ 4%] Linking CXX static library ../libLLVMSupport.a
Error running link command: No such file or directory
make[3]: *** [lib/libLLVMSupport.a] Error 2
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [Clang] Error 2
@eddieschoute it is better to rm build directory after changed to GNU toolchain, then executed make. and you can try to build llvm 3.1 with your GNU toolchain at first, then build ScaffCC if no error.
I used GCC 6.4 to build LLVM 3.1 and 6.0 (upstream) successfully, migrated ScaffCC to LLVM 6.0 https://github.com/ScaffCC
But I want to fix the issue, for example https://github.com/ScaffCC/scaff-llvm/issues/1 not just workaround like comment the error report when Name + Surrfix != Function Name, but try to find the root cause.
My gcc
is not version 6.4 but Apple LLVM version 9:
~/dev/llvmbuild> gcc -v
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.38)
Target: x86_64-apple-darwin17.0.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
The same holds for g++
. I am unable to build LLVM with those (I get the same error as described in https://github.com/Homebrew/homebrew-versions/issues/384)
I also tried building scaff-llvm: I cloned the repository, made a subdir ./build
and ran cmake ..
, this also gives multiple errors:
~/dev/scaff-llvm/build> cmake ..
-- The C compiler identification is AppleClang 9.0.0.9000038
-- The CXX compiler identification is AppleClang 9.0.0.9000038
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/gcc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/g++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for argz.h
-- Looking for argz.h - not found
-- Looking for assert.h
-- Looking for assert.h - found
-- Looking for ctype.h
-- Looking for ctype.h - found
-- Looking for dirent.h
-- Looking for dirent.h - found
-- Looking for dl.h
-- Looking for dl.h - not found
-- Looking for dld.h
-- Looking for dld.h - not found
-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Looking for errno.h
-- Looking for errno.h - found
-- Looking for execinfo.h
-- Looking for execinfo.h - found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for limits.h
-- Looking for limits.h - found
-- Looking for link.h
-- Looking for link.h - not found
-- Looking for malloc.h
-- Looking for malloc.h - not found
-- Looking for malloc/malloc.h
-- Looking for malloc/malloc.h - found
-- Looking for memory.h
-- Looking for memory.h - found
-- Looking for ndir.h
-- Looking for ndir.h - not found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for setjmp.h
-- Looking for setjmp.h - found
-- Looking for signal.h
-- Looking for signal.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stdio.h
-- Looking for stdio.h - found
-- Looking for stdlib.h
-- Looking for stdlib.h - found
-- Looking for string.h
-- Looking for string.h - found
-- Looking for strings.h
-- Looking for strings.h - found
-- Looking for sys/dir.h
-- Looking for sys/dir.h - found
-- Looking for sys/dl.h
-- Looking for sys/dl.h - not found
-- Looking for sys/ioctl.h
-- Looking for sys/ioctl.h - found
-- Looking for sys/mman.h
-- Looking for sys/mman.h - found
-- Looking for sys/ndir.h
-- Looking for sys/ndir.h - not found
-- Looking for sys/param.h
-- Looking for sys/param.h - found
-- Looking for sys/resource.h
-- Looking for sys/resource.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for sys/uio.h
-- Looking for sys/uio.h - found
-- Looking for sys/wait.h
-- Looking for sys/wait.h - found
-- Looking for termios.h
-- Looking for termios.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for utime.h
-- Looking for utime.h - found
-- Looking for valgrind/valgrind.h
-- Looking for valgrind/valgrind.h - not found
-- Looking for windows.h
-- Looking for windows.h - not found
-- Looking for fenv.h
-- Looking for fenv.h - found
-- Looking for mach/mach.h
-- Looking for mach/mach.h - found
-- Looking for mach-o/dyld.h
-- Looking for mach-o/dyld.h - found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Looking for pthread_getspecific in pthread
-- Looking for pthread_getspecific in pthread - found
-- Looking for pthread_rwlock_init in pthread
-- Looking for pthread_rwlock_init in pthread - found
-- Looking for dlopen in dl
-- Looking for dlopen in dl - found
-- Looking for getpagesize
-- Looking for getpagesize - found
-- Looking for getrusage
-- Looking for getrusage - found
-- Looking for setrlimit
-- Looking for setrlimit - found
-- Looking for isatty
-- Looking for isatty - found
-- Looking for index
-- Looking for index - found
-- Looking for isinf
-- Looking for isinf - not found
-- Looking for isinf
-- Looking for isinf - found
-- Looking for finite
-- Looking for finite - not found
-- Looking for isnan
-- Looking for isnan - not found
-- Looking for isnan
-- Looking for isnan - found
-- Looking for ceilf
-- Looking for ceilf - found
-- Looking for floorf
-- Looking for floorf - found
-- Looking for fmodf
-- Looking for fmodf - found
-- Looking for longjmp
-- Looking for longjmp - found
-- Looking for setjmp
-- Looking for setjmp - found
-- Looking for siglongjmp
-- Looking for siglongjmp - found
-- Looking for sigsetjmp
-- Looking for sigsetjmp - found
-- Looking for writev
-- Looking for writev - found
-- Looking for nearbyintf
-- Looking for nearbyintf - found
-- Looking for mallinfo
-- Looking for mallinfo - not found
-- Looking for malloc_zone_statistics
-- Looking for malloc_zone_statistics - found
-- Looking for mkdtemp
-- Looking for mkdtemp - found
-- Looking for mkstemp
-- Looking for mkstemp - found
-- Looking for mktemp
-- Looking for mktemp - found
-- Looking for closedir
-- Looking for closedir - found
-- Looking for opendir
-- Looking for opendir - found
-- Looking for readdir
-- Looking for readdir - found
-- Looking for getcwd
-- Looking for getcwd - found
-- Looking for gettimeofday
-- Looking for gettimeofday - found
-- Looking for getrlimit
-- Looking for getrlimit - found
-- Looking for posix_spawn
-- Looking for posix_spawn - found
-- Looking for pread
-- Looking for pread - found
-- Looking for rindex
-- Looking for rindex - found
-- Looking for strchr
-- Looking for strchr - found
-- Looking for strcmp
-- Looking for strcmp - found
-- Looking for strdup
-- Looking for strdup - found
-- Looking for strrchr
-- Looking for strrchr - found
-- Looking for pthread_mutex_lock
-- Looking for pthread_mutex_lock - found
-- Looking for sbrk
-- Looking for sbrk - found
-- Looking for srand48
-- Looking for srand48 - found
-- Looking for lrand48
-- Looking for lrand48 - found
-- Looking for drand48
-- Looking for drand48 - found
-- Looking for strtoll
-- Looking for strtoll - found
-- Looking for strtoq
-- Looking for strtoq - found
-- Looking for strerror
-- Looking for strerror - found
-- Looking for strerror_r
-- Looking for strerror_r - found
-- Looking for strerror_s
-- Looking for strerror_s - not found
-- Looking for memcpy
-- Looking for memcpy - found
-- Looking for memmove
-- Looking for memmove - found
-- Looking for setenv
-- Looking for setenv - found
-- Looking for dlerror
-- Looking for dlerror - found
-- Looking for dlopen
-- Looking for dlopen - found
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - not found
-- Performing Test HAVE_INT64_T
-- Performing Test HAVE_INT64_T - Success
-- Performing Test HAVE_UINT64_T
-- Performing Test HAVE_UINT64_T - Success
-- Performing Test HAVE_U_INT64_T
-- Performing Test HAVE_U_INT64_T - Success
-- Performing Test HAVE_ERROR_T
-- Performing Test HAVE_ERROR_T - Failed
-- Performing Test LLVM_HAS_ATOMICS
-- Performing Test LLVM_HAS_ATOMICS - Success
-- Performing Test SUPPORTS_NO_VARIADIC_MACROS_FLAG
-- Performing Test SUPPORTS_NO_VARIADIC_MACROS_FLAG - Success
-- Target triple: x86_64-apple-darwin17.0.0
-- Native target architecture is X86
-- Threads enabled.
-- Performing Test SUPPORTS_FPIC_FLAG
-- Performing Test SUPPORTS_FPIC_FLAG - Success
-- Building with -fPIC
-- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG
-- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG - Success
-- Performing Test SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
-- Performing Test SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Success
-- Found PythonInterp: /usr/bin/python (found version "2.7.10")
-- Constructing LLVMBuild project information
CMake Error at cmake/modules/LLVMProcessSources.cmake:86 (message):
Found unknown source file
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/CriticalResourceCount.cpp
Please update
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/CMakeLists.txt
Call Stack (most recent call first):
cmake/modules/LLVMProcessSources.cmake:42 (llvm_check_source_file_list)
cmake/modules/AddLLVM.cmake:45 (llvm_process_sources)
lib/Transforms/Scaffold/CMakeLists.txt:1 (add_llvm_loadable_module)
CMake Error at cmake/modules/LLVMProcessSources.cmake:86 (message):
Found unknown source file
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/DynCriticalPath.cpp
Please update
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/CMakeLists.txt
Call Stack (most recent call first):
cmake/modules/LLVMProcessSources.cmake:42 (llvm_check_source_file_list)
cmake/modules/AddLLVM.cmake:45 (llvm_process_sources)
lib/Transforms/Scaffold/CMakeLists.txt:1 (add_llvm_loadable_module)
CMake Error at cmake/modules/LLVMProcessSources.cmake:86 (message):
Found unknown source file
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/DynGenQASMLoops.cpp
Please update
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/CMakeLists.txt
Call Stack (most recent call first):
cmake/modules/LLVMProcessSources.cmake:42 (llvm_check_source_file_list)
cmake/modules/AddLLVM.cmake:45 (llvm_process_sources)
lib/Transforms/Scaffold/CMakeLists.txt:1 (add_llvm_loadable_module)
CMake Error at cmake/modules/LLVMProcessSources.cmake:86 (message):
Found unknown source file
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/DynRollupLoops.cpp
Please update
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/CMakeLists.txt
Call Stack (most recent call first):
cmake/modules/LLVMProcessSources.cmake:42 (llvm_check_source_file_list)
cmake/modules/AddLLVM.cmake:45 (llvm_process_sources)
lib/Transforms/Scaffold/CMakeLists.txt:1 (add_llvm_loadable_module)
CMake Error at cmake/modules/LLVMProcessSources.cmake:86 (message):
Found unknown source file
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/DynRollupRepLoops.cpp
Please update
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/CMakeLists.txt
Call Stack (most recent call first):
cmake/modules/LLVMProcessSources.cmake:42 (llvm_check_source_file_list)
cmake/modules/AddLLVM.cmake:45 (llvm_process_sources)
lib/Transforms/Scaffold/CMakeLists.txt:1 (add_llvm_loadable_module)
CMake Error at cmake/modules/LLVMProcessSources.cmake:86 (message):
Found unknown source file
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/FlattenModule.cpp
Please update
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/CMakeLists.txt
Call Stack (most recent call first):
cmake/modules/LLVMProcessSources.cmake:42 (llvm_check_source_file_list)
cmake/modules/AddLLVM.cmake:45 (llvm_process_sources)
lib/Transforms/Scaffold/CMakeLists.txt:1 (add_llvm_loadable_module)
CMake Error at cmake/modules/LLVMProcessSources.cmake:86 (message):
Found unknown source file
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/FunctionDuplicate.cpp
Please update
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/CMakeLists.txt
Call Stack (most recent call first):
cmake/modules/LLVMProcessSources.cmake:42 (llvm_check_source_file_list)
cmake/modules/AddLLVM.cmake:45 (llvm_process_sources)
lib/Transforms/Scaffold/CMakeLists.txt:1 (add_llvm_loadable_module)
CMake Error at cmake/modules/LLVMProcessSources.cmake:86 (message):
Found unknown source file
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/GenLPFSSchedule.cpp
Please update
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/CMakeLists.txt
Call Stack (most recent call first):
cmake/modules/LLVMProcessSources.cmake:42 (llvm_check_source_file_list)
cmake/modules/AddLLVM.cmake:45 (llvm_process_sources)
lib/Transforms/Scaffold/CMakeLists.txt:1 (add_llvm_loadable_module)
CMake Error at cmake/modules/LLVMProcessSources.cmake:86 (message):
Found unknown source file
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/GenQASM.cpp
Please update
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/CMakeLists.txt
Call Stack (most recent call first):
cmake/modules/LLVMProcessSources.cmake:42 (llvm_check_source_file_list)
cmake/modules/AddLLVM.cmake:45 (llvm_process_sources)
lib/Transforms/Scaffold/CMakeLists.txt:1 (add_llvm_loadable_module)
CMake Error at cmake/modules/LLVMProcessSources.cmake:86 (message):
Found unknown source file
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/GenQASMLoops.cpp
Please update
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/CMakeLists.txt
Call Stack (most recent call first):
cmake/modules/LLVMProcessSources.cmake:42 (llvm_check_source_file_list)
cmake/modules/AddLLVM.cmake:45 (llvm_process_sources)
lib/Transforms/Scaffold/CMakeLists.txt:1 (add_llvm_loadable_module)
CMake Error at cmake/modules/LLVMProcessSources.cmake:86 (message):
Found unknown source file
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/GenRKQC.cpp
Please update
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/CMakeLists.txt
Call Stack (most recent call first):
cmake/modules/LLVMProcessSources.cmake:42 (llvm_check_source_file_list)
cmake/modules/AddLLVM.cmake:45 (llvm_process_sources)
lib/Transforms/Scaffold/CMakeLists.txt:1 (add_llvm_loadable_module)
CMake Error at cmake/modules/LLVMProcessSources.cmake:86 (message):
Found unknown source file
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/GenSIMDSchedule.cpp
Please update
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/CMakeLists.txt
Call Stack (most recent call first):
cmake/modules/LLVMProcessSources.cmake:42 (llvm_check_source_file_list)
cmake/modules/AddLLVM.cmake:45 (llvm_process_sources)
lib/Transforms/Scaffold/CMakeLists.txt:1 (add_llvm_loadable_module)
CMake Error at cmake/modules/LLVMProcessSources.cmake:86 (message):
Found unknown source file
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/GenSIMDScheduleCG.cpp
Please update
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/CMakeLists.txt
Call Stack (most recent call first):
cmake/modules/LLVMProcessSources.cmake:42 (llvm_check_source_file_list)
cmake/modules/AddLLVM.cmake:45 (llvm_process_sources)
lib/Transforms/Scaffold/CMakeLists.txt:1 (add_llvm_loadable_module)
CMake Error at cmake/modules/LLVMProcessSources.cmake:86 (message):
Found unknown source file
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/GetCriticalPath.cpp
Please update
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/CMakeLists.txt
Call Stack (most recent call first):
cmake/modules/LLVMProcessSources.cmake:42 (llvm_check_source_file_list)
cmake/modules/AddLLVM.cmake:45 (llvm_process_sources)
lib/Transforms/Scaffold/CMakeLists.txt:1 (add_llvm_loadable_module)
CMake Error at cmake/modules/LLVMProcessSources.cmake:86 (message):
Found unknown source file
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/InlineModule.cpp
Please update
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/CMakeLists.txt
Call Stack (most recent call first):
cmake/modules/LLVMProcessSources.cmake:42 (llvm_check_source_file_list)
cmake/modules/AddLLVM.cmake:45 (llvm_process_sources)
lib/Transforms/Scaffold/CMakeLists.txt:1 (add_llvm_loadable_module)
CMake Error at cmake/modules/LLVMProcessSources.cmake:86 (message):
Found unknown source file
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/Optimize.cpp
Please update
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/CMakeLists.txt
Call Stack (most recent call first):
cmake/modules/LLVMProcessSources.cmake:42 (llvm_check_source_file_list)
cmake/modules/AddLLVM.cmake:45 (llvm_process_sources)
lib/Transforms/Scaffold/CMakeLists.txt:1 (add_llvm_loadable_module)
CMake Error at cmake/modules/LLVMProcessSources.cmake:86 (message):
Found unknown source file
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/ResourceCount.cpp
Please update
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/CMakeLists.txt
Call Stack (most recent call first):
cmake/modules/LLVMProcessSources.cmake:42 (llvm_check_source_file_list)
cmake/modules/AddLLVM.cmake:45 (llvm_process_sources)
lib/Transforms/Scaffold/CMakeLists.txt:1 (add_llvm_loadable_module)
CMake Error at cmake/modules/LLVMProcessSources.cmake:86 (message):
Found unknown source file
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/ResourceCount2.cpp
Please update
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/CMakeLists.txt
Call Stack (most recent call first):
cmake/modules/LLVMProcessSources.cmake:42 (llvm_check_source_file_list)
cmake/modules/AddLLVM.cmake:45 (llvm_process_sources)
lib/Transforms/Scaffold/CMakeLists.txt:1 (add_llvm_loadable_module)
CMake Error at cmake/modules/LLVMProcessSources.cmake:86 (message):
Found unknown source file
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/Reverse.cpp
Please update
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/CMakeLists.txt
Call Stack (most recent call first):
cmake/modules/LLVMProcessSources.cmake:42 (llvm_check_source_file_list)
cmake/modules/AddLLVM.cmake:45 (llvm_process_sources)
lib/Transforms/Scaffold/CMakeLists.txt:1 (add_llvm_loadable_module)
CMake Error at cmake/modules/LLVMProcessSources.cmake:86 (message):
Found unknown source file
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/RuntimeFrequencyEstimationHybrid.cpp
Please update
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/CMakeLists.txt
Call Stack (most recent call first):
cmake/modules/LLVMProcessSources.cmake:42 (llvm_check_source_file_list)
cmake/modules/AddLLVM.cmake:45 (llvm_process_sources)
lib/Transforms/Scaffold/CMakeLists.txt:1 (add_llvm_loadable_module)
CMake Error at cmake/modules/LLVMProcessSources.cmake:86 (message):
Found unknown source file
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/RuntimeResourceEst-Memoized.cpp
Please update
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/CMakeLists.txt
Call Stack (most recent call first):
cmake/modules/LLVMProcessSources.cmake:42 (llvm_check_source_file_list)
cmake/modules/AddLLVM.cmake:45 (llvm_process_sources)
lib/Transforms/Scaffold/CMakeLists.txt:1 (add_llvm_loadable_module)
CMake Error at cmake/modules/LLVMProcessSources.cmake:86 (message):
Found unknown source file
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/RuntimeResourceEst.cpp
Please update
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/CMakeLists.txt
Call Stack (most recent call first):
cmake/modules/LLVMProcessSources.cmake:42 (llvm_check_source_file_list)
cmake/modules/AddLLVM.cmake:45 (llvm_process_sources)
lib/Transforms/Scaffold/CMakeLists.txt:1 (add_llvm_loadable_module)
CMake Error at cmake/modules/LLVMProcessSources.cmake:86 (message):
Found unknown source file
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/SortCloneArguments.cpp
Please update
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/CMakeLists.txt
Call Stack (most recent call first):
cmake/modules/LLVMProcessSources.cmake:42 (llvm_check_source_file_list)
cmake/modules/AddLLVM.cmake:45 (llvm_process_sources)
lib/Transforms/Scaffold/CMakeLists.txt:1 (add_llvm_loadable_module)
CMake Error at cmake/modules/LLVMProcessSources.cmake:86 (message):
Found unknown source file
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/Toffoli.cpp
Please update
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/CMakeLists.txt
Call Stack (most recent call first):
cmake/modules/LLVMProcessSources.cmake:42 (llvm_check_source_file_list)
cmake/modules/AddLLVM.cmake:45 (llvm_process_sources)
lib/Transforms/Scaffold/CMakeLists.txt:1 (add_llvm_loadable_module)
CMake Error at cmake/modules/LLVMProcessSources.cmake:86 (message):
Found unknown source file
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/XformCbitStores.cpp
Please update
/Users/eddie/dev/scaff-llvm/lib/Transforms/Scaffold/CMakeLists.txt
Call Stack (most recent call first):
cmake/modules/LLVMProcessSources.cmake:42 (llvm_check_source_file_list)
cmake/modules/AddLLVM.cmake:45 (llvm_process_sources)
lib/Transforms/Scaffold/CMakeLists.txt:1 (add_llvm_loadable_module)
-- Targeting ARM
-- Targeting CellSPU
-- Targeting CppBackend
-- Targeting Hexagon
-- Targeting Mips
-- Targeting MBlaze
-- Targeting MSP430
-- Targeting PowerPC
-- Targeting PTX
-- Targeting Sparc
-- Targeting X86
-- Targeting XCore
Migrating from a git-svn v1 layout...
Data from a previous version of git-svn exists, but
.git/svn
(required for this version (2.13.5 (Apple Git-94)) of git-svn) does not exist.
Done migrating from a git-svn v1 layout
-- Configuring incomplete, errors occurred!
See also "/Users/eddie/dev/scaff-llvm/build/CMakeFiles/CMakeOutput.log".
See also "/Users/eddie/dev/scaff-llvm/build/CMakeFiles/CMakeError.log".
@eddieschoute Please git checkout master branch https://github.com/ScaffCC/scaff-llvm/tree/master I only test release_31 branch for Fedora
I checked out master
and removed the entire build directory and rebuilt the project, but that doesn't work either:
output.log
@eddieschoute that is my fault: I migrated scaff-llvm to LLVM UPSTREAM version 6.0.0 (trunk 316308) (based on LLVM 6.0.0svn), and I often git merge upstream/master without checking the changes...
And please wait for this issue fixed, LLVM 6.0 is not able to LoopUnroll, but 3.1 and 3.9.1 are still able to work. Although it is able to generate flattened QASM (for example: qft.n05.qasmh), but the simulation's output is different with LLVM 3.1:
$ ./qft.n05_qasm
PrepZ reg0 <-- lack of for loop info...
H reg0
T reg0
Rz reg1,0.785398
CNOT reg1,reg0
Rz reg1,-0.785398
CNOT reg1,reg0
H reg1
Rz reg0,0.392699
Rz reg2,0.392699
CNOT reg2,reg0
Rz reg2,-0.392699
CNOT reg2,reg0
T reg1
Rz reg2,0.785398
CNOT reg2,reg1
Rz reg2,-0.785398
CNOT reg2,reg1
H reg2
Rz reg3,-0.196350
CNOT reg3,reg0
Rz reg3,0.196350
CNOT reg3,reg0
Rz reg1,0.392699
Rz reg3,0.392699
CNOT reg3,reg1
Rz reg3,-0.392699
CNOT reg3,reg1
T reg2
Rz reg3,0.785398
CNOT reg3,reg2
Rz reg3,-0.785398
CNOT reg3,reg2
H reg3
Rz reg4,-0.098150
CNOT reg4,reg0
Rz reg4,0.098150
CNOT reg4,reg0
Rz reg4,-0.196350
CNOT reg4,reg1
Rz reg4,0.196350
CNOT reg4,reg1
Rz reg2,0.392699
Rz reg4,0.392699
CNOT reg4,reg2
Rz reg4,-0.392699
CNOT reg4,reg2
T reg3
Rz reg4,0.785398
CNOT reg4,reg3
Rz reg4,-0.785398
CNOT reg4,reg3
H reg4
H reg0
MeasZ reg0 <-- lack of for loop info...
Workaround patch:
One solution would be to make this change in line 131 in the file ROOT/llvm/tools/bugpoint/ToolRunner.cpp
errs () << OS to errs() << OS.str()
Or fixed all LLVM 3.1 ~ 6.0 issues :)
@eddieschoute please git pull origin master, I have fixed the issue, and QFT works correctly now:
$ ./qft.n05_qasm
PrepZ reg0
PrepZ reg1
PrepZ reg2
PrepZ reg3
PrepZ reg4
H reg0
T reg0
Rz reg1,0.785398
CNOT reg1,reg0
Rz reg1,-0.785398
CNOT reg1,reg0
H reg1
Rz reg0,0.392699
Rz reg2,0.392699
CNOT reg2,reg0
Rz reg2,-0.392699
CNOT reg2,reg0
T reg1
Rz reg2,0.785398
CNOT reg2,reg1
Rz reg2,-0.785398
CNOT reg2,reg1
H reg2
Rz reg3,-0.196350
CNOT reg3,reg0
Rz reg3,0.196350
CNOT reg3,reg0
Rz reg1,0.392699
Rz reg3,0.392699
CNOT reg3,reg1
Rz reg3,-0.392699
CNOT reg3,reg1
T reg2
Rz reg3,0.785398
CNOT reg3,reg2
Rz reg3,-0.785398
CNOT reg3,reg2
H reg3
Rz reg4,-0.098150
CNOT reg4,reg0
Rz reg4,0.098150
CNOT reg4,reg0
Rz reg4,-0.196350
CNOT reg4,reg1
Rz reg4,0.196350
CNOT reg4,reg1
Rz reg2,0.392699
Rz reg4,0.392699
CNOT reg4,reg2
Rz reg4,-0.392699
CNOT reg4,reg2
T reg3
Rz reg4,0.785398
CNOT reg4,reg3
Rz reg4,-0.785398
CNOT reg4,reg3
H reg4
H reg0
MeasZ reg0
H reg1
MeasZ reg1
H reg2
MeasZ reg2
H reg3
MeasZ reg3
H reg4
MeasZ reg4
@xiangzhai Ok it builds successfully. But I don't know how to use that fork. Is there a manual?
@eddieschoute
$ git clone https://github.com/ScaffCC/ScaffCC.git
$ cd ScaffCC
$ git clone https://github.com/ScaffCC/scaff-llvm.git llvm
$ git clone https://github.com/ScaffCC/scaff-clang.git clang
$ make
$ ./scaffold.sh -fkR Algorithms/Cat_State/cat_state.n04.scaffold
$ ./cat_state.n04_qasm
H bits0
CNOT bits1,bits0
CNOT bits2,bits1
CNOT bits3,bits2
$ ./scaffold.sh -s Algorithms/Cat_State/cat_state.n04.scaffold
$ ./qx_simulator_1.0.beta_linux_x86_64 cat_state.n04.qc
=======================================================================================================
_______
/ ___ \ _ __ ____ ____ __ ___ __ __ __ ___ ______ ____ ___
/ / / | | |/_/ / __/ / _/ / |/ / / / / / / / / _ | /_ __/ / __ \ / _ \
/ /___/ / _> < _\ \ _/ / / /|_/ / / /_/ / / /__ / __ | / / / /_/ / / , _/
\______/\__\ /_/|_| /___/ /___/ /_/ /_/ \____/ /____//_/ |_| /_/ \____/ /_/|_|
[v0.1 beta]
_______________________________________________________________________________________________________
[version 0.1 beta - Nader Khammassi - TU Delft, QuTech - 2016 - report bugs to: n.khammassi@tudelft.nl]
[released under Apache License 2.0 terms, license copy at: http://www.apache.org/licenses/LICENSE-2.0]
=======================================================================================================
[+] loading circuit from 'cat_state.n04.qc' ...
[-] loading quantum_code file 'cat_state.n04.qc'...
[+] code loaded successfully.
[+] initializing xpu...
[+] initialized.
[+] creating quantum register of 4 qubits...
[+] executing circuit 'default' (1 iter) ...
--------------[quantum state]--------------
(+0.707107,+0.000000) |0000> +
(+0.707107,+0.000000) |1111> +
-------------------------------------------
[>>] measurement prediction: | X | X | X | X |
-------------------------------------------
[>>] measurement register : | 0 | 0 | 0 | 0 |
-------------------------------------------
[+] circuit execution time: +0.000396 sec.
QX: Quantum Computer Simulator https://qutech.nl/qx-quantum-computer-simulator/
But I have no idea how to compile Shor #10 in my Thinkpad X220... the same story is Boolean Formula and Class Number
I recently reinstalled OSX and still encounter the same issue as the opening post, do you have any update @ah744 ? I'm interested in running some samples with your SHA-1 implementation.
I met the same problem in Ubuntu 17.10. Do you have any update?
The build on ScaffCC_OSX
branch seem to be working perfectly fine on macOS Mojave version 10.14.5.
I did have to do the following for regression tests to pass (as I saw stdio.h
missing):
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
Consider closing this issue?
I'm trying to build Scaffold on OSX High Sierra and am getting a build error. I followed the installation instructions and am on the OSX branch. After following the OSX installation instruction,
cmake
was still missing so I installed that throughbrew
.During the
make
I get the following error:Let me know how I can help debug the issue.