gcc

Using memory sanitizer (asan) on C/C++ library loaded to python with ctypes

Using memory sanitizer (asan) on C/C++ library loaded to python with ctypes Question: I have C++ library compiled with AddressSanitizer(asan) using g++ and cmake: SET( AXULIARY_COMPILE_FLAGS "-g -Og -fsanitize=address -fno-omit-frame-pointer") this works very well when running stand-alone C/C++ executable program. But I’m unable to make it work when loaded as shared/dynamic library (.so) into python …

Total answers: 1

Symbol not found: error while using ibm_db library in Python

Symbol not found: error while using ibm_db library in Python Question: I am using Monterey MacOS and Python 3.10. While running this sample code: from ibm_db import connect from ibm_db import fetch_assoc from ibm_db import tables connection = connect(‘DATABASE=<DATABASE>;’ ‘HOSTNAME=<HOSTNAME>;’ ‘PORT=<PORT>;’ ‘PROTOCOL=<PROTOCOL>;’ ‘UID=<UID>;’ ‘PWD=<PWD>;’, ”, ”) I am getting error: ImportError: dlopen(../lib/python3.10/site-packages/ibm_db.cpython-310-darwin.so, 0x0002): Symbol not …

Total answers: 2

cffi installation got failure on MacOs 12.5 with pip

cffi installation got failure on MacOs 12.5 with pip Question: I am trying to install "cffi" with pip on MacOs 12.5 but I got an error python : 3.8.10 pip : 22.2.2 Apple clang version 13.1.6 (clang-1316.0.21.2.5) Command : pip install cffi Error /opt/homebrew/bin/gcc-11 -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/opt/homebrew/opt/libffi/include -DFFI_BUILDING=1 …

Total answers: 1

compile official doc "Embedding Python in Another Application" example failed

compile official doc "Embedding Python in Another Application" example failed Question: I am trying to compile and run the example from https://docs.python.org/3/extending/embedding.html#very-high-level-embedding , but failed. My environment is Ubuntu 20.04.2 LTS, with system shipped python3.8(statically built), libpython3-dev and libpython3.8-dev packages installed. What I’ve tried: main.c : #define PY_SSIZE_T_CLEAN #include <Python.h> int main(int argc, char *argv[]) …

Total answers: 2

How to install uwsgi on windows?

How to install uwsgi on windows? Question: I’m trying to install uwsgi for a django project inside a virtual environment; I’m using windows 10. I did pip install uwsgi & I gotCommand "python setup.py egg_info". So to resolve the error I followed this SO answer As per the answer I installed cygwin and gcc compiler …

Total answers: 1

how to succesfully compile python 3.x

how to succesfully compile python 3.x Question: Upon attempting to compile python 3.7 I hit Could not import runpy module: jeremyr@b88:$ wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz …. jeremyr@b88:~/Python-3.7.3$ ./configure –enable-optimizations jeremyr@b88:~/Python-3.7.3$ make clean jeremyr@b88:~/Python-3.7.3$ make -j32 …. gcc -pthread -Xlinker -export-dynamic -o Programs/_testembed Programs/_testembed.o libpython3.7m.a -lcrypt -lpthread -ldl -lutil -lm ./python -E -S -m sysconfig –generate-posix-vars ; if …

Total answers: 5

command 'x86_64-linux-gnu-gcc' failed with exit status 1

command 'x86_64-linux-gnu-gcc' failed with exit status 1 Question: I tried to install “scholarly” package, but I keep receiving this error: x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/_openssl.c -o build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/_openssl.o build/temp.linux-x86_64-2.7/_openssl.c:434:30: fatal error: openssl/opensslv.h: No such file or directory compilation terminated. error: command ‘x86_64-linux-gnu-gcc’ …

Total answers: 4

gcc: error trying to exec 'cc1plus': execvp: No such file or directory

gcc: error trying to exec 'cc1plus': execvp: No such file or directory Question: I’m trying to install this python module, which requires compilation (on Ubuntu 16.04). I’m struggling to understand exactly what’s causing it stall; what am I missing? (xenial)chris@localhost:~$ pip install swigibpy Collecting swigibpy Using cached swigibpy-0.4.1.tar.gz Building wheels for collected packages: swigibpy Running …

Total answers: 8

setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 Question: When I try to install odoo-server, I got the following error: error: Setup script exited with error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1 Could anyone help me to solve this issue? Asked By: Madura Dissanayake || Source Answers: $ sudo apt-get …

Total answers: 38