Open pouyamiralayi opened 3 years ago
Thanks for the report!
I'm unsure what's going on here!
EOF in backquote substitution
seems to be coming from a shell. And this seems to be coming from the bowels of the python3-sys
crate's build.rs
. Why or where exactly, I'm unsure: the stack only seems to flag a high-level function/line, not something that invokes a process.
Do you have any special characters in your HOME
or PATH
environment variables? Spaces? Non-ASCII characters? Newlines? Or maybe other environment variables?
It feels like something invoking a shell process isn't doing so correctly...
I'm wondering if the custom distribution you have defined is causing this. Can you reproduce this with the default distributions that PyOxidizer uses?
Regarding the additional notes issue with PyOxidizer downloading a distribution when you provided your own, that's likely a separate matter. There probably needs to be a feature to specify a custom distribution to run on the host (in addition to the distribution to target). Could you please file a separate issue to track this?
@indygreg
Do you have any special characters in your HOME or PATH environment variables? Spaces? Non-ASCII characters? Newlines? Or maybe other environment variables?
these are the current values for my HOME
and PATH
environment variables:
echo "$HOME"
/home/sarpedon
echo "$PATH"
/home/sarpedon/.nvm/versions/node/v12.18.3/bin:~/.poetry/bin:/home/sarpedon/.pyenv/shims:/home/sarpedon/.pyenv/bin:/home/sarpedon/.cargo/bin:/home/sarpedon/.poetry/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
I'm wondering if the custom distribution you have defined is causing this. Can you reproduce this with the default distributions that PyOxidizer uses?
when i replace custom PythonDistribution
with default_python_distribution()
it is working fine and it will produce a linux binary as expected.
Regarding the additional notes issue with PyOxidizer downloading a distribution when you provided your own, that's likely a separate matter. There probably needs to be a feature to specify a custom distribution to run on the host (in addition to the distribution to target). Could you please file a separate issue to track this?
I suspect your custom distribution has something wrong in the shebang line. Would you be running the patch at https://github.com/indygreg/python-build-standalone/pull/61 (which inserts backticks into the shebang line of various Python scripts) by any chance?
@indygreg trying to build the distribution, crashes with the following error:
clang> FAILED: lib/libc++abi.1.0.dylib\
clang> : && /usr/bin/clang++ -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -O3 -DNDEBUG -dynamiclib -Wl,-headerpad_max_install_names -stdlib=libc++ -nodefaultlibs -compatibility_version 1.0.0 -current_version 1.0.0 -o lib/libc++abi.1.0.dylib -install_name @rpath/libc++abi.1.dylib projects/libcxxabi/src/CMakeFiles/cxxabi_shared.dir/cxa_aux_runtime.cpp.o projects/libcxxabi/src/CMakeFiles/cxxabi_shared.dir/cxa_default_handlers.cpp.o projects/libcxxabi/src/CMakeFiles/cxxabi_shared.dir/cxa_demangle.cpp.o projects/libcxxabi/src/CMakeFiles/cxxabi_shared.dir/cxa_exception_storage.cpp.o projects/libcxxabi/src/CMakeFiles/cxxabi_shared.dir/cxa_guard.cpp.o projects/libcxxabi/src/CMakeFiles/cxxabi_shared.dir/cxa_handlers.cpp.o projects/libcxxabi/src/CMakeFiles/cxxabi_shared.dir/cxa_vector.cpp.o projects/libcxxabi/src/CMakeFiles/cxxabi_shared.dir/cxa_virtual.cpp.o projects/libcxxabi/src/CMakeFiles/cxxabi_shared.dir/stdlib_exception.cpp.o projects/libcxxabi/src/CMakeFiles/cxxabi_shared.dir/stdlib_stdexcept.cpp.o projects/libcxxabi/src/CMakeFiles/cxxabi_shared.dir/stdlib_typeinfo.cpp.o projects/libcxxabi/src/CMakeFiles/cxxabi_shared.dir/abort_message.cpp.o projects/libcxxabi/src/CMakeFiles/cxxabi_shared.dir/fallback_malloc.cpp.o projects/libcxxabi/src/CMakeFiles/cxxabi_shared.dir/private_typeinfo.cpp.o projects/libcxxabi/src/CMakeFiles/cxxabi_shared.dir/stdlib_new_delete.cpp.o projects/libcxxabi/src/CMakeFiles/cxxabi_shared.dir/cxa_exception.cpp.o projects/libcxxabi/src/CMakeFiles/cxxabi_shared.dir/cxa_personality.cpp.o -Wl,-rpath,@loader_path/../lib -lSystem -Wl,-exported_symbols_list,/private/var/folders/vg/_hqrdhh12lb7db2c3gk8gqqc0000gn/T/tmplhpxqkyv/llvm/projects/libcxxabi/src/../lib/itanium-base.exp -Wl,-exported_symbols_list,/private/var/folders/vg/_hqrdhh12lb7db2c3gk8gqqc0000gn/T/tmplhpxqkyv/llvm/projects/libcxxabi/src/../lib/new-delete.exp -Wl,-exported_symbols_list,/private/var/folders/vg/_hqrdhh12lb7db2c3gk8gqqc0000gn/T/tmplhpxqkyv/llvm/projects/libcxxabi/src/../lib/exceptions.exp -Wl,-exported_symbols_list,/private/var/folders/vg/_hqrdhh12lb7db2c3gk8gqqc0000gn/T/tmplhpxqkyv/llvm/projects/libcxxabi/src/../lib/personality-v0.exp && :\
clang> Undefined symbols for architecture x86_64:\
clang> "__ZTIDu", referenced from:\
clang> -exported_symbol[s_list] command line option\
clang> "__ZTIPDu", referenced from:\
clang> -exported_symbol[s_list] command line option\
clang> "__ZTIPKDu", referenced from:\
clang> -exported_symbol[s_list] command line option\
clang> "__ZTSDu", referenced from:\
clang> -exported_symbol[s_list] command line option\
clang> "__ZTSPDu", referenced from:\
clang> -exported_symbol[s_list] command line option\
clang> "__ZTSPKDu", referenced from:\
clang> -exported_symbol[s_list] command line option\
clang> ld: symbol(s) not found for architecture x86_64\
OS: mac 10.13.6 Memory: 16GB Python: 3.8.6 (using pyenv)
@indygreg is there any docker image out there which works out for this scenario? a linux docker image with a working pyoxidizer that generates mac compatible executables would be great 💯
Why are you building your own distribution? What's wrong with the pre-built distributions?
PyOxidizer does not yet officially support cross-compiling from Linux to macOS. PyOxidizer does not yet provide images for building. This is on the long-term project roadmap.
@indygreg so to wrap my head around this, to make an executable out of my python code that works on mac environments, i have to use pyoxidizer on mac, while cross-compiling is going to be achieved on the future. thanks!
description: trying to build an executable targetting mac os.
command:
config file:
full backtrace output:
additional notes: i have noticed that even when i specify the exact python distribution to use, pyoxidizer will also download the distrobution targetting my own os as in this scenario
cpython-3.8.6-x86_64-unknown-linux-gnu
OS: UBUNTU 18.04.3 Architecture: x86_64 PyOxidizer: 0.10.1