eos icon indicating copy to clipboard operation
eos copied to clipboard

Build not working on macOS High Sierra 10.13.4

Open dreson4 opened this issue 8 years ago • 4 comments

I'm trying to build EOS from source, can't get it to work. This is the command I ran

git clone https://github.com/EOSIO/eos.git --recursive cd eos git submodule update --init --recursive ./eosio_build.sh

Beginning build version: 1.2
	Tue Jun  5 15:53:29 UTC 2018
	User: baraka
	git head id: f54d6bb66d74b6fa47b4562b6730cae32dcce568
	Current branch: master

	ARCHITECTURE: Darwin

	OS name: Darwin
	OS Version: 10.13.4
	CPU speed: 3.10Ghz
	CPU cores: 2
	Physical Memory: 8 Gbytes
	Disk install: /dev/disk1s1
	Disk space total: 465G
	Disk space available: 219G

	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.67.0 found at /usr/local.
	Checking MongoDB C++ driver installation.
 Total    Received Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   616    0   616    0     0    677       677
100 7535k  100 7535k    0     0   237k      0  0:00:31  0:00: 347k
configure: Current version (from VERSION_CURRENT file): 1.9.3

checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking accept ARG2 => struct sockaddr ARG3 => socklen_t ... ok
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for typeof syntax and keyword spelling... typeof
checking for perl... /usr/bin/perl
checking for mv... /bin/mv
checking for grep... /usr/bin/grep
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for strings.h... (cached) yes
checking for unistd.h... (cached) yes
checking for stdarg.h... yes
checking for sphinx-build... no
checking for a BSD-compatible install... /usr/bin/install -c
checking build system type... x86_64-apple-darwin17.5.0
checking host system type... x86_64-apple-darwin17.5.0
checking target system type... x86_64-apple-darwin17.5.0
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking how to convert x86_64-apple-darwin17.5.0 file names to x86_64-apple-darwin17.5.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin17.5.0 file names to toolchain format... func_convert_file_noop
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin17.5.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fno-common -DPIC
checking if g++ PIC flag -fno-common -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin17.5.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether to do a debug build... no
checking whether to enable tracing... no
checking whether to automatic init and cleanup... no
checking whether to enable optimized builds... yes
checking whether to enable shared memory performance counters... yes
checking whether to enable code coverage support... no
checking whether to enable debug symbols... no
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for SASL... no
checking for sasl_client_init in -lsasl2... yes
checking for sasl_client_init in -lsasl... no
checking sasl/sasl.h usability... yes
checking sasl/sasl.h presence... yes
checking for sasl/sasl.h... yes
checking for sasl/sasl.h... (cached) yes
checking for sasl_client_done in -lsasl2... yes
checking for SNAPPY... no
checking for snappy_uncompress in -lsnappy... no
checking for ZLIB... yes
checking whether to enable crypto and TLS... darwin
checking whether to use system crypto profile... no
checking which TLS library to use... darwin
checking for shm_open... yes
checking for sched_getcpu... no
checking for socklen_t... yes
checking if compiler needs -Werror to reject unknown flags... yes
checking whether pthreads work with -pthread... no
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... no
checking whether pthreads work with -pthreads... no
checking whether pthreads work with -mthreads... no
checking for the pthreads library -lpthread... no
checking whether pthreads work with --thread-safe... no
checking whether pthreads work with -mt... no
checking for pthread-config... no
checking for res_nsearch... no
checking for res_search... no
checking whether C compiler accepts -Wno-deprecated-declarations... yes
checking whether C compiler accepts -Wno-cast-align... yes
checking whether C compiler accepts -Wno-unneeded-internal-declaration... yes
checking whether C compiler accepts -Wno-error=unused-command-line-argument... yes
checking whether the linker accepts -Wl,-Bsymbolic... no
checking if weak symbols are supported... yes
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... build/autotools/install-sh -c -d
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking whether make supports nested variables... yes
checking whether UID '501' is supported by ustar format... yes
checking whether GID '20' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking dependency style of gcc... gcc3
checking dependency style of g++... gcc3
checking whether make supports nested variables... (cached) yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/libmongoc-1.0.pc
config.status: creating src/libmongoc-static-1.0.pc
config.status: creating src/libmongoc-ssl-1.0.pc
config.status: creating build/cmake/libmongoc-1.0-config-version.cmake
config.status: creating build/cmake/libmongoc-static-1.0-config.cmake
config.status: creating build/cmake/libmongoc-1.0-config.cmake
config.status: creating build/cmake/libmongoc-static-1.0-config-version.cmake
config.status: creating src/mongoc/mongoc-config.h
config.status: creating src/mongoc/mongoc-version.h
config.status: creating src/zlib-1.2.11/zconf.h
config.status: executing libtool commands
config.status: executing depfiles commands
=== configuring in src/libbson (/tmp/mongo-c-driver-1.9.3/src/libbson)
configure: running /bin/sh ./configure --disable-option-checking '--prefix=/usr/local'  '--enable-static' '--with-libbson=bundled' '--enable-ssl=darwin' '--disable-automatic-init-and-cleanup' --cache-file=/dev/null --srcdir=.
configure: Current version (from VERSION_CURRENT file): 1.9.3
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for typeof syntax and keyword spelling... typeof
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for stdint-types....... "(putting them into src/bson/bson-stdint.h)"
checking for uintptr_t... yes
checking for uint64_t... yes
... seen our uintptr_t in stdint.h (uint64_t too)
creating src/bson/bson-stdint.h : _SRC_BSON_BSON_STDINT_H
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
checking for int_least32_t... yes
checking for int_fast32_t... yes
..adding include stdint.h
... seen good stdint.h inttypes
... seen good uint64_t
... DONE src/bson/bson-stdint.h
checking for strings.h... (cached) yes
checking for perl... /usr/bin/perl
checking for mv... /bin/mv
checking for grep... (cached) /usr/bin/grep
checking for sphinx-build... no
checking for a BSD-compatible install... /usr/bin/install -c
checking build system type... x86_64-apple-darwin17.5.0
checking host system type... x86_64-apple-darwin17.5.0
checking target system type... x86_64-apple-darwin17.5.0
checking whether byte ordering is bigendian... no
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking how to convert x86_64-apple-darwin17.5.0 file names to x86_64-apple-darwin17.5.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin17.5.0 file names to toolchain format... func_convert_file_noop
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin17.5.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fno-common -DPIC
checking if g++ PIC flag -fno-common -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin17.5.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether to do a debug build... no
checking whether to enable optimized builds... yes
checking whether to enable extra alignment of types... yes
checking whether to enable code coverage support... no
checking whether to enable debug symbols... no
checking for strnlen... yes
checking for reallocf... yes
checking for syscall... yes
checking for snprintf... yes
checking for struct timespec... no
checking for library containing clock_gettime... none required
checking for library containing floor... none required
checking for gmtime_r... yes
checking for rand_r... yes
checking if compiler needs -Werror to reject unknown flags... yes
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... no
checking whether pthreads work with -pthreads... no
checking whether pthreads work with -mthreads... no
checking for the pthreads library -lpthread... no
checking whether pthreads work with --thread-safe... no
checking whether pthreads work with -mt... no
checking for pthread-config... no
configure: error: libbson requires pthreads on non-Windows platforms.
configure: error: ./configure failed for src/libbson
	Configuring MongoDB C driver has encountered the errors above.
	Exiting now.

