Cant install allennlp with pip on mac - python-3.x

I am trying to install allennlp on my mac. I have tried installing macOS headers which solved the missing headers problem but now i am experiencing new problems.
The error when i run pip install allennlp:
Running setup.py bdist_wheel for jsonnet ... error
Complete output from command /anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/qf/jkn4v43j08xgst0r9yxyl0dc0000gn/T/pip-install-i4nyb384/jsonnet/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/qf/jkn4v43j08xgst0r9yxyl0dc0000gn/T/pip-wheel-eof7cc6k --python-tag cp37:
running bdist_wheel
running build
running build_ext
x86_64-apple-darwin13.4.0-clang++ -c -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 core/desugarer.cpp -o core/desugarer.o
In file included from core/desugarer.cpp:17:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/cassert:21:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/assert.h:44:
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:111:82: error: use of undeclared identifier 'labs'; did you mean 'abs'?
inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:111:44: note: 'abs' declared here
inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:113:81: error: use of undeclared identifier 'llabs'
inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:116:35: error: unknown type name 'ldiv_t'
inline _LIBCPP_INLINE_VISIBILITY ldiv_t div( long __x, long __y) _NOEXCEPT {return ldiv(__x, __y);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:116:95: error: use of undeclared identifier 'ldiv'; did you mean 'div'?
inline _LIBCPP_INLINE_VISIBILITY ldiv_t div( long __x, long __y) _NOEXCEPT {return ldiv(__x, __y);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:116:42: note: 'div' declared here
inline _LIBCPP_INLINE_VISIBILITY ldiv_t div( long __x, long __y) _NOEXCEPT {return ldiv(__x, __y);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:118:34: error: unknown type name 'lldiv_t'
inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x, long long __y) _NOEXCEPT {return lldiv(__x, __y);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/stdlib.h:118:94: error: use of undeclared identifier 'lldiv'
inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x, long long __y) _NOEXCEPT {return lldiv(__x, __y);}
^
In file included from core/desugarer.cpp:19:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/algorithm:642:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/cstring:61:
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:74:64: error: use of undeclared identifier 'strchr'
char* __libcpp_strchr(const char* __s, int __c) {return (char*)strchr(__s, __c);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:81:75: error: use of undeclared identifier 'strpbrk'
char* __libcpp_strpbrk(const char* __s1, const char* __s2) {return (char*)strpbrk(__s1, __s2);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:88:65: error: use of undeclared identifier 'strrchr'; did you mean 'strchr'?
char* __libcpp_strrchr(const char* __s, int __c) {return (char*)strrchr(__s, __c);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:76:13: note: 'strchr' declared here
const char* strchr(const char* __s, int __c) {return __libcpp_strchr(__s, __c);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:95:76: error: use of undeclared identifier 'memchr'
void* __libcpp_memchr(const void* __s, int __c, size_t __n) {return (void*)memchr(__s, __c, __n);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:102:74: error: use of undeclared identifier 'strstr'; did you mean 'strchr'?
char* __libcpp_strstr(const char* __s1, const char* __s2) {return (char*)strstr(__s1, __s2);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:78:13: note: 'strchr' declared here
char* strchr( char* __s, int __c) {return __libcpp_strchr(__s, __c);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:102:74: error: no matching function for call to 'strchr'
char* __libcpp_strstr(const char* __s1, const char* __s2) {return (char*)strstr(__s1, __s2);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:78:13: note: candidate disabled: <no message provided>
char* strchr( char* __s, int __c) {return __libcpp_strchr(__s, __c);}
^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:102:81: error: cannot initialize a parameter of type 'char *' with an lvalue of type 'const char *'
char* __libcpp_strstr(const char* __s1, const char* __s2) {return (char*)strstr(__s1, __s2);}
^~~~
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:78:32: note: passing argument to parameter '__s' here
char* strchr( char* __s, int __c) {return __libcpp_strchr(__s, __c);}
^
In file included from core/desugarer.cpp:19:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/algorithm:642:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstring:70:9: error: no member named 'memcpy' in the global namespace; did you mean 'memchr'?
using ::memcpy;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:97:13: note: 'memchr' declared here
const void* memchr(const void* __s, int __c, size_t __n) {return __libcpp_memchr(__s, __c, __n);}
^
In file included from core/desugarer.cpp:19:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/algorithm:642:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstring:71:9: error: no member named 'memmove' in the global namespace
using ::memmove;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstring:72:9: error: no member named 'strcpy' in the global namespace; did you mean 'strchr'?
using ::strcpy;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:76:13: note: 'strchr' declared here
const char* strchr(const char* __s, int __c) {return __libcpp_strchr(__s, __c);}
^
In file included from core/desugarer.cpp:19:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/algorithm:642:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstring:73:9: error: no member named 'strncpy' in the global namespace
using ::strncpy;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstring:74:9: error: no member named 'strcat' in the global namespace; did you mean 'strchr'?
using ::strcat;
~~^
/Library/Developer/CommandLineTools/usr/include/c++/v1/string.h:76:13: note: 'strchr' declared here
const char* strchr(const char* __s, int __c) {return __libcpp_strchr(__s, __c);}
^
In file included from core/desugarer.cpp:19:
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/algorithm:642:
/Library/Developer/CommandLineTools/usr/include/c++/v1/cstring:75:9: error: no member named 'strncat' in the global namespace
using ::strncat;
~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Makefile:118: core/desugarer.o] Error 1
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/qf/jkn4v43j08xgst0r9yxyl0dc0000gn/T/pip-install-i4nyb384/jsonnet/setup.py", line 75, in <module>
test_suite="python._jsonnet_test",
File "/anaconda3/lib/python3.7/site-packages/setuptools/__init__.py", line 143, in setup
return distutils.core.setup(**attrs)
File "/anaconda3/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/anaconda3/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/anaconda3/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 188, in run
self.run_command('build')
File "/anaconda3/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/anaconda3/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/anaconda3/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/private/var/folders/qf/jkn4v43j08xgst0r9yxyl0dc0000gn/T/pip-install-i4nyb384/jsonnet/setup.py", line 54, in run
raise Exception('Could not build %s' % (', '.join(LIB_OBJECTS)))
Exception: Could not build core/desugarer.o, core/formatter.o, core/libjsonnet.o, core/lexer.o, core/parser.o, core/pass.o, core/static_analysis.o, core/string_utils.o, core/vm.o, third_party/md5/md5.o
----------------------------------------
Failed building wheel for jsonnet
Running setup.py clean for jsonnet
Failed to build jsonnet
My compiler and gcc:
(base) Sakets-MacBook-Pro:usr saketkhandelwal$ gcc -v
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
(base) Sakets-MacBook-Pro:usr saketkhandelwal$ clang --version
clang version 4.0.1 (tags/RELEASE_401/final)
Target: x86_64-apple-darwin18.5.0
Thread model: posix
InstalledDir: /anaconda3/bin
How do i fix this, i have tried reinstalling command line tools and package headers but still no luck.

I suppose you can resolve this by updating to latest version of
anaconda
Try to install jsonnet separately using conda install -c
conda-forge jsonnet and then pip install allennlp
Please refer to this issue on allennlp github for more details :
Pip3 install failing on jsonnet

Related

error installing polyglot package in stack heroku-18 and python3.6.12 runtime

I want to deploy a flask server that is capable of upload files and text pre-processing techniques using packages like spacy, polyglot, etc.
while installing the polyglot package in Heroku(i.e. stack Heroku-18) it's always throwing error like below
ERROR: Command errored out with exit status 1:
command: /app/.heroku/python/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-u83b_12_/PyICU/setup.py'"'"'; __file__='"'"'/tmp/pip-install-u83b_12_/PyICU/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-9jw5frbg/install-record.txt --single-version-externally-managed --compile --install-headers /app/.heroku/python/include/python3.6m/PyICU
cwd: /tmp/pip-install-u83b_12_/PyICU/
Complete output (95 lines):
(running 'icu-config --version')
Building PyICU 2.6 for ICU 60.2 (max ICU major version supported: 68)
(running 'icu-config --cxxflags --cppflags')
Adding CFLAGS="-std=c++11 -I/usr/include" from /tmp/build_83566000/.apt/usr/bin/icu-config
(running 'icu-config --ldflags')
Adding LFLAGS="-L/usr/lib/x86_64-linux-gnu -licui18n -licuuc -licudata" from /tmp/build_83566000/.apt/usr/bin/icu-config
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
copying PyICU.py -> build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/icu
copying icu/__init__.py -> build/lib.linux-x86_64-3.6/icu
running build_ext
building '_icu' extension
creating build/temp.linux-x86_64-3.6
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/app/.heroku/python/include/python3.6m -c _icu.cpp -o build/temp.linux-x86_64-3.6/_icu.o -std=c++11 -I/usr/include -DPYICU_VER="2.6" -DPYICU_ICU_MAX_VER="68"
In file included from /usr/include/c++/7/clocale:42:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/c++locale.h:41,
from /usr/include/c++/7/bits/localefwd.h:40,
from /usr/include/c++/7/string:43,
from /tmp/build_83566000/.apt/usr/include/unicode/std_string.h:37,
from /tmp/build_83566000/.apt/usr/include/unicode/unistr.h:38,
from common.h:106,
from _icu.cpp:27:
./locale.h:29:23: error: ‘Locale’ was not declared in this scope
PyObject *wrap_Locale(Locale *locale, int flags);
^~~~~~
./locale.h:29:23: note: suggested alternative: ‘scalb’
PyObject *wrap_Locale(Locale *locale, int flags);
^~~~~~
scalb
./locale.h:29:31: error: ‘locale’ was not declared in this scope
PyObject *wrap_Locale(Locale *locale, int flags);
^~~~~~
./locale.h:29:31: note: suggested alternative: ‘locale_t’
PyObject *wrap_Locale(Locale *locale, int flags);
^~~~~~
locale_t
./locale.h:29:39: error: expected primary-expression before ‘int’
PyObject *wrap_Locale(Locale *locale, int flags);
^~~
./locale.h:29:48: error: expression list treated as compound expression in initializer [-fpermissive]
PyObject *wrap_Locale(Locale *locale, int flags);
^
./locale.h:30:29: error: ‘Locale’ does not name a type; did you mean ‘scalb’?
PyObject *wrap_Locale(const Locale &locale);
^~~~~~
scalb
./locale.h:30:43: error: ‘PyObject* wrap_Locale(const int&)’ redeclared as different kind of symbol
PyObject *wrap_Locale(const Locale &locale);
^
./locale.h:29:11: note: previous declaration ‘PyObject* wrap_Locale’
PyObject *wrap_Locale(Locale *locale, int flags);
^~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/c++locale.h:41:0,
from /usr/include/c++/7/bits/localefwd.h:40,
from /usr/include/c++/7/string:43,
from /tmp/build_83566000/.apt/usr/include/unicode/std_string.h:37,
from /tmp/build_83566000/.apt/usr/include/unicode/unistr.h:38,
from common.h:106,
from _icu.cpp:27:
/usr/include/c++/7/clocale:53:11: error: ‘::lconv’ has not been declared
using ::lconv;
^~~~~
/usr/include/c++/7/clocale:54:11: error: ‘::setlocale’ has not been declared
using ::setlocale;
^~~~~~~~~
/usr/include/c++/7/clocale:55:11: error: ‘::localeconv’ has not been declared
using ::localeconv;
^~~~~~~~~~
In file included from /usr/include/c++/7/bits/localefwd.h:40:0,
from /usr/include/c++/7/string:43,
from /tmp/build_83566000/.apt/usr/include/unicode/std_string.h:37,
from /tmp/build_83566000/.apt/usr/include/unicode/unistr.h:38,
from common.h:106,
from _icu.cpp:27:
/usr/include/x86_64-linux-gnu/c++/7/bits/c++locale.h:52:23: error: ‘uselocale’ was not declared in this scope
extern "C" __typeof(uselocale) __uselocale;
^~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/c++locale.h:52:23: note: suggested alternative: ‘u_fsetlocale’
extern "C" __typeof(uselocale) __uselocale;
^~~~~~~~~
u_fsetlocale
/usr/include/x86_64-linux-gnu/c++/7/bits/c++locale.h: In function ‘int std::__convert_from_v(__locale_struct* const&, char*, int, const char*, ...)’:
/usr/include/x86_64-linux-gnu/c++/7/bits/c++locale.h:75:53: error: ‘__gnu_cxx::__uselocale’ cannot be used as a function
__c_locale __old = __gnu_cxx::__uselocale(__cloc);
^
/usr/include/x86_64-linux-gnu/c++/7/bits/c++locale.h:100:33: error: ‘__gnu_cxx::__uselocale’ cannot be used as a function
__gnu_cxx::__uselocale(__old);
^
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /app/.heroku/python/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-u83b_12_/PyICU/setup.py'"'"'; __file__='"'"'/tmp/pip-install-u83b_12_/PyICU/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-9jw5frbg/install-record.txt --single-version-externally-managed --compile --install-headers /app/.heroku/python/include/python3.6m/PyICU Check the logs for full command output.
requirements.txt
spacy==2.2.4
en-core-web-sm # https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.2.0/en_core_web_sm-2.2.0.tar.gz
langdetect==1.0.8
googletrans==3.0.0
contractions==0.0.25
inflect==5.0.2
emoji==0.6.0
Flask==1.1.2
nltk==3.5
beautifulsoup4==4.9.3
pandas==1.1.4
python-dotenv==0.15.0
pybind11==2.6.1
fasttext # git+https://github.com/facebookresearch/fastText.git
gunicorn==20.0.4
polyglot # git+https://github.com/aboSamoor/polyglot.git#master
sklearn==0.0
Aptfile
# you can list packages
apt-get install --reinstall build-essential libicu-dev g++
# or include links to specific .deb files
#http://downloads.sourceforge.net/project/wkhtmltopdf/0.12.1/wkhtmltox-0.12.1_linux-precise-amd64.deb
http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu-dev_67.1-4_amd64.deb
# or add custom apt repos
:repo:deb http://cz.archive.ubuntu.com/ubuntu artful main universe
runtime.txt
python-3.6.12
I referred and tried the below links but no use.
references: https://github.com/aboSamoor/polyglot/issues/152

Error building CXX object gnuradio-runtime

I am trying to install a specific version of gnuradio (3.7.10.1). To do so I am not using Pybombs, but I try to do it from source (I am following this).
First I've cloned the github repository, then checkout the appropriate version. It worked fine until I've tried to invoke CMake and build GNU Radio:
mkdir build
cd build
cmake ../
make
During the make, after 6% done, I have the following error:
In file included from /usr/include/c++/7/type_traits:35:0,
from /usr/include/cppunit/tools/StringHelper.h:7,
from /usr/include/cppunit/TestAssert.h:8,
from /usr/include/cppunit/TestCase.h:6,
from /usr/include/cppunit/TestCaller.h:5,
from /usr/include/cppunit/extensions/HelperMacros.h:9,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:26,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:27:
/usr/include/c++/7/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support \
^~~~~
In file included from /usr/include/cppunit/TestAssert.h:8:0,
from /usr/include/cppunit/TestCase.h:6,
from /usr/include/cppunit/TestCaller.h:5,
from /usr/include/cppunit/extensions/HelperMacros.h:9,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:26,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:27:
/usr/include/cppunit/tools/StringHelper.h:22:15: error: ‘enable_if’ in namespace ‘std’ does not name a template type
typename std::enable_if<!std::is_enum<T>::value, std::string>::type toString(const T& x)
^~~~~~~~~
/usr/include/cppunit/tools/StringHelper.h:22:24: error: expected unqualified-id before ‘<’ token
typename std::enable_if<!std::is_enum<T>::value, std::string>::type toString(const T& x)
^
/usr/include/cppunit/tools/StringHelper.h:31:15: error: ‘enable_if’ in namespace ‘std’ does not name a template type
typename std::enable_if<std::is_enum<T>::value, std::string>::type toString(const T& x)
^~~~~~~~~
/usr/include/cppunit/tools/StringHelper.h:31:24: error: expected unqualified-id before ‘<’ token
typename std::enable_if<std::is_enum<T>::value, std::string>::type toString(const T& x)
In file included from /usr/include/cppunit/TestCase.h:6:0,
from /usr/include/cppunit/TestCaller.h:5,
from /usr/include/cppunit/extensions/HelperMacros.h:9,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:26,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:27:
/usr/include/cppunit/TestAssert.h: In static member function ‘static std::__cxx11::string CppUnit::assertion_traits<T>::toString(const T&)’:
/usr/include/cppunit/TestAssert.h:74:42: error: ‘toString’ is not a member of ‘CppUnit::StringHelper’
return CPPUNIT_NS::StringHelper::toString(x);
^~~~~~~~
In file included from /usr/include/cppunit/extensions/HelperMacros.h:9:0,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:26,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:27:
/usr/include/cppunit/TestCaller.h: At global scope:
/usr/include/cppunit/TestCaller.h:159:37: error: ‘std::function’ has not been declared
TestCaller(std::string name, std::function<void()> test_function, Fixture* fixture):
^~~~~~~~
/usr/include/cppunit/TestCaller.h:159:45: error: expected ‘,’ or ‘...’ before ‘<’ token
TestCaller(std::string name, std::function<void()> test_function, Fixture* fixture):
^
/usr/include/cppunit/TestCaller.h:200:8: error: ‘function’ in namespace ‘std’ does not name a template type
std::function<void()> m_test_function;
^~~~~~~~
/usr/include/cppunit/TestCaller.h: In constructor ‘CppUnit::TestCaller<Fixture>::TestCaller(std::__cxx11::string, CppUnit::TestCaller<Fixture>::TestMethod)’:
/usr/include/cppunit/TestCaller.h:121:6: error: class ‘CppUnit::TestCaller<Fixture>’ does not have any field named ‘m_test_function’
m_test_function( std::bind(test, m_fixture) )
^~~~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h:121:28: error: ‘bind’ is not a member of ‘std’
m_test_function( std::bind(test, m_fixture) )
^~~~
/usr/include/cppunit/TestCaller.h:121:28: note: suggested alternative: ‘find’
m_test_function( std::bind(test, m_fixture) )
^~~~
find
/usr/include/cppunit/TestCaller.h: In constructor ‘CppUnit::TestCaller<Fixture>::TestCaller(std::__cxx11::string, CppUnit::TestCaller<Fixture>::TestMethod, Fixture&)’:
/usr/include/cppunit/TestCaller.h:138:6: error: class ‘CppUnit::TestCaller<Fixture>’ does not have any field named ‘m_test_function’
m_test_function( std::bind(test, &fixture) )
^~~~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h:138:28: error: ‘bind’ is not a member of ‘std’
m_test_function( std::bind(test, &fixture) )
^~~~
/usr/include/cppunit/TestCaller.h:138:28: note: suggested alternative: ‘find’
m_test_function( std::bind(test, &fixture) )
^~~~
find
/usr/include/cppunit/TestCaller.h: In constructor ‘CppUnit::TestCaller<Fixture>::TestCaller(std::__cxx11::string, CppUnit::TestCaller<Fixture>::TestMethod, Fixture*)’:
/usr/include/cppunit/TestCaller.h:155:6: error: class ‘CppUnit::TestCaller<Fixture>’ does not have any field named ‘m_test_function’
m_test_function( std::bind(test, fixture) )
^~~~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h:155:28: error: ‘bind’ is not a member of ‘std’
m_test_function( std::bind(test, fixture) )
^~~~
/usr/include/cppunit/TestCaller.h:155:28: note: suggested alternative: ‘find’
m_test_function( std::bind(test, fixture) )
^~~~
find
/usr/include/cppunit/TestCaller.h: In constructor ‘CppUnit::TestCaller<Fixture>::TestCaller(std::__cxx11::string, int)’:
/usr/include/cppunit/TestCaller.h:162:17: error: ‘fixture’ was not declared in this scope
m_fixture(fixture),
^~~~~~~
/usr/include/cppunit/TestCaller.h:162:17: note: suggested alternative: ‘Fixture’
m_fixture(fixture),
^~~~~~~
Fixture
/usr/include/cppunit/TestCaller.h:163:7: error: class ‘CppUnit::TestCaller<Fixture>’ does not have any field named ‘m_test_function’
m_test_function(test_function)
^~~~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h:163:23: error: ‘test_function’ was not declared in this scope
m_test_function(test_function)
^~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h: In member function ‘void CppUnit::TestCaller<Fixture>::runTest()’:
/usr/include/cppunit/TestCaller.h:175:7: error: there are no arguments to ‘m_test_function’ that depend on a template parameter, so a declaration of ‘m_test_function’ must be available [-fpermissive]
m_test_function();
^~~~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h:175:7: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
In file included from /usr/include/cppunit/extensions/HelperMacros.h:14:0,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:26,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:27:
/usr/include/cppunit/extensions/TestNamer.h: In member function ‘std::__cxx11::string CppUnit::TestNamer::getTestNameFor(const string&, const E&) const’:
/usr/include/cppunit/extensions/TestNamer.h:70:95: error: ‘toString’ is not a member of ‘CppUnit::StringHelper’
return getTestNameFor(testMethodName) + " with parameter: " + CPPUNIT_NS::StringHelper::toString(val);
^~~~~~~~
In file included from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:26:0,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:27:
/home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h: In static member function ‘static CppUnit::TestSuite* qa_fxpt::suite()’:
/home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:36:3: error: ‘unique_ptr’ is not a member of ‘std’
CPPUNIT_TEST_SUITE_END();
^
/home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:36:3: error: expected primary-expression before ‘>’ token
CPPUNIT_TEST_SUITE_END();
^
/home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:36:3: error: ‘guard’ was not declared in this scope
CPPUNIT_TEST_SUITE_END();
^
In file included from /usr/include/cppunit/extensions/HelperMacros.h:9:0,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:26,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:27:
/usr/include/cppunit/TestCaller.h: In instantiation of ‘void CppUnit::TestCaller<Fixture>::runTest() [with Fixture = qa_fxpt]’:
/home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:102:1: required from here
/usr/include/cppunit/TestCaller.h:175:22: error: ‘m_test_function’ was not declared in this scope
m_test_function();
~~~~~~~~~~~~~~~^~
/usr/include/cppunit/TestCaller.h:175:22: note: suggested alternative: ‘__fortify_function’
m_test_function();
~~~~~~~~~~~~~~~^~
__fortify_function
gnuradio-runtime/lib/CMakeFiles/test-gnuradio-runtime.dir/build.make:62: recipe for target 'gnuradio-runtime/lib/CMakeFiles/test-gnuradio-runtime.dir/math/qa_fxpt.cc.o' failed
make[2]: *** [gnuradio-runtime/lib/CMakeFiles/test-gnuradio-runtime.dir/math/qa_fxpt.cc.o] Error 1
CMakeFiles/Makefile2:726: recipe for target 'gnuradio-runtime/lib/CMakeFiles/test-gnuradio-runtime.dir/all' failed
make[1]: *** [gnuradio-runtime/lib/CMakeFiles/test-gnuradio-runtime.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
I am not a Linux expert and I am not very familiar to this compiler/library support. I don't really understand where the error comes from and how to correct it.
I use Ubuntu 18.04.
Coud you give me a hand on this please?
Any help would be very appreciated.
Thanks a lot.
/usr/include/c++/7/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
To resolve the above error you need to compile with -std=c++11 flag. Open CMakeLists.txt, find all occurrences or -std=c++98 and change them to -std=c++11. Then go to the build directory, remove CMakeCache.txt and rebuild
sed -i 's/-std=c++98/-std=c++11/g' CMakeLists.txt
cd build
rm CMakeCache.txt
cmake ..
make
Also as the error is in the cppunit and it's used for testing you can try disabling all tests
cd build
rm CMakeCache.txt
cmake -DENABLE_TESTING=OFF ..
make

Simple Fltk application not cross-compiling with MinGW

I am trying to do cross-compiling on Linux to create exe file for 32bit Windows. I use following code:
i686-w64-mingw32-g++ rnfltk_simplest.cpp -static-libgcc -static-libstdc++ -o rnfltk_simplest.exe -lfltk -I/usr/include/
But I get an output with many errors:
In file included from /usr/share/mingw-w64/include/winsock.h:32:0,
from /usr/share/mingw-w64/include/windows.h:92,
from /usr/include/Fl/Fl_Window.H:26,
from rnfltk_simplest.cpp:4:
/usr/share/mingw-w64/include/_timeval.h:10:8: error: redefinition of ‘struct timeval’
struct timeval
^~~~~~~
In file included from /usr/include/sys/select.h:47:0,
from /usr/include/sys/types.h:219,
from /usr/include/stdlib.h:275,
from /usr/include/FL/fl_utf8.h:36,
from /usr/include/FL/Fl.H:32,
from rnfltk_simplest.cpp:2:
/usr/include/bits/time.h:30:8: error: previous definition of ‘struct timeval’
struct timeval
^~~~~~~
In file included from /usr/share/mingw-w64/include/winsock.h:36:0,
from /usr/share/mingw-w64/include/windows.h:92,
from /usr/include/Fl/Fl_Window.H:26,
from rnfltk_simplest.cpp:4:
/usr/share/mingw-w64/include/psdk_inc/_fd_types.h:21:16: error: using typedef-name ‘fd_set’ after ‘struct’
typedef struct fd_set
^~~~~~
In file included from /usr/include/sys/types.h:219:0,
from /usr/include/stdlib.h:275,
from /usr/include/FL/fl_utf8.h:36,
from /usr/include/FL/Fl.H:32,
from rnfltk_simplest.cpp:2:
/usr/include/sys/select.h:77:5: note: ‘fd_set’ has a previous declaration here
} fd_set;
^~~~~~
In file included from /usr/share/mingw-w64/include/winsock.h:36:0,
from /usr/share/mingw-w64/include/windows.h:92,
from /usr/include/Fl/Fl_Window.H:26,
from rnfltk_simplest.cpp:4:
/usr/share/mingw-w64/include/psdk_inc/_fd_types.h:25:3: error: conflicting declaration ‘typedef int fd_set’
} fd_set;
^~~~~~
In file included from /usr/include/sys/types.h:219:0,
from /usr/include/stdlib.h:275,
from /usr/include/FL/fl_utf8.h:36,
from /usr/include/FL/Fl.H:32,
from rnfltk_simplest.cpp:2:
/usr/include/sys/select.h:77:5: note: previous declaration as ‘typedef struct fd_set fd_set’
} fd_set;
^~~~~~
In file included from /usr/share/mingw-w64/include/winsock.h:36:0,
from /usr/share/mingw-w64/include/windows.h:92,
from /usr/include/Fl/Fl_Window.H:26,
from rnfltk_simplest.cpp:4:
/usr/share/mingw-w64/include/psdk_inc/_fd_types.h:104:16: error: using typedef-name ‘fd_set’ after ‘struct’
typedef struct fd_set FD_SET;
^~~~~~
In file included from /usr/include/sys/types.h:219:0,
from /usr/include/stdlib.h:275,
from /usr/include/FL/fl_utf8.h:36,
from /usr/include/FL/Fl.H:32,
from rnfltk_simplest.cpp:2:
/usr/include/sys/select.h:77:5: note: ‘fd_set’ has a previous declaration here
} fd_set;
^~~~~~
In file included from /usr/share/mingw-w64/include/winsock.h:36:0,
from /usr/share/mingw-w64/include/windows.h:92,
from /usr/include/Fl/Fl_Window.H:26,
from rnfltk_simplest.cpp:4:
/usr/share/mingw-w64/include/psdk_inc/_fd_types.h:105:16: error: using typedef-name ‘fd_set’ after ‘struct’
typedef struct fd_set *PFD_SET;
^~~~~~
In file included from /usr/include/sys/types.h:219:0,
from /usr/include/stdlib.h:275,
from /usr/include/FL/fl_utf8.h:36,
from /usr/include/FL/Fl.H:32,
from rnfltk_simplest.cpp:2:
/usr/include/sys/select.h:77:5: note: ‘fd_set’ has a previous declaration here
} fd_set;
^~~~~~
In file included from /usr/share/mingw-w64/include/winsock.h:36:0,
from /usr/share/mingw-w64/include/windows.h:92,
from /usr/include/Fl/Fl_Window.H:26,
from rnfltk_simplest.cpp:4:
/usr/share/mingw-w64/include/psdk_inc/_fd_types.h:106:16: error: using typedef-name ‘fd_set’ after ‘struct’
typedef struct fd_set *LPFD_SET;
^~~~~~
In file included from /usr/include/sys/types.h:219:0,
from /usr/include/stdlib.h:275,
from /usr/include/FL/fl_utf8.h:36,
from /usr/include/FL/Fl.H:32,
from rnfltk_simplest.cpp:2:
/usr/include/sys/select.h:77:5: note: ‘fd_set’ has a previous declaration here
} fd_set;
^~~~~~
In file included from /usr/share/mingw-w64/include/windows.h:92:0,
from /usr/include/Fl/Fl_Window.H:26,
from rnfltk_simplest.cpp:4:
/usr/share/mingw-w64/include/winsock.h:299:34: error: conflicting declaration of C function ‘int select(int, fd_set*, fd_set*, fd_set*, PTIMEVAL)’
WINSOCK_API_LINKAGE int WSAAPI select(int nfds,fd_set *readfds,fd_set *writefds,fd_set *exceptfds,const PTIMEVAL timeout);
^~~~~~
In file included from /usr/include/sys/types.h:219:0,
from /usr/include/stdlib.h:275,
from /usr/include/FL/fl_utf8.h:36,
from /usr/include/FL/Fl.H:32,
from rnfltk_simplest.cpp:2:
/usr/include/sys/select.h:108:12: note: previous declaration ‘int select(int, fd_set*, fd_set*, fd_set*, timeval*)’
extern int select (int __nfds, fd_set *__restrict __readfds,
^~~~~~
Where is the problem and how can it be solved? Thanks for your help.
The problem is in
-I/usr/include/
This path contains headers for libraries configured for and installed in your Linux system. But you want to use headers specific to the Windows libraries. These are installed in the MinGW compiler "system" include directory (most likely /usr/share/mingw-w64/include given that from there all the collisions come).
You need to install Fltk into your MinGW. For example, in openSUSE, this would be the package mingw64-fltk-devel.

node-gyp rebuild error while installing an npm package

I'm trying to install "karma" and "grunt-karma" for a project and I end up with the following npm error. I'm running MacOS Sierra v10.12.4, XCode v8.3.2 with command line tools installed, node v7.9.0, node-gyp v3.5.0.
Before pasting this here I read all the SO topics about this and also some other ones on GitHub, but nothing worked.
> bufferutil#1.1.0 install /Users/cc/project/node_modules/bufferutil
> node-gyp rebuild
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:82:
../node_modules/nan/nan_new.h:34:56: warning: 'ToInt32' is deprecated
[-Wdeprecated-declarations]
To<v8::Int32>(v8::Handle<v8::Integer> i) { return i->ToInt32(); }
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:9041:21: note: 'ToInt32'
has been explicitly marked deprecated here
Local<Int32> Value::ToInt32() const {
^
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:82:
../node_modules/nan/nan_new.h:39:56: warning: 'ToUint32' is deprecated
[-Wdeprecated-declarations]
To<v8::Uint32>(v8::Handle<v8::Integer> i) { return i->ToUint32(); }
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:9035:22: note: 'ToUint32'
has been explicitly marked deprecated here
Local<Uint32> Value::ToUint32() const {
^
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:82:
In file included from ../node_modules/nan/nan_new.h:189:
../node_modules/nan/nan_implementation_12_inl.h:49:29: warning: 'New' is
deprecated [-Wdeprecated-declarations]
return v8::BooleanObject::New(value).As<v8::BooleanObject>();
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:4490:56: note: 'New' has
been explicitly marked deprecated here
V8_DEPRECATED("Pass an isolate", static Local<Value> New(bool value));
^
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:82:
In file included from ../node_modules/nan/nan_new.h:189:
../node_modules/nan/nan_implementation_12_inl.h:166:30: warning: 'Compile' is
deprecated [-Wdeprecated-declarations]
return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &src);
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:1376:21: note: 'Compile'
has been explicitly marked deprecated here
Local<Script> Compile(Isolate* isolate, Source* source,
^
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:82:
In file included from ../node_modules/nan/nan_new.h:189:
../node_modules/nan/nan_implementation_12_inl.h:173:30: warning: 'Compile' is
deprecated [-Wdeprecated-declarations]
return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &src);
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:1376:21: note: 'Compile'
has been explicitly marked deprecated here
Local<Script> Compile(Isolate* isolate, Source* source,
^
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:82:
In file included from ../node_modules/nan/nan_new.h:189:
../node_modules/nan/nan_implementation_12_inl.h:205:22: warning:
'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
return v8::String::NewFromOneByte(v8::Isolate::GetCurrent(), value,
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:2544:21: note:
'NewFromOneByte' has been explicitly marked deprecated here
Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
^
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:82:
In file included from ../node_modules/nan/nan_new.h:189:
../node_modules/nan/nan_implementation_12_inl.h:217:22: warning: 'NewExternal'
is deprecated [-Wdeprecated-declarations]
return v8::String::NewExternal(v8::Isolate::GetCurrent(), value);
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:2582:38: note:
'NewExternal' has been explicitly marked deprecated here
Local<String> NewExternal(
^
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:82:
In file included from ../node_modules/nan/nan_new.h:189:
../node_modules/nan/nan_implementation_12_inl.h:237:30: warning:
'CompileUnbound' is deprecated [-Wdeprecated-declarations]
return v8::ScriptCompiler::CompileUnbound(v8::Isolate::GetCurrent(), &src);
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:1356:45: note:
'CompileUnbound' has been explicitly marked deprecated here
Local<UnboundScript> CompileUnbound(
^
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:82:
In file included from ../node_modules/nan/nan_new.h:189:
../node_modules/nan/nan_implementation_12_inl.h:244:30: warning:
'CompileUnbound' is deprecated [-Wdeprecated-declarations]
return v8::ScriptCompiler::CompileUnbound(v8::Isolate::GetCurrent(), &src);
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:1356:45: note:
'CompileUnbound' has been explicitly marked deprecated here
Local<UnboundScript> CompileUnbound(
^
In file included from ../src/bufferutil.cc:16:
../node_modules/nan/nan.h:261:25: error: redefinition of '_NanEnsureLocal'
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
^
../node_modules/nan/nan.h:256:25: note: previous definition is here
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {
^
../node_modules/nan/nan.h:289:39: warning: 'IdleNotification' is deprecated
[-Wdeprecated-declarations]
return v8::Isolate::GetCurrent()->IdleNotification(idle_time_in_ms);
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:6893:22: note:
'IdleNotification' has been explicitly marked deprecated here
bool IdleNotification(int idle_time_in_ms));
^
In file included from ../src/bufferutil.cc:16:
../node_modules/nan/nan.h:473:20: error: no type named 'GCEpilogueCallback' in
'v8::Isolate'
v8::Isolate::GCEpilogueCallback callback
~~~~~~~~~~~~~^
../node_modules/nan/nan.h:479:20: error: no type named 'GCEpilogueCallback' in
'v8::Isolate'
v8::Isolate::GCEpilogueCallback callback) {
~~~~~~~~~~~~~^
../node_modules/nan/nan.h:484:20: error: no type named 'GCPrologueCallback' in
'v8::Isolate'
v8::Isolate::GCPrologueCallback callback
~~~~~~~~~~~~~^
../node_modules/nan/nan.h:490:20: error: no type named 'GCPrologueCallback' in
'v8::Isolate'
v8::Isolate::GCPrologueCallback callback) {
~~~~~~~~~~~~~^
../node_modules/nan/nan.h:569:15: error: no type named 'WeakCallbackData' in
namespace 'v8'
const v8::WeakCallbackData<T, _NanWeakCallbackInfo<T, P> > &data) {
~~~~^
../node_modules/nan/nan.h:569:31: error: expected ')'
const v8::WeakCallbackData<T, _NanWeakCallbackInfo<T, P> > &data) {
^
../node_modules/nan/nan.h:568:41: note: to match this '('
static void _NanWeakCallbackDispatcher(
^
../node_modules/nan/nan.h:570:42: error: use of undeclared identifier 'data'
_NanWeakCallbackInfo<T, P> *info = data.GetParameter();
^
../node_modules/nan/nan.h:661:13: error: no member named 'smalloc' in namespace
'node'
, node::smalloc::FreeCallback callback
~~~~~~^
../node_modules/nan/nan.h:672:12: error: no matching function for call to 'New'
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^~~~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/node_buffer.h:46:40: note:
candidate function not viable: 2nd argument ('const char *') would lose
const qualifier
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/Users/cc/.node-gyp/7.9.0/include/node/node_buffer.h:34:40: note:
candidate function not viable: no known conversion from 'const char *' to
'v8::Local<v8::String>' for 2nd argument
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/Users/cc/.node-gyp/7.9.0/include/node/node_buffer.h:31:40: note:
candidate function not viable: requires 2 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, size_t length);
^
/Users/cc/.node-gyp/7.9.0/include/node/node_buffer.h:39:40: note:
candidate function not viable: requires 5 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
In file included from ../src/bufferutil.cc:16:
../node_modules/nan/nan.h:676:12: error: no viable conversion from returned
value of type 'v8::MaybeLocal<v8::Object>' to function return type
'v8::Local<v8::Object>'
return node::Buffer::New(v8::Isolate::GetCurrent(), size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:221:7: note: candidate
constructor (the implicit copy constructor) not viable: no known
conversion from 'v8::MaybeLocal<v8::Object>' to 'const
v8::Local<v8::Object> &' for 1st argument
class Local {
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:221:7: note: candidate
constructor (the implicit move constructor) not viable: no known
conversion from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object> &&'
for 1st argument
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:225:13: note: candidate
template ignored: could not match 'Local' against 'MaybeLocal'
V8_INLINE Local(Local<S> that)
^
In file included from ../src/bufferutil.cc:16:
../node_modules/nan/nan.h:683:26: error: no member named 'Use' in namespace
'node::Buffer'
return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
~~~~~~~~~~~~~~^
../node_modules/nan/nan.h:710:32: warning: 'Compile' is deprecated
[-Wdeprecated-declarations]
return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &source);
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:1376:21: note: 'Compile'
has been explicitly marked deprecated here
Local<Script> Compile(Isolate* isolate, Source* source,
^
In file included from ../src/bufferutil.cc:16:
../node_modules/nan/nan.h:717:32: warning: 'Compile' is deprecated
[-Wdeprecated-declarations]
return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &source);
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:1376:21: note: 'Compile'
has been explicitly marked deprecated here
Local<Script> Compile(Isolate* isolate, Source* source,
^
../src/bufferutil.cc:30:5: error: call to 'NODE_SET_METHOD' is ambiguous
NODE_SET_METHOD(t, "unmask", BufferUtil::Unmask);
^~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/node.h:266:25: note: expanded
from macro 'NODE_SET_METHOD'
#define NODE_SET_METHOD node::NODE_SET_METHOD
^~~~~~~~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/node.h:241:13: note: candidate
function
inline void NODE_SET_METHOD(v8::Local<v8::Template> recv,
^
/Users/cc/.node-gyp/7.9.0/include/node/node.h:254:13: note: candidate
function
inline void NODE_SET_METHOD(v8::Local<v8::Object> recv,
^
../src/bufferutil.cc:31:5: error: call to 'NODE_SET_METHOD' is ambiguous
NODE_SET_METHOD(t, "mask", BufferUtil::Mask);
^~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/node.h:266:25: note: expanded
from macro 'NODE_SET_METHOD'
#define NODE_SET_METHOD node::NODE_SET_METHOD
^~~~~~~~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/node.h:241:13: note: candidate
function
inline void NODE_SET_METHOD(v8::Local<v8::Template> recv,
^
/Users/cc/.node-gyp/7.9.0/include/node/node.h:254:13: note: candidate
function
inline void NODE_SET_METHOD(v8::Local<v8::Object> recv,
^
../src/bufferutil.cc:32:5: error: call to 'NODE_SET_METHOD' is ambiguous
NODE_SET_METHOD(t, "merge", BufferUtil::Merge);
^~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/node.h:266:25: note: expanded
from macro 'NODE_SET_METHOD'
#define NODE_SET_METHOD node::NODE_SET_METHOD
^~~~~~~~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/node.h:241:13: note: candidate
function
inline void NODE_SET_METHOD(v8::Local<v8::Template> recv,
^
/Users/cc/.node-gyp/7.9.0/include/node/node.h:254:13: note: candidate
function
inline void NODE_SET_METHOD(v8::Local<v8::Object> recv,
^
In file included from ../src/bufferutil.cc:7:
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:232:5: error: assigning to
'v8::Primitive *volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:191:37: note: expanded from
macro 'TYPE_CHECK'
*(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \
^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:414:12: note: in instantiation of function template
specialization 'v8::Local<v8::Primitive>::Local<v8::Value>' requested here
return NanEscapeScope(NanNew(v8::Undefined(v8::Isolate::GetCurrent())));
^
../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))
^
In file included from ../src/bufferutil.cc:7:
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:232:5: error: assigning to
'v8::Boolean *volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:191:37: note: expanded from
macro 'TYPE_CHECK'
*(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \
^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:424:12: note: in instantiation of function template
specialization 'v8::Local<v8::Boolean>::Local<v8::Value>' requested here
return NanEscapeScope(NanNew(v8::True(v8::Isolate::GetCurrent())));
^
../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))
^
In file included from ../src/bufferutil.cc:7:
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:232:5: error: assigning to
'v8::Function *volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:191:37: note: expanded from
macro 'TYPE_CHECK'
*(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \
^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:1514:12: note: in instantiation of function template
specialization 'v8::Local<v8::Function>::Local<v8::Value>' requested here
return NanEscapeScope(NanNew(handle)->Get(kCallbackIndex)
^
../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))
^
In file included from ../src/bufferutil.cc:7:
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:232:5: error: assigning to
'v8::Object *volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:191:37: note: expanded from
macro 'TYPE_CHECK'
*(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \
^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:1632:12: note: in instantiation of function template
specialization 'v8::Local<v8::Object>::Local<v8::Value>' requested here
return NanEscapeScope(handle->Get(NanNew(key)).As<v8::Object>());
^
../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))
^
12 warnings and 19 errors generated.
make: *** [Release/obj.target/bufferutil/src/bufferutil.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:194:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 16.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/cc/project/node_modules/bufferutil
gyp ERR! node -v v7.9.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok

Compiling VNC Server Binary Files (error when running $make)

Hey folks I'm trying to compile a ELF binary server files from here:https://github.com/LibVNC/libvncserver
To do this I follow the steps here: (starting line 10 - 31). I set the NDK toolchains correctly and now I'm trying to run the $configure command
I'm using a 14.04 Ubuntu Machine.
The following command is succesful
$./configure --host=arm-eabi CC=arm-linux-androideabi-gcc
I then run
$make
and get the following error ($make clean ... doesn't help):
root#ip-172-31-35-74:~/Desktop/libvncserver-LibVNCServer-0.9.10#
root#ip-172-31-35-74:~/Desktop/libvncserver-LibVNCServer-0.9.10# make
make all-recursive
make[1]: Entering directory `/home/ubuntu/Desktop/libvncserver-LibVNCServer-0.9.10'
Making all in libvncserver
make[2]: Entering directory `/home/ubuntu/Desktop/libvncserver-LibVNCServer-0.9.10/libvncserver'
CC main.lo
CC rfbserver.lo
rfbserver.c: In function 'rfbProcessFileTransfer':
rfbserver.c:1690:69: warning: pointer targets in passing argument 1 of 'gmtime' differ in signedness [-Wpointer-sign]
strftime(timespec, sizeof(timespec), "%m/%d/%Y %H:%M",gmtime(&statbuf.st_ctime));
^
In file included from rfbserver.c:87:0:
/tmp/my-android-toolchain/sysroot/usr/include/time.h:76:20: note: expected 'const time_t *' but argument is of type 'long unsigned int *'
extern struct tm* gmtime(const time_t *timep);
^
CC rfbregion.lo
CC auth.lo
CC sockets.lo
CC websockets.lo
CC rfbssl_none.lo
CC rfbcrypto_included.lo
In file included from rfbcrypto_included.c:25:0:
../common/md5.h: In function '__md5_init_ctx':
../common/md5.h:101:50: error: expected declaration specifiers before '__THROW'
extern void __md5_init_ctx (struct md5_ctx *ctx) __THROW;
^
../common/md5.h:108:39: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__THROW'
struct md5_ctx *ctx) __THROW;
^
../common/md5.h:115:39: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__THROW'
struct md5_ctx *ctx) __THROW;
^
../common/md5.h:124:67: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__THROW'
extern void *__md5_finish_ctx (struct md5_ctx *ctx, void *resbuf) __THROW;
^
../common/md5.h:133:71: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__THROW'
extern void *__md5_read_ctx (const struct md5_ctx *ctx, void *resbuf) __THROW;
^
../common/md5.h:139:56: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__THROW'
extern int __md5_stream (FILE *stream, void *resblock) __THROW;
^
../common/md5.h:146:32: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__THROW'
void *resblock) __THROW;
^
In file included from rfbcrypto_included.c:26:0:
../common/sha1.h:62:1: warning: empty declaration
enum
^
../common/sha1.h:89:3: error: storage class specified for parameter 'SHA1Context'
} SHA1Context;
^
../common/sha1.h:94:17: error: expected declaration specifiers or '...' before 'SHA1Context'
int SHA1Reset( SHA1Context *);
^
../common/sha1.h:95:17: error: expected declaration specifiers or '...' before 'SHA1Context'
int SHA1Input( SHA1Context *,
^
../common/sha1.h:98:17: error: expected declaration specifiers or '...' before 'SHA1Context'
int SHA1Result( SHA1Context *,
^
rfbcrypto_included.c:30:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{
^
rfbcrypto_included.c:41:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
{
^
In file included from rfbcrypto_included.c:25:0:
../common/md5.h:101:13: error: old-style parameter declarations in prototyped function definition
extern void __md5_init_ctx (struct md5_ctx *ctx) __THROW;
^
rfbcrypto_included.c:49:1: error: expected '{' at end of input
}
^
make[2]: *** [rfbcrypto_included.lo] Error 1
make[2]: Leaving directory `/home/ubuntu/Desktop/libvncserver-LibVNCServer-0.9.10/libvncserver'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ubuntu/Desktop/libvncserver-LibVNCServer-0.9.10'
make: *** [all] Error 2
root#ip-172-31-35-74:~/Desktop/libvncserver-LibVNCServer-0.9.10#
root#ip-172-31-35-74:~/Desktop/libvncserver-LibVNCServer-0.9.10#

Resources