Errors when installing phusion passenger on mac - ruby-on-rails

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

Related

Ubuntu Sqlite3 1.4.2 gem install error. Any ideas?

I installed libsqlite3-dev but it hasn't helped. My ruby version is 3.0.0 .And this is my error :
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/nurlaney/.gem/gems/sqlite3-1.4.2/ext/sqlite3
/snap/ruby/201/bin/ruby -I /snap/ruby/201/lib/ruby/3.0.0 -r ./siteconf20210129-26408-4tihlx.rb extconf.rb
checking for sqlite3.h... yes
checking for pthread_create() in -lpthread... yes
checking for -ldl... yes
checking for sqlite3_libversion_number() in -lsqlite3... yes
checking for rb_proc_arity()... no
checking for rb_integer_pack()... no
checking for sqlite3_initialize()... yes
checking for sqlite3_backup_init()... yes
checking for sqlite3_column_database_name()... yes
checking for sqlite3_enable_load_extension()... yes
checking for sqlite3_load_extension()... yes
checking for sqlite3_open_v2()... yes
checking for sqlite3_prepare_v2()... yes
checking for sqlite3_int64 in sqlite3.h... yes
checking for sqlite3_uint64 in sqlite3.h... yes
creating Makefile
current directory: /home/nurlaney/.gem/gems/sqlite3-1.4.2/ext/sqlite3
make "DESTDIR=" clean
current directory: /home/nurlaney/.gem/gems/sqlite3-1.4.2/ext/sqlite3
make "DESTDIR="
compiling aggregator.c
compiling backup.c
compiling database.c
database.c: In function ‘rb_sqlite3_open_v2’:
database.c:38:9: warning: unused variable ‘flags’ [-Wunused-variable]
38 | VALUE flags;
| ^~~~~
database.c: In function ‘exec_batch’:
database.c:726:57: warning: passing argument 3 of ‘sqlite3_exec’ from incompatible pointer type
[-Wincompatible-pointer-types]
726 | status = sqlite3_exec(ctx->db, StringValuePtr(sql), hash_callback_function, callback_ary, &errMsg);
| ^~~~~~~~~~~~~~~~~~~~~~
| |
| int (*)(VALUE, int, char **, char **) {aka int
(*)(long unsigned int, int, char **, char **)}
In file included from ./sqlite3_ruby.h:25,
from database.c:1:
/usr/include/sqlite3.h:409:9: note: expected ‘int (*)(void *, int, char **, char **)’ but argument is of type ‘int
(*)(VALUE, int, char **, char **)’ {aka ‘int (*)(long unsigned int, int, char **, char **)’}
409 | int (*callback)(void*,int,char**,char**), /* Callback function */
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
database.c:726:81: warning: passing argument 4 of ‘sqlite3_exec’ makes pointer from integer without a cast
[-Wint-conversion]
726 | status = sqlite3_exec(ctx->db, StringValuePtr(sql), hash_callback_function, callback_ary, &errMsg);
| ^~~~~~~~~~~~
| |
| VALUE {aka long unsigned int}
In file included from ./sqlite3_ruby.h:25,
from database.c:1:
/usr/include/sqlite3.h:410:3: note: expected ‘void *’ but argument is of type ‘VALUE’ {aka ‘long unsigned int’}
410 | void *, /* 1st argument to callback */
| ^~~~~~
database.c:728:57: warning: passing argument 3 of ‘sqlite3_exec’ from incompatible pointer type
[-Wincompatible-pointer-types]
728 | status = sqlite3_exec(ctx->db, StringValuePtr(sql), regular_callback_function, callback_ary, &errMsg);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int (*)(VALUE, int, char **, char **) {aka int
(*)(long unsigned int, int, char **, char **)}
In file included from ./sqlite3_ruby.h:25,
from database.c:1:
/usr/include/sqlite3.h:409:9: note: expected ‘int (*)(void *, int, char **, char **)’ but argument is of type ‘int
(*)(VALUE, int, char **, char **)’ {aka ‘int (*)(long unsigned int, int, char **, char **)’}
409 | int (*callback)(void*,int,char**,char**), /* Callback function */
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
database.c:728:84: warning: passing argument 4 of ‘sqlite3_exec’ makes pointer from integer without a cast
[-Wint-conversion]
728 | status = sqlite3_exec(ctx->db, StringValuePtr(sql), regular_callback_function, callback_ary, &errMsg);
| ^~~~~~~~~~~~
| |
| VALUE {aka long unsigned
int}
In file included from ./sqlite3_ruby.h:25,
from database.c:1:
/usr/include/sqlite3.h:410:3: note: expected ‘void *’ but argument is of type ‘VALUE’ {aka ‘long unsigned int’}
410 | void *, /* 1st argument to callback */
| ^~~~~~
database.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 exception.c
compiling sqlite3.c
sqlite3.c: In function ‘bignum_to_int64’:
sqlite3.c:33:27: warning: implicit declaration of function ‘RBIGNUM’; did you mean ‘T_BIGNUM’?
[-Wimplicit-function-declaration]
33 | # define RBIGNUM_LEN(x) RBIGNUM(x)->len
| ^~~~~~~
sqlite3.c:35:20: note: in expansion of macro ‘RBIGNUM_LEN’
35 | const long len = RBIGNUM_LEN(value);
| ^~~~~~~~~~~
sqlite3.c:33:37: error: invalid type argument of ‘->’ (have ‘int’)
33 | # define RBIGNUM_LEN(x) RBIGNUM(x)->len
| ^~
sqlite3.c:35:20: note: in expansion of macro ‘RBIGNUM_LEN’
35 | const long len = RBIGNUM_LEN(value);
| ^~~~~~~~~~~
sqlite3.c:40:19: error: ‘SIZEOF_BDIGITS’ undeclared (first use in this function); did you mean ‘SIZEOF_INT’?
40 | if (len > 63 / (SIZEOF_BDIGITS * CHAR_BIT) + 1) return 0;
| ^~~~~~~~~~~~~~
| SIZEOF_INT
sqlite3.c:40:19: note: each undeclared identifier is reported only once for each function it appears in
sqlite3.c:42:11: error: unknown type name ‘BDIGIT’
42 | const BDIGIT *digits = RBIGNUM_DIGITS(value);
| ^~~~~~
sqlite3.c:42:28: warning: implicit declaration of function ‘RBIGNUM_DIGITS’; did you mean ‘RBIGNUM_SIGN’?
[-Wimplicit-function-declaration]
42 | const BDIGIT *digits = RBIGNUM_DIGITS(value);
| ^~~~~~~~~~~~~~
| RBIGNUM_SIGN
sqlite3.c:42:28: warning: initialization of ‘const int *’ from ‘int’ makes pointer from integer without a cast
[-Wint-conversion]
sqlite3.c:43:5: error: unknown type name ‘BDIGIT’; did you mean ‘ISDIGIT’?
43 | BDIGIT blast = digits[len-1];
| ^~~~~~
| ISDIGIT
sqlite3.c:44:5: error: unknown type name ‘BDIGIT’; did you mean ‘ISDIGIT’?
44 | BDIGIT bmax = (BDIGIT)1UL << (63 % (CHAR_BIT * SIZEOF_BDIGITS));
| ^~~~~~
| ISDIGIT
sqlite3.c:44:20: error: ‘BDIGIT’ undeclared (first use in this function); did you mean ‘ISDIGIT’?
44 | BDIGIT bmax = (BDIGIT)1UL << (63 % (CHAR_BIT * SIZEOF_BDIGITS));
| ^~~~~~
| ISDIGIT
sqlite3.c:44:27: error: expected ‘,’ or ‘;’ before numeric constant
44 | BDIGIT bmax = (BDIGIT)1UL << (63 % (CHAR_BIT * SIZEOF_BDIGITS));
| ^~~
sqlite3.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’
make: *** [Makefile:245: sqlite3.o] Error 1
make failed, exit code 2
Gem files will remain installed in /home/nurlaney/.gem/gems/sqlite3-1.4.2 for inspection.
Results logged to /home/nurlaney/.gem/extensions/x86_64-linux/3.0.0/sqlite3-1.4.2/gem_make.out
An error occurred while installing sqlite3 (1.4.2), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.4.2' --source 'http://rubygems.org/'` succeeds before bundling.
In Gemfile:
sqlite3
I looked at other topics and none of them helped. Should i install DevKit like in Windows ? And if this can install, how is it ?
I installed ruby from snap channel.
I tried install sqlite3 gem but it returns me same error again. Then i tried to install gem locally but it doesnt help again. So im stuck. I don't know how to fix. Any ideas ?
Please check following simple steps for install sqlite3 in Ubuntu 20.04
sudo apt update
sudo apt install sqlite3
sqlite3 --version
If above comment not working for your machine, you can directly download the .deb file here and install https://ubuntu.pkgs.org/20.04/ubuntu-main-amd64/libsqlite3-dev_3.31.1-4_amd64.deb.html
Install sqlite3 Gem
sudo apt-get install sqlite3 libsqlite3-dev
sudo gem install sqlite3-ruby
Let me if you need any help thanks :)

