Error when building dawn 4.0 "pthread.h" ?
git clone https://github.com/eosio/eos
git submodule update --init --recursive
./eosio_build.sh darwin full
Beginning build version: 1.2
User: johan
git head id: 13952d4505d56442a769528bdf6094b52768b2cd
Current branch: master
ARCHITECTURE: Darwin
OS name: Darwin
OS Version: 10.13
CPU speed: 359.20Ghz
CPU cores: 2
Physical Memory: 8 Gbytes
Disk install: /dev/disk3s1
Disk space total: 465G
Disk space available: 326G
Checking xcode-select installation
xcode-select installation found @
/usr/bin/xcode-select
Checking Ruby installation.
Ruby installation found @
/usr/bin/ruby
Checking Home Brew installation
Home Brew installation found @
/usr/local/bin/brew
Checking dependencies.
Checking automake ... automake found
Checking Libtool ... Libtool found
Checking OpenSSL ... OpenSSL found
Checking llvm ... llvm found
Checking wget ... wget found
Checking CMake ... CMake found
Checking GMP ... GMP found
Checking gettext ... gettext found
Checking MongoDB ... MongoDB found
Checking Doxygen ... Doxygen found
Checking Graphviz ... Graphviz found
Checking LCOV ... LCOV found
Checking Python3 ... Python3 found
No required Home Brew dependencies to install.
Checking boost library installation.
Boost 1.66.0 found at /usr/local.
Checking MongoDB C++ driver installation.
Mongo C++ driver found at /usr/local/lib/libmongocxx-static.a.
Checking secp256k1-zkp installation.
secp256k1 found at /usr/local/lib/.
Checking LLVM with WASM support.
WASM found at /usr/local/wasm/bin/.
ALL dependencies sucessfully found or installed . Installing EOSIO
CMAKE_BUILD_TYPE=Release ENABLE_COVERAGE_TESTING=false DOXYGEN=false
-- The C compiler identification is Clang 4.0.1
-- The CXX compiler identification is Clang 4.0.1
-- Check for working C compiler: /usr/local/bin/clang
-- Check for working C compiler: /usr/local/bin/clang -- 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/local/bin/clang++
-- Check for working CXX compiler: /usr/local/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using custom FindBoost.cmake
-- Boost version: 1.66.0
-- Found the following Boost libraries:
-- thread
-- date_time
-- filesystem
-- system
-- program_options
-- signals
-- serialization
-- chrono
-- unit_test_framework
-- context
-- locale
-- iostreams
-- Configuring Eos on OS X
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- binaryen building with -std=c++11
-- binaryen building for platform x86-64
-- binaryen building with -Wall
-- binaryen building with -Werror
-- binaryen building with -Wextra
-- binaryen building with -Wno-unused-parameter
-- binaryen building with -fno-omit-frame-pointer
-- binaryen building with -fPIC
-- binaryen building with -O2
-- binaryen building with -UNDEBUG
-- Found WASM: /usr/local/wasm/bin/clang
-- Using WASM clang => /usr/local/wasm/bin/clang
-- Using WASM llc => /usr/local/wasm/bin/llc
-- Using WASM llvm-link => /usr/local/wasm/bin/llvm-link
-- Found Secp256k1: /usr/local/lib/libsecp256k1.a
-- Found GMP: /usr/local/lib/libgmp.a
-- Configuring fc to build on Unix/Apple
-- Found OpenSSL: /usr/local/opt/openssl/lib/libcrypto.a (found version "1.0.2o")
-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.11")
-- zlib found
-- Configuring Builtins
CMake Error at libraries/CMakeLists.txt:3 (add_subdirectory):
The source directory
/Users/johan/eos/libraries/softfloat
does not contain a CMakeLists.txt file.
-- Using custom FindBoost.cmake
-- Boost version: 1.66.0
-- Found the following Boost libraries:
-- thread
-- date_time
-- filesystem
-- system
-- chrono
-- unit_test_framework
-- locale
-- Configuring ChainBase on OS X
-- Using custom FindBoost.cmake
-- Boost version: 1.66.0
-- Found the following Boost libraries:
-- thread
-- date_time
-- filesystem
-- system
-- chrono
-- program_options
-- unit_test_framework
-- locale
-- Configuring AppBase on OS X
-- Found Git: /usr/bin/git (found version "2.14.3 (Apple Git-98)")
-- Git commit revision: 13952d45
-- Git commit revision: 13952d45
-- Found Intl: /opt/local/include
-- Git commit revision: 13952d45
-- Found Doxygen: /usr/local/bin/doxygen (found version "1.8.14") found components: doxygen dot
-- Configuring incomplete, errors occurred!
See also "/Users/johan/eos/build/CMakeFiles/CMakeOutput.log".
>>>>>>>>>>>>>>>>>>>> CMAKE building EOSIO has exited with the above error.
/Users/johan/eos/build/CMakeFiles/CMakeOutput.log ... Determining if the include file pthread.h exists passed with the following output: Change Dir: /Users/johan/eos/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_0944b/fast" /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_0944b.dir/build.make CMakeFiles/cmTC_0944b.dir/build Building C object CMakeFiles/cmTC_0944b.dir/CheckIncludeFile.c.o /usr/local/bin/clang -o CMakeFiles/cmTC_0944b.dir/CheckIncludeFile.c.o -c /Users/johan/eos/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c Linking C executable cmTC_0944b /usr/local/Cellar/cmake/3.11.1/bin/cmake -E cmake_link_script CMakeFiles/cmTC_0944b.dir/link.txt --verbose=1 /usr/local/bin/clang -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_0944b.dir/CheckIncludeFile.c.o -o cmTC_0944b
Determining if the pthread_create exist passed with the following output: Change Dir: /Users/johan/eos/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_b10e6/fast" /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_b10e6.dir/build.make CMakeFiles/cmTC_b10e6.dir/build Building C object CMakeFiles/cmTC_b10e6.dir/CheckSymbolExists.c.o /usr/local/bin/clang -o CMakeFiles/cmTC_b10e6.dir/CheckSymbolExists.c.o -c /Users/johan/eos/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c Linking C executable cmTC_b10e6 /usr/local/Cellar/cmake/3.11.1/bin/cmake -E cmake_link_script CMakeFiles/cmTC_b10e6.dir/link.txt --verbose=1 /usr/local/bin/clang -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_b10e6.dir/CheckSymbolExists.c.o -o cmTC_b10e6
File /Users/johan/eos/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: /* */ #include <pthread.h>
int main(int argc, char** argv) { (void)argv; #ifndef pthread_create return ((int*)(&pthread_create))[argc]; #else (void)argc; return 0; #endif }
@telnetor it looks like the command: git submodule update --init --recursive may not have updated your submodules correctly. Try it again and paste the output of the eosio_build.sh script here if you have any further issues. cd /path/to/eos rm -rf build/ git pull git submodule update --init --recursive ./eosio_build.sh
If you run into the same error run this command. find /usr -name pthread.h -print 2>/dev/null
The output should be similar to below: $ find /usr -name pthread.h -print 2>/dev/null /usr/include/pthread/pthread.h /usr/include/pthread.h
@pacificcode I think I have did it corretly with latest dawn4.1, without any error, but I get the same error when I build it.
cd ~/eos rm -rf build/ git pull git submodule update --init --recursive ./eosio_build.sh
$ find /usr -name pthread.h -print 2>/dev/null /usr/include/pthread/pthread.h /usr/include/pthread.h The same as you paste.
$ echo $PATH /opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/mysql/bin:/usr/local/go/bin:/usr/local/MacGPG2/bin
I paste it again. johandeiMac:eos johan$ ./eosio_build.sh
Beginning build version: 1.2
2018年 5月22日 星期二 10时12分19秒 UTC
User: johan
git head id: 4beb5bce606818a0b180e89064bc2bb4af40818e
Current branch: master
ARCHITECTURE: Darwin
OS name: Darwin
OS Version: 10.13
CPU speed: 359.20Ghz
CPU cores: 2
Physical Memory: 8 Gbytes
Disk install: /dev/disk2s1
Disk space total: 465G
Disk space available: 327G
Checking xcode-select installation
xcode-select installation found @
/usr/bin/xcode-select
Checking Ruby installation.
Ruby installation found @
/usr/bin/ruby
Checking Home Brew installation
Home Brew installation found @
/usr/local/bin/brew
Checking dependencies.
Checking automake ... automake found
Checking Libtool ... Libtool found
Checking OpenSSL ... OpenSSL found
Checking llvm ... llvm found
Checking wget ... wget found
Checking CMake ... CMake found
Checking GMP ... GMP found
Checking gettext ... gettext found
Checking MongoDB ... MongoDB found
Checking Doxygen ... Doxygen found
Checking Graphviz ... Graphviz found
Checking LCOV ... LCOV found
Checking Python3 ... Python3 found
No required Home Brew dependencies to install.
Checking boost library installation.
Boost 1.66.0 found at /usr/local.
Checking MongoDB C++ driver installation.
Mongo C++ driver found at /usr/local/lib/libmongocxx-static.a.
Checking secp256k1-zkp installation.
secp256k1 found at /usr/local/lib/.
Checking LLVM with WASM support.
WASM found at /usr/local/wasm/bin/.
ALL dependencies sucessfully found or installed . Installing EOSIO
CMAKE_BUILD_TYPE=Release ENABLE_COVERAGE_TESTING=false DOXYGEN=false
-- Using custom FindBoost.cmake -- Boost version: 1.66.0 -- Found the following Boost libraries: -- thread -- date_time -- filesystem -- system -- program_options -- signals -- serialization -- chrono -- unit_test_framework -- context -- locale -- iostreams -- Configuring Eos on OS X -- binaryen building with -std=c++11 -- binaryen building for platform x86-64 -- binaryen building with -Wall -- binaryen building with -Werror -- binaryen building with -Wextra -- binaryen building with -Wno-unused-parameter -- binaryen building with -fno-omit-frame-pointer -- binaryen building with -fPIC -- binaryen building with -O2 -- binaryen building with -UNDEBUG -- Using SYS as CORE symbol name -- Using WASM clang => /usr/local/wasm/bin/clang -- Using WASM llc => /usr/local/wasm/bin/llc -- Using WASM llvm-link => /usr/local/wasm/bin/llvm-link -- Found Secp256k1: /usr/local/lib/libsecp256k1.a -- Configuring fc to build on Unix/Apple -- zlib found -- Configuring Builtins CMake Error at libraries/CMakeLists.txt:3 (add_subdirectory): The source directory
/Users/johan/eos/libraries/softfloat
does not contain a CMakeLists.txt file.
-- Using custom FindBoost.cmake -- Boost version: 1.66.0 -- Found the following Boost libraries: -- thread -- date_time -- filesystem -- system -- chrono -- unit_test_framework -- locale -- Configuring ChainBase on OS X -- Using custom FindBoost.cmake -- Boost version: 1.66.0 -- Found the following Boost libraries: -- thread -- date_time -- filesystem -- system -- chrono -- program_options -- unit_test_framework -- locale -- Configuring AppBase on OS X -- Could NOT find Soci (missing: SOCI_INCLUDE_DIR SOCI_LIBRARY) -- Database SQL plugin: disabled -- Git commit revision: 4beb5bce -- Git commit revision: 4beb5bce -- Git commit revision: 4beb5bce -- Configuring incomplete, errors occurred! See also "/Users/johan/eos/build/CMakeFiles/CMakeOutput.log".
>>>>>>>>>>>>>>>>>>>> CMAKE building EOSIO has exited with the above error.
/Users/johan/eos/build/CMakeFiles/CMakeOutput.log: ... Determining if the include file pthread.h exists passed with the following output: Change Dir: /Users/johan/eos/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_84e04/fast" /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_84e04.dir/build.make CMakeFiles/cmTC_84e04.dir/build Building C object CMakeFiles/cmTC_84e04.dir/CheckIncludeFile.c.o /usr/local/bin/clang -o CMakeFiles/cmTC_84e04.dir/CheckIncludeFile.c.o -c /Users/johan/eos/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c Linking C executable cmTC_84e04 /usr/local/Cellar/cmake/3.11.1/bin/cmake -E cmake_link_script CMakeFiles/cmTC_84e04.dir/link.txt --verbose=1 /usr/local/bin/clang -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_84e04.dir/CheckIncludeFile.c.o -o cmTC_84e04
Determining if the pthread_create exist passed with the following output: Change Dir: /Users/johan/eos/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_7c20c/fast" /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_7c20c.dir/build.make CMakeFiles/cmTC_7c20c.dir/build Building C object CMakeFiles/cmTC_7c20c.dir/CheckSymbolExists.c.o /usr/local/bin/clang -o CMakeFiles/cmTC_7c20c.dir/CheckSymbolExists.c.o -c /Users/johan/eos/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c Linking C executable cmTC_7c20c /usr/local/Cellar/cmake/3.11.1/bin/cmake -E cmake_link_script CMakeFiles/cmTC_7c20c.dir/link.txt --verbose=1 /usr/local/bin/clang -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_7c20c.dir/CheckSymbolExists.c.o -o cmTC_7c20c
File /Users/johan/eos/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: /* */ #include <pthread.h>
int main(int argc, char** argv) { (void)argv; #ifndef pthread_create return ((int*)(&pthread_create))[argc]; #else (void)argc; return 0; #endif }
@telnetor I would recommend removing your current clone of the EOSIO repo and then do a clean clone and build.
rm -rf /path/to/eos cd "$HOME" git clone https://github.com/EOSIO/eos.git --recursive git submodule update --init --recursive ./eosio_build.sh
OK, I reclone, It works! Thinks