Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error on Termux, Android 13, and on FreeBSD #11

Open
piereligio opened this issue Jul 25, 2023 · 5 comments
Open

Fatal error on Termux, Android 13, and on FreeBSD #11

piereligio opened this issue Jul 25, 2023 · 5 comments

Comments

@piereligio
Copy link

I'm getting this error when I install requirements. Any idea? Thanks in advance

$ python3 -m pip install -r MotionPhotoMuxer/requirements.txt
Collecting py3exiv2==0.9.3 (from -r MotionPhotoMuxer/requirements.txt (line 1))
Using cached py3exiv2-0.9.3.tar.gz (36 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: py3exiv2
Building wheel for py3exiv2 (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for py3exiv2 (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [24 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-aarch64-cpython-39 creating build/lib.linux-aarch64-cpython-39/pyexiv2 copying src/pyexiv2/init.py -> build/lib.linux-aarch64-cpython-39/pyexiv2
copying src/pyexiv2/exif.py -> build/lib.linux-aarch64-cpython-39/pyexiv2
copying src/pyexiv2/iptc.py -> build/lib.linux-aarch64-cpython-39/pyexiv2
copying src/pyexiv2/metadata.py -> build/lib.linux-aarch64-cpython-39/pyexiv2
copying src/pyexiv2/preview.py -> build/lib.linux-aarch64-cpython-39/pyexiv2 copying src/pyexiv2/utils.py -> build/lib.linux-aarch64-cpython-39/pyexiv2 copying src/pyexiv2/xmp.py -> build/lib.linux-aarch64-cpython-39/pyexiv2 running build_ext building 'libexiv2python' extension creating build/temp.linux-aarch64-cpython-39 creating build/temp.linux-aarch64-cpython-39/src aarch64-linux-android-clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fstack-protector-strong -O3 -fstack-protector-strong -O3 -fPIC -I/data/data/com.termux/files/usr/include/python3.9 -c src/exiv2wrapper.cpp -o build/temp.linux-aarch64-cpython-39/src/exiv2wrapper.o -g
In file included from src/exiv2wrapper.cpp:27: src/exiv2wrapper.hpp:32:10: fatal error: 'exiv2/exiv2.hpp' file not found
#include "exiv2/exiv2.hpp"
^~~~~
1 error generated.
error: command '/data/data/com.termux/files/usr/bin/aarch64-linux-android-clang' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for py3exiv2 Failed to build py3exiv2
ERROR: Could not build wheels for py3exiv2, which is required to install pyproject.toml-based projects

@piereligio
Copy link
Author

I'm getting the same exact error on FreeBSD, whilst in Windows WSL it worked fine. I wonder if there is some additional step I'm not aware of

@piereligio piereligio changed the title Fatal error on Termux, Android 13, OnePlus 7 Pro (custom ROM) Fatal error on Termux, Android 13, and on FreeBSD Jul 25, 2023
@mihir-io
Copy link
Owner

Thanks for reporting this, I'll look into it.

@romanovj
Copy link

romanovj commented Jul 27, 2023

pkg install exiv2
pkg install boost-headers
CFLAGS=-D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR pip install py3exiv2==0.9.3

(I used clang)

@mihir-io
Copy link
Owner

@piereligio Your original issue seems to be that the exiv2 package isn't installed.

After installing that package with pkg install exiv2, I ran into a new issue:

      /data/data/com.termux/files/usr/include/exiv2/tags.hpp:143:17: error: no template named 'auto_ptr' in namespace 'std'; did you mean simply 'auto_ptr'?
        143 |         typedef std::auto_ptr<ExifKey> AutoPtr;
            |                 ^~~~~
      /data/data/com.termux/files/usr/include/exiv2/config.h:105:3: note: 'auto_ptr' declared here
        105 |   using auto_ptr = std::unique_ptr<T>;
            |   ^
      fatal error: too many errors emitted, stopping now [-ferror-limit=]

Which was solved using @romanovj 's suggestion to add the -D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR CFLAG to the pip install.

Following his instructions, I was able to get this to work on Android 11 (LineageOS) on the Pixel XL.

@Serendo
Copy link

Serendo commented Dec 5, 2023

pyexiv2 is hard to install on termux under android 13. You can use exiv2 cmd tool directly to add gcamera tags.

exiv2 -M "reg GCamera http://ns.google.com/photos/1.0/camera/" -M "add Xmp.GCamera.MicroVideo 1" photo.jpg

works fine for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants