My development stack has been completely turned upside down since I've done the Apple last update of March 11, 2014, and I try to fix it bit by bit. Right now I'm stuck with the following error when I try to install the gem glib2:
$ gem install glib2
Building native extensions. This could take a while...
ERROR: Error installing glib2:
ERROR: Failed to build gem native extension.
/Users/ymesserl/.rvm/rubies/ruby-2.0.0-p451/bin/ruby extconf.rb
checking for -Wall option to compiler... yes
checking for -Waggregate-return option to compiler... yes
checking for -Wcast-align option to compiler... yes
checking for -Wextra option to compiler... yes
checking for -Wformat=2 option to compiler... yes
checking for -Winit-self option to compiler... yes
checking for -Wlarger-than-65500 option to compiler... yes
checking for -Wmissing-declarations option to compiler... yes
checking for -Wmissing-format-attribute option to compiler... yes
checking for -Wmissing-include-dirs option to compiler... yes
checking for -Wmissing-noreturn option to compiler... yes
checking for -Wmissing-prototypes option to compiler... yes
checking for -Wnested-externs option to compiler... yes
checking for -Wold-style-definition option to compiler... yes
checking for -Wpacked option to compiler... yes
checking for -Wp,-D_FORTIFY_SOURCE=2 option to compiler... yes
checking for -Wpointer-arith option to compiler... yes
checking for -Wswitch-default option to compiler... yes
checking for -Wswitch-enum option to compiler... yes
checking for -Wundef option to compiler... yes
checking for -Wunsafe-loop-optimizations option to compiler... yes
checking for -Wwrite-strings option to compiler... yes
checking for rb_define_alloc_func() in ruby.h... yes
checking for rb_block_proc() in ruby.h... yes
checking for new allocation framework... yes
checking for attribute assignment... no
checking for Win32 OS... no
checking for gobject-2.0 version (>= 2.12.0)... yes
checking for gthread-2.0... yes
checking for unistd.h... yes
checking for io.h... no
checking for g_spawn_close_pid() in glib.h... no
checking for g_thread_init() in glib.h... no
checking for g_main_depth() in glib.h... no
checking for g_listenv() in glib.h... no
checking for rb_check_array_type() in ruby.h... no
checking for rb_check_hash_type() in ruby.h... no
checking for rb_exec_recursive() in ruby.h... no
checking for rb_errinfo() in ruby.h... no
checking for rb_sourcefile() in ruby.h... no
checking for rb_sourceline() in ruby.h... no
checking for ruby_set_current_source() in ruby.h... no
checking for rb_thread_blocking_region() in ruby.h... no
checking for ruby_native_thread_p() in ruby.h... no
checking for rb_thread_call_with_gvl() in ruby.h... no
checking for rb_str_new_cstr() in ruby.h... no
checking for rb_gc_register_mark_object() in ruby.h... no
checking for rb_exc_new_str() in ruby.h... no
checking for curr_thread in ruby.h,node.h... no
checking for rb_curr_thread in ruby.h,node.h... no
creating ruby-glib2.pc
creating glib-enum-types.c
creating glib-enum-types.h
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling glib-enum-types.c
warning: unknown warning option '-Wunsafe-loop-optimizations'; did you mean '-Wout-of-line-declaration'? [-Wunknown-warning-option]
1 warning generated.
compiling rbglib.c
warning: unknown warning option '-Wunsafe-loop-optimizations'; did you mean '-Wout-of-line-declaration'? [-Wunknown-warning-option]
In file included from rbglib.c:23:
./rbgprivate.h:33:11: warning: 'rb_str_new_cstr' macro redefined
# define rb_str_new_cstr(c_string) rb_str_new2(c_string)
^
/Users/ymesserl/.rvm/rubies/ruby-2.0.0-p451/include/ruby-2.0.0/ruby/intern.h:758:9: note: previous definition is here
#define rb_str_new_cstr(str) __extension__ ( \
^
rbglib.c:349:18: error: use of undeclared identifier 'ruby_errinfo'; did you mean 'rb_errinfo'?
rb_exc_raise(rb_errinfo());
^
./rbgprivate.h:29:25: note: expanded from macro 'rb_errinfo'
# define rb_errinfo() (ruby_errinfo)
^
/Users/ymesserl/.rvm/rubies/ruby-2.0.0-p451/include/ruby-2.0.0/ruby/ruby.h:579:7: note: 'rb_errinfo' declared here
VALUE rb_errinfo(void);
^
rbglib.c:349:18: warning: incompatible pointer to integer conversion passing 'VALUE (void)' to parameter of type 'VALUE' (aka 'unsigned long') [-Wint-conversion]
rb_exc_raise(rb_errinfo());
^~~~~~~~~~~~
./rbgprivate.h:29:24: note: expanded from macro 'rb_errinfo'
# define rb_errinfo() (ruby_errinfo)
^~~~~~~~~~~~~~
/Users/ymesserl/.rvm/rubies/ruby-2.0.0-p451/include/ruby-2.0.0/ruby/intern.h:343:33: note: passing argument to parameter here
NORETURN(void rb_exc_raise(VALUE));
^
/Users/ymesserl/.rvm/rubies/ruby-2.0.0-p451/include/ruby-2.0.0/x86_64-darwin13.1.0/ruby/config.h:91:48: note: expanded from macro 'NORETURN'
#define NORETURN(x) __attribute__ ((noreturn)) x
^
rbglib.c:406:18: error: use of undeclared identifier 'ruby_errinfo'; did you mean 'rb_errinfo'?
rb_exc_raise(rb_errinfo());
^
./rbgprivate.h:29:25: note: expanded from macro 'rb_errinfo'
# define rb_errinfo() (ruby_errinfo)
^
/Users/ymesserl/.rvm/rubies/ruby-2.0.0-p451/include/ruby-2.0.0/ruby/ruby.h:579:7: note: 'rb_errinfo' declared here
VALUE rb_errinfo(void);
^
rbglib.c:406:18: warning: incompatible pointer to integer conversion passing 'VALUE (void)' to parameter of type 'VALUE' (aka 'unsigned long') [-Wint-conversion]
rb_exc_raise(rb_errinfo());
^~~~~~~~~~~~
./rbgprivate.h:29:24: note: expanded from macro 'rb_errinfo'
# define rb_errinfo() (ruby_errinfo)
^~~~~~~~~~~~~~
/Users/ymesserl/.rvm/rubies/ruby-2.0.0-p451/include/ruby-2.0.0/ruby/intern.h:343:33: note: passing argument to parameter here
NORETURN(void rb_exc_raise(VALUE));
^
/Users/ymesserl/.rvm/rubies/ruby-2.0.0-p451/include/ruby-2.0.0/x86_64-darwin13.1.0/ruby/config.h:91:48: note: expanded from macro 'NORETURN'
#define NORETURN(x) __attribute__ ((noreturn)) x
^
rbglib.c:499:18: error: use of undeclared identifier 'ruby_errinfo'; did you mean 'rb_errinfo'?
rb_exc_raise(rb_errinfo());
^
./rbgprivate.h:29:25: note: expanded from macro 'rb_errinfo'
# define rb_errinfo() (ruby_errinfo)
^
/Users/ymesserl/.rvm/rubies/ruby-2.0.0-p451/include/ruby-2.0.0/ruby/ruby.h:579:7: note: 'rb_errinfo' declared here
VALUE rb_errinfo(void);
^
rbglib.c:499:18: warning: incompatible pointer to integer conversion passing 'VALUE (void)' to parameter of type 'VALUE' (aka 'unsigned long') [-Wint-conversion]
rb_exc_raise(rb_errinfo());
^~~~~~~~~~~~
./rbgprivate.h:29:24: note: expanded from macro 'rb_errinfo'
# define rb_errinfo() (ruby_errinfo)
^~~~~~~~~~~~~~
/Users/ymesserl/.rvm/rubies/ruby-2.0.0-p451/include/ruby-2.0.0/ruby/intern.h:343:33: note: passing argument to parameter here
NORETURN(void rb_exc_raise(VALUE));
^
/Users/ymesserl/.rvm/rubies/ruby-2.0.0-p451/include/ruby-2.0.0/x86_64-darwin13.1.0/ruby/config.h:91:48: note: expanded from macro 'NORETURN'
#define NORETURN(x) __attribute__ ((noreturn)) x
^
rbglib.c:542:18: error: use of undeclared identifier 'ruby_errinfo'; did you mean 'rb_errinfo'?
rb_exc_raise(rb_errinfo());
^
./rbgprivate.h:29:25: note: expanded from macro 'rb_errinfo'
# define rb_errinfo() (ruby_errinfo)
^
/Users/ymesserl/.rvm/rubies/ruby-2.0.0-p451/include/ruby-2.0.0/ruby/ruby.h:579:7: note: 'rb_errinfo' declared here
VALUE rb_errinfo(void);
^
rbglib.c:542:18: warning: incompatible pointer to integer conversion passing 'VALUE (void)' to parameter of type 'VALUE' (aka 'unsigned long') [-Wint-conversion]
rb_exc_raise(rb_errinfo());
^~~~~~~~~~~~
./rbgprivate.h:29:24: note: expanded from macro 'rb_errinfo'
# define rb_errinfo() (ruby_errinfo)
^~~~~~~~~~~~~~
/Users/ymesserl/.rvm/rubies/ruby-2.0.0-p451/include/ruby-2.0.0/ruby/intern.h:343:33: note: passing argument to parameter here
NORETURN(void rb_exc_raise(VALUE));
^
/Users/ymesserl/.rvm/rubies/ruby-2.0.0-p451/include/ruby-2.0.0/x86_64-darwin13.1.0/ruby/config.h:91:48: note: expanded from macro 'NORETURN'
#define NORETURN(x) __attribute__ ((noreturn)) x
^
rbglib.c:585:18: error: use of undeclared identifier 'ruby_errinfo'; did you mean 'rb_errinfo'?
rb_exc_raise(rb_errinfo());
^
./rbgprivate.h:29:25: note: expanded from macro 'rb_errinfo'
# define rb_errinfo() (ruby_errinfo)
^
/Users/ymesserl/.rvm/rubies/ruby-2.0.0-p451/include/ruby-2.0.0/ruby/ruby.h:579:7: note: 'rb_errinfo' declared here
VALUE rb_errinfo(void);
^
rbglib.c:585:18: warning: incompatible pointer to integer conversion passing 'VALUE (void)' to parameter of type 'VALUE' (aka 'unsigned long') [-Wint-conversion]
rb_exc_raise(rb_errinfo());
^~~~~~~~~~~~
./rbgprivate.h:29:24: note: expanded from macro 'rb_errinfo'
# define rb_errinfo() (ruby_errinfo)
^~~~~~~~~~~~~~
/Users/ymesserl/.rvm/rubies/ruby-2.0.0-p451/include/ruby-2.0.0/ruby/intern.h:343:33: note: passing argument to parameter here
NORETURN(void rb_exc_raise(VALUE));
^
/Users/ymesserl/.rvm/rubies/ruby-2.0.0-p451/include/ruby-2.0.0/x86_64-darwin13.1.0/ruby/config.h:91:48: note: expanded from macro 'NORETURN'
#define NORETURN(x) __attribute__ ((noreturn)) x
^
rbglib.c:628:18: error: use of undeclared identifier 'ruby_errinfo'; did you mean 'rb_errinfo'?
rb_exc_raise(rb_errinfo());
^
./rbgprivate.h:29:25: note: expanded from macro 'rb_errinfo'
# define rb_errinfo() (ruby_errinfo)
^
/Users/ymesserl/.rvm/rubies/ruby-2.0.0-p451/include/ruby-2.0.0/ruby/ruby.h:579:7: note: 'rb_errinfo' declared here
VALUE rb_errinfo(void);
^
rbglib.c:628:18: warning: incompatible pointer to integer conversion passing 'VALUE (void)' to parameter of type 'VALUE' (aka 'unsigned long') [-Wint-conversion]
rb_exc_raise(rb_errinfo());
^~~~~~~~~~~~
./rbgprivate.h:29:24: note: expanded from macro 'rb_errinfo'
# define rb_errinfo() (ruby_errinfo)
^~~~~~~~~~~~~~
/Users/ymesserl/.rvm/rubies/ruby-2.0.0-p451/include/ruby-2.0.0/ruby/intern.h:343:33: note: passing argument to parameter here
NORETURN(void rb_exc_raise(VALUE));
^
/Users/ymesserl/.rvm/rubies/ruby-2.0.0-p451/include/ruby-2.0.0/x86_64-darwin13.1.0/ruby/config.h:91:48: note: expanded from macro 'NORETURN'
#define NORETURN(x) __attribute__ ((noreturn)) x
^
rbglib.c:671:18: error: use of undeclared identifier 'ruby_errinfo'; did you mean 'rb_errinfo'?
rb_exc_raise(rb_errinfo());
^
./rbgprivate.h:29:25: note: expanded from macro 'rb_errinfo'
# define rb_errinfo() (ruby_errinfo)
^
/Users/ymesserl/.rvm/rubies/ruby-2.0.0-p451/include/ruby-2.0.0/ruby/ruby.h:579:7: note: 'rb_errinfo' declared here
VALUE rb_errinfo(void);
^
rbglib.c:671:18: warning: incompatible pointer to integer conversion passing 'VALUE (void)' to parameter of type 'VALUE' (aka 'unsigned long') [-Wint-conversion]
rb_exc_raise(rb_errinfo());
^~~~~~~~~~~~
./rbgprivate.h:29:24: note: expanded from macro 'rb_errinfo'
# define rb_errinfo() (ruby_errinfo)
^~~~~~~~~~~~~~
/Users/ymesserl/.rvm/rubies/ruby-2.0.0-p451/include/ruby-2.0.0/ruby/intern.h:343:33: note: passing argument to parameter here
NORETURN(void rb_exc_raise(VALUE));
^
/Users/ymesserl/.rvm/rubies/ruby-2.0.0-p451/include/ruby-2.0.0/x86_64-darwin13.1.0/ruby/config.h:91:48: note: expanded from macro 'NORETURN'
#define NORETURN(x) __attribute__ ((noreturn)) x
^
rbglib.c:714:18: error: use of undeclared identifier 'ruby_errinfo'; did you mean 'rb_errinfo'?
rb_exc_raise(rb_errinfo());
^
./rbgprivate.h:29:25: note: expanded from macro 'rb_errinfo'
# define rb_errinfo() (ruby_errinfo)
^
/Users/ymesserl/.rvm/rubies/ruby-2.0.0-p451/include/ruby-2.0.0/ruby/ruby.h:579:7: note: 'rb_errinfo' declared here
VALUE rb_errinfo(void);
^
rbglib.c:714:18: warning: incompatible pointer to integer conversion passing 'VALUE (void)' to parameter of type 'VALUE' (aka 'unsigned long') [-Wint-conversion]
rb_exc_raise(rb_errinfo());
^~~~~~~~~~~~
./rbgprivate.h:29:24: note: expanded from macro 'rb_errinfo'
# define rb_errinfo() (ruby_errinfo)
^~~~~~~~~~~~~~
/Users/ymesserl/.rvm/rubies/ruby-2.0.0-p451/include/ruby-2.0.0/ruby/intern.h:343:33: note: passing argument to parameter here
NORETURN(void rb_exc_raise(VALUE));
^
/Users/ymesserl/.rvm/rubies/ruby-2.0.0-p451/include/ruby-2.0.0/x86_64-darwin13.1.0/ruby/config.h:91:48: note: expanded from macro 'NORETURN'
#define NORETURN(x) __attribute__ ((noreturn)) x
^
rbglib.c:757:18: error: use of undeclared identifier 'ruby_errinfo'; did you mean 'rb_errinfo'?
rb_exc_raise(rb_errinfo());
^
./rbgprivate.h:29:25: note: expanded from macro 'rb_errinfo'
# define rb_errinfo() (ruby_errinfo)
^
/Users/ymesserl/.rvm/rubies/ruby-2.0.0-p451/include/ruby-2.0.0/ruby/ruby.h:579:7: note: 'rb_errinfo' declared here
VALUE rb_errinfo(void);
^
rbglib.c:757:18: warning: incompatible pointer to integer conversion passing 'VALUE (void)' to parameter of type 'VALUE' (aka 'unsigned long') [-Wint-conversion]
rb_exc_raise(rb_errinfo());
^~~~~~~~~~~~
./rbgprivate.h:29:24: note: expanded from macro 'rb_errinfo'
# define rb_errinfo() (ruby_errinfo)
^~~~~~~~~~~~~~
/Users/ymesserl/.rvm/rubies/ruby-2.0.0-p451/include/ruby-2.0.0/ruby/intern.h:343:33: note: passing argument to parameter here
NORETURN(void rb_exc_raise(VALUE));
^
/Users/ymesserl/.rvm/rubies/ruby-2.0.0-p451/include/ruby-2.0.0/x86_64-darwin13.1.0/ruby/config.h:91:48: note: expanded from macro 'NORETURN'
#define NORETURN(x) __attribute__ ((noreturn)) x
^
11 warnings and 9 errors generated.
make: *** [rbglib.o] Error 1
make failed, exit code 2
Here is the ruby versions I tried to use (got same errors for all of them):
$ rvm list
rvm rubies
ruby-1.9.3-p448 [ x86_64 ]
ruby-2.0.0-p247 [ x86_64 ]
=* ruby-2.0.0-p451 [ x86_64 ]
# => - current
# =* - current && default
# * - default
Here is the specific version of gcc it tries to use:
$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix
gtk+ is installed:
$ brew install gtk+
Warning: gtk+-2.24.22 already installed
Any idea how I could install my gem? Thanks
I solved my problem by removing all my homebrew packages and installing them with macports. Especially the gem that needed glib2 (causing the error) was rsvg2, so I solved the problem by reinstalling:
sudo port install ImageMagick
sudo port install librsvg
And then I could install my gems
Related
I am new to this, I should install everything with bundle install and I am stuck at the pg_query 1.3.0 gem. It seems to show me error
linking shared-object pg_query/pg_query.bundle
ld: library not found for -lpg_query
clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [pg_query.bundle] Error 1`
This is the whole log after bundle install:
Fetching pg_query 1.3.0
Installing pg_query 1.3.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/dominikkrautstengel/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/pg_query-1.3.0/ext/pg_query
/Users/dominikkrautstengel/.rbenv/versions/2.7.2/bin/ruby -I /Users/dominikkrautstengel/.rbenv/versions/2.7.2/lib/ruby/2.7.0 -r
./siteconf20221123-20970-12vwdyo.rb extconf.rb
compiling src/pg_query.c
compiling src/pg_query_fingerprint.c
compiling src/pg_query_json.c
compiling src/pg_query_json_plpgsql.c
compiling src/pg_query_normalize.c
compiling src/pg_query_parse.c
compiling src/pg_query_parse_plpgsql.c
compiling src/postgres/contrib_pgcrypto_sha1.c
compiling src/postgres/src_backend_catalog_namespace.c
compiling src/postgres/src_backend_catalog_pg_proc.c
compiling src/postgres/src_backend_lib_stringinfo.c
compiling src/postgres/src_backend_libpq_pqcomm.c
compiling src/postgres/src_backend_nodes_bitmapset.c
compiling src/postgres/src_backend_nodes_copyfuncs.c
compiling src/postgres/src_backend_nodes_equalfuncs.c
compiling src/postgres/src_backend_nodes_extensible.c
compiling src/postgres/src_backend_nodes_list.c
compiling src/postgres/src_backend_nodes_makefuncs.c
compiling src/postgres/src_backend_nodes_nodeFuncs.c
compiling src/postgres/src_backend_nodes_value.c
compiling src/postgres/src_backend_parser_gram.c
In file included from gram.y:46:
In file included from ./src/postgres/include/postgres.h:47:
In file included from ./src/postgres/include/c.h:1224:
In file included from ./src/postgres/include/port.h:17:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/netdb.h:91:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/netinet/in.h:81:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/socket.h:425:1: error:
expected ';' after top level declarator
__CCT_DECLARE_CONSTRAINED_PTR_TYPES(struct sockaddr, sockaddr);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:587:101:
note: expanded from macro '__CCT_DECLARE_CONSTRAINED_PTR_TYPES'
#define __CCT_DECLARE_CONSTRAINED_PTR_TYPES(basetype, basetag) \
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:580:2:
note: expanded from macro '\
__CCT_DECLARE_CONSTRAINED_PTR_TYPE'
__CCT_DISPATCH(__CCT_DECLARE_CONSTRAINED_PTR_TYPE, basetype, basetag, __VA_ARGS__)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:548:2:
note: expanded from macro '__CCT_DISPATCH'
__CCT_DISPATCH1(base, __CCT_COUNT_ARGS(__VA_ARGS__), __VA_ARGS__)
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:113:26: note:
expanded from macro '__CONCAT'
#define __CONCAT(x, y) x ## y
^
<scratch space>:415:1: note: expanded from here
__CCT_DECLARE_CONSTRAINED_PTR_TYPE_3
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:563:14:
note: expanded from macro '__CCT_DECLARE_CONSTRAINED_PTR_TYPE_3'
__CCT_DEFER(__CONCAT, basetag, __CCT_CONTRACT_LIST_TO_TAGGED_SUFFIX_1(kind))
^
In file included from gram.y:46:
In file included from ./src/postgres/include/postgres.h:47:
In file included from ./src/postgres/include/c.h:1224:
In file included from ./src/postgres/include/port.h:17:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/netdb.h:91:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/netinet/in.h:81:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/socket.h:425:1: error:
expected ';' after top level declarator
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:588:101:
note: expanded from macro '__CCT_DECLARE_CONSTRAINED_PTR_TYPES'
__CCT_DECLARE_CONSTRAINED_PTR_TYPE(basetype, basetag, REF); \
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:580:2:
note: expanded from macro '\
__CCT_DECLARE_CONSTRAINED_PTR_TYPE'
__CCT_DISPATCH(__CCT_DECLARE_CONSTRAINED_PTR_TYPE, basetype, basetag, __VA_ARGS__)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:548:2:
note: expanded from macro '__CCT_DISPATCH'
__CCT_DISPATCH1(base, __CCT_COUNT_ARGS(__VA_ARGS__), __VA_ARGS__)
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:113:26: note:
expanded from macro '__CONCAT'
#define __CONCAT(x, y) x ## y
^
<scratch space>:420:1: note: expanded from here
__CCT_DECLARE_CONSTRAINED_PTR_TYPE_4
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:567:11:
note: expanded from macro '__CCT_DECLARE_CONSTRAINED_PTR_TYPE_4'
* __CCT_CONTRACT_TO_ATTR(kind2) \
^
In file included from gram.y:46:
In file included from ./src/postgres/include/postgres.h:47:
In file included from ./src/postgres/include/c.h:1224:
In file included from ./src/postgres/include/port.h:17:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/netdb.h:91:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/netinet/in.h:81:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/socket.h:471:1: error:
typedef redefinition with different types ('struct sockaddr_storage *' vs 'struct sockaddr *')
__CCT_DECLARE_CONSTRAINED_PTR_TYPES(struct sockaddr_storage, sockaddr_storage);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:587:101:
note: expanded from macro '__CCT_DECLARE_CONSTRAINED_PTR_TYPES'
#define __CCT_DECLARE_CONSTRAINED_PTR_TYPES(basetype, basetag) \
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:580:2:
note: expanded from macro '\
__CCT_DECLARE_CONSTRAINED_PTR_TYPE'
__CCT_DISPATCH(__CCT_DECLARE_CONSTRAINED_PTR_TYPE, basetype, basetag, __VA_ARGS__)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:548:2:
note: expanded from macro '__CCT_DISPATCH'
__CCT_DISPATCH1(base, __CCT_COUNT_ARGS(__VA_ARGS__), __VA_ARGS__)
^
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/constrained_ctypes.h:540:38:
note: expanded from macro '__CCT_CONTRACT_TO_ATTR'
#define __CCT_CONTRACT_TO_ATTR(kind) __CONCAT(__CCT_CONTRACT_ATTR_, kind)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:113:26: note:
expanded from macro '__CONCAT'
#define __CONCAT(x, y) x ## y
pg_query_ruby.c:63:41: warning: '}' and ')' tokens terminating statement expression appear in different macro expansion contexts
[-Wcompound-token-split-by-macro]
cPgQuery = rb_const_get(rb_cObject, rb_intern("PgQuery"));
^~~~~~~~~~~~~~~~~~~~
/Users/dominikkrautstengel/.rbenv/versions/2.7.2/include/ruby-2.7.0/ruby/ruby.h:1847:24: note: expanded from macro 'rb_intern'
__extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/dominikkrautstengel/.rbenv/versions/2.7.2/include/ruby-2.7.0/ruby/ruby.h:1837:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
}
^
pg_query_ruby.c:63:41: note: ')' token is here
cPgQuery = rb_const_get(rb_cObject, rb_intern("PgQuery"));
^~~~~~~~~~~~~~~~~~~~
/Users/dominikkrautstengel/.rbenv/versions/2.7.2/include/ruby-2.7.0/ruby/ruby.h:1847:56: note: expanded from macro 'rb_intern'
__extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
^
pg_query_ruby.c:64:42: warning: '(' and '{' tokens introducing statement expression appear in different macro expansion contexts
[-Wcompound-token-split-by-macro]
cParseError = rb_const_get_at(cPgQuery, rb_intern("ParseError"));
^~~~~~~~~~~~~~~~~~~~~~~
/Users/dominikkrautstengel/.rbenv/versions/2.7.2/include/ruby-2.7.0/ruby/ruby.h:1847:23: note: expanded from macro 'rb_intern'
__extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
^
pg_query_ruby.c:64:42: note: '{' token is here
cParseError = rb_const_get_at(cPgQuery, rb_intern("ParseError"));
^~~~~~~~~~~~~~~~~~~~~~~
/Users/dominikkrautstengel/.rbenv/versions/2.7.2/include/ruby-2.7.0/ruby/ruby.h:1847:24: note: expanded from macro 'rb_intern'
__extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/dominikkrautstengel/.rbenv/versions/2.7.2/include/ruby-2.7.0/ruby/ruby.h:1832:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
{ \
^
pg_query_ruby.c:64:42: warning: '}' and ')' tokens terminating statement expression appear in different macro expansion contexts
[-Wcompound-token-split-by-macro]
cParseError = rb_const_get_at(cPgQuery, rb_intern("ParseError"));
^~~~~~~~~~~~~~~~~~~~~~~
/Users/dominikkrautstengel/.rbenv/versions/2.7.2/include/ruby-2.7.0/ruby/ruby.h:1847:24: note: expanded from macro 'rb_intern'
__extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/dominikkrautstengel/.rbenv/versions/2.7.2/include/ruby-2.7.0/ruby/ruby.h:1837:5: note: expanded from macro 'RUBY_CONST_ID_CACHE'
}
^
pg_query_ruby.c:64:42: note: ')' token is here
cParseError = rb_const_get_at(cPgQuery, rb_intern("ParseError"));
^~~~~~~~~~~~~~~~~~~~~~~
/Users/dominikkrautstengel/.rbenv/versions/2.7.2/include/ruby-2.7.0/ruby/ruby.h:1847:56: note: expanded from macro 'rb_intern'
__extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : \
^
pg_query_ruby.c:59:1: warning: function 'raise_ruby_fingerprint_error' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
17 warnings generated.
linking shared-object pg_query/pg_query.bundle
ld: library not found for -lpg_query
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [pg_query.bundle] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/dominikkrautstengel/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/pg_query-1.3.0 for inspection.
Results logged to
/Users/dominikkrautstengel/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/extensions/arm64-darwin-22/2.7.0/pg_query-1.3.0/gem_make.out
An error occurred while installing pg_query (1.3.0), and Bundler cannot continue.
Make sure that `gem install pg_query -v '1.3.0'` succeeds before bundling.
In Gemfile:
prosopite was resolved to 0.2.1, which depends on
pg_query
I have latest Xcode installed and Command Line Tools also. But as I said, I do not understand any of this, this is just my assignment to be able to run on local.
When I am bitbaking my custom image recipe for STM32MP1 based Avenger96 board I am facing some errors related to analyze.l:466:19: error: format not a string literal and no format arguments [-Werror=format-security]. I don't understand why I am getting this error as this is the first I am facing it. Please find the below complete log:
DEBUG: Executing python function autotools_aclocals
DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common', 'arm-32', 'common-linux', 'common-glibc', 'arm-linux', 'arm-linux-gnueabi', 'common']
DEBUG: Python function autotools_aclocals finished
DEBUG: Executing shell function do_compile
NOTE: make -j 8
make all-recursive
make[1]: Entering directory '/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/build'
Making all in src
make[2]: Entering directory '/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/build/src'
Making all in libcommon
make[3]: Entering directory '/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/build/src/libcommon'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/build/src/libcommon'
Making all in libkbdfile
make[3]: Entering directory '/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/build/src/libkbdfile'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/build/src/libkbdfile'
Making all in libkeymap
make[3]: Entering directory '/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/build/src/libkeymap'
make all-am
make[4]: Entering directory '/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/build/src/libkeymap'
../../arm-poky-linux-gnueabi-libtool --tag=CC --mode=compile arm-poky-linux-gnueabi-gcc -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/recipe-sysroot -DHAVE_CONFIG_H -I. -I../../../kbd-2.2.0/src/libkeymap -I../.. -I../../../kbd-2.2.0/src/libkeymap -I. -I../../../kbd-2.2.0/src/libkeymap/.. -I./.. -I../../../kbd-2.2.0/src/libkeymap/../libcommon -I./../libcommon -I../../../kbd-2.2.0/src/libkeymap/../libkbdfile -I./../libkbdfile -DDATADIR=\"/usr/share\" -DLOCALEDIR=\"/usr/share/locale\" -U_GNU_SOURCE -funit-at-a-time -g -O2 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0=/usr/src/debug/kbd/2.2.0-r0 -fdebug-prefix-map=/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0=/usr/src/debug/kbd/2.2.0-r0 -fdebug-prefix-map=/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/recipe-sysroot= -fdebug-prefix-map=/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/recipe-sysroot-native= -Waggregate-return -Wall -Wcast-align -Wconversion -Wdisabled-optimization -Wextra -Wmissing-declarations -Wmissing-format-attribute -Wmissing-noreturn -Wmissing-prototypes -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings -c -o analyze.lo ../../../kbd-2.2.0/src/libkeymap/analyze.c
arm-poky-linux-gnueabi-libtool: compile: arm-poky-linux-gnueabi-gcc -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/recipe-sysroot -DHAVE_CONFIG_H -I. -I../../../kbd-2.2.0/src/libkeymap -I../.. -I../../../kbd-2.2.0/src/libkeymap -I. -I../../../kbd-2.2.0/src/libkeymap/.. -I./.. -I../../../kbd-2.2.0/src/libkeymap/../libcommon -I./../libcommon -I../../../kbd-2.2.0/src/libkeymap/../libkbdfile -I./../libkbdfile -DDATADIR=\"/usr/share\" -DLOCALEDIR=\"/usr/share/locale\" -U_GNU_SOURCE -funit-at-a-time -g -O2 -D_FORTIFY_SOURCE=2 -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0=/usr/src/debug/kbd/2.2.0-r0 -fdebug-prefix-map=/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0=/usr/src/debug/kbd/2.2.0-r0 -fdebug-prefix-map=/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/recipe-sysroot= -fdebug-prefix-map=/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/recipe-sysroot-native= -Waggregate-return -Wall -Wcast-align -Wconversion -Wdisabled-optimization -Wextra -Wmissing-declarations -Wmissing-format-attribute -Wmissing-noreturn -Wmissing-prototypes -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings -c ../../../kbd-2.2.0/src/libkeymap/analyze.c -fPIC -DPIC -o .libs/analyze.o
analyze.l: In function 'find_incl_file_near_fn':
analyze.l:141:24: warning: passing argument 2 of 'kbdfile_find' from incompatible pointer type [-Wincompatible-pointer-types]
In file included from ../../../kbd-2.2.0/src/libkeymap/keymap/kmap.h:36,
from ../../../kbd-2.2.0/src/libkeymap/keymap.h:8,
from ../../../kbd-2.2.0/src/libkeymap/analyze.c:1:
../../../kbd-2.2.0/src/libkeymap/../libkbdfile/kbdfile.h:40:37: note: expected 'char **' but argument is of type 'const char **'
40 | int kbdfile_find(char *fnam, char **dirpath, char **suffixes, struct kbdfile *fp);
| ~~~~~~~^~~~~~~
analyze.l:141:42: warning: passing argument 3 of 'kbdfile_find' from incompatible pointer type [-Wincompatible-pointer-types]
In file included from ../../../kbd-2.2.0/src/libkeymap/keymap/kmap.h:36,
from ../../../kbd-2.2.0/src/libkeymap/keymap.h:8,
from ../../../kbd-2.2.0/src/libkeymap/analyze.c:1:
../../../kbd-2.2.0/src/libkeymap/../libkbdfile/kbdfile.h:40:53: note: expected 'char **' but argument is of type 'const char * const*'
40 | int kbdfile_find(char *fnam, char **dirpath, char **suffixes, struct kbdfile *fp);
| ~~~~~~~^~~~~~~~
analyze.l: In function 'find_standard_incl_file':
analyze.l:168:22: warning: passing argument 2 of 'kbdfile_find' from incompatible pointer type [-Wincompatible-pointer-types]
In file included from ../../../kbd-2.2.0/src/libkeymap/keymap/kmap.h:36,
from ../../../kbd-2.2.0/src/libkeymap/keymap.h:8,
from ../../../kbd-2.2.0/src/libkeymap/analyze.c:1:
../../../kbd-2.2.0/src/libkeymap/../libkbdfile/kbdfile.h:40:37: note: expected 'char **' but argument is of type 'const char * const*'
40 | int kbdfile_find(char *fnam, char **dirpath, char **suffixes, struct kbdfile *fp);
| ~~~~~~~^~~~~~~
analyze.l:168:40: warning: passing argument 3 of 'kbdfile_find' from incompatible pointer type [-Wincompatible-pointer-types]
In file included from ../../../kbd-2.2.0/src/libkeymap/keymap/kmap.h:36,
from ../../../kbd-2.2.0/src/libkeymap/keymap.h:8,
from ../../../kbd-2.2.0/src/libkeymap/analyze.c:1:
../../../kbd-2.2.0/src/libkeymap/../libkbdfile/kbdfile.h:40:53: note: expected 'char **' but argument is of type 'const char * const*'
40 | int kbdfile_find(char *fnam, char **dirpath, char **suffixes, struct kbdfile *fp);
| ~~~~~~~^~~~~~~~
analyze.l:197:24: warning: passing argument 2 of 'kbdfile_find' from incompatible pointer type [-Wincompatible-pointer-types]
In file included from ../../../kbd-2.2.0/src/libkeymap/keymap/kmap.h:36,
from ../../../kbd-2.2.0/src/libkeymap/keymap.h:8,
from ../../../kbd-2.2.0/src/libkeymap/analyze.c:1:
../../../kbd-2.2.0/src/libkeymap/../libkbdfile/kbdfile.h:40:37: note: expected 'char **' but argument is of type 'const char * const*'
40 | int kbdfile_find(char *fnam, char **dirpath, char **suffixes, struct kbdfile *fp);
| ~~~~~~~^~~~~~~
analyze.l:197:42: warning: passing argument 3 of 'kbdfile_find' from incompatible pointer type [-Wincompatible-pointer-types]
In file included from ../../../kbd-2.2.0/src/libkeymap/keymap/kmap.h:36,
from ../../../kbd-2.2.0/src/libkeymap/keymap.h:8,
from ../../../kbd-2.2.0/src/libkeymap/analyze.c:1:
../../../kbd-2.2.0/src/libkeymap/../libkbdfile/kbdfile.h:40:53: note: expected 'char **' but argument is of type 'const char * const*'
40 | int kbdfile_find(char *fnam, char **dirpath, char **suffixes, struct kbdfile *fp);
| ~~~~~~~^~~~~~~~
analyze.l: In function 'find_incl_file':
analyze.l:210:27: warning: passing argument 2 of 'kbdfile_find' from incompatible pointer type [-Wincompatible-pointer-types]
In file included from ../../../kbd-2.2.0/src/libkeymap/keymap/kmap.h:36,
from ../../../kbd-2.2.0/src/libkeymap/keymap.h:8,
from ../../../kbd-2.2.0/src/libkeymap/analyze.c:1:
../../../kbd-2.2.0/src/libkeymap/../libkbdfile/kbdfile.h:40:37: note: expected 'char **' but argument is of type 'const char * const*'
40 | int kbdfile_find(char *fnam, char **dirpath, char **suffixes, struct kbdfile *fp);
| ~~~~~~~^~~~~~~
analyze.l:210:45: warning: passing argument 3 of 'kbdfile_find' from incompatible pointer type [-Wincompatible-pointer-types]
In file included from ../../../kbd-2.2.0/src/libkeymap/keymap/kmap.h:36,
from ../../../kbd-2.2.0/src/libkeymap/keymap.h:8,
from ../../../kbd-2.2.0/src/libkeymap/analyze.c:1:
../../../kbd-2.2.0/src/libkeymap/../libkbdfile/kbdfile.h:40:53: note: expected 'char **' but argument is of type 'const char * const*'
40 | int kbdfile_find(char *fnam, char **dirpath, char **suffixes, struct kbdfile *fp);
| ~~~~~~~^~~~~~~~
analyze.l:225:26: warning: passing argument 2 of 'kbdfile_find' from incompatible pointer type [-Wincompatible-pointer-types]
In file included from ../../../kbd-2.2.0/src/libkeymap/keymap/kmap.h:36,
from ../../../kbd-2.2.0/src/libkeymap/keymap.h:8,
from ../../../kbd-2.2.0/src/libkeymap/analyze.c:1:
../../../kbd-2.2.0/src/libkeymap/../libkbdfile/kbdfile.h:40:37: note: expected 'char **' but argument is of type 'const char **'
40 | int kbdfile_find(char *fnam, char **dirpath, char **suffixes, struct kbdfile *fp);
| ~~~~~~~^~~~~~~
analyze.l:225:36: warning: passing argument 3 of 'kbdfile_find' from incompatible pointer type [-Wincompatible-pointer-types]
In file included from ../../../kbd-2.2.0/src/libkeymap/keymap/kmap.h:36,
from ../../../kbd-2.2.0/src/libkeymap/keymap.h:8,
from ../../../kbd-2.2.0/src/libkeymap/analyze.c:1:
../../../kbd-2.2.0/src/libkeymap/../libkbdfile/kbdfile.h:40:53: note: expected 'char **' but argument is of type 'const char * const*'
40 | int kbdfile_find(char *fnam, char **dirpath, char **suffixes, struct kbdfile *fp);
| ~~~~~~~^~~~~~~~
In file included from analyze.l:10:
analyze.l: In function 'yylex':
analyze.l:466:19: error: format not a string literal and no format arguments [-Werror=format-security]
../../../kbd-2.2.0/src/libkeymap/contextP.h:79:55: note: in definition of macro 'lk_log_cond'
79 | lk_log(ctx, level, __FILE__, __LINE__, __func__, ##arg); \
| ^~~
analyze.l:466:6: note: in expansion of macro 'ERR'
cc1: some warnings being treated as errors
make[4]: *** [Makefile:604: analyze.lo] Error 1
make[4]: Leaving directory '/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/build/src/libkeymap'
make[3]: *** [Makefile:476: all] Error 2
make[3]: Leaving directory '/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/build/src/libkeymap'
make[2]: *** [Makefile:1083: all-recursive] Error 1
make[2]: Leaving directory '/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/build/src'
make[1]: *** [Makefile:471: all-recursive] Error 1
make[1]: Leaving directory '/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/build'
ERROR: oe_runmake failed
make: *** [Makefile:402: all] Error 2
WARNING: exit code 1 from a shell command.
ERROR: Execution of '/root/build-swu-v2/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0/temp/run.do_compile.380' failed with exit code 1
When I checked the sources/poky/meta/recipes-core/kbd, add missing string format patch patch is already available and included in kbd_2.2.0.bb recipe. And same patch is also present in build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/kbd/2.2.0-r0. But still I am getting above error.
I have no idea what this error means and why am I getting this all of a sudden.
Can anyone please let me know how to fix this issue?
Your help will be much appreciated.
Thanks in advance.
You should NOT do the following, its likely your code compiles just fine on an older version of GCC, but GCC adds new warnings and errors for security purposes, you should really look at the code and fix it properly, it is also very likely you just need to use a newer version of kbd that builds contains these fixes (kbd is at 2.4.0 in the latest branch: https://git.yoctoproject.org/poky/tree/meta/recipes-core/kbd/kbd_2.4.0.bb).
But if you want to temporarily disable the GCC error to check if your build works while you either fix the kbd code or upgrade to a new version of kbd, you could set:
CFLAGS += "-Wno-error=format-security"
Which will suppress the compilation error, I cannot stress this enough, the fix is to actually fix the kbd code.
quick fix, thanks to aehs29:
copy file
https://git.yoctoproject.org/poky/tree/meta/recipes-core/kbd/kbd_2.4.0.bb
to the folder .../poky/meta/recipes-core/kbd/
remove file .../poky/meta/recipes-core/kbd/kbd_2.2.0.bb
and rebuild
bitbake -k radxa-minimal-image
I was able to compiled the gateway but I got the error below running the make command.
gcc -D_REENTRANT=1 -I. -Igw -g -O2 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_LARGE_FILES= -I/usr/include/libxml2 -I/usr/include/mysql -o gwlib/dbpool.o -c gwlib/dbpool.c
In file included from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/stdlib.h:25,
from gwlib/gwlib.h:70,
from gwlib/dbpool.c:70:
/usr/include/features.h:187:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
187 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
In file included from gwlib/gwlib.h:83,
from gwlib/dbpool.c:70:
gwlib/dbpool_mysql.c: In function ‘mysql_select’:
gwlib/dbpool_mysql.c:224:48: error: ‘my_bool’ undeclared (first use in this function); did you mean ‘xr_bool’?
224 | bind[i].is_null = gw_malloc(sizeof(my_bool));
gwlib/gwmem.h:122:43: note: in definition of macro ‘gw_malloc’
122 | #define gw_malloc(size) (gw_native_malloc(size))|
gwlib/dbpool_mysql.c:224:48: note: each undeclared identifier is reported only once for each function it appears in
224 | bind[i].is_null = gw_malloc(sizeof(my_bool));
gwlib/gwmem.h:122:43: note: in definition of macro ‘gw_malloc’
122 | #define gw_malloc(size) (gw_native_malloc(size))
make: *** [Makefile:230: gwlib/dbpool.o] Error 1`
This error comes when you're compiling with mysql 8
To fix this, add these lines to gwlib/dbpool_mysql.c
/* define my_bool for newer versions because they use the bool or int C type instead */
#if MYSQL_VERSION_ID >= 80000 && !defined(MARIADB_BASE_VERSION)
typedef bool my_bool;
#endif
I am trying to install a linear solver called PDSLin on ubuntu16.04 LTS machine. I installed all the dependencies but when running make for PDSLin I got those warnings and errors. I do not understand from where -c in gcc -c come from and whether it is the reason of not identifying "superlu_options_t" variable.
(cd src; make lib;)
make[1]: Entering directory '/home/afrah/pdslin/src'
(make all; cd slu; make lib)
make[2]: Entering directory '/home/afrah/pdslin/src'
gcc -c -I/home/afrah/pdslin/include -I/home/afrah/SuperLU_5.2.0/SRC -I/usr/include -DDEBUGlevel=0 -DPRNTlevel=0 -DAdd_ -DUSE_VENDOR_BLAS -I/home/afrah/SuperLU_DIST_5.1.2/SRC -DSCOTCH_ORDER -I/usr/local/include -I/usr/share/parmetis/include -I/usr/share/mpich-install/include -I/home/afrah/petsc/include -I/home/afrah/petsc/arch-linux2-c-debug/include -Wall -DWITH_HIPS -DWITH_PETSC pdslin_graph.c
pdslin_graph.c: In function ‘a_plus_at_CompRow_loc_with_diag’:
pdslin_graph.c:51:26: warning: variable ‘sz_tcolind_loc’ set but not used [-Wunused-but-set-variable]
int_t sz_tcolind_send, sz_tcolind_loc, sz_tcolind_recv;
^
pdslin_graph.c: In function ‘perm_snodes’:
pdslin_graph.c:898:22: warning: passing argument 1 of ‘ParMETIS_V3_NodeND’ from incompatible pointer type [-Wincompatible-pointer-types]
ParMETIS_V3_NodeND(disp, m_rowptr, m_colind, &numflag, options,
^
// similar warnings
pdslin_graph.c:1034:9: warning: variable ‘numflag’ set but not used [-Wunused-but-set-variable]
int numflag;
^
gcc -c -I/home/afrah/pdslin/include -I/home/afrah/SuperLU_5.2.0/SRC -I/usr/include -DDEBUGlevel=0 -DPRNTlevel=0 -DAdd_ -DUSE_VENDOR_BLAS -I/home/afrah/SuperLU_DIST_5.1.2/SRC -DSCOTCH_ORDER -I/usr/local/include -I/usr/share/parmetis/include -I/usr/share/mpich-install/include -I/home/afrah/petsc/include -I/home/afrah/petsc/arch-linux2-c-debug/include -Wall -DWITH_HIPS -DWITH_PETSC pdslin_wrapper.c
gcc -c -I/home/afrah/pdslin/include -I/home/afrah/SuperLU_5.2.0/SRC -I/usr/include -DDEBUGlevel=0 -DPRNTlevel=0 -DAdd_ -DUSE_VENDOR_BLAS -I/home/afrah/SuperLU_DIST_5.1.2/SRC -DSCOTCH_ORDER -I/usr/local/include -I/usr/share/parmetis/include -I/usr/share/mpich-install/include -I/home/afrah/petsc/include -I/home/afrah/petsc/arch-linux2-c-debug/include -Wall -DWITH_HIPS -DWITH_PETSC pdslin_perm.c
pdslin_perm.c: In function ‘comp_perm’:
pdslin_perm.c:113:24: warning: passing argument 1 of ‘ParMETIS_V3_NodeND’ from incompatible pointer type [-Wincompatible-pointer-types]
ParMETIS_V3_NodeND(disp, rowptr_l, colind_l, &numflag, options,
^
In file included from pdslin_perm.c:14:0:
/home/afrah/SuperLU_DIST_5.1.2/SRC/parmetis.h:102:13: note: expected ‘idx_t * {aka long int *}’ but argument is of type ‘int *’
int __cdecl ParMETIS_V3_NodeND(
^
pdslin_perm.c:113:30: warning: passing argument 2 of ‘ParMETIS_V3_NodeND’ from incompatible pointer type [-Wincompatible-pointer-types]
ParMETIS_V3_NodeND(disp, rowptr_l, colind_l, &numflag, options,
^
In file included from pdslin_perm.c:14:0:
/home/afrah/SuperLU_DIST_5.1.2/SRC/parmetis.h:102:13: note: expected ‘idx_t * {aka long int *}’ but argument is of type ‘int *’
int __cdecl ParMETIS_V3_NodeND(
^
pdslin_perm.c:113:40: warning: passing argument 3 of ‘ParMETIS_V3_NodeND’ from incompatible pointer type [-Wincompatible-pointer-types]
ParMETIS_V3_NodeND(disp, rowptr_l, colind_l, &numflag, options,
^
// warnings
gcc -c -I/home/afrah/pdslin/include -I/home/afrah/SuperLU_5.2.0/SRC -I/usr/include -DDEBUGlevel=0 -DPRNTlevel=0 -DAdd_ -DUSE_VENDOR_BLAS -I/home/afrah/SuperLU_DIST_5.1.2/SRC -DSCOTCH_ORDER -I/usr/local/include -I/usr/share/parmetis/include -I/usr/share/mpich-install/include -I/home/afrah/petsc/include -I/home/afrah/petsc/arch-linux2-c-debug/include -Wall -DWITH_HIPS -DWITH_PETSC pdslin_util.c
In file included from pdslin_util.c:11:0:
/home/afrah/pdslin/include/pdslin_slu.h:49:24: error: unknown type name ‘superlu_options_t’
void get_perm_c_dist_t(superlu_options_t *options, int_t pnum, int_t ispec, S
^
/home/afrah/pdslin/include/pdslin_slu.h:70:24: error: unknown type name ‘superlu_options_t’
int_t pdslin_symbfact( superlu_options_t *options, /* input options */
^
pdslin_util.c: In function ‘a_plus_at’:
pdslin_util.c:116:9: warning: variable ‘nnz_loc’ set but not used [-Wunused-but-set-variable]
int_t nnz_loc; /* number of local nonzeros in matrix A */
^
pdslin_util.c:107:26: warning: variable ‘sz_tcolind_loc’ set but not used [-Wunused-but-set-variable]
int_t sz_tcolind_send, sz_tcolind_loc, sz_tcolind_recv;
^
pdslin_util.c: In function ‘pdslin_print_stat’:
pdslin_util.c:1047:13: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘long long int’ [-Wformat=]
printf( " domain dim : (%.2lf, %.2lf ) %ld / %ld, %ld\n",
^
pdslin_util.c:1047:13: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘long long int’ [-Wformat=]
pdslin_util.c:1047:13: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type ‘long long int’ [-Wformat=]
pdslin_util.c:1049:13: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘long long int’ [-Wformat=]
printf( " domain nnz : (%.2lf, %.2lf ) %ld / %ld, %ld\n",
^
// warnings
makefile:103: recipe for target 'pdslin_util.o' failed
make[2]: *** [pdslin_util.o] Error 1
make[2]: Leaving directory '/home/afrah/pdslin/src'
make[2]: Entering directory '/home/afrah/pdslin/src/slu'
gcc -c -I/home/afrah/pdslin/include -I/home/afrah/SuperLU_5.2.0/SRC -I/usr/include -DDEBUGlevel=0 -DPRNTlevel=0 -DAdd_ -DUSE_VENDOR_BLAS -I/home/afrah/SuperLU_DIST_5.1.2/SRC -DSCOTCH_ORDER -I/usr/local/include -I/usr/share/parmetis/include -I/usr/share/mpich-install/include -I/home/afrah/petsc/include -I/home/afrah/petsc/arch-linux2-c-debug/include -Wall -DWITH_HIPS -DWITH_PETSC get_perm_c.c
get_perm_c.c:49:11: error: unknown type name ‘superlu_options_t’
superlu_options_t *options,
^
get_perm_c.c:167:19: error: unknown type name ‘superlu_options_t’
get_perm_c_dist_t(superlu_options_t *options, int_t pnum, int_t ispec, SuperM
^
makefile:41: recipe for target 'get_perm_c.o' failed
make[2]: *** [get_perm_c.o] Error 1
make[2]: Leaving directory '/home/afrah/pdslin/src/slu'
makefile:46: recipe for target 'lib' failed
make[1]: *** [lib] Error 2
make[1]: Leaving directory '/home/afrah/pdslin/src'
makefile:8: recipe for target 'all' failed
make: *** [all] Error 2
This is my makefile:
#
# top directory make.inc
#
# on hopper: % module load cray-petsc which also loads cray-tpsl, including pt-schotch and parmetis.
########################################################################
# home directory, where the software is located
TOP = /home/afrah/pdslin
INCLUDEDIR =/usr/include
########################################################################
# hybrid solver library name
LIB = $(TOP)/lib/libhybrid.a
########################################################################
# Libraries:
#
# MPI/BLAS libraries
L_MPI = /usr/share/mpich-install/lib/libmpi.a -llibmpi
I_MPI = -I/usr/share/mpich-install/include
L_BLAS = -llibblas -lliblapack
########################################################################
# make utility
MAKE = make
########################################################################
# archiver and flags to build the library
ARCH = /usr/bin/ar
ARCHFLAGS = -cr
RANLIB = /usr/bin/ranlib
########################################################################
# C compiler and flags
CC = gcc
FLAGS = -Wall -DWITH_HIPS -DWITH_PETSC
FLAGS = -Wall -DWITH_HIPS -DWITH_PETSC
########################################################################
# fortran compiler and flags
FC = mpif90
FLIB = -pgf90libs
FFLAGS = -fast
FFLAGS = -g
########################################################################
# linker used to link example program with the library
#LINKER = /usr/share/mpich-install/bin/mpicc -Wl,--allow-multiple-definition
LINKER = CC -Wl,--allow-multiple-definition
########################################################################
# C++ compiler (this is not needed for your standard compilation)
CPP = mpicxx
####################################################################
#L_PPART = -L/usr/share/parmetis/lib/libparmetis -lparmetis
#I_PPART = -I/usr/local/include
L_PPART = -L/usr/local/lib -llibscotch -llibptscotch \
-L/usr/local/lib -lptscotcherr -llibscotchmetis -lptscotchparmetis
I_PPART = -DSCOTCH_ORDER -I/usr/local/include
#------------------------------------------------------#
# Metis Library, and its header files
L_METIS = -L/usr/share/parmetis/lib/libmetis -lmetis
I_METIS = -I/usr/share/parmetis/include
#------------------------------------------------------#
# SuperLU_DIST library, and its header files (hopper: module load superlu_dist)
# SLUDIST = /global/common/hopper2/acts/SuperLU/SuperLU_DIST/2.5
# L_SLUDIST = -L$(SLUDIST)/craypgi-xe6_O/lib -lsuperlu_dist_2.5
# I_SLUDIST = -DDEBUGlevel=0 -DPRNTlevel=1 -DAdd_ -DUSE_VENDOR_BLAS -I$(SLUDIST)/SRC
SLUDIST = /home/afrah/SuperLU_DIST_5.1.2
I_SLUDIST = -DDEBUGlevel=0 -DPRNTlevel=0 -DAdd_ -DUSE_VENDOR_BLAS -I$(SLUDIST)/SRC
L_SLUDIST = -L$(SLUDIST)/lib -llibsuperlu_dist.so
#------------------------------------------------------#
# Petsc library, and its header files
# double version
I_PETSC = -I/home/afrah/petsc/include \
-I/home/afrah/petsc/arch-linux2-c-debug/include
L_PETSC = -L/home/afrah/petsc/arch-linux2-c-debug/lib -llibpetsc
#------------------------------------------------------#
# Other optional libraries
# serial SuperLU
L_SLU = -L/home/afrah/SuperLU_5.2.0/lib -llibsuperlu_5.2.a
I_SLU = -I/home/afrah/SuperLU_5.2.0/SRC
########################################################################
########################################################################
# accumulate all includes and libraries
INC = -I$(TOP)/include $(I_SLU) -I$(INCLUDEDIR) $(I_SLUDIST) $(I_PPART) $(I_METIS) $(I_MPI) $(I_PETSC)
LIBS = $(LIB) $(L_SLU) $(L_SLUDIST) $(L_PPART) $(L_METIS) $(L_BLAS) $(L_MPI) $
(L_PETSC)
ZLIBS = $(LIB) $(L_SLUDIST) $(L_PPART) $(L_METIS) $(L_BLAS) $(L_MPI) $(L_SLU) $(L_PETSC)
due to rubygem dependencies, eventmachine version 1.0.0.beta.3 needs to be installed. installing the rubygem as follows, results in error. enclosed a snippet for convenience.
$ sudo gem install eventmachine -v '1.0.0.beta.3'
Building native extensions. This could take a while...
ERROR: Error installing eventmachine:
ERROR: Failed to build gem native extension.
/usr/bin/ruby2.0 extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... yes
checking for inotify_init() in sys/inotify.h... yes
checking for writev() in sys/uio.h... yes
checking for rb_thread_check_ints()... yes
checking for rb_time_new()... yes
checking for sys/event.h... no
checking for epoll_create() in sys/epoll.h... yes
creating Makefile
make "DESTDIR="
compiling cmain.cpp
compiling kb.cpp
kb.cpp: In member function ‘virtual void KeyboardDescriptor::Read()’:
kb.cpp:77:27: warning: ignoring return value of ‘ssize_t read(int, void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
read (GetSocket(), &c, 1);
^
compiling pipe.cpp
compiling binder.cpp
compiling ed.cpp
compiling page.cpp
compiling rubymain.cpp
rubymain.cpp: In function ‘VALUE t_connect_server(VALUE, VALUE, VALUE)’:
rubymain.cpp:504:42: error: format not a string literal and no format arguments [-Werror=format-security]
rb_raise (EM_eConnectionError, e.what());
^
rubymain.cpp: In function ‘VALUE t_bind_connect_server(VALUE, VALUE, VALUE, VALUE, VALUE)’:
rubymain.cpp:525:42: error: format not a string literal and no format arguments [-Werror=format-security]
rb_raise (EM_eConnectionError, e.what());
^
rubymain.cpp: In function ‘VALUE t_watch_filename(VALUE, VALUE)’:
rubymain.cpp:798:38: error: format not a string literal and no format arguments [-Werror=format-security]
rb_raise (EM_eUnsupported, e.what());
^
rubymain.cpp: In function ‘VALUE t_watch_pid(VALUE, VALUE)’:
rubymain.cpp:824:38: error: format not a string literal and no format arguments [-Werror=format-security]
rb_raise (EM_eUnsupported, e.what());
^
rubymain.cpp: In function ‘VALUE t_start_proxy(VALUE, VALUE, VALUE, VALUE, VALUE)’:
rubymain.cpp:1024:42: error: format not a string literal and no format arguments [-Werror=format-security]
rb_raise (EM_eConnectionError, e.what());
^
rubymain.cpp: In function ‘VALUE t_stop_proxy(VALUE, VALUE)’:
rubymain.cpp:1039:42: error: format not a string literal and no format arguments [-Werror=format-security]
rb_raise (EM_eConnectionError, e.what());
^
cc1plus: some warnings being treated as errors
make: *** [rubymain.o] Error 1
Gem files will remain installed in /var/lib/gems/2.0.0/gems/eventmachine-1.0.0.beta.3 for inspection.
Results logged to /var/lib/gems/2.0.0/gems/eventmachine-1.0.0.beta.3/ext/gem_make.out
i tried to modify /var/lib/gems/2.0.0/gems/eventmachine-1.0.0.beta.3/ext/Makefile by replacing -Werror=format-security with -Wformat-security, then running make. it installed the the rubygem, though when trying to check whether the rubygem installation has a consistent behaviour. hence, i tried to invoke the command above (gem install...) again, but it fails again.
here are few more details on the system:
$ ruby --version
ruby 2.0.0p299 (2013-08-29) [x86_64-linux-gnu]
$ cat /etc/*release* | grep -i distrib
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=13.10
DISTRIB_CODENAME=saucy
DISTRIB_DESCRIPTION="Ubuntu 13.10"
$ uname -a
Linux user 3.11.0-15-generic #23-Ubuntu SMP Mon Dec 9 18:17:04 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
$ gcc --version | grep gcc
gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
i am also familiar with this fix solution, and this one, but it does not work for me.
any help would be appreciated.
UPDATE:
i also tried the following:
$ sudo gem install eventmachine -v '1.0.0.beta.3' -- --with-cflags=\"-Wno-error=format-security\"
Building native extensions with: '--with-cflags="-Wno-error=format-security"'
This could take a while...
ERROR: Error installing eventmachine:
ERROR: Failed to build gem native extension.
/usr/bin/ruby2.0 extconf.rb --with-cflags="-Wno-error=format-security"
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... yes
checking for inotify_init() in sys/inotify.h... yes
checking for writev() in sys/uio.h... yes
checking for rb_thread_check_ints()... yes
checking for rb_time_new()... yes
checking for sys/event.h... no
checking for epoll_create() in sys/epoll.h... yes
creating Makefile
make "DESTDIR="
compiling cmain.cpp
compiling kb.cpp
kb.cpp: In member function ‘virtual void KeyboardDescriptor::Read()’:
kb.cpp:77:27: warning: ignoring return value of ‘ssize_t read(int, void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
read (GetSocket(), &c, 1);
^
compiling pipe.cpp
compiling binder.cpp
compiling ed.cpp
compiling page.cpp
compiling rubymain.cpp
rubymain.cpp: In function ‘VALUE t_connect_server(VALUE, VALUE, VALUE)’:
rubymain.cpp:504:42: error: format not a string literal and no format arguments [-Werror=format-security]
rb_raise (EM_eConnectionError, e.what());
^
rubymain.cpp: In function ‘VALUE t_bind_connect_server(VALUE, VALUE, VALUE, VALUE, VALUE)’:
rubymain.cpp:525:42: error: format not a string literal and no format arguments [-Werror=format-security]
rb_raise (EM_eConnectionError, e.what());
^
rubymain.cpp: In function ‘VALUE t_watch_filename(VALUE, VALUE)’:
rubymain.cpp:798:38: error: format not a string literal and no format arguments [-Werror=format-security]
rb_raise (EM_eUnsupported, e.what());
^
rubymain.cpp: In function ‘VALUE t_watch_pid(VALUE, VALUE)’:
rubymain.cpp:824:38: error: format not a string literal and no format arguments [-Werror=format-security]
rb_raise (EM_eUnsupported, e.what());
^
rubymain.cpp: In function ‘VALUE t_start_proxy(VALUE, VALUE, VALUE, VALUE, VALUE)’:
rubymain.cpp:1024:42: error: format not a string literal and no format arguments [-Werror=format-security]
rb_raise (EM_eConnectionError, e.what());
^
rubymain.cpp: In function ‘VALUE t_stop_proxy(VALUE, VALUE)’:
rubymain.cpp:1039:42: error: format not a string literal and no format arguments [-Werror=format-security]
rb_raise (EM_eConnectionError, e.what());
^
cc1plus: some warnings being treated as errors
make: *** [rubymain.o] Error 1
Gem files will remain installed in /var/lib/gems/2.0.0/gems/eventmachine-1.0.0.beta.3 for inspection.
Results logged to /var/lib/gems/2.0.0/gems/eventmachine-1.0.0.beta.3/ext/gem_make.out
you can see that the flag is not propagated to the compilation of the rubygem.
UPDATE 2:
also tried the following:
$ sudo gem install eventmachine -v '1.0.0.beta.3' -- --with-cppflags=\"-Wno-error=format-security\"
Building native extensions with: '--with-cppflags="-Wno-error=format-security"'
This could take a while...
ERROR: Error installing eventmachine:
ERROR: Failed to build gem native extension.
/usr/bin/ruby2.0 extconf.rb --with-cppflags="-Wno-error=format-security"
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... yes
checking for inotify_init() in sys/inotify.h... yes
checking for writev() in sys/uio.h... yes
checking for rb_thread_check_ints()... yes
checking for rb_time_new()... yes
checking for sys/event.h... no
checking for epoll_create() in sys/epoll.h... yes
creating Makefile
make "DESTDIR="
compiling cmain.cpp
compiling kb.cpp
kb.cpp: In member function ‘virtual void KeyboardDescriptor::Read()’:
kb.cpp:77:27: warning: ignoring return value of ‘ssize_t read(int, void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
read (GetSocket(), &c, 1);
^
compiling pipe.cpp
compiling binder.cpp
compiling ed.cpp
compiling page.cpp
compiling rubymain.cpp
rubymain.cpp: In function ‘VALUE t_connect_server(VALUE, VALUE, VALUE)’:
rubymain.cpp:504:42: error: format not a string literal and no format arguments [-Werror=format-security]
rb_raise (EM_eConnectionError, e.what());
^
rubymain.cpp: In function ‘VALUE t_bind_connect_server(VALUE, VALUE, VALUE, VALUE, VALUE)’:
rubymain.cpp:525:42: error: format not a string literal and no format arguments [-Werror=format-security]
rb_raise (EM_eConnectionError, e.what());
^
rubymain.cpp: In function ‘VALUE t_watch_filename(VALUE, VALUE)’:
rubymain.cpp:798:38: error: format not a string literal and no format arguments [-Werror=format-security]
rb_raise (EM_eUnsupported, e.what());
^
rubymain.cpp: In function ‘VALUE t_watch_pid(VALUE, VALUE)’:
rubymain.cpp:824:38: error: format not a string literal and no format arguments [-Werror=format-security]
rb_raise (EM_eUnsupported, e.what());
^
rubymain.cpp: In function ‘VALUE t_start_proxy(VALUE, VALUE, VALUE, VALUE, VALUE)’:
rubymain.cpp:1024:42: error: format not a string literal and no format arguments [-Werror=format-security]
rb_raise (EM_eConnectionError, e.what());
^
rubymain.cpp: In function ‘VALUE t_stop_proxy(VALUE, VALUE)’:
rubymain.cpp:1039:42: error: format not a string literal and no format arguments [-Werror=format-security]
rb_raise (EM_eConnectionError, e.what());
^
cc1plus: some warnings being treated as errors
make: *** [rubymain.o] Error 1
Gem files will remain installed in /var/lib/gems/2.0.0/gems/eventmachine-1.0.0.beta.3 for inspection.
Results logged to /var/lib/gems/2.0.0/gems/eventmachine-1.0.0.beta.3/ext/gem_make.out
UPDATE 3:
$ sudo gem install eventmachine -v '1.0.0.beta.3' 2>&1 | grep -i inspection
Gem files will remain installed in /var/lib/gems/2.0.0/gems/eventmachine-1.0.0.beta.3 for inspection.
$ grep -i error /var/lib/gems/2.0.0/gems/eventmachine-1.0.0.beta.3/ext/Makefile
CFLAGS = $(CCDLFLAGS) -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -fPIC $(ARCH_FLAG)
CXXFLAGS = $(CCDLFLAGS) -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security $(ARCH_FLAG)
$ sudo gem install eventmachine -v '1.0.0.beta.3' -- --with-cflags=\"-Wno-error=format-security\" --with-cppflags=\"-Wno-error=format-security\" --with-cxxflags=\"-Wno-error=format-security\" 2>&1 | grep -i inspection
Gem files will remain installed in /var/lib/gems/2.0.0/gems/eventmachine-1.0.0.beta.3 for inspection.
$ grep -i error /var/lib/gems/2.0.0/gems/eventmachine-1.0.0.beta.3/ext/Makefile
CFLAGS = $(CCDLFLAGS) -Wno-error=format-security $(ARCH_FLAG)
CPPFLAGS = -DWITH_SSL -DBUILD_FOR_RUBY -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_TBR -DHAVE_INOTIFY_INIT -DHAVE_INOTIFY -DHAVE_WRITEV -DHAVE_WRITEV -DHAVE_RB_THREAD_CHECK_INTS -DHAVE_RB_TIME_NEW -DOS_UNIX -DHAVE_EPOLL_CREATE -DHAVE_EPOLL -DHAVE_MAKE_PAIR -Wno-error=format-security
CXXFLAGS = $(CCDLFLAGS) -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security $(ARCH_FLAG)
please refer to the CXXFLAGS, why the flags which are passed to the comiplation are not being propogated?
Apparently this is an issue with em-winrm depending on eventmachine v1.0.0.beta.3.
A combination of mudasobwa's comment and workaround suggested here worked for me:
gem install eventmachine -v '1.0.0.beta.3' -- --with-cflags=\"-O2 -pipe -march=native -w\"
Alternatively, if you wish to use bundler
export CONFIGURE_ARGS="--with-cflags='-O2 -pipe -march=native -w'"
bundle install --path vendor