Comments (9)
I've encountered this too.
Easiest (& dirty) patch:
- add
#define SOABI "cpython-34m"
- add
#define _Py_END_SUPPRESS_IPH
Trying to figure a better way now
from klayge.
Just don't know if this is the only problem.
These macros are provided by configure, in the original automake system.
I think maybe a better way is to use the provided configure/make on linux-based system?
Is this easy to integrate with CMake?
I'll see to this later after work.
from klayge.
I've just tested yesterday. Other problems like Assimp has been fixed.
Python src doesn't provide a CMakeFiles...so every time I have to maintain it manually after updating 😞
from klayge.
Add -DSOABI='"cpython-35m-darwin"' -DPy_BUILD_CORE in c compiler flag can work. But where should I add these options? I tried "makefile-variables.in" but not working. And the SOABI value is platform specified.
It turn out you should only add the -DPy_BUILD_CORE for the core modules, not for tests. Or you will get _testcapimodule.c not compile.
I'm going with the dirty way now 😒
from klayge.
This is something I don't understand. The first line of External\Python\Build\cmake\cmake\libpython\CMakeLists.txt is add_definitions(-DPy_BUILD_CORE). But somehow on OSX, Py_BUILD_CORE doesn't get through to compiler.
SOABI is definitely required. Can you confirm it's "cpython-35m-darwin"? If so, I can fix this problem by adding it to CMakeLists.txt.
from klayge.
I tried just add it to CMAKE_C_FLAGS in the root CMakeLists.txt, and it's working somehow. I'm not familiar with CMake syntax, especially the quote rules. I don't have my Mac with me right now, hope it helps.
SOABI is platform specific, as I see in configure.ac: 4074
# ABI version string for Python extension modules. This appears between the
# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
# from the following attributes which affect the ABI of this Python build (in
# this order):
#
# * The Python implementation (always 'cpython-' for us)
# * The major and minor version numbers
# * --with-pydebug (adds a 'd')
# * --with-pymalloc (adds a 'm')
# * --with-wide-unicode (adds a 'u')
#
# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
# would get a shared library ABI version tag of 'cpython-32dmu' and shared
# libraries would be named 'foo.cpython-32dmu.so'.
....
SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
....
Update:
Above is from windows machine. On my Mac, the SOABI line is slightly different
SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
from klayge.
To be clear, I didn't finally add Py_BUILD_CORE. Because I modified the root CMakeList.txt., it would affect the test files and cause build failure.
I added the -D_Py_BEGIN_SUPPRESS_IPH and -D_Py_END_SUPPRESS_IPH instead.
The "cpython-35m-darwin" is what I got from running the ./configure and checked the Makefile.
from klayge.
I thought you added Py_BUILD_CORE in libpython, but not in extensions.
I got first compile error in extension-time and extension-datetime.
update:
in External\Python\Build\cmake\cmake\extensions\CMakeLists.txt,
adding
DEFINITIONS Py_BUILD_CORE
in add_python_extension for datetime and time solves the first issue.
from klayge.
Thanks for you help. I'll move the Py_BUILD_CORE to root CMakeLists, and add cpython-35m-darwin as SOABI. New commit will be pushed very soon.
from klayge.
Related Issues (20)
- Faster skin rendering
- cling based C++ as scripting language / hot code reload
- Struct support in fxml
- Integrate motion blur into DeferredRendering pipeline
- Engineering improvements for 4.17
- A bug about loading "RenderableHelper.fxml" HOT 1
- Command buffer-based rendering system
- build fail on win HOT 1
- Resource view heap support in rendering system HOT 1
- Unable to build HOT 1
- DXBC2GLSL bug HOT 2
- Imgui integration
- DXBC2GLSLCmd bug: false in const struct DXBCInputBindDesc &__cdecl GLSLGen::GetResourceDesc HOT 1
- D3D12 descriptor heap allocator
- Cmake failed because of UniversalDXSDK HOT 1
- Cmake failed when downlaoding dependencies HOT 1
- Cleanup material system
- An error when "python Build.py" HOT 1
- computer shader(DXBC) to GLSL HOT 4
- How to build from source on MSYS2 MINGW64? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from klayge.