Architecture not supported error when installing OpenSSL on OS X - ios
rbenv-2.6.5 is attempting to install openssl-1.1.1d and that's where the architecture error comes, I have no direct access to the Makefile:
$ rbenv install 2.6.5
Downloading openssl-1.1.1d.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/1e3a91bc1f9dfce01af26026f856e064eab4c8ee0a8f457b5ae30b40b8b711f2
Installing openssl-1.1.1d...
BUILD FAILED (OS X 10.15.1 using ruby-build 20191124)
Inspect or clean up the working tree at /var/folders/8s/8mw7vg315l7dr9vyfxmv9vk80000gn/T/ruby-build.20191126132843.6027.Z0Hvfg
Results logged to /var/folders/8s/8mw7vg315l7dr9vyfxmv9vk80000gn/T/ruby-build.20191126132843.6027.log
Last 10 log lines:
In file included from include/openssl/e_os2.h:243:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/include/inttypes.h:30:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/inttypes.h:227:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/sys/_types/_wchar_t.h:34:9: error: unknown type name '__darwin_wchar_t'
typedef __darwin_wchar_t wchar_t;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[1]: *** [apps/app_rand.o] Error 1
make: *** [all] Error 2
Complete log:
$ cat /var/folders/8s/8mw7vg315l7dr9vyfxmv9vk80000gn/T/ruby-build.20191126132843.6027.log
/var/folders/8s/8mw7vg315l7dr9vyfxmv9vk80000gn/T/ruby-build.20191126132843.6027.Z0Hvfg ~/Developer/ReactNativeApp/ios
HTTP/1.1 200 OK
Content-Type: binary/octet-stream
Content-Length: 8845861
Connection: keep-alive
Date: Tue, 26 Nov 2019 09:50:32 GMT
Last-Modified: Tue, 01 Oct 2019 21:38:26 GMT
ETag: "3be209000dbc7e1b95bcdf47980a3baa"
Accept-Ranges: bytes
Server: AmazonS3
X-Cache: Hit from cloudfront
Via: 1.1 e56e6732f380db727425bac2d6158761.cloudfront.net (CloudFront)
X-Amz-Cf-Pop: FRA2-C2
X-Amz-Cf-Id: Hw-jhD36n4Jk8CezqbAuFTzudNo4qopXkdH3CaxRXUHbadZgf9Z6xA==
Age: 9492
/var/folders/8s/8mw7vg315l7dr9vyfxmv9vk80000gn/T/ruby-build.20191126132843.6027.Z0Hvfg/openssl-1.1.1d /var/folders/8s/8mw7vg315l7dr9vyfxmv9vk80000gn/T/ruby-build.20191126132843.6027.Z0Hvfg ~/Developer/ReactNativeApp/ios
Operating system: x86_64-apple-darwinDarwin Kernel Version 19.0.0: Thu Oct 17 16:17:15 PDT 2019; root:xnu-6153.41.3~29/RELEASE_X86_64
Configuring OpenSSL version 1.1.1d (0x1010104fL) for darwin64-x86_64-cc
Using os-specific seed configuration
Creating configdata.pm
Creating Makefile
**********************************************************************
*** ***
*** OpenSSL has been successfully configured ***
*** ***
*** If you encounter a problem while building, please open an ***
*** issue on GitHub <https://github.com/openssl/openssl/issues> ***
*** and include the output from the following command: ***
*** ***
*** perl configdata.pm --dump ***
*** ***
*** (If you are new to OpenSSL, you might want to consult the ***
*** 'Troubleshooting' section in the INSTALL file first) ***
*** ***
**********************************************************************
WARNING! If you wish to build 32-bit libraries, then you have to
invoke 'KERNEL_BITS=32 ./config '--prefix=/Users/User/.rbenv/versions/2.6.5/openssl' '--openssldir=/Users/User/.rbenv/versions/2.6.5/openssl/ssl' 'zlib-dynamic' 'no-ssl3' 'shared''.
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" \
"-oMakefile" crypto/include/internal/bn_conf.h.in > crypto/include/internal/bn_conf.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" \
"-oMakefile" crypto/include/internal/dso_conf.h.in > crypto/include/internal/dso_conf.h
/usr/bin/perl "-I." -Mconfigdata "util/dofile.pl" \
"-oMakefile" include/openssl/opensslconf.h.in > include/openssl/opensslconf.h
make depend && make _all
clang -I. -Iinclude -fPIC -arch x86_64 -O3 -Wall -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/Users/User/.rbenv/versions/2.6.5/openssl/ssl\"" -DENGINESDIR="\"/Users/User/.rbenv/versions/2.6.5/openssl/lib/engines-1.1\"" -D_REENTRANT -DZLIB -DZLIB_SHARED -DNDEBUG -I/Users/User/.rbenv/versions/2.6.5/include -MMD -MF apps/app_rand.d.tmp -MT apps/app_rand.o -c -o apps/app_rand.o apps/app_rand.c
In file included from apps/app_rand.c:10:
In file included from apps/apps.h:13:
In file included from ./e_os.h:13:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/include/limits.h:37:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/limits.h:63:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/sys/cdefs.h:807:2: error: Unsupported architecture
#error Unsupported architecture
^
In file included from apps/app_rand.c:10:
In file included from apps/apps.h:13:
In file included from ./e_os.h:13:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/include/limits.h:37:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/limits.h:64:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/machine/limits.h:8:2: error: architecture not supported
#error architecture not supported
^
In file included from apps/app_rand.c:10:
In file included from apps/apps.h:13:
In file included from ./e_os.h:16:
In file included from include/openssl/e_os2.h:243:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/include/inttypes.h:30:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/inttypes.h:226:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/_types.h:27:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/sys/_types.h:33:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported
#error architecture not supported
^
In file included from apps/app_rand.c:10:
In file included from apps/apps.h:13:
In file included from ./e_os.h:16:
In file included from include/openssl/e_os2.h:243:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/include/inttypes.h:30:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/inttypes.h:226:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/_types.h:27:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'; did you mean '__int128_t'?
typedef __int64_t __darwin_blkcnt_t; /* total blocks */
^
note: '__int128_t' declared here
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
typedef __int32_t __darwin_blksize_t; /* preferred block size */
^
note: '__int128_t' declared here
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
typedef __int32_t __darwin_dev_t; /* dev_t */
^
note: '__int128_t' declared here
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_gid_t; /* [???] process and group IDs */
^
note: '__uint128_t' declared here
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, or gid_t*/
^
note: '__uint128_t' declared here
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'; did you mean '__uint128_t'?
typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */
^
note: '__uint128_t' declared here
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'
typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'; did you mean '__uint128_t'?
typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes */
^
note: '__uint128_t' declared here
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'; did you mean '__int128_t'?
typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */
^
note: '__int128_t' declared here
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
typedef __int32_t __darwin_pid_t; /* [???] process and group IDs */
^
note: '__int128_t' declared here
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_sigset_t; /* [???] signal set */
^
note: '__uint128_t' declared here
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */
^
note: '__int128_t' declared here
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_uid_t; /* [???] user IDs */
^
note: '__uint128_t' declared here
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */
^
note: '__uint128_t' declared here
In file included from apps/app_rand.c:10:
In file included from apps/apps.h:13:
In file included from ./e_os.h:16:
In file included from include/openssl/e_os2.h:243:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/include/inttypes.h:30:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/inttypes.h:226:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/_types.h:43:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t __darwin_wctype_t;
^
note: '__uint128_t' declared here
In file included from apps/app_rand.c:10:
In file included from apps/apps.h:13:
In file included from ./e_os.h:16:
In file included from include/openssl/e_os2.h:243:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/include/inttypes.h:30:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/inttypes.h:227:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk/usr/include/sys/_types/_wchar_t.h:34:9: error: unknown type name '__darwin_wchar_t'
typedef __darwin_wchar_t wchar_t;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[1]: *** [apps/app_rand.o] Error 1
make: *** [all] Error 2
There were two errors in total, the final solution was:
Made sure I have the right version of gcc installed
Install xcode-select to fix the compiler error by selecting the right environment:
xcode-select --install
sudo xcode-select -switch /Applications/Xcode.app
Restarted Mac (important)
Installed the rbenv:
rbenv install 2.6.5
Related
Can't build charlock_holmes native gem
Trying to install and build native gem charlock_holmes version 0.7,3 with bundle install and getting an error. I believe I have all the dependencies but cannot figure out the error messages. Any help is appreciated. I'm using Archlinux, ruby 3.0.0p0 and rubygems 3.2.3. Stackoverflow is forcing me to add more stuff since it says "your post is mostly code", but there isn't much more to say about it... ¯_(ツ)_/¯ current directory: /home/kemel/.rvm/gems/ruby-3.0.0/gems/charlock_holmes-0.7.3/ext/charlock_holmes /home/kemel/.rvm/rubies/ruby-3.0.0/bin/ruby -I /home/kemel/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0 -r ./siteconf20221027-431256-wyip6m.rb extconf.rb checking for -licui18n... yes checking for -licui18n... yes checking for unicode/ucnv.h... yes checking for -lz... yes checking for -licuuc... yes checking for -licudata... yes creating Makefile current directory: /home/kemel/.rvm/gems/ruby-3.0.0/gems/charlock_holmes-0.7.3/ext/charlock_holmes make "DESTDIR=" clean current directory: /home/kemel/.rvm/gems/ruby-3.0.0/gems/charlock_holmes-0.7.3/ext/charlock_holmes make "DESTDIR=" compiling converter.c In file included from converter.c:2: common.h:32:14: warning: ‘charlock_new_str2’ defined but not used [-Wunused-function] 32 | static VALUE charlock_new_str2(const char *str) | ^~~~~~~~~~~~~~~~~ common.h:23:14: warning: ‘charlock_new_str’ defined but not used [-Wunused-function] 23 | static VALUE charlock_new_str(const char *str, size_t len) | ^~~~~~~~~~~~~~~~ cc1: note: unrecognized command-line option ‘-Wno-self-assign’ may have been intended to silence earlier diagnostics cc1: note: unrecognized command-line option ‘-Wno-parentheses-equality’ may have been intended to silence earlier diagnostics cc1: note: unrecognized command-line option ‘-Wno-constant-logical-operand’ may have been intended to silence earlier diagnostics compiling encoding_detector.c In file included from encoding_detector.c:2: common.h:14:14: warning: ‘charlock_new_enc_str’ defined but not used [-Wunused-function] 14 | static VALUE charlock_new_enc_str(const char *str, size_t len, void *encoding) | ^~~~~~~~~~~~~~~~~~~~ cc1: note: unrecognized command-line option ‘-Wno-self-assign’ may have been intended to silence earlier diagnostics cc1: note: unrecognized command-line option ‘-Wno-parentheses-equality’ may have been intended to silence earlier diagnostics cc1: note: unrecognized command-line option ‘-Wno-constant-logical-operand’ may have been intended to silence earlier diagnostics compiling ext.c In file included from ext.c:1: common.h:32:14: warning: ‘charlock_new_str2’ defined but not used [-Wunused-function] 32 | static VALUE charlock_new_str2(const char *str) | ^~~~~~~~~~~~~~~~~ common.h:23:14: warning: ‘charlock_new_str’ defined but not used [-Wunused-function] 23 | static VALUE charlock_new_str(const char *str, size_t len) | ^~~~~~~~~~~~~~~~ common.h:14:14: warning: ‘charlock_new_enc_str’ defined but not used [-Wunused-function] 14 | static VALUE charlock_new_enc_str(const char *str, size_t len, void *encoding) | ^~~~~~~~~~~~~~~~~~~~ cc1: note: unrecognized command-line option ‘-Wno-self-assign’ may have been intended to silence earlier diagnostics cc1: note: unrecognized command-line option ‘-Wno-parentheses-equality’ may have been intended to silence earlier diagnostics cc1: note: unrecognized command-line option ‘-Wno-constant-logical-operand’ may have been intended to silence earlier diagnostics compiling transliterator.cpp transliterator.cpp: In function ‘VALUE rb_transliterator_id_list(VALUE)’: transliterator.cpp:39:3: error: ‘StringEnumeration’ was not declared in this scope; did you mean ‘icu_71::StringEnumeration’? 39 | StringEnumeration *id_list; | ^~~~~~~~~~~~~~~~~ | icu_71::StringEnumeration In file included from /usr/include/unicode/translit.h:30, from transliterator.cpp:5: /usr/include/unicode/strenum.h:61:20: note: ‘icu_71::StringEnumeration’ declared here 61 | class U_COMMON_API StringEnumeration : public UObject { | ^~~~~~~~~~~~~~~~~ transliterator.cpp:39:22: error: ‘id_list’ was not declared in this scope; did you mean ‘va_list’? 39 | StringEnumeration *id_list; | ^~~~~~~ | va_list transliterator.cpp:47:13: error: ‘Transliterator’ has not been declared 47 | id_list = Transliterator::getAvailableIDs(status); | ^~~~~~~~~~~~~~ transliterator.cpp:73:10: error: type ‘<type error>’ argument given to ‘delete’, expected pointer 73 | delete id_list; | ^~~~~~~ transliterator.cpp: In function ‘VALUE rb_transliterator_transliterate(VALUE, VALUE, VALUE)’: transliterator.cpp:81:3: error: ‘Transliterator’ was not declared in this scope; did you mean ‘icu_71::Transliterator’? 81 | Transliterator *trans; | ^~~~~~~~~~~~~~ | icu_71::Transliterator /usr/include/unicode/translit.h:490:18: note: ‘icu_71::Transliterator’ declared here 490 | class U_I18N_API Transliterator : public UObject { | ^~~~~~~~~~~~~~ transliterator.cpp:81:19: error: ‘trans’ was not declared in this scope 81 | Transliterator *trans; | ^~~~~ transliterator.cpp:86:3: error: ‘UnicodeString’ was not declared in this scope; did you mean ‘icu_71::UnicodeString’? 86 | UnicodeString *u_txt; | ^~~~~~~~~~~~~ | icu_71::UnicodeString In file included from /usr/include/unicode/translit.h:27: /usr/include/unicode/unistr.h:295:20: note: ‘icu_71::UnicodeString’ declared here 295 | class U_COMMON_API UnicodeString : public Replaceable | ^~~~~~~~~~~~~ transliterator.cpp:86:18: error: ‘u_txt’ was not declared in this scope; did you mean ‘txt’? 86 | UnicodeString *u_txt; | ^~~~~ | txt transliterator.cpp:101:11: error: ‘Transliterator’ is not a class, namespace, or enumeration 101 | trans = Transliterator::createInstance(UnicodeString(id, id_len), UTRANS_FORWARD, p_error, status); | ^~~~~~~~~~~~~~ transliterator.cpp:106:15: error: expected type-specifier before ‘UnicodeString’ 106 | u_txt = new UnicodeString(txt, txt_len); | ^~~~~~~~~~~~~ transliterator.cpp:108:3: error: ‘StringByteSink’ was not declared in this scope; did you mean ‘icu_71::StringByteSink’? 108 | StringByteSink<std::string> sink(&result); | ^~~~~~~~~~~~~~ | icu_71::StringByteSink In file included from /usr/include/unicode/unistr.h:40: /usr/include/unicode/bytestream.h:267:7: note: ‘icu_71::StringByteSink’ declared here 267 | class StringByteSink : public ByteSink { | ^~~~~~~~~~~~~~ transliterator.cpp:108:29: error: expected primary-expression before ‘>’ token 108 | StringByteSink<std::string> sink(&result); | ^ transliterator.cpp:108:31: error: ‘sink’ was not declared in this scope; did you mean ‘sinl’? 108 | StringByteSink<std::string> sink(&result); | ^~~~ | sinl transliterator.cpp:111:10: error: type ‘<type error>’ argument given to ‘delete’, expected pointer 111 | delete u_txt; | ^~~~~ transliterator.cpp:112:10: error: type ‘<type error>’ argument given to ‘delete’, expected pointer 112 | delete trans; | ^~~~~ make: *** [Makefile:237: transliterator.o] Erro 1 make failed, exit code 2
Mac GridLabD installation error at % make -j8
I am trying to build GridLabD on my mac, but get a range or warnings and errors at the step "% make -j8". It is a long log, but below is how it starts (couldn't find gridlabd tag). I followed steps in Is it possible to run GridLab-D on macOS Catalina?, but got the same error at the "make" command. I appreciate any help. % make -j8 /bin/bash -c "source utilities/build_number . gldcore/build.h" Updating gldcore/build.h: revision 19053 (d7f83006:develop:Mod) /Users/hei06j/Documents/repositories/remote/gridlab-d /Applications/Xcode.app/Contents/Developer/usr/bin/make all-am CXX gldcore/gridlabd-convert.o CC gldcore/gridlabd-instance_slave.o CC gldcore/gridlabd-interpolate.o CXX gldcore/gridlabd-job.o CC gldcore/gridlabd-kml.o CC gldcore/gridlabd-legal.o CC gldcore/gridlabd-linkage.o CXX gldcore/gridlabd-link.o CC gldcore/gridlabd-load.o CC gldcore/gridlabd-loadshape.o CXX gldcore/gridlabd-load_xml.o CXX gldcore/gridlabd-load_xml_handle.o CC gldcore/gridlabd-local.o CXX gldcore/gridlabd-lock.o CC gldcore/gridlabd-main.o CC gldcore/gridlabd-match.o CC gldcore/gridlabd-matlab.o CC gldcore/gridlabd-module.o CC gldcore/gridlabd-object.o CC gldcore/gridlabd-output.o CC gldcore/gridlabd-property.o CC gldcore/gridlabd-random.o CC gldcore/gridlabd-realtime.o CXX gldcore/gridlabd-sanitize.o CC gldcore/gridlabd-save.o CC gldcore/gridlabd-schedule.o CC gldcore/gridlabd-server.o CXX gldcore/gridlabd-setup.o In file included from gldcore/load_xml.cpp:15: In file included from ./gldcore/platform.h:57: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/math.h:309: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:420: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:37: ./version:1:3: error: invalid preprocessing directive # $Id: VERSION 858 2008-08-28 21:06:13Z d3g637 $ ^ ./version:2:1: error: C++ requires a type specifier for all declarations MAJOR=3 ^ ./version:2:8: error: expected ';' after top level declarator MAJOR=3 ^ In file included from gldcore/convert.cpp:15: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/math.h:309: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:420: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:37: ./version:1:3: error: invalid preprocessing directive # $Id: VERSION 858 2008-08-28 21:06:13Z d3g637 $ ^ ./version:2:1: error: C++ requires a type specifier for all declarations MAJOR=3 ^ In file included from gldcore/load_xml_handle.cpp:18: In file included from ./gldcore/platform.h:57: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/math.h:309: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:420: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:37: ./version:./version1::32:: 8: error: error: invalid preprocessing directive expected ';' after top level declarator MAJOR=3 ^ # $Id: VERSION 858 2008-08-28 21:06:13Z d3g637 $ ^ ./version:2:1: error: C++ requires a type specifier for all declarations MAJOR=3 ^ ./version:2:8: error: expected ';' after top level declarator MAJOR=3 ^ In file included from gldcore/setup.cpp:4: In file included from ./gldcore/gridlabd.h:91: In file included from ./gldcore/platform.h:57: In file included from ...
Error installing rails: ERROR: Failed to build gem native extension. Ubuntu 20.04
When I ran this command: gem install rails I got this output: ERROR: Error installing rails: ERROR: Failed to build gem native extension. current directory: /home/hizmarck/.rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.9/ext/nokogiri /usr/share/rvm/rubies/ruby-2.7.1/bin/ruby -I /usr/share/rvm/rubies/ruby-2.7.1/lib/ruby/site_ruby/2.7.0 -r ./siteconf20200602-62149-hwdwns.rb extconf.rb checking if the C compiler accepts ... yes Building nokogiri using packaged libraries. Using mini_portile version 2.4.0 checking for gzdopen() in -lz... yes checking for iconv... yes ************************************************************************ IMPORTANT NOTICE: Building Nokogiri with a packaged version of libxml2-2.9.10 with the following patches applied: - 0001-Revert-Do-not-URI-escape-in-server-side-includes.patch - 0002-Remove-script-macro-support.patch - 0003-Update-entities-to-remove-handling-of-ssi.patch - 0004-libxml2.la-is-in-top_builddir.patch - 0005-Fix-infinite-loop-in-xmlStringLenDecodeEntities.patch Team Nokogiri will keep on doing their best to provide security updates in a timely manner, but if this is a concern for you and want to use the system library instead; abort this installation process and reinstall nokogiri as follows: gem install nokogiri -- --use-system-libraries [--with-xml2-config=/path/to/xml2-config] [--with-xslt-config=/path/to/xslt-config] If you are using Bundler, tell it to use the option: bundle config build.nokogiri --use-system-libraries bundle install Note, however, that nokogiri is not fully compatible with arbitrary versions of libxml2 provided by OS/package vendors. ************************************************************************ Extracting libxml2-2.9.10.tar.gz into tmp/x86_64-pc-linux-gnu/ports/libxml2/2.9.10... OK Running git apply with /home/hizmarck/.rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.9/patches/libxml2/0001-Revert-Do-not-URI-escape-in-server-side-includes.patch... OK Running git apply with /home/hizmarck/.rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.9/patches/libxml2/0002-Remove-script-macro-support.patch... OK Running git apply with /home/hizmarck/.rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.9/patches/libxml2/0003-Update-entities-to-remove-handling-of-ssi.patch... OK Running git apply with /home/hizmarck/.rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.9/patches/libxml2/0004-libxml2.la-is-in-top_builddir.patch... OK Running git apply with /home/hizmarck/.rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.9/patches/libxml2/0005-Fix-infinite-loop-in-xmlStringLenDecodeEntities.patch... OK Running 'configure' for libxml2 2.9.10... OK Running 'compile' for libxml2 2.9.10... OK Running 'install' for libxml2 2.9.10... OK Activating libxml2 2.9.10 (from /home/hizmarck/.rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.9/ports/x86_64-pc-linux-gnu/libxml2/2.9.10)... ************************************************************************ IMPORTANT NOTICE: Building Nokogiri with a packaged version of libxslt-1.1.34. Team Nokogiri will keep on doing their best to provide security updates in a timely manner, but if this is a concern for you and want to use the system library instead; abort this installation process and reinstall nokogiri as follows: gem install nokogiri -- --use-system-libraries [--with-xml2-config=/path/to/xml2-config] [--with-xslt-config=/path/to/xslt-config] If you are using Bundler, tell it to use the option: bundle config build.nokogiri --use-system-libraries bundle install ************************************************************************ Extracting libxslt-1.1.34.tar.gz into tmp/x86_64-pc-linux-gnu/ports/libxslt/1.1.34... OK Running 'configure' for libxslt 1.1.34... OK Running 'compile' for libxslt 1.1.34... OK Running 'install' for libxslt 1.1.34... OK Activating libxslt 1.1.34 (from /home/hizmarck/.rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.9/ports/x86_64-pc-linux-gnu/libxslt/1.1.34)... checking for -llzma... yes checking for xmlParseDoc() in libxml/parser.h... yes checking for xsltParseStylesheetDoc() in libxslt/xslt.h... yes checking for exsltFuncRegister() in libexslt/exslt.h... yes checking for xmlHasFeature()... yes checking for xmlFirstElementChild()... yes checking for xmlRelaxNGSetParserStructuredErrors()... yes checking for xmlRelaxNGSetParserStructuredErrors()... yes checking for xmlRelaxNGSetValidStructuredErrors()... yes checking for xmlSchemaSetValidStructuredErrors()... yes checking for xmlSchemaSetParserStructuredErrors()... yes creating Makefile current directory: /home/hizmarck/.rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.9/ext/nokogiri make "DESTDIR=" clean current directory: /home/hizmarck/.rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.9/ext/nokogiri make "DESTDIR=" compiling html_document.c In file included from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33, from ./nokogiri.h:33, from ./html_document.h:4, from html_document.c:1: html_document.c: In function ‘new’: /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2508:48: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] 2508 | (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc) | ^ /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2340:9: note: in expansion of macro ‘rb_scan_args0’ 2340 | rb_scan_args0(argc,argvp,fmt,\ | ^~~~~~~~~~~~~ html_document.c:16:3: note: in expansion of macro ‘rb_scan_args’ 16 | rb_scan_args(argc, argv, "0*", &rest); | ^~~~~~~~~~~~ html_document.c: At top level: cc1: warning: unrecognized command line option ‘-Wno-self-assign’ cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’ cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’ compiling html_element_description.c compiling html_entity_lookup.c compiling html_sax_parser_context.c compiling html_sax_push_parser.c compiling nokogiri.c compiling xml_attr.c In file included from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33, from ./nokogiri.h:33, from ./xml_attr.h:4, from xml_attr.c:1: xml_attr.c: In function ‘new’: /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2508:48: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] 2508 | (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc) | ^ /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2340:9: note: in expansion of macro ‘rb_scan_args0’ 2340 | rb_scan_args0(argc,argvp,fmt,\ | ^~~~~~~~~~~~~ xml_attr.c:61:3: note: in expansion of macro ‘rb_scan_args’ 61 | rb_scan_args(argc, argv, "2*", &document, &name, &rest); | ^~~~~~~~~~~~ xml_attr.c: At top level: cc1: warning: unrecognized command line option ‘-Wno-self-assign’ cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’ cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’ compiling xml_attribute_decl.c compiling xml_cdata.c In file included from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33, from ./nokogiri.h:33, from ./xml_cdata.h:4, from xml_cdata.c:1: xml_cdata.c: In function ‘new’: /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2508:48: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] 2508 | (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc) | ^ /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2340:9: note: in expansion of macro ‘rb_scan_args0’ 2340 | rb_scan_args0(argc,argvp,fmt,\ | ^~~~~~~~~~~~~ xml_cdata.c:23:3: note: in expansion of macro ‘rb_scan_args’ 23 | rb_scan_args(argc, argv, "2*", &doc, &content, &rest); | ^~~~~~~~~~~~ xml_cdata.c: At top level: cc1: warning: unrecognized command line option ‘-Wno-self-assign’ cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’ cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’ compiling xml_comment.c In file included from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33, from ./nokogiri.h:33, from ./xml_comment.h:4, from xml_comment.c:1: xml_comment.c: In function ‘new’: /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2508:48: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] 2508 | (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc) | ^ /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2340:9: note: in expansion of macro ‘rb_scan_args0’ 2340 | rb_scan_args0(argc,argvp,fmt,\ | ^~~~~~~~~~~~~ xml_comment.c:21:3: note: in expansion of macro ‘rb_scan_args’ 21 | rb_scan_args(argc, argv, "2*", &document, &content, &rest); | ^~~~~~~~~~~~ xml_comment.c: At top level: cc1: warning: unrecognized command line option ‘-Wno-self-assign’ cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’ cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’ compiling xml_document.c xml_document.c: In function ‘dealloc’: xml_document.c:49:25: warning: passing argument 2 of ‘rb_st_foreach’ from incompatible pointer type [-Wincompatible-pointer-types] 49 | st_foreach(node_hash, dealloc_node_i, (st_data_t)doc); | ^~~~~~~~~~~~~~ | | | int (*)(xmlNode *, xmlNode *, xmlDoc *) {aka int (*)(struct _xmlNode *, struct _xmlNode *, struct _xmlDoc *)} In file included from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/intern.h:39, from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2148, from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33, from ./nokogiri.h:33, from ./xml_document.h:4, from xml_document.c:1: /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/st.h:141:31: note: expected ‘int (*)(st_data_t, st_data_t, st_data_t)’ {aka ‘int ... | ^~~~~~~~~~~~ xml_document.c: At top level: cc1: warning: unrecognized command line option ‘-Wno-self-assign’ cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’ cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’ compiling xml_document_fragment.c In file included from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33, from ./nokogiri.h:33, from ./xml_document_fragment.h:4, from xml_document_fragment.c:1: xml_document_fragment.c: In function ‘new’: /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2508:48: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] 2508 | (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc) | ^ /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2340:9: note: in expansion of macro ‘rb_scan_args0’ 2340 | rb_scan_args0(argc,argvp,fmt,\ | ^~~~~~~~~~~~~ xml_document_fragment.c:17:3: note: in expansion of macro ‘rb_scan_args’ 17 | rb_scan_args(argc, argv, "1*", &document, &rest); | ^~~~~~~~~~~~ xml_document_fragment.c: At top level: cc1: warning: unrecognized command line option ‘-Wno-self-assign’ cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’ cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’ compiling xml_dtd.c compiling xml_element_content.c compiling xml_element_decl.c compiling xml_encoding_handler.c compiling xml_entity_decl.c compiling xml_entity_reference.c In file included from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33, from ./nokogiri.h:33, from ./xml_entity_reference.h:4, from xml_entity_reference.c:1: xml_entity_reference.c: In function ‘new’: /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2508:48: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] 2508 | (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc) | ^ /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2340:9: note: in expansion of macro ‘rb_scan_args0’ 2340 | rb_scan_args0(argc,argvp,fmt,\ | ^~~~~~~~~~~~~ xml_entity_reference.c:18:3: note: in expansion of macro ‘rb_scan_args’ 18 | rb_scan_args(argc, argv, "2*", &document, &name, &rest); | ^~~~~~~~~~~~ xml_entity_reference.c: At top level: cc1: warning: unrecognized command line option ‘-Wno-self-assign’ cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’ cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’ compiling xml_io.c xml_io.c: In function ‘io_read_callback’: xml_io.c:20:22: warning: passing argument 1 of ‘rb_rescue’ from incompatible pointer type [-Wincompatible-pointer-types] 20 | string = rb_rescue(read_check, (VALUE)args, read_failed, 0); | ^~~~~~~~~~ | | | VALUE (*)(VALUE *) {aka long unsigned int (*)(long unsigned int *)} In file included from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33, from ./nokogiri.h:33, from ./xml_io.h:4, from xml_io.c:1: /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:1987:17: note: expected ‘VALUE (*)(VALUE)’ {aka ‘long unsigned int (*)(long unsigned int)’} but argument is of type ‘VALUE (*)(VALUE *)’ {aka ‘long unsigned int (*)(long unsigned int *)’} 1987 | VALUE rb_rescue(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE); | ^~~~~~~~~~~~~~~ xml_io.c:20:47: warning: passing argument 3 of ‘rb_rescue’ from incompatible pointer type [-Wincompatible-pointer-types] 20 | string = rb_rescue(read_check, (VALUE)args, read_failed, 0); | ^~~~~~~~~~~ | | | VALUE (*)(void) {aka long unsigned int (*)(void)} In file included from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33, from ./nokogiri.h:33, from ./xml_node_set.h:4, from xml_node_set.c:1: xml_node_set.c: In function ‘slice’: /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2508:48: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] 2508 | (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc) | ^ /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2340:9: note: in expansion of macro ‘rb_scan_args0’ 2340 | rb_scan_args0(argc,argvp,fmt,\ | ^~~~~~~~~~~~~ xml_node_set.c:294:5: note: in expansion of macro ‘rb_scan_args’ 294 | rb_scan_args(argc, argv, "11", NULL, NULL); | ^~~~~~~~~~~~ In file included from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33, from ./nokogiri.h:33, from ./xml_node_set.h:4, from xml_node_set.c:1: xml_node_set.c: In function ‘init_xml_node_set’: /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2799:117: warning: passing argument 3 of ‘rb_define_method0’ from incompatible pointer type [-Wincompatible-pointer-types] 2799 | #define rb_define_method(klass, mid, func, arity) rb_define_method_choose_prototypem3((arity),(func))((klass),(mid),(func),(arity)); | ^~~~~~ | | | VALUE (*)(VALUE, VALUE) {aka long unsigned int (*)(long unsigned int, long unsigned int)} xml_node_set.c:479:3: note: in expansion of macro ‘rb_define_method’ 479 | rb_define_method(klass, "to_a", to_array, 0); | ^~~~~~~~~~~~~~~~ In file included from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2148, from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33, from ./nokogiri.h:33, from ./xml_node_set.h:4, from xml_node_set.c:1: /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2775:27: note: expected ‘VALUE (*)(VALUE)’ {aka ‘long unsigned int (*)(long unsigned int)’} but argument is of type ‘VALUE (*)(VALUE, VALUE)’ {aka ‘long unsigned int (*)(long unsigned int, long unsigned int)’} 2775 | RB_METHOD_DEFINITION_DECL(rb_define_method, (2,3), (VALUE klass, const char *name), (klass, name)) | ^~~~~~~~~~~~~~~~ /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/intern.h:1042:82: note: in definition of macro ‘RB_METHOD_DEFINITION_DECL_C’ 1042 | __attribute__((__unused__,__weakref__(#def),__nonnull__ nonnull))static void defname(RB_UNWRAP_MACRO decl,VALUE(*func)funcargs,int arity); | ^~~~~~~ /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/intern.h:1074:1: note: in expansion of macro ‘RB_METHOD_DEFINITION_DECL_1’ 1074 | RB_METHOD_DEFINITION_DECL_1(def,nonnull,def##0 ,0 ,decl,vars,(VALUE)) \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2775:1: note: in expansion of macro ‘RB_METHOD_DEFINITION_DECL’ 2775 | RB_METHOD_DEFINITION_DECL(rb_define_method, (2,3), (VALUE klass, const char *name), (klass, name)) | ^~~~~~~~~~~~~~~~~~~~~~~~~ xml_node_set.c: At top level: cc1: warning: unrecognized command line option ‘-Wno-self-assign’ cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’ cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’ compiling xml_processing_instruction.c In file included from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33, from ./nokogiri.h:33, from ./xml_processing_instruction.h:4, from xml_processing_instruction.c:1: xml_processing_instruction.c: In function ‘new’: /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2508:48: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] 2508 | (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc) | ^ /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2340:9: note: in expansion of macro ‘rb_scan_args0’ 2340 | rb_scan_args0(argc,argvp,fmt,\ | ^~~~~~~~~~~~~ xml_processing_instruction.c:20:3: note: in expansion of macro ‘rb_scan_args’ 20 | rb_scan_args(argc, argv, "3*", &document, &name, &content, &rest); | ^~~~~~~~~~~~ xml_processing_instruction.c: At top level: cc1: warning: unrecognized command line option ‘-Wno-self-assign’ cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’ cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’ compiling xml_reader.c In file included from /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby.h:33, from ./nokogiri.h:33, from ./xml_reader.h:4, from xml_reader.c:1: xml_reader.c: In function ‘from_memory’: /usr/share/rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/ruby.h:2508:48: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] 2508 | (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc) | ^ | ^~~~~~~~~~~~ ... At top level: xslt_stylesheet.c:112:13: warning: ‘swallow_superfluous_xml_errors’ defined but not used [-Wunused-function] 112 | static void swallow_superfluous_xml_errors(void * userdata, xmlErrorPtr error, ...) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: warning: unrecognized command line option ‘-Wno-self-assign’ cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’ cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’ linking shared-object nokogiri/nokogiri.so Cleaning files only used during build. rm -rf /home/hizmarck/.rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.9/ext/nokogiri/tmp/x86_64-pc-linux-gnu/ports rm -rf /home/hizmarck/.rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.9/ports current directory: /home/hizmarck/.rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.9/ext/nokogiri make "DESTDIR=" install make: /usr/bin/mkdir: Command not found make: *** [Makefile:202: .sitearchdir.-.nokogiri.time] Error 127 make install failed, exit code 2 Gem files will remain installed in /home/hizmarck/.rvm/gems/ruby-2.7.1/gems/nokogiri-1.10.9 for inspection. Results logged to /home/hizmarck/.rvm/gems/ruby-2.7.1/extensions/x86_64-linux/2.7.0/nokogiri-1.10.9/gem_make.out I spend 2 days, I can't make it work. rvm 1.29.10 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io] yarn version 1.22.4 ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux] This is the complete log: https://drive.google.com/file/d/1tngDfaI9mXri16sTYcPflz8PLoieIQTT/view?usp=sharing What could it be? Thank you for your support.
Make process cannot find the mkdir command. $ which mkdir /bin/mkdir Since the process is searching for the command in /usr/bin/mkdir it cannot be found. It is fixable by creating a symbolic link to the correct path: sudo ln -s /bin/mkdir /usr/bin/mkdir Answer source - stackoverflow post
ERROR: Error installing oj:
I just cloned a repository from GitHub for the first time. I went to check it out on my local machine, so within the local repository on my mac I ran the following command bin/rails server I got the following error: Could not find activesupport-5.0.0.1 in any of the sources Run bundle install to install missing gems. So I then ran the bundle install command as suggested, but then it gave me the following error An error occurred while installing oj (2.12.14), and Bundler cannot continue. Make sure that gem install oj -v '2.12.14' succeeds before bundling. So as suggested I ran: gem install oj -v '2.12.14' Then I got a really long message with warning and an error (see below). Any thoughts? ERROR: Error installing oj: ERROR: Failed to build gem native extension. current directory: /usr/local/lib/ruby/gems/2.4.0/gems/oj-2.12.14/ext/oj /usr/local/opt/ruby/bin/ruby -r ./siteconf20170218-3717-1p2bvl9.rb extconf.rb >>>>> Creating Makefile for ruby version 2.4.0 on x86_64-darwin16 <<<<< creating Makefile current directory: /usr/local/lib/ruby/gems/2.4.0/gems/oj-2.12.14/ext/oj make "DESTDIR=" clean current directory: /usr/local/lib/ruby/gems/2.4.0/gems/oj-2.12.14/ext/oj make "DESTDIR=" compiling cache8.c compiling circarray.c compiling compat.c compiling dump.c dump.c:503:8: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] cnt = RSTRING_LEN(rstr); ~ ^~~~~~~~~~~~~~~~~ /usr/local/Cellar/ruby/2.4.0/include/ruby-2.4.0/ruby/ruby.h:976:6: note: expanded from macro 'RSTRING_LEN' RSTRING_EMBED_LEN(str) : \ ^~~~~~~~~~~~~~~~~~~~~~ /usr/local/Cellar/ruby/2.4.0/include/ruby-2.4.0/ruby/ruby.h:972:6: note: expanded from macro 'RSTRING_EMBED_LEN' (long)((RBASIC(str)->flags >> RSTRING_EMBED_LEN_SHIFT) & \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ dump.c:503:8: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] cnt = RSTRING_LEN(rstr); ~ ^~~~~~~~~~~~~~~~~ /usr/local/Cellar/ruby/2.4.0/include/ruby-2.4.0/ruby/ruby.h:977:28: note: expanded from macro 'RSTRING_LEN' RSTRING(str)->as.heap.len) ~~~~~~~~~~~~~~~~~~~~~~^~~ dump.c:1776:39: warning: 'rb_struct_ptr' is deprecated [-Wdeprecated-declarations] for (i = (int)RSTRUCT_LEN(obj), vp = RSTRUCT_PTR(obj); 0 < i; i--, vp++) { ^ /usr/local/Cellar/ruby/2.4.0/include/ruby-2.4.0/ruby/ruby.h:1190:33: note: expanded from macro 'RSTRUCT_PTR' #define RSTRUCT_PTR(st) rb_struct_ptr(st) ^ /usr/local/Cellar/ruby/2.4.0/include/ruby-2.4.0/ruby/intern.h:889:25: note: 'rb_struct_ptr' has been explicitly marked deprecated here DEPRECATED(const VALUE *rb_struct_ptr(VALUE s)); ^ dump.c:1776:37: warning: assigning to 'VALUE *' (aka 'unsigned long *') from 'const VALUE *' (aka 'const unsigned long *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] for (i = (int)RSTRUCT_LEN(obj), vp = RSTRUCT_PTR(obj); 0 < i; i--, vp++) { ^ ~~~~~~~~~~~~~~~~ 4 warnings generated. compiling err.c compiling fast.c fast.c:816:17: warning: 'rb_data_object_alloc' is deprecated: by rb_data_object_wrap [-Wdeprecated-declarations] doc->self = rb_data_object_alloc(clas, doc, 0, free_doc_cb); ^ /usr/local/Cellar/ruby/2.4.0/include/ruby-2.4.0/ruby/ruby.h:1379:1: note: 'rb_data_object_alloc' has been explicitly marked deprecated here rb_data_object_alloc(VALUE klass, void *data, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree) ^ fast.c:1280:24: error: use of undeclared identifier 'rb_cFixnum' case T_FIXNUM: type = rb_cFixnum; break; ^ 1 warning and 1 error generated. make: *** [fast.o] Error 1 make failed, exit code 2 Gem files will remain installed in /usr/local/lib/ruby/gems/2.4.0/gems/oj-2.12.14 for inspection. Results logged to /usr/local/lib/ruby/gems/2.4.0/extensions/x86_64-darwin-16/2.4.0/oj-2.12.14/gem_make.out
Fixnum is no longer a thing in ruby 2.4. Either downgrade your ruby or update oj to 2.16.1, which supports ruby 2.4.
Errors when installing phusion passenger on mac
I'm installing Passenger on Mac OSX (10.9.5) and have been getting errors. If it matters, Ruby 2.1.2 is installed through rbenv and I have Rails 4.0.0 installed. Per the 'Agile Web Development with Rails 4' book I'm installing Passenger version 4.0.8. After typing the command > sudo passenger-install-apache2-module in Terminal it takes me through some prompts for the installation process and then I get the following error section In file included from ext/common/Logging.cpp:31: In file included from ext/common/Utils/IOUtils.h:39: ext/common/FileDescriptor.h:99:2: error: unknown type name 'shared_ptr' shared_ptr<SharedData> data; ^ ext/common/FileDescriptor.h:99:12: error: expected member name or ';' after declaration specifiers shared_ptr<SharedData> data; ~~~~~~~~~~^ ext/common/FileDescriptor.h:126:4: error: use of undeclared identifier 'data' data = make_shared<SharedData>(fd, autoClose); ^ ext/common/FileDescriptor.h:145:7: error: use of undeclared identifier 'data'; did you mean 'StaticString::data'? if (data != NULL) { ^~~~ StaticString::data ext/common/StaticString.h:161:14: note: 'StaticString::data' declared here const char *data() const { ^ In file included from ext/common/Logging.cpp:31: In file included from ext/common/Utils/IOUtils.h:39: ext/common/FileDescriptor.h:145:7: error: call to non-static member function without an object argument if (data != NULL) { ^~~~ ext/common/FileDescriptor.h:146:4: error: use of undeclared identifier 'data'; did you mean 'StaticString::data'? data->close(checkErrors); ^~~~ StaticString::data ext/common/StaticString.h:161:14: note: 'StaticString::data' declared here const char *data() const { ^ In file included from ext/common/Logging.cpp:31: In file included from ext/common/Utils/IOUtils.h:39: ext/common/FileDescriptor.h:146:4: error: call to non-static member function without an object argument data->close(checkErrors); ^~~~ ext/common/FileDescriptor.h:147:4: error: use of undeclared identifier 'data'; did you mean 'StaticString::data'? data.reset(); ^~~~ StaticString::data ext/common/StaticString.h:161:14: note: 'StaticString::data' declared here const char *data() const { ^ In file included from ext/common/Logging.cpp:31: In file included from ext/common/Utils/IOUtils.h:39: ext/common/FileDescriptor.h:147:4: error: call to non-static member function without an object argument data.reset(); ^~~~ ext/common/FileDescriptor.h:160:7: error: use of undeclared identifier 'data'; did you mean 'StaticString::data'? if (data != NULL) { ^~~~ StaticString::data ext/common/StaticString.h:161:14: note: 'StaticString::data' declared here const char *data() const { ^ In file included from ext/common/Logging.cpp:31: In file included from ext/common/Utils/IOUtils.h:39: ext/common/FileDescriptor.h:160:7: error: call to non-static member function without an object argument if (data != NULL) { ^~~~ ext/common/FileDescriptor.h:161:13: error: use of undeclared identifier 'data'; did you mean 'StaticString::data'? int fd = data->fd; ^~~~ StaticString::data ext/common/StaticString.h:161:14: note: 'StaticString::data' declared here const char *data() const { ^ In file included from ext/common/Logging.cpp:31: In file included from ext/common/Utils/IOUtils.h:39: ext/common/FileDescriptor.h:161:13: error: call to non-static member function without an object argument int fd = data->fd; ^~~~ ext/common/FileDescriptor.h:162:4: error: use of undeclared identifier 'data'; did you mean 'StaticString::data'? data->detach(); ^~~~ StaticString::data ext/common/StaticString.h:161:14: note: 'StaticString::data' declared here const char *data() const { ^ In file included from ext/common/Logging.cpp:31: In file included from ext/common/Utils/IOUtils.h:39: ext/common/FileDescriptor.h:162:4: error: call to non-static member function without an object argument data->detach(); ^~~~ ext/common/FileDescriptor.h:163:4: error: use of undeclared identifier 'data'; did you mean 'StaticString::data'? data.reset(); ^~~~ StaticString::data ext/common/StaticString.h:161:14: note: 'StaticString::data' declared here const char *data() const { ^ In file included from ext/common/Logging.cpp:31: In file included from ext/common/Utils/IOUtils.h:39: ext/common/FileDescriptor.h:163:4: error: call to non-static member function without an object argument data.reset(); ^~~~ ext/common/FileDescriptor.h:177:7: error: use of undeclared identifier 'data'; did you mean 'StaticString::data'? if (data == NULL) { ^~~~ StaticString::data ext/common/StaticString.h:161:14: note: 'StaticString::data' declared here const char *data() const { ^ In file included from ext/common/Logging.cpp:31: In file included from ext/common/Utils/IOUtils.h:39: ext/common/FileDescriptor.h:177:7: error: call to non-static member function without an object argument if (data == NULL) { ^~~~ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. rake aborted! Command failed with status (1): [g++ -Iext -Iext/common -Iext/libev -Wno-ambiguous-member-template -fPIC -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I/usr/include/apr-1 -I/usr/include/apr-1 -I/usr/include/apache2 -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_MAP_HEADER="<ext/hash_map>" -DHASH_MAP_CLASS="hash_map" -DHAS_ALLOCA_H -DHAS_SFENCE -DHAS_LFENCE -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -ggdb -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -fcommon -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -o buildout/apache2/module_libpassenger_common/Logging.o -c ext/common/Logging.cpp] /Library/Ruby/Gems/2.0.0/gems/passenger-4.0.8/build/cplusplus_support.rb:51:in `run_compiler' /Library/Ruby/Gems/2.0.0/gems/passenger-4.0.8/build/cplusplus_support.rb:61:in `compile_cxx' /Library/Ruby/Gems/2.0.0/gems/passenger-4.0.8/lib/phusion_passenger/common_library.rb:133:in `block (2 levels) in define_category_tasks' Tasks: TOP => apache2 => buildout/apache2/mod_passenger.so => buildout/apache2/module_libpassenger_common/Logging.o (See full trace by running task with --trace) -------------------------------------------- It looks like something went wrong Please read our Users guide for troubleshooting tips: /Library/Ruby/Gems/2.0.0/gems/passenger-4.0.8/doc/Users guide Apache.html If that doesn't help, please use our support facilities at: https://www.phusionpassenger.com We'll do our best to help you. I've looked through the documentation like it suggested but can't seem to find what could cause these errors. I've also looked online with the same result. Any idea what could cause this? How should I fix it?
I think you're using too outdated version of passenger. Try install it from http://brew.sh/. https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html#install_osx_homebrew