ManimCommunity / ManimPango

Binding for Pango, to use with Manim.
https://manimpango.manim.community
MIT License
43 stars 13 forks source link

Error while building ManimPango (PEP 517) #43

Closed Windabove closed 3 years ago

Windabove commented 3 years ago
  Building wheel for ManimPango (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/windabove/.conda/envs/manim/bin/python /home/windabove/.conda/envs/manim/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpggpgl71f
       cwd: /tmp/pip-req-build-bu2z0zs7
  Complete output (34 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.8
  creating build/lib.linux-x86_64-3.8/manimpango
  copying manimpango/__init__.py -> build/lib.linux-x86_64-3.8/manimpango
  copying manimpango/utils.py -> build/lib.linux-x86_64-3.8/manimpango
  copying manimpango/_version.py -> build/lib.linux-x86_64-3.8/manimpango
  copying manimpango/register_font.pxd -> build/lib.linux-x86_64-3.8/manimpango
  copying manimpango/cairo.pxd -> build/lib.linux-x86_64-3.8/manimpango
  copying manimpango/glib.pxd -> build/lib.linux-x86_64-3.8/manimpango
  copying manimpango/cmanimpango.pxd -> build/lib.linux-x86_64-3.8/manimpango
  copying manimpango/pango.pxd -> build/lib.linux-x86_64-3.8/manimpango
  copying manimpango/register_font.pyx -> build/lib.linux-x86_64-3.8/manimpango
  copying manimpango/enums.pyx -> build/lib.linux-x86_64-3.8/manimpango
  copying manimpango/cmanimpango.pyx -> build/lib.linux-x86_64-3.8/manimpango
  running build_ext
  building 'manimpango.cmanimpango' extension
  creating build/temp.linux-x86_64-3.8
  creating build/temp.linux-x86_64-3.8/manimpango
  gcc -pthread -B /home/windabove/.conda/envs/manim/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/lzo -I/usr/include/pixman-1 -I/home/windabove/.conda/envs/manim/include/python3.8 -c manimpango/cmanimpango.c -o build/temp.linux-x86_64-3.8/manimpango/cmanimpango.o -pthread
  gcc -pthread -shared -B /home/windabove/.conda/envs/manim/compiler_compat -L/home/windabove/.conda/envs/manim/lib -Wl,-rpath=/home/windabove/.conda/envs/manim/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.8/manimpango/cmanimpango.o -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lharfbuzz -lcairo -o build/lib.linux-x86_64-3.8/manimpango/cmanimpango.cpython-38-x86_64-linux-gnu.so
  /home/windabove/.conda/envs/manim/compiler_compat/ld: warning: /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib/crti.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010002
  /home/windabove/.conda/envs/manim/compiler_compat/ld: warning: /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib/crti.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010001
  /home/windabove/.conda/envs/manim/compiler_compat/ld: warning: /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/crtbeginS.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010002
  /home/windabove/.conda/envs/manim/compiler_compat/ld: warning: /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/crtbeginS.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010001
  /home/windabove/.conda/envs/manim/compiler_compat/ld: build/temp.linux-x86_64-3.8/manimpango/cmanimpango.o: unable to initialize decompress status for section .debug_info
  /home/windabove/.conda/envs/manim/compiler_compat/ld: build/temp.linux-x86_64-3.8/manimpango/cmanimpango.o: unable to initialize decompress status for section .debug_info
  /home/windabove/.conda/envs/manim/compiler_compat/ld: build/temp.linux-x86_64-3.8/manimpango/cmanimpango.o: unable to initialize decompress status for section .debug_info
  /home/windabove/.conda/envs/manim/compiler_compat/ld: build/temp.linux-x86_64-3.8/manimpango/cmanimpango.o: unable to initialize decompress status for section .debug_info
  build/temp.linux-x86_64-3.8/manimpango/cmanimpango.o: file not recognized: file format not recognized
  collect2: Error:ld return 1
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for ManimPango
Failed to build ManimPango
ERROR: Could not build wheels for ManimPango which use PEP 517 and cannot be installed directly

OS configuration:

naveen521kk commented 3 years ago

Can you try upgrading setuptools? This looks like a problem with either python itself or with conda. Are you able to install any other C extensions from the source?

Windabove commented 3 years ago

Can you try upgrading setuptools? This looks like a problem with either python itself or with conda. Are you able to install any other C extensions from the source?

I've successfully built ManimPango(PEP 517) after I had manually executed

pip install -r requirement.txt

under the directory cloned from 3b1b/manim

In addition, this error has also occured when I run pip install -e . as the guide said in 3b1b/manim

Definitely this issue has something to do with the dependencies of manim. I suppose there are some source files need to be recompiled or updated.

naveen521kk commented 3 years ago

I've successfully built ManimPango(PEP 517) after I had manually executed

Good to know.

Definitely this issue has something to do with the dependencies of manim. I suppose there are some source files need to be recompiled or updated.

That is something you should report to Manim's repository and not here. You can simply install ManimPango using pip and it will do the compiling work directly, so I don't think this is a ManimPango's issue.

Also, a quick question, did you change your python installation or rather Conda venv? Maybe that Conda venv was broken or something, I suspect that?

Windabove commented 3 years ago

But the same issue happened when building ManimPango directly from this repository.

The python installation has not been changed after I create a new Conda venv with python3.8, and it seems to work well now, so it may not be the problem of Conda venv or Python.

By the way, the error report mentioned unsupported GNU_PROPERTY_TYPE (5) type, maybe something was wrong with the linux kernel 5.11.8?

naveen521kk commented 3 years ago

But the same issue happened when building ManimPango directly from this repository.

Could you post the logs?

By the way, the error report mentioned unsupported GNU_PROPERTY_TYPE (5) type, maybe something was wrong with the linux kernel 5.11.8?

Sorry, my knowledge about them is so poor.

The python installation has not been changed after I create a new Conda venv with python3.8, and it seems to work well now, so it may not be the problem of Conda venv or Python.

Maybe simply the previous venv was broken? Because it works now, but it didn't before?

Windabove commented 3 years ago

The error report I posted is exactly of this repository.

Maybe simply the previous venv was broken? Because it works now, but it didn't before?

I created a new venv and tried again, but the same happened as well before pip install -r requirements.txt

naveen521kk commented 3 years ago

So ManimPango installs only when it is installed using requirements.txt and not otherwise? See that file in that repo I got no idea why this fails.

Can you simply try, pip install manimpango in a new venv?

naveen521kk commented 3 years ago

Oh, I understand a bit now about what is happing here. I think this is because of mix of Conda's Python and System libraries. Maybe try with system python? Maybe Conda's Python and Sytem Libraries, like Pango aren't compatible? Simply, try conda install -c conda-forge pango, https://anaconda.org/conda-forge/pango and then try running pip install manimpango or build from source from this repo? See if that fix?

Windabove commented 3 years ago

Yes, I found manimpango is installed in system's site-packages.

When I run pip it will run the system's pip but not the one of the conda env

Windabove commented 3 years ago

And after I switched to the env's pip, the problem is fixed. So it is indeed the problem of Conda env.

naveen521kk commented 3 years ago

Closing the issue as it is fixed.