emscripten-core / emscripten

Emscripten: An LLVM-to-WebAssembly Compiler
Other
25.37k stars 3.25k forks source link

libimobiledevice port request #16634

Open carloszinato-tomtom opened 2 years ago

carloszinato-tomtom commented 2 years ago

Hi there, is it possible to request a port? I'm trying to compile the libimobiledevice myself but it depends on other llibs like plist and libusbmuxd which I couldn't compile either. I have some problems with the path of my Python installation and I cannot solve it either. Sorry if this is not the correct place for such request.

Thank you so much, have a nice day

ancientstraits commented 2 years ago

I can help you with you Python error. Please describe it. Does it happen for other Python programs, or only Emscripten?

ancientstraits commented 2 years ago

@carloszinato-tomtom

dnicolson commented 2 years ago

I was also wondering about libimobiledevice, for libplist I tried these commands:

git clone https://github.com/libimobiledevice/libplist.git
cd libplist
LT_MULTI_MODULE=1 ./autogen.sh CC=emcc CXX=emcc --enable-debug

After the Could not link test program to Python Autoconf macro error, based on the environment variables it was possible to reduce the issue to this example (paths are for an M1 Mac):

brew install python@3.10
cat > test.c <<EOF
#include <Python.h>

int main() {
  Py_Initialize();
}
EOF
gcc test.c /opt/homebrew/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/Python -I/opt/homebrew/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/include/python3.10 -framework CoreFoundation
./a.out

Replacing gcc with emcc results in a couple of issues.

The first issue relates to the argument -framework CoreFoundation: emcc: error: CoreFoundation: No such file or directory ("CoreFoundation" was expected to be an input file, based on the command line arguments provided)

Removing that argument then results in the following error: error: "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?).

This Python issue might be related: https://bugs.python.org/issue46248