I am trying to install johnson, in order to install harmony with Centos 8.
gem install johnson
I keep getting the error that there is no such file as node.h. But I have clearly installed nodejs, and nodejs-devel (I used the latest packages from stream: nodejs:18)
I am using Discourse community software, so require a specific version or ruby
current directory: /usr/local/share/gems/gems/johnson-1.2.0/ext/spidermonkey
make "DESTDIR="
gcc -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -I/usr/local/share/gems/gems/johnson-1.2.0/vendor/spidermonkey/Linux_All_DBG.OBJ -I/usr/local/share/gems/gems/johnson-1.2.0/vendor/spidermonkey -fPIC -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -g -Wall -Wextra -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline -DXP_UNIX -m64 -o context.o -c context.c
In file included from context.h:4,
from context.c:1:
spidermonkey.h:21: warning: "MAYBE_UNUSED" redefined
# define MAYBE_UNUSED(name) name __attribute__((unused))
In file included from /usr/include/ruby/config.h:18,
from /usr/include/ruby/ruby.h:24,
from /usr/include/ruby.h:33,
from spidermonkey.h:7,
from context.h:4,
from context.c:1:
/usr/include/ruby/config-x86_64.h:152: note: this is the location of the previous definition
#define MAYBE_UNUSED(x) __attribute__ ((__unused__)) x
gcc -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -I/usr/local/share/gems/gems/johnson-1.2.0/vendor/spidermonkey/Linux_All_DBG.OBJ -I/usr/local/share/gems/gems/johnson-1.2.0/vendor/spidermonkey -fPIC -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -g -Wall -Wextra -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline -DXP_UNIX -m64 -o conversions.o -c conversions.c
In file included from conversions.h:4,
from conversions.c:1:
spidermonkey.h:21: warning: "MAYBE_UNUSED" redefined
# define MAYBE_UNUSED(name) name __attribute__((unused))
In file included from /usr/include/ruby/config.h:18,
from /usr/include/ruby/ruby.h:24,
from /usr/include/ruby.h:33,
from spidermonkey.h:7,
from conversions.h:4,
from conversions.c:1:
/usr/include/ruby/config-x86_64.h:152: note: this is the location of the previous definition
#define MAYBE_UNUSED(x) __attribute__ ((__unused__)) x
In file included from conversions.c:2:
js_land_proxy.h:11:10: fatal error: node.h: No such file or directory
#include "node.h"
^~~~~~~~
compilation terminated.
make: *** [Makefile:245: conversions.o] Error 1
make failed, exit code 2
Gem files will remain installed in /usr/local/share/gems/gems/johnson-1.2.0 for inspection.
Results logged to /usr/local/lib64/gems/ruby/johnson-1.2.0/gem_make.out
Related
I experience troubles installing Python#2 via homebrew on MacOS High Sierra. During the make process it simply fails with the "expected function body after function declarator error" on several occasions.
Based on the messages from the make process it seems that it has to do something with the fact Command Line Tools on High Sierra are updated to MacOSX10.14.sdk. The question now is how to downgrade the SDK to 10.13?
clang -c -fno-strict-aliasing -fno-common -dynamic -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -I/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Modules/main.o Modules/main.c
clang -c -fno-strict-aliasing -fno-common -dynamic -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -I/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Modules/gcmodule.o Modules/gcmodule.c
clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -I/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -c ./Modules/threadmodule.c -o Modules/threadmodule.o
In file included from Python/mactoolboxglue.c:27:
In file included from Include/pymactoolbox.h:10:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:24:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:29:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AppleEvents.h:597:165: error: expected function body after function declarator
extern OSStatus AEDeterminePermissionToAutomateTarget( const AEAddressDesc* target, AEEventClass theAEEventClass, AEEventID theAEEventID, Boolean askUserIfNeeded ) __OSX_AVAILABLE_STARTING( __MAC_10_14, __IPHONE_NA );
^
/usr/include/Availability.h:216:50: note: expanded from macro '__OSX_AVAILABLE_STARTING'
#define __OSX_AVAILABLE_STARTING(_osx, _ios) __AVAILABILITY_INTERNAL##_osx
^
<scratch space>:95:1: note: expanded from here
__AVAILABILITY_INTERNAL__MAC_10_14
^
clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -I/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -c ./Modules/signalmodule.c -o Modules/signalmodule.o
clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -I/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -c ./Modules/posixmodule.c -o Modules/posixmodule.o
clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -I/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -c ./Modules/errnomodule.c -o Modules/errnomodule.o
clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -I/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -c ./Modules/pwdmodule.c -o Modules/pwdmodule.o
clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -I/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -c ./Modules/_sre.c -o Modules/_sre.o
In file included from Python/mactoolboxglue.c:27:
In file included from clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -I/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -c ./Modules/_codecsmodule.c -o Modules/_codecsmodule.o
Include/pymactoolbox.h:10:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:67:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:200:51: error: expected ';' after top level declarator
typedef struct OpaqueInkTextRef* InkTextRef DEPRECATED_IN_MAC_OS_X_VERSION_10_14_AND_LATER;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:222:53: error: expected ';' after top level declarator
typedef struct OpaqueInkStrokeRef* InkStrokeRef DEPRECATED_IN_MAC_OS_X_VERSION_10_14_AND_LATER;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:251:49: error: expected ';' after top level declarator
typedef struct InkPoint InkPoint DEPRECATED_IN_MAC_OS_X_VERSION_10_14_AND_LATER;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:252:52: error: expected ';' after top level declarator
typedef InkPoint * InkPointPtr DEPRECATED_IN_MAC_OS_X_VERSION_10_14_AND_LATER;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:262:58: error: expected ';' after top level declarator
typedef CFIndex InkAlternateCount DEPRECATED_IN_MAC_OS_X_VERSION_10_14_AND_LATER;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:274:63: error: expected ';' after top level declarator
typedef FourCharCode InkUserWritingModeType DEPRECATED_IN_MAC_OS_X_VERSION_10_14_AND_LATER;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:289:70: error: expected ';' after top level declarator
typedef FourCharCode InkApplicationWritingModeType DEPRECATED_IN_MAC_OS_X_VERSION_10_14_AND_LATER;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:303:34: error: expected ';' after top level declarator
typedef UInt32 InkDrawingModeType DEPRECATED_IN_MAC_OS_X_VERSION_10_14_AND_LATER;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:318:36: error: expected ';' after top level declarator
typedef UInt32 InkTextDrawFlagsType DEPRECATED_IN_MAC_OS_X_VERSION_10_14_AND_LATER;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:361:34: error: expected ';' after top level declarator
typedef UInt32 InkTerminationType DEPRECATED_IN_MAC_OS_X_VERSION_10_14_AND_LATER;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:427:29: error: expected ';' after top level declarator
typedef UInt32 InkSourceType DEPRECATED_IN_MAC_OS_X_VERSION_10_14_AND_LATER;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:454:34: error: expected ';' after top level declarator
typedef UInt32 InkRecognitionType DEPRECATED_IN_MAC_OS_X_VERSION_10_14_AND_LATER;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:546:36: error: expected ';' after top level declarator
typedef FourCharCode InkGestureKind DEPRECATED_IN_MAC_OS_X_VERSION_10_14_AND_LATER;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:776:63: error: expected function body after function declarator
InkUserWritingMode(void) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_14;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:810:73: error: expected function body after function declarator
InkSetApplicationWritingMode(InkApplicationWritingModeType iWriteWhere) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_14;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:837:71: error: expected function body after function declarator
InkSetApplicationRecognitionMode(InkRecognitionType iRecognitionType) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_14;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:901:63: error: expected function body after function declarator
InkTerminationType iAllowedTerminationTypes) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_14;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:934:63: error: expected function body after function declarator
InkIsPhraseInProgress(void) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_14;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -I/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -c ./Modules/_weakref.c -o Modules/_weakref.o
20 errors generated.
make: *** [Python/mactoolboxglue.o] Error 1
make: *** Waiting for unfinished jobs....
I know that Python is installed in the MacOS but this is dependency for two tools I wanted to install through Homebrew.
In order to resolve the problem the Command Line Tools should be reinstalled in two steps:
Remove the Command Line Tools
sudo rm -rf /Library/Developer/CommandLineTools
Installing Command Line Tools
xcode-select --install
The newly installed version creates a symlink for both versions, MacOSX10.13.sdk and MacOSX.14.sdk.
I'm trying to compile C++ using clang's address sanitizer to output the sanitize results within a core dump, so I added:
CXXFLAGS += -fsanitize=address
to have the compiler options:
/opt/llvm-3.8.0/bin/clang++ --gcc-toolchain=/opt/gcc-5.2.0 -fsanitize=address -DLINUX -DLINUX64 -DTB_USE_RCU -DURCU_INLINE_SMALL_FUNCTIONS -DU_USING_ICU_NAMESPACE=0 -DNDEBUG -D_POSIX_PTHREAD_SEMANTICS -fPIC -D_GNU_SOURCE -DTB_USE_RCU -DTB_USE_RCU -D_GLIBCXX_USE_CXX11_ABI=0 -m64 --gcc-toolchain=/opt/gcc-5.2.0 -flto=full -std=gnu++14 -D_GLIBCXX_DEPRECATED= -pipe -fno-omit-frame-pointer -ffast-math -fno-finite-math-only -pthread -march=core2 -mtune=corei7 -g -O3 -Qunused-arguments -fnon-call-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -Wshadow -Wpointer-arith -Wno-self-assign -Wno-unused-function -Wno-gnu-empty-initializer -Wno-unused-parameter -Wno-ignored-qualifiers -Wno-mismatched-tags -Wno-unused-local-typedef -Wno-parentheses-equality -Wno-unused-private-field -Wno-missing-field-initializers -Wno-missing-braces -Werror=return-type -Werror=overloaded-virtual -c MyClass.cpp -o MyClass.o
but I get the error:
undefined symbol: __asan_option_detect_stack_use_after_return
What's the simplest way to resolve this?
I am trying to install ace and tao following this tutorial and this one. But after i enter "make" command from TAO_wrapper directory, i get below error:
make[1]: Leaving directory '/home/robot/ACE_wrappers/apps/gperf'
make[1]: Entering directory '/home/robot/ACE_wrappers/apps/gperf/src'
GNUmakefile: /home/robot/ACE_wrappers/apps/gperf/src/GNUmakefile.gperf MAKEFLAGS=w
make[1]: Leaving directory '/home/robot/ACE_wrappers/apps/gperf/src'
make[1]: Entering directory '/home/robot/ACE_wrappers/apps/gperf/tests'
GNUmakefile: /home/robot/ACE_wrappers/apps/gperf/tests/GNUmakefile.cinset MAKEFLAGS=w
g++ -fvisibility=hidden -fvisibility-inlines-hidden -Wnon-virtual-dtor -O3 -ggdb -pthread -fno-strict-aliasing -Wall -W -Wpointer-arith -pipe -D_GNU_SOURCE -I/home/robot/ACE_wrappers -D__ACE_INLINE__ -I../../.. -c -o .obj/c.o /home/robot/ACE_wrappers/apps/gperf/tests/c.cpp
g++ -fvisibility=hidden -fvisibility-inlines-hidden -Wnon-virtual-dtor -O3 -ggdb -pthread -fno-strict-aliasing -Wall -W -Wpointer-arith -pipe -D_GNU_SOURCE -I/home/robot/ACE_wrappers -D__ACE_INLINE__ -I../../.. -c -o .obj/test.o /home/robot/ACE_wrappers/apps/gperf/tests/test.cpp
g++ -fvisibility=hidden -fvisibility-inlines-hidden -Wnon-virtual-dtor -O3 -ggdb -pthread -fno-strict-aliasing -Wall -W -Wpointer-arith -pipe -D_GNU_SOURCE -I/home/robot/ACE_wrappers -D__ACE_INLINE__ -I../../.. -Wl,-E -L/home/robot/ACE_wrappers/lib -L. -L../../../lib -o cout .obj/c.o .obj/test.o -lACE -ldl -lrt
.obj/test.o: In function `main':
/home/robot/ACE_wrappers/apps/gperf/tests/test.cpp:24: undefined reference to `in_word_set(char const*, unsigned int)'
/home/robot/ACE_wrappers/apps/gperf/tests/test.cpp:24: undefined reference to `in_word_set(char const*, unsigned int)'
collect2: error: ld returned 1 exit status
GNUmakefile.cinset:196: recipe for target 'cout' failed
make[1]: *** [cout] Error 1
make[1]: Leaving directory '/home/robot/ACE_wrappers/apps/gperf/tests'
GNUmakefile:1241: recipe for target 'cinset' failed
make: *** [cinset] Error 2
When i compile the gperf, ace packaes individually i didn't get any error. But when i try to compile the hole ACE_wrapper package i get the error.
Probably something got messed up on your file system. As this is just an unit test this should not be a problem to ignore. As alternative you can run make realclean and make.
I'm cross-building dart for armel (a client hired me to solve problems there)
I'm building on ubuntu 14.04 (the armel gcc/g++ is 4.7.3).
I want to take out -Werror since I'm seeing:
/usr/bin/arm-linux-gnueabi-g++ '-DDART_NO_SNAPSHOT' '-DDART_PRECOMPILER' '-DTARGET_ARCH_ARM' '-DNDEBUG' '-D_FORTIFY_SOURCE=2' -Iruntime -Werror -Wall -Wextra -Wno-unused-parameter -Wnon-virtual-dtor -Wvla -Woverloaded-virtual -g3 -ggdb3 -fno-rtti -fno-exceptions -fstack-protector -Wa,--noexecstack -marm -mfpu=vfp -Wno-psabi -fno-strict-overflow -O3 -ffunction-sections -fno-omit-frame-pointer -MMD -MF out/ReleaseXARM/.deps/out/ReleaseXARM/obj.target/libdart_vm_nosnapshot/runtime/vm/compiler.o.d.raw -c -o out/ReleaseXARM/obj.target/libdart_vm_nosnapshot/runtime/vm/compiler.o runtime/vm/compiler.cc
In file included from runtime/vm/isolate.h:18:0,
from runtime/vm/growable_array.h:15,
from runtime/vm/compiler.h:9,
from runtime/vm/compiler.cc:5:
runtime/vm/thread.h: In static member function 'static dart::RawError* dart::Compiler::CompileClass(const dart::Class&)':
runtime/vm/thread.h:167:17: error: variable 'thread' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
cc1plus: all warnings being treated as errors
make: *** [out/ReleaseXARM/obj.target/libdart_vm_nosnapshot/runtime/vm/compiler.o] Error 1
BUILD FAILED
I'm working with this dart git tree:
commit 1d028eed8dfa00ac9d4ff685e61b01e6909dbeb4
Author: Paul Berry <paulberry#google.com>
Date: Wed Nov 30 12:28:51 2016 -0800
This is an actual bug in the code. One way to fix it would be to mark the thread variable volatile.
I'm trying to install mysql2 gem with ruby on rails 4/ruby 2.0 OpenShift scaled app.
But, bundle install fails, trying "gem install mysql2", which leads to the following error:
gem install mysql2
Fetching: mysql2-0.4.1.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
/opt/rh/ruby200/root/usr/bin/ruby extconf.rb
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
-----
Using mysql_config at /opt/rh/mysql55/root/usr/bin/mysql_config
-----
checking for mysql.h... yes
checking for errmsg.h... yes
checking for mysqld_error.h... yes
-----
Don't know how to set rpath on your system, if MySQL libraries are not in path mysql2 may not load
-----
-----
Setting libpath to /opt/rh/mysql55/root/usr/lib64/mysql
-----
creating Makefile
make "DESTDIR="
gcc -I. -I/opt/rh/ruby200/root/usr/include -I/opt/rh/ruby200/root/usr/include/ruby/backward -I/opt/rh/ruby200/root/usr/include -I. -I/opt/rh/mysql55/root/usr/include/mysql -DHAVE_RUBY_THREAD_H -DHAVE_RB_THREAD_CALL_WITHOUT_GVL -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_RB_WAIT_FOR_SINGLE_FD -DHAVE_RB_HASH_DUP -DHAVE_RB_INTERN3 -DHAVE_MYSQL_H -DHAVE_ERRMSG_H -DHAVE_MYSQLD_ERROR_H -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -mtune=generic -fPIC -m64 -o client.o -c client.c
gcc -I. -I/opt/rh/ruby200/root/usr/include -I/opt/rh/ruby200/root/usr/include/ruby/backward -I/opt/rh/ruby200/root/usr/include -I. -I/opt/rh/mysql55/root/usr/include/mysql -DHAVE_RUBY_THREAD_H -DHAVE_RB_THREAD_CALL_WITHOUT_GVL -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_RB_WAIT_FOR_SINGLE_FD -DHAVE_RB_HASH_DUP -DHAVE_RB_INTERN3 -DHAVE_MYSQL_H -DHAVE_ERRMSG_H -DHAVE_MYSQLD_ERROR_H -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -mtune=generic -fPIC -m64 -o infile.o -c infile.c
gcc -I. -I/opt/rh/ruby200/root/usr/include -I/opt/rh/ruby200/root/usr/include/ruby/backward -I/opt/rh/ruby200/root/usr/include -I. -I/opt/rh/mysql55/root/usr/include/mysql -DHAVE_RUBY_THREAD_H -DHAVE_RB_THREAD_CALL_WITHOUT_GVL -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_RB_WAIT_FOR_SINGLE_FD -DHAVE_RB_HASH_DUP -DHAVE_RB_INTERN3 -DHAVE_MYSQL_H -DHAVE_ERRMSG_H -DHAVE_MYSQLD_ERROR_H -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -mtune=generic -fPIC -m64 -o mysql2_ext.o -c mysql2_ext.c
gcc -I. -I/opt/rh/ruby200/root/usr/include -I/opt/rh/ruby200/root/usr/include/ruby/backward -I/opt/rh/ruby200/root/usr/include -I. -I/opt/rh/mysql55/root/usr/include/mysql -DHAVE_RUBY_THREAD_H -DHAVE_RB_THREAD_CALL_WITHOUT_GVL -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_RB_WAIT_FOR_SINGLE_FD -DHAVE_RB_HASH_DUP -DHAVE_RB_INTERN3 -DHAVE_MYSQL_H -DHAVE_ERRMSG_H -DHAVE_MYSQLD_ERROR_H -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -mtune=generic -fPIC -m64 -o result.o -c result.c
gcc -I. -I/opt/rh/ruby200/root/usr/include -I/opt/rh/ruby200/root/usr/include/ruby/backward -I/opt/rh/ruby200/root/usr/include -I. -I/opt/rh/mysql55/root/usr/include/mysql -DHAVE_RUBY_THREAD_H -DHAVE_RB_THREAD_CALL_WITHOUT_GVL -DHAVE_RB_THREAD_BLOCKING_REGION -DHAVE_RB_WAIT_FOR_SINGLE_FD -DHAVE_RB_HASH_DUP -DHAVE_RB_INTERN3 -DHAVE_MYSQL_H -DHAVE_ERRMSG_H -DHAVE_MYSQLD_ERROR_H -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -mtune=generic -fPIC -m64 -o statement.o -c statement.c
rm -f mysql2.so
gcc -shared -o mysql2.so client.o infile.o mysql2_ext.o result.o statement.o -L. -L/opt/rh/ruby200/root/usr/lib64 -L/opt/rh/mysql55/root/usr/lib64/mysql -L. -fstack-protector -rdynamic -Wl,-export-dynamic -m64 -lruby -L/opt/rh/mysql55/root/usr/lib64/mysql -lmysqlclient -lpthread -lz -lm -lrt -lssl -lcrypto -ldl -lpthread -lrt -ldl -lcrypt -lm -lc
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
make: *** [mysql2.so] Error 1
Gem files will remain installed in /var/lib/openshift/541424415004469f3a000b85/.gem/gems/mysql2-0.4.1 for inspection.
Results logged to /var/lib/openshift/541424415004469f3a000b85/.gem/gems/mysql2-0.4.1/ext/mysql2/gem_make.out
MySQL libraries/SDK are supposed to be maintained/provided by RedHat in the PaaS offering, so I'm a bit stuck. Interestingly enough, until tonight, it worked well.
EDIT:
The first answers revealed, that I missed an important point in the question. In OpenShift one does not have root access to the gear, so I cannot execute yum install as suggested below. It is really an OpenShift specific question, not a general one. I definitely know how to install MySQL development libraries. Sorry about the confusion, caused by the missing piece of information.
On Mac OS X, and is using Homebrew:
brew install mysql
or if you're on Red Hat or CentOS or other distributions using yum:
sudo yum install mysql-devel
and finally, if you're on Ubuntu or Debian or other distributions using aptitude:
sudo apt-get install libmysqlclient-dev
Ok, I finally made it and I'm posting the answer so that others can benefit from that in case they meet the same problem.
The reason for the behavior was apparently that the previous deployment approach in OpenShift broke in the middle, which left the gear in an inconsistent state (the issue with mysql2 gem was one symptom of that). What I basically tried to do is to bring it back to a consistent state manually by bundle'ing and re-building from the git HEAD.
This did not work.
Attempts to push to the gear git from my development repository did not work either, since nothing has changed from the last push (which resulted in deployment that broke apparently due to some OpenShift internal bugs).
What I did at the end, I made some change in the bundle (in my case updated one gem by bundle update) and this updated Gemfile.lock.
Since I also checked in "force_clean_build" marker, the subsequent push rebuilt the gear from scratch, also having brought it to a consistent state.
Long story short, if OpenShift deployment breaks in the middle, it is much better to make a fake change in sources and push them in conjunction with the marker force_clean_build to the gear's git than to try to rebuild manually by gear deploy HEAD, since the latter does not clean up the possibly occurred inconsistency.