I'm trying to build build NUMBA package form its source to generate a wheel out of it. I know there is a wheel for windows but I want to do some test on my local Windows 64X machine. I have installed NUMPY, LLVMLITE dependencies and I'm using MinGW c++ compiler and not visual studio. I get a below error, what am I missing here?
py : C:\Workspace\Python_Runtime\Python\lib\site-packages\setuptools\distutils_patch.py:25:
UserWarning: Distutils was imported before Setuptools. This usage is discouraged and may exhibit undesirable behaviors or errors. Please use Setuptools' objects directly or at least import Setuptools first.In Zeile:1 Zeichen:1
+ py setup.py bdist_wheel 2>&1 > error.txt
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (C:\Workspace\Py...tuptools first.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
warnings.warn(TBB not found Using OpenMP from: True running bdist_wheel running build got version from file C:\Workspace\Python_Runtime\numba-0.54.1\numba/_version.py {'version': '0.54.1', 'full': '39aef3deb073a67b0bf121e099ecf5b33d799f40'}
running build_py
running build_ext
building 'numba._dispatcher' extension
C compiler: gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall -Wstrict-prototypes
compile options: '-D__MSVCRT_VERSION__=0x1927 -
IC:\\Workspace\\Python_Runtime\\Python\\lib\\site-packages\\numpy\\core\\include -
IC:\Workspace\Python_Runtime\Python\include -IC:\Workspace\Python_Runtime\Python\include -c'
gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall -Wstrict-prototypes -D__MSVCRT_VERSION__=0x1927 -
IC:\\Workspace\\Python_Runtime\\Python\\lib\\site-packages\\numpy\\core\\include -
IC:\Workspace\Python_Runtime\Python\include -IC:\Workspace\Python_Runtime\Python\include -c
numba/_dispatcher.cpp -o build\temp.win-amd64-3.9\Release\numba\_dispatcher.o
gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall -Wstrict-prototypes -D__MSVCRT_VERSION__=0x1927 -
IC:\\Workspace\\Python_Runtime\\Python\\lib\\site-packages\\numpy\\core\\include -
IC:\Workspace\Python_Runtime\Python\include -IC:\Workspace\Python_Runtime\Python\include -c numba/_hashtable.c -o build\temp.win-amd64-3.9\Release\numba\_hashtable.o
gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall -Wstrict-prototypes -D__MSVCRT_VERSION__=0x1927 -
IC:\\Workspace\\Python_Runtime\\Python\\lib\\site-packages\\numpy\\core\\include -
IC:\Workspace\Python_Runtime\Python\include -IC:\Workspace\Python_Runtime\Python\include -c numba/core/typeconv/typeconv.cpp -o build\temp.win-amd64 3.9\Release\numba\core\typeconv\typeconv.o
gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall -Wstrict-prototypes -D__MSVCRT_VERSION__=0x1927 -
IC:\\Workspace\\Python_Runtime\\Python\\lib\\site-packages\\numpy\\core\\include -
IC:\Workspace\Python_Runtime\Python\include -IC:\Workspace\Python_Runtime\Python\include -c numba/_typeof.c -o build\temp.win-amd64-3.9\Release\numba\_typeof.o
cc1plus.exe: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
numba/_hashtable.c:102:1: warning: '_Numba_hashtable_hash_int' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
_Numba_hashtable_hash_int(const void *key)
^
numba/_hashtable.c:108:1: warning: '_Numba_hashtable_hash_ptr' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
_Numba_hashtable_hash_ptr(const void *key)
^
numba/_hashtable.c:114:1: warning: '_Numba_hashtable_compare_direct' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
_Numba_hashtable_compare_direct(const void *key, const _Numba_hashtable_entry_t *entry)
^
numba/_hashtable.c:133:1: warning: '_Numba_hashtable_new_full' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
_Numba_hashtable_new_full(size_t data_size, size_t init_size,
^
numba/_hashtable.c:178:1: warning: '_Numba_hashtable_new' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
_Numba_hashtable_new(size_t data_size,
^
numba/_hashtable.c:188:1: warning: '_Numba_hashtable_size' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
_Numba_hashtable_size(_Numba_hashtable_t *ht)
^
numba/_hashtable.c:259:1: warning: '_Numba_hashtable_get_entry' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
_Numba_hashtable_get_entry(_Numba_hashtable_t *ht, const void *key)
^
numba/_hashtable.c:312:1: warning: '_Numba_hashtable_set' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
_Numba_hashtable_set(_Numba_hashtable_t *ht, const void *key,
^
numba/_hashtable.c:354:1: warning: '_Numba_hashtable_get' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
_Numba_hashtable_get(_Numba_hashtable_t *ht, const void *key, void *data, size_t data_size)
^
numba/_hashtable.c:368:1: warning: '_Numba_hashtable_pop' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
_Numba_hashtable_pop(_Numba_hashtable_t *ht, const void *key, void *data, size_t data_size)
^
numba/_hashtable.c:377:1: warning: '_Numba_hashtable_delete' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
_Numba_hashtable_delete(_Numba_hashtable_t *ht, const void *key)
^
numba/_hashtable.c:391:1: warning: '_Numba_hashtable_foreach' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
_Numba_hashtable_foreach(_Numba_hashtable_t *ht,
^
numba/_hashtable.c:451:1: warning: '_Numba_hashtable_clear' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
_Numba_hashtable_clear(_Numba_hashtable_t *ht)
^
numba/_hashtable.c:470:1: warning: '_Numba_hashtable_destroy' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
_Numba_hashtable_destroy(_Numba_hashtable_t *ht)
^
numba/_hashtable.c:491:1: warning: '_Numba_hashtable_copy' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
_Numba_hashtable_copy(_Numba_hashtable_t *src)
^
In file included from C:/Program Files/R/Rtools/mingw_64/x86_64-w64 mingw32/include/c++/cassert:43:0,
from numba/_dispatcher.cpp:5:
numba/_dispatcher.cpp: In function 'PyObject* call_cfunc(Dispatcher*, PyObject*, PyObject*, PyObject*, PyObject*)':
numba/_dispatcher.cpp:383:41: warning: suggest parentheses around comparison in operand of '|' [-Wparentheses]
assert(PyCFunction_GET_FLAGS(cfunc) == METH_VARARGS | METH_KEYWORDS);
^
g++ -g -shared build\temp.win-amd64-3.9\Release\numba\_dispatcher.o build\temp.win-amd64 3.9\Release\numba\_hashtable.o build\temp.win-amd64-3.9\Release\numba\_typeof.o build\temp.win amd64-3.9\Release\numba\core\typeconv\typeconv.o -
LC:\\Workspace\\Python_Runtime\\Python\\lib\\site-packages\\numpy\\core\\lib -
LC:\Workspace\Python_Runtime\Python\libs -LC:\Workspace\Python_Runtime\Python\PCbuild\amd64 -lnpymath -lpython39 -o build\lib.win-amd64-3.9\numba\_dispatcher.cp39-win_amd64.pyd build\temp.win-amd64-3.9\Release\numba\_typeof.o: In function `typecode_using_fingerprint': C:\Workspace\Python_Runtime\numba-0.54.1/numba/_typeof.c:617: undefined reference to `__imp__Numba_hashtable_get'
C:\Workspace\Python_Runtime\numba-0.54.1/numba/_typeof.c:639: undefined reference to `__imp__Numba_hashtable_set' build\temp.win-amd64-3.9\Release\numba\_typeof.o: In function `typeof_init':
C:\Workspace\Python_Runtime\numba-0.54.1/numba/_typeof.c:1115: undefined reference to `__imp__Numba_hashtable_new'
collect2.exe: error: ld returned 1 exit status
error: Command "g++ -g -shared build\temp.win-amd64-3.9\Release\numba\_dispatcher.o build\temp.win-amd64-3.9\Release\numba\_hashtable.o build\temp.win-amd64 3.9\Release\numba\_typeof.o build\temp.win-amd64-3.9\Release\numba\core\typeconv\typeconv.o
-LC:\\Workspace\\Python_Runtime\\Python\\lib\\site-packages\\numpy\\core\\lib -
LC:\Workspace\Python_Runtime\Python\libs -LC:\Workspace\Python_Runtime\Python\PCbuild\amd64 -lnpymath -lpython39 -o build\lib.win-amd64-3.9\numba\_dispatcher.cp39-win_amd64.pyd" failed with
exit status 1
Related
It runs good at a windows platform. But when I switch platform to webgl and build it, there is an error as following. As a beginner of Unity, it hard for me to figure out what happened, so I try to search for some answers. But there seems few similar questions.
Building Library\Bee\artifacts\WebGL\il2cpp\master_WebGL_wasm\9tk2_eric0.lump.o failed with output:
In file included from Library/Bee/artifacts/WebGL/il2cpp/master_WebGL_wasm/ipux_Generic0.lump.cpp:3:
D:\1installfiles\unity\Editor\2021.3.12f1c1\Editor\Data\il2cpp\libil2cpp\os\Generic\WaitObject.cpp:94:36: error: 'SetWaitObject' is a private member of 'il2cpp::os::ThreadImpl'
currentThread->SetWaitObject(this);
^
D:\1installfiles\unity\Editor\2021.3.12f1c1\Editor\Data\il2cpp\libil2cpp\os\Posix\ThreadImpl.h:105:14: note: declared private here
void SetWaitObject(posix::PosixWaitObject* waitObject);
^
In file included from Library/Bee/artifacts/WebGL/il2cpp/master_WebGL_wasm/ipux_Generic0.lump.cpp:3:
D:\1installfiles\unity\Editor\2021.3.12f1c1\Editor\Data\il2cpp\libil2cpp\os\Generic\WaitObject.cpp:94:50: error: cannot initialize a parameter of type 'posix::PosixWaitObject *' with an rvalue of type 'il2cpp::os::WaitObject *'
currentThread->SetWaitObject(this);
^~~~
D:\1installfiles\unity\Editor\2021.3.12f1c1\Editor\Data\il2cpp\libil2cpp\os\Posix\ThreadImpl.h:105:52: note: passing argument to parameter 'waitObject' here
void SetWaitObject(posix::PosixWaitObject* waitObject);
^
In file included from Library/Bee/artifacts/WebGL/il2cpp/master_WebGL_wasm/ipux_Generic0.lump.cpp:3:
D:\1installfiles\unity\Editor\2021.3.12f1c1\Editor\Data\il2cpp\libil2cpp\os\Generic\WaitObject.cpp:148:36: error: 'SetWaitObject' is a private member of 'il2cpp::os::ThreadImpl'
currentThread->SetWaitObject(NULL);
^
D:\1installfiles\unity\Editor\2021.3.12f1c1\Editor\Data\il2cpp\libil2cpp\os\Posix\ThreadImpl.h:105:14: note: declared private here
void SetWaitObject(posix::PosixWaitObject* waitObject);
^
In file included from Library/Bee/artifacts/WebGL/il2cpp/master_WebGL_wasm/ipux_Generic0.lump.cpp:3:
D:\1installfiles\unity\Editor\2021.3.12f1c1\Editor\Data\il2cpp\libil2cpp\os\Generic\WaitObject.cpp:161:36: error: 'SetWaitObject' is a private member of 'il2cpp::os::ThreadImpl'
currentThread->SetWaitObject(NULL);
^
D:\1installfiles\unity\Editor\2021.3.12f1c1\Editor\Data\il2cpp\libil2cpp\os\Posix\ThreadImpl.h:105:14: note: declared private here
void SetWaitObject(posix::PosixWaitObject* waitObject);
^
In file included from Library/Bee/artifacts/WebGL/il2cpp/master_WebGL_wasm/ipux_Generic0.lump.cpp:3:
D:\1installfiles\unity\Editor\2021.3.12f1c1\Editor\Data\il2cpp\libil2cpp\os\Generic\WaitObject.cpp:227:17: error: no member named 'AcquireSemaphore' in 'il2cpp::os::ThreadImpl'
thread->AcquireSemaphore();
~~~~~~ ^
D:\1installfiles\unity\Editor\2021.3.12f1c1\Editor\Data\il2cpp\libil2cpp\os\Generic\WaitObject.cpp:238:28: error: no member named 'TryTimedAcquireSemaphore' in 'il2cpp::os::ThreadImpl'
bool ret = thread->TryTimedAcquireSemaphore(timeout);
~~~~~~ ^
D:\1installfiles\unity\Editor\2021.3.12f1c1\Editor\Data\il2cpp\libil2cpp\os\Generic\WaitObject.cpp:264:33: error: no member named 'ReleaseSemaphore' in 'il2cpp::os::ThreadImpl'
object->thread->ReleaseSemaphore();
~~~~~~~~~~~~~~ ^
7 errors generated.
emcc2: error: 'D:/1installfiles/unity/Editor/2021.3.12f1c1/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/llvm\clang++.exe -target wasm32-unknown-emscripten -DEMSCRIPTEN -fno-inline-functions -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-cxx-exceptions -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -D__EMSCRIPTEN_major__=2 -D__EMSCRIPTEN_minor__=0 -D__EMSCRIPTEN_tiny__=19 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -iwithsysroot/include/SDL --sysroot=D:\1installfiles\unity\Editor\2021.3.12f1c1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten\cache\sysroot -Xclang -iwithsysroot/include\compat -D__webgl__ -Wno-c++11-extensions -Wno-nonportable-include-path -ffunction-sections -fno-unwind-tables -fomit-frame-pointer -fno-threadsafe-statics -std=c++11 -Wno-#warnings -Wswitch -Wno-trigraphs -Wno-tautological-compare -Wno-invalid-offsetof -Wno-implicitly-unsigned-literal -Wno-integer-overflow -Wno-shift-negative-value -Wno-unknown-attributes -Wno-implicit-function-declaration -Wno-null-conversion -Wno-missing-declarations -Wno-unused-value -Wno-pragma-once-outside-header -fvisibility=hidden -fexceptions -fno-rtti -fno-strict-overflow -ffunction-sections -fdata-sections -fmessage-length=0 -pipe -DBASELIB_INLINE_NAMESPACE=il2cpp_baselib -DIL2CPP_MONO_DEBUGGER_DISABLED -DRUNTIME_IL2CPP -DGC_NOT_DLL -DIL2CPP_DEFAULT_DATA_DIR_PATH=Data -DNDEBUG -I. -ID:/1installfiles/unity/Editor/2021.3.12f1c1/Editor/Data/il2cpp/libil2cpp/pch -ID:/1installfiles/unity/Editor/2021.3.12f1c1/Editor/Data/il2cpp/libil2cpp -ID:/1installfiles/unity/Editor/2021.3.12f1c1/Editor/Data/il2cpp/external/baselib/Include -ID:/1installfiles/unity/Editor/2021.3.12f1c1/Editor/Data/il2cpp/external/baselib/Platforms/WebGL/Include -ID:/1installfiles/unity/Editor/2021.3.12f1c1/Editor/Data/il2cpp/external/bdwgc/include -Oz -fcolor-diagnostics -fdiagnostics-absolute-paths -UGC_THREADS -UUSE_MMAP -UUSE_MUNMAP -c -xc++ Library/Bee/artifacts/WebGL/il2cpp/master_WebGL_wasm/ipux_Generic0.lump.cpp -o Library/Bee/artifacts/WebGL/il2cpp/master_WebGL_wasm/9tk2_eric0.lump.o' failed (1)
I tried to change settings in player settings\seeting for webgl. But it didn't work.
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
I have project structure like this,
a.pb.h --- includes --> protobuf.h
b.grpc.pb.h --- includes --> a.pb.h & grpcpp.h
Also there are a.pb.cc and b.grpc.cc files.
A C++ wrapper with extern C which is wrapper.cc and wrapper.h which includes b.grpc.pb.h and grpcpp.h.
The function inside extern C is char* helloWorld(const char*, const char*, const char*);
Creating .o of a.pb.h and b.grpc.pb.h:
g++ -fpic -std=c++11 `pkg-config --cflags protobuf grpc` -c -o a.pb.o a.pb.cc
g++ -fpic -std=c++11 `pkg-config --cflags protobuf grpc` -c -o b.grpc.pb.o b.grpc.pb.cc
Steps to create libcombined.so:
The grpc and protobuf so are already provided under /usr/local/lib.
First created .so of a.pb.o and b.grpc.pb.o to compile wrapper file as:
g++ -shared -o libcombined.so *.o
Compiled wrapper as:
g++ -fpic wrapper.cc -l:./libcombined.so -c -o wrapper.o -std=c++11
.so of a.pb.o, b.grpc.pb.o and wrapper.o as libcombined.so:
g++ -shared -o libcombinedwrapper.so *.o
Compiled main.c as:
gcc main.c -l:./libcombinedwrapper.so -o main -ldl
I am calling helloWorld from my main.c file which is:
#include <stdio.h>
#include <dlfcn.h>
int main(){
char* (*fn)(const char*,const char*,const char*);
void *handle = dlopen("path_to/libcombined.so",RTLD_NOW);
if(handle==NULL){
fprintf(stderr, "Error: %s\n", dlerror());
}
fn = (char* (*)(const char*,const char*,const char*))dlsym(handle, "helloWorld");
if (!fn) {
/* no such symbol */
fprintf(stderr, "Error: %s\n", dlerror());
dlclose(handle);
return 0;
}
char* msg = fn("asd","asdas","asdasd");
printf("%s",msg);
return 0;
}
Error after executing: ./main
Error: path_to/libcombinedwrapper.so: undefined symbol: _ZN6google8protobuf2io20ZeroCopyOutputStream15WriteAliasedRawEPKvi
Error: ./main: undefined symbol: helloWorld
Segmentation fault (core dumped)
The first above error is from symbol from protobuf.h file.
Can someone please suggest what I am doing wrong while linking or is there something I am doing wrong in main.c file?
g++ -shared -o libcombined.so *.o
You need to also link in all dependencies of the objects (libgrpc here).
You can add -Wl,--no-allow-shlib-undefined to verify that libcombined.so is linking everything it needs.
P.S. To avoid core dump, you should exit or return once dlopen fails.
P.P.S. It is generally a very bad idea(TM) to link *.o. Use proper Makefile to avoid unnecessary compilations and explicitly list objects that you are intending to put into libcombined.so.
I use Mac OSX Sierra, and am trying to install matplotlib in python 3.7, and therefore use
pip3.7 install matplotlib
But that gives me an error
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/local/include -I/usr/include -I/usr/X11/include -I/opt/X11/include -I/opt/local/include -I. -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/_macosx.m -o build/temp.macosx-10.11-x86_64-3.7/src/_macosx.o
In file included from src/_macosx.m:1:
In file included from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:6:
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:7:15: error: expected ';' after #class
#class NSArray<ObjectType>;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:7:16: error: cannot find protocol declaration for 'ObjectType'
#class NSArray<ObjectType>;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:34:25: error: cannot find protocol declaration for 'ObjectType'
#interface NSEnumerator<ObjectType> : NSObject <NSFastEnumeration>
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:34:37: error: expected identifier or '('
#interface NSEnumerator<ObjectType> : NSObject <NSFastEnumeration>
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:36:13: error: expected ')'
- (nullable ObjectType)nextObject;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:36:3: note: to match this '('
- (nullable ObjectType)nextObject;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:25: error: cannot find protocol declaration for 'ObjectType'
#interface NSEnumerator<ObjectType> (NSExtendedEnumerator)
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:1: error: duplicate interface definition for class 'NSEnumerator'
#interface NSEnumerator<ObjectType> (NSExtendedEnumerator)
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:34:12: note: previous definition is here
#interface NSEnumerator<ObjectType> : NSObject <NSFastEnumeration>
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:37: error: method type specifier must start with '-' or '+'
#interface NSEnumerator<ObjectType> (NSExtendedEnumerator)
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:40:38: error: expected a type
#interface NSEnumerator<ObjectType> (NSExtendedEnumerator)
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:42:1: error: expected selector for Objective-C method
#property (readonly, copy) NSArray<ObjectType> *allObjects;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSEnumerator.h:42:36: error: cannot find protocol declaration for 'ObjectType'
#property (readonly, copy) NSArray<ObjectType> *allObjects;
^
In file included from src/_macosx.m:1:
In file included from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10:
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:16:32: error: cannot find protocol declaration for 'ObjectType'
#interface NSArray<__covariant ObjectType> : NSObject <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration>
^
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:16:44: error: expected identifier or '('
#interface NSArray<__covariant ObjectType> : NSObject <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration>
^
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:19:4: error: expected a type
- (ObjectType)objectAtIndex:(NSUInteger)index;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:21:40: error: expected ')'
- (instancetype)initWithObjects:(const ObjectType [])objects count:(NSUInteger)cnt NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:21:33: note: to match this '('
- (instancetype)initWithObjects:(const ObjectType [])objects count:(NSUInteger)cnt NS_DESIGNATED_INITIALIZER;
^
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:26:20: error: cannot find protocol declaration for 'ObjectType'
#interface NSArray<ObjectType> (NSExtendedArray)
^
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:26:1: error: duplicate interface definition for class 'NSArray'
#interface NSArray<ObjectType> (NSExtendedArray)
^
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:16:12: note: previous definition is here
#interface NSArray<__covariant ObjectType> : NSObject <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration>
^
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:26:32: error: method type specifier must start with '-' or '+'
#interface NSArray<ObjectType> (NSExtendedArray)
^
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:26:33: error: expected a type
#interface NSArray<ObjectType> (NSExtendedArray)
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command 'clang' failed with exit status 1
----------------------------------------
Failed building wheel for matplotlib
Any suggestions on how to fix this would be really appreciated.
I compiled successfully BOTAN-2 (botan.exe BOTAN-test.exe runnable).
When I build QSsh's Project under Qt Creator I've got a linking error on std::thead (Compiler MinGW32)
rsa.cpp:-1: erreur : undefined reference to std::thread::_State::~_State()
rsa.cpp:-1: erreur : undefined reference to std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)())
A added unsuccessfully in the file qssh/src/libs/ssh.pro :
LIBS += -lbotan-2
LIBS += -lpthread
QMAKE_CXXFLAGS += -std=c++11 -pthread
QMAKE_CFLAGS += -std=c++11 -pthread
Note : I made a simple program ("hello world" style) using pthread with success.
g++ main.cpp -o build32/prog.exe -std=c++11 -pthread (MSYS2/MinGW32)
What's wrong with QSsh ?
Thanks