-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Although the module runs if run via python, it fails when attempted to run via packaging:
Traceback (most recent call last):
File "__main__", line 1, in <module>
File "importlib._bootstrap", line 991, in _find_and_load
File "importlib._bootstrap", line 975, in _find_and_load_unlocked
File "importlib._bootstrap", line 671, in _load_unlocked
File "importlib._bootstrap", line 827, in exec_module
File "panda3d.core", line 1, in <module>
File "imp", line 342, in load_dynamic
File "importlib._bootstrap", line 702, in _load
File "importlib._bootstrap", line 657, in _load_unlocked
File "importlib._bootstrap", line 556, in module_from_spec
File "importlib._bootstrap_external", line 1166, in create_module
File "importlib._bootstrap", line 219, in _call_with_frames_removed
ImportError: /proj/build/manylinux2010_x86_64/libpandaexpress.so.1.10: undefined symbol: _ZNK11GlobPattern14matches_substrEN9__gnu_cxx17__normal_iteratorIPKcSsEES4_S4_S4_Repro steps:
- docker run --rm -it --entrypoint /bin/bash ubuntu
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install cmake curl git python3-venv python3-pip
- curl https://www.panda3d.org/download/panda3d-1.10.10/panda3d1.10_1.10.10~focal_amd64.deb -o panda3d-1.10.10/panda3d1.10_1.10.10~focal_amd64.deb
- apt-get -y install panda3d-1.10.10/panda3d1.10_1.10.10~focal_amd64.deb
- git clone https://github.com/tobspr/P3DModuleBuilder.git /proj/P3DModuleBuilder
- cd /proj/P3DModuleBuilder
- rm -rf source/*
- cat << EOF > source/example.h
#ifndef EXAMPLE_H
#define EXAMPLE_H
#include "pandabase.h"
BEGIN_PUBLISH // This exposes all functions in this block to python
inline int multiply(int a, int b) {
return a * b;
}
END_PUBLISH
class ExampleClass {
PUBLISHED: // Exposes all functions in this scope, use instead of "public:"
inline int get_answer() {
return 42;
};
};
#endif EXAMPLE_H
EOF
- echo -e "\nmodule_name=TestModule\n" >> config.ini
- python3 build.py
- cd ../
- cat << EOF > s.py
import panda3d.core # Make sure you import this first before importing your module
from P3DModuleBuilder import TestModule
print(TestModule.multiply(3, 4)) # prints 12
example = TestModule.ExampleClass()
print(example.get_answer()) # prints 42
EOF
- python3 s.py
- echo -e "panda3d" >> requirements.txt
- cat << EOF > setup.py
import setuptools
setuptools.setup(
name="repro",
version="0.1",
options={
'build_apps': {
'platforms': [ "manylinux2010_x86_64" ],
'console_apps': {
'repro': "s.py",
}
}
}
)
EOF
- python3 setup.py build_apps
- ./build/manylinux2010_x86_64/reproReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels