-
Notifications
You must be signed in to change notification settings - Fork 132
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
Added Ctranslate2 #1253
base: master
Are you sure you want to change the base?
Added Ctranslate2 #1253
Conversation
In second commit, loading c++ library locally instead of git repo, to modify CMakeLists.txt, so that it could find libiomp5.so, As i had to build it locally, It wasn't present for my system. |
Originally posted by @aryan1165 in #1239 (comment) Hi @mhsmith, The wheels are building for ctranslate2-lib and ctranslate2-python seperately, but when i unzip them they only have dist-info. I dont know where i went wrong? I know it must be a stupid thing, but as i am new to all this. Please consider having a look at the PR and guide me where i am going wrong? Hi @mhsmith, i rebuilt the c++ part, and the logs are showing that it is building successfully, but the .whl doesn't have the actual package inside it. Also i am seeing that ctranslate2-lib directory is being created at the root of my machine. Logs -
And build.sh
Error -
Hi @mhsmith , After resolving some issues, I am getting stuck here, I think issue is with the pybind11 as for python build ctranslate2 uses it. Log -
Link for build instructions - https://opennmt.net/CTranslate2/installation.html Also my c++ lib is getting build at prefix directory so my CTRANSLATE2_ROOT=/home/aryan/aryan/chaquopy/server/pypi/packages/ctranslate2-lib/build/4.1.0/py3-none-android_21_arm64_v8a/prefix Screenshot.2024-10-13.at.5.46.44.PM.png (view on web) Hi @mhsmith , Can you please look into this, Python.h header file is there located in my anaconda envs. Hi @mhsmith , I also tried to build the wheel without conda and using system's python 3.8, Still same error Cant find Python.h. It is because chaquopy is printing this Chaquopy: ignored invalid -I directory: '/usr/include/python3.8' hi @mhsmith , After including manual path to valid_dir in compiler_wrapper.py , I am getting this error
Please can you help me around this? It is soem cross-compiling issue |
It's important to make a distinction between the Linux headers and libraries of the "build" platform, and the Android headers and libraries of the "host" platform. Including LInux components in an Android build will never work – that's why compiler-wrapper removes them from the command line. Instead, you need to work out why the Android components aren't being found. In this case, Python.h wasn't being found because when the source code is downloaded from anywhere except the default of PyPI, build-wheel doesn't know that this is a Python package and won't add the necessary entry to CFLAGS. You can fix this by adding a Also, unless there's something very unusual about this package, you should not provide a build.sh script for the Python recipe. Remove it, and the package will be built using a standard PEP 517 process. There are several other issues with this recipe:
|
I have tried to build ctranslate2. As mentioned in #1239 i have to create seperate recipe for c++ build of it which is named as ctranslate2-lib and for python part it is a pre-requisite.