Any help would be appreciated, I have googled about pthreads everywhere for hours with no luck. Tried installing mongodb c drivers manually still same error, I guess it has something to do with it.

dreson4 avatar Jun 05 '18 15:06 dreson4

@dreson4 pthread is required to install the mongodb drivers and should be installed with Mac OS. Can you run the following commands and paste the output here?

find /usr -name pthread.h -print 2>/dev/null which gcc gcc --version xcode-select --install

(You may need to install/re-install the latest version of Xcode and install/upgrade the command line tools.)

pacificcode avatar Jun 05 '18 17:06 pacificcode

@pacificcode

I'm getting this output

$ find /usr -name pthread.h -print 2>/dev/null
/usr/include/pthread/pthread.h
/usr/include/pthread.h

$which gcc
/usr/bin/gcc

$gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.1.0 (clang-902.0.39.2)
Target: x86_64-apple-darwin17.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

$xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

I just updated xcode plus the command line tools, still getting the same error.

dreson4 avatar Jun 05 '18 17:06 dreson4

@dreson4 Everything looks good (from your pasted in command output). You may need to run disk first aid: https://support.apple.com/guide/disk-utility/repair-a-disk-dskutl1040/mac

And clear your parameter ram: https://support.apple.com/en-us/HT204063

pacificcode avatar Jun 07 '18 21:06 pacificcode

Thanks for your help. I tried all that, couldn't get it to work. Its fine though, I'm now using the docker container without issues.

dreson4 avatar Jun 14 '18 02:06 dreson4