Architecture not supported error when installing OpenSSL on OS X

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

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.

MOXA Nport 5110A Driver Failed Installation (On Linux Ubuntu 14.04)

I am trying to install MOXA Nport 5110A Driver in my Linux Ubuntu 14.04, but failed miserably. The details about installation process is too long for me to understand where the problem is (and frankly I am still a noob in Linux world). The details is listed below.
===============================================================================
Copyright (C) 2002-2012 Moxa Inc.
All Rights Reserved.
MOXA NPort Server Real TTY Driver V1.18 Installation.
System Imformation: Kernel 3.13.0-62-generic; Machine x86_64.
===============================================================================
Tar files, please wait ... OK!
Building driver...
If you want to use secure communication with target,
you might choose [y] to enable the SSL function.
Note: This function support RealCOM with secure mode only.
Do you want to enable secure function? [y/N].
N
make -C /lib/modules/3.13.0-62-generic/build SUBDIRS=/tmp/moxa modules
make[1]: Entering directory `/usr/src/linux-headers-3.13.0-62-generic'
CC [M] /tmp/moxa/npreal2.o
/tmp/moxa/npreal2.c: In function ‘npreal_init_tty’:
/tmp/moxa/npreal2.c:661:11: error: dereferencing pointer to incomplete type
de->data = (void *) net_node;
^
/tmp/moxa/npreal2.c:663:11: error: dereferencing pointer to incomplete type
de->proc_fops = &npreal_net_fops;
^
In file included from /tmp/moxa/npreal2.c:92:0:
/tmp/moxa/npreal2.c: In function ‘npreal_init’:
/tmp/moxa/npreal2.h:28:35: error: ‘struct tty_driver’ has no member named ‘termios_locked’
#define DRV_VAR_P(x) npvar_sdriver->x
^
/tmp/moxa/npreal2.c:779:5: note: in expansion of macro ‘DRV_VAR_P’
DRV_VAR_P(termios_locked) = npvar_termios_locked;
^
/tmp/moxa/npreal2.c: In function ‘npreal_open’:
/tmp/moxa/npreal2.c:1064:13: error: invalid type argument of unary ‘*’ (have ‘struct ktermios’)
*tty->termios = info->normal_termios;
^
/tmp/moxa/npreal2.c:1066:13: error: invalid type argument of unary ‘*’ (have ‘struct ktermios’)
*tty->termios = info->callout_termios;
^
/tmp/moxa/npreal2.c:1080:8: error: ‘struct tty_struct’ has no member named ‘low_latency’
tty->low_latency = 1;
^
/tmp/moxa/npreal2.c: In function ‘npreal_close’:
/tmp/moxa/npreal2.c:1170:32: error: invalid type argument of unary ‘*’ (have ‘struct ktermios’)
info->normal_termios = *tty->termios;
^
/tmp/moxa/npreal2.c:1172:33: error: invalid type argument of unary ‘*’ (have ‘struct ktermios’)
info->callout_termios = *tty->termios;
^
/tmp/moxa/npreal2.c: In function ‘npreal_ioctl’:
/tmp/moxa/npreal2.c:1612:21: error: invalid type argument of ‘->’ (have ‘struct ktermios’)
tty->termios->c_cflag = ((tty->termios->c_cflag & ~CLOCAL) |
^
/tmp/moxa/npreal2.c:1612:47: error: invalid type argument of ‘->’ (have ‘struct ktermios’)
tty->termios->c_cflag = ((tty->termios->c_cflag & ~CLOCAL) |
^
/tmp/moxa/npreal2.c: In function ‘npreal_block_til_ready’:
/tmp/moxa/npreal2.c:1962:26: error: invalid type argument of ‘->’ (have ‘struct ktermios’)
if ( tty->termios->c_cflag & CLOCAL )
^
/tmp/moxa/npreal2.c: In function ‘npreal_startup’:
/tmp/moxa/npreal2.c:2155:27: error: invalid type argument of ‘->’ (have ‘struct ktermios’)
if (info->tty->termios->c_cflag & CBAUD)
^
/tmp/moxa/npreal2.c: In function ‘npreal_shutdown’:
/tmp/moxa/npreal2.c:2278:42: error: invalid type argument of ‘->’ (have ‘struct ktermios’)
if (!info->tty || (info->tty->termios->c_cflag & HUPCL))
^
/tmp/moxa/npreal2.c: In function ‘npreal_port_init’:
/tmp/moxa/npreal2.c:2325:18: error: incompatible types when assigning to type ‘struct ktermios *’ from type ‘struct ktermios’
if (!(termio = info->tty->termios))
^
/tmp/moxa/npreal2.c: In function ‘npreal_port_shutdown’:
/tmp/moxa/npreal2.c:2700:18: error: incompatible types when assigning to type ‘struct ktermios *’ from type ‘struct ktermios’
if (!(termio = info->tty->termios))
^
/tmp/moxa/npreal2.c: In function ‘tty_buffer_free’:
/tmp/moxa/npreal2.c:3352:9: error: implicit declaration of function ‘kfree’ [-Werror=implicit-function-declaration]
kfree(b);
^
/tmp/moxa/npreal2.c:3355:22: error: ‘struct tty_struct’ has no member named ‘buf’
b->next = tty->buf.free;
^
/tmp/moxa/npreal2.c:3356:12: error: ‘struct tty_struct’ has no member named ‘buf’
tty->buf.free = b;
^
In file included from include/linux/seqlock.h:35:0,
from include/linux/time.h:5,
from include/linux/stat.h:18,
from include/linux/module.h:10,
from /tmp/moxa/npreal2.c:42:
/tmp/moxa/npreal2.c: In function ‘npreal_flush_to_ldisc’:
/tmp/moxa/npreal2.c:3424:31: error: ‘struct tty_struct’ has no member named ‘buf’
spin_lock_irqsave(&tty->buf.lock, flags);
^
include/linux/spinlock.h:199:34: note: in definition of macro ‘raw_spin_lock_irqsave’
flags = _raw_spin_lock_irqsave(lock); \
^
/tmp/moxa/npreal2.c:3424:9: note: in expansion of macro ‘spin_lock_irqsave’
spin_lock_irqsave(&tty->buf.lock, flags);
^
/tmp/moxa/npreal2.c:3425:19: error: ‘struct tty_struct’ has no member named ‘buf’
head = tty->buf.head;
^
/tmp/moxa/npreal2.c:3428:16: error: ‘struct tty_struct’ has no member named ‘buf’
tty->buf.head = NULL;
^
/tmp/moxa/npreal2.c:3452:26: error: ‘struct tty_buffer’ has no member named ‘char_buf_ptr’
cp = head->char_buf_ptr + head->read;
^
/tmp/moxa/npreal2.c:3453:26: error: ‘struct tty_buffer’ has no member named ‘flag_buf_ptr’
fp = head->flag_buf_ptr + head->read;
^
/tmp/moxa/npreal2.c:3455:44: error: ‘struct tty_struct’ has no member named ‘buf’
spin_unlock_irqrestore(&tty->buf.lock, flags);
^
In file included from include/linux/seqlock.h:35:0,
from include/linux/time.h:5,
from include/linux/stat.h:18,
from include/linux/module.h:10,
from /tmp/moxa/npreal2.c:42:
/tmp/moxa/npreal2.c:3461:39: error: ‘struct tty_struct’ has no member named ‘buf’
spin_lock_irqsave(&tty->buf.lock, flags);
^
include/linux/spinlock.h:199:34: note: in definition of macro ‘raw_spin_lock_irqsave’
flags = _raw_spin_lock_irqsave(lock); \
^
/tmp/moxa/npreal2.c:3461:17: note: in expansion of macro ‘spin_lock_irqsave’
spin_lock_irqsave(&tty->buf.lock, flags);
^
/tmp/moxa/npreal2.c:3463:16: error: ‘struct tty_struct’ has no member named ‘buf’
tty->buf.head = head;
^
/tmp/moxa/npreal2.c:3465:36: error: ‘struct tty_struct’ has no member named ‘buf’
spin_unlock_irqrestore(&tty->buf.lock, flags);
^
/tmp/moxa/npreal2.c: In function ‘npreal_create_proc_entry’:
/tmp/moxa/npreal2.c:3546:5: error: implicit declaration of function ‘create_proc_entry’ [-Werror=implicit-function-declaration]
return( create_proc_entry( name, mode, parent ) );
^
/tmp/moxa/npreal2.c:3546:5: warning: return makes pointer from integer without a cast [enabled by default]
/tmp/moxa/npreal2.c: In function ‘npreal_remove_proc_entry’:
/tmp/moxa/npreal2.c:3554:26: error: dereferencing pointer to incomplete type
remove_proc_entry(pde->name, pde->parent);
^
/tmp/moxa/npreal2.c:3554:37: error: dereferencing pointer to incomplete type
remove_proc_entry(pde->name, pde->parent);
^
/tmp/moxa/npreal2.c: In function ‘npreal_net_open’:
/tmp/moxa/npreal2.c:3606:5: error: implicit declaration of function ‘PDE’ [-Werror=implicit-function-declaration]
de = PDE(inode);
^
/tmp/moxa/npreal2.c:3606:8: warning: assignment makes pointer from integer without a cast [enabled by default]
de = PDE(inode);
^
/tmp/moxa/npreal2.c:3615:32: error: dereferencing pointer to incomplete type
nd = (struct nd_struct *)de->data;
^
/tmp/moxa/npreal2.c: In function ‘npreal_net_write’:
/tmp/moxa/npreal2.c:4255:18: error: ‘struct tty_struct’ has no member named ‘low_latency’
if(!info->tty->low_latency)
^
/tmp/moxa/npreal2.c:4283:5: warning: passing argument 1 of ‘tty_buffer_request_room’ from incompatible pointer type [enabled by default]
if ((cnt = tty_buffer_request_room(tty, count)) <= 0)
^
In file included from /tmp/moxa/npreal2.c:57:0:
include/linux/tty_flip.h:5:12: note: expected ‘struct tty_port *’ but argument is of type ‘struct tty_struct *’
extern int tty_buffer_request_room(struct tty_port *port, size_t size);
^
/tmp/moxa/npreal2.c:4296:17: error: ‘struct tty_struct’ has no member named ‘icanon’
if (!tty->icanon || tty->canon_data)
^
/tmp/moxa/npreal2.c:4296:32: error: ‘struct tty_struct’ has no member named ‘canon_data’
if (!tty->icanon || tty->canon_data)
^
/tmp/moxa/npreal2.c:4311:13: error: ‘struct tty_struct’ has no member named ‘icanon’
if (!tty->icanon || tty->canon_data)
^
/tmp/moxa/npreal2.c:4311:28: error: ‘struct tty_struct’ has no member named ‘canon_data’
if (!tty->icanon || tty->canon_data)
^
/tmp/moxa/npreal2.c:4313:52: error: ‘struct tty_struct’ has no member named ‘read_cnt’
if ((cnt = MIN(cnt,(N_TTY_BUF_SIZE-1) - tty->read_cnt )) <= 0)
^
/tmp/moxa/npreal2.c:117:26: note: in definition of macro ‘MIN’
#define MIN(a,b) ((a) < (b) ? (a) : (b))
^
/tmp/moxa/npreal2.c:4313:52: error: ‘struct tty_struct’ has no member named ‘read_cnt’
if ((cnt = MIN(cnt,(N_TTY_BUF_SIZE-1) - tty->read_cnt )) <= 0)
^
/tmp/moxa/npreal2.c:117:38: note: in definition of macro ‘MIN’
#define MIN(a,b) ((a) < (b) ? (a) : (b))
^
/tmp/moxa/npreal2.c:4347:5: warning: passing argument 1 of ‘tty_insert_flip_string’ from incompatible pointer type [enabled by default]
if ((count = tty_insert_flip_string(tty, (unsigned char *)buf, cnt)))
^
In file included from /tmp/moxa/npreal2.c:57:0:
include/linux/tty_flip.h:29:19: note: expected ‘struct tty_port *’ but argument is of type ‘struct tty_struct *’
static inline int tty_insert_flip_string(struct tty_port *port,
^
/tmp/moxa/npreal2.c:4349:9: warning: passing argument 1 of ‘tty_flip_buffer_push’ from incompatible pointer type [enabled by default]
tty_flip_buffer_push(tty);
^
In file included from /tmp/moxa/npreal2.c:57:0:
include/linux/tty_flip.h:14:13: note: expected ‘struct tty_port *’ but argument is of type ‘struct tty_struct *’
extern void tty_flip_buffer_push(struct tty_port *port);
^
/tmp/moxa/npreal2.c: In function ‘npreal_process_notify’:
/tmp/moxa/npreal2.c:4516:16: error: ‘struct tty_struct’ has no member named ‘low_latency’
if(!tty->low_latency)
^
/tmp/moxa/npreal2.c:4522:9: warning: passing argument 1 of ‘tty_insert_flip_char’ from incompatible pointer type [enabled by default]
tty_insert_flip_char(tty, 0, TTY_BREAK);
^
In file included from /tmp/moxa/npreal2.c:57:0:
include/linux/tty_flip.h:17:19: note: expected ‘struct tty_port *’ but argument is of type ‘struct tty_struct *’
static inline int tty_insert_flip_char(struct tty_port *port,
^
/tmp/moxa/npreal2.c: In function ‘npreal_do_session_recovery’:
/tmp/moxa/npreal2.c:4571:22: error: incompatible types when assigning to type ‘struct ktermios *’ from type ‘struct ktermios’
if (!(termio = info->tty->termios))
^
cc1: some warnings being treated as errors
make[2]: *** [/tmp/moxa/npreal2.o] Error 1
make[1]: *** [_module_/tmp/moxa] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.13.0-62-generic'
make: *** [module] Error 2
Check Driver...
FAILED !!!
Install Not Completed !
Can you help me finding out where is the problem?
I attach the link to download the driver files here:
NPort Real TTY Driver for Linux
I had the same problem and got in contact with MOXA. They managed to redirect me to the distributor (systerra in Germany). They (systerra) sent to me the driver version 1.18.51_build_15051816 which worked just fine. I asked MOXA to upload this version to their website as well, don't know if they managed so far.
To help anyone else with this problem, you need a MUCH later driver. As of Oct 2015 the latest driver is available from this link (Linux) moxa support forum link
Please remind Moxa tech support that it looks REALLY bad that the product they are selling has a 4 year old driver, not updated on their site!

How to use Intel AVX on QNX Neutrino 6.5.0?

I recently started working with QNX 6.5.0 and can't understand how in QNX develop programs using Intel AVX. Installed QNX Development Studio 6.5.0 with GCC 4.4.2, I'm trying to write a simple program, but the build fails.
#include <immitnrin.h>
int main( int argc, char** argv )
{
__m256 var;
__m256 var2;
__m256 result;
var = _mm256_set1_ps(1.f);
var2 = _mm256_set1_ps(3.f);
result = _mm256_add_ps(var,var2);
return 0;
}
error: immitnrin.h: No such file or directory
In function 'int main(int, char**)':
error: '__m256' was not declared in this scope
error: expected ';' before 'var'
error: expected ';' before 'var2'
error: expected ';' before 'result'
error: 'var' was not declared in this scope
error: '_mm256_set1_ps' was not declared in this scope
error: 'var2' was not declared in this scope
error: 'result' was not declared in this scope
error: '_mm256_add_ps' was not declared in this scope
How and where can I learn how to work with SIMD instructions Intel in QNX?
Update
Here's the output from the program make.exe:
make.exe -k CPULIST=x86 all --file=C:/DOCUME~1/Andrew/LOCALS~1/Temp/QMakefile.tmp
C:/QNX650/host/win32/x86/usr/bin/make.exe -j 1 -Cx86 -fMakefile all
make.exe[1]: Entering directory C:/ide-4.7-workspace/project_test_avx/x86'
C:/QNX650/host/win32/x86/usr/bin/make.exe -j 1 -Co -fMakefile all
make.exe[2]: Entering directoryC:/ide-4.7-workspace/project_test_avx/x86/o'

Resources