Ultimaker / cura-build-environment

CMake project to build dependencies for Cura
GNU Affero General Public License v3.0
24 stars 55 forks source link

Ubuntu 16.0464 bit system cannot generate arcus.pyd #14

Closed twosilly closed 7 years ago

twosilly commented 7 years ago

[ 40%] Built target AppImageKit [ 40%] Built target PythonSix [ 40%] Built target PyQt [ 40%] Built target PythonNetifaces [ 40%] Built target PythonZeroconf [ 40%] Built target SciPy [ 40%] Built target PySerial [ 40%] Performing update step for 'Arcus' [ 40%] Performing configure step for 'Arcus' -- Found SIP version: 4.19.1 -- Configuring done -- Generating done -- Build files have been written to: /home/build/cura-build-environment-master/build/Arcus-prefix/src/Arcus-build [ 40%] Performing build step for 'Arcus' [ 35%] Built target Arcus [100%] Built target python_module_Arcus [ 40%] Performing install step for 'Arcus' [ 35%] Built target Arcus [100%] Built target python_module_Arcus Install the project... -- Install configuration: "Release" -- Up-to-date: /home/build/cura-build-environment-master/build/release/lib/python3/dist-packages/Arcus.so -- Up-to-date: /home/build/cura-build-environment-master/build/release/lib/libArcus.a -- Up-to-date: /home/build/cura-build-environment-master/build/release/include/Arcus/Socket.h -- Up-to-date: /home/build/cura-build-environment-master/build/release/include/Arcus/SocketListener.h -- Up-to-date: /home/build/cura-build-environment-master/build/release/include/Arcus/Types.h -- Up-to-date: /home/build/cura-build-environment-master/build/release/include/Arcus/ArcusExport.h -- Up-to-date: /home/build/cura-build-environment-master/build/release/include/Arcus/MessageTypeStore.h -- Up-to-date: /home/build/cura-build-environment-master/build/release/include/Arcus/Error.h -- Up-to-date: /home/build/cura-build-environment-master/build/release/lib/cmake/Arcus/Arcus-targets.cmake -- Installing: /home/build/cura-build-environment-master/build/release/lib/cmake/Arcus/Arcus-targets-release.cmake -- Up-to-date: /home/build/cura-build-environment-master/build/release/lib/cmake/Arcus/ArcusConfig.cmake -- Up-to-date: /home/build/cura-build-environment-master/build/release/lib/cmake/Arcus/ArcusConfigVersion.cmake [ 40%] Completed 'Arcus' [ 40%] Built target Arcus [ 40%] Built target projects

Yes you will find I compile arcus. but do not know why he did not generate a python .PYD? So it is another module "Savitar", but I think their problems are so consistent, please!

twosilly commented 7 years ago

I try to compile the "arcus" alone, he was only produced Arcus.so, libArcus.so, libArcus.s0.1.1.0 I still lack a library for Python PYD, I'm sure I have chosen BUILD_PYTHON ON

awhiemstra commented 7 years ago

.pyd files only exist for Windows. On Linux, Python plugins use the normal extension for libraries, .so. Since you have Arcus.so, the plugin compiled correctly. Arcus.so is the Python plugin which wraps libArcus.so.

twosilly commented 7 years ago

twosilly@twosilly:/home/build/cura-build-environment-master/build/release$ find ./ -name Savitar ./include/Savitar ./include/Savitar/SavitarExport.h ./lib/libSavitar.a ./lib/python3/dist-packages/Savitar.so ./lib/cmake/Savitar ./lib/cmake/Savitar/SavitarConfigVersion.cmake ./lib/cmake/Savitar/SavitarConfig.cmake ./lib/cmake/Savitar/Savitar-targets-release.cmake ./lib/cmake/Savitar/Savitar-targets.cmake This is me in my building inside the directory search results it is obvious that he has Savitar.so.! twosilly@twosilly:/home/build/cura-build-environment-master/build/release/bin$ ./python3 Python 3.5.2 (default, Jun 6 2017, 12:51:06) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information.

import Savitar Traceback (most recent call last): File "", line 1, in ImportError: No module named 'Savitar' Why is that?

twosilly commented 7 years ago

@awhiemstra

awhiemstra commented 7 years ago

Savitar installs its binding plugin to lib/python3/dist-packages because it thinks it needs to install for a Debian-based system. But the custom Python that gets built does not have the Debian patches that force it to look into python3/dist-packages, so it should actually be installed to lib/python3.5/site-packages. We never ran into this before because we build on CentOS which is not debian based.

For a quick workaround, you can move everything in lib/python3/dist-packages to lib/python3.5/site-packages. The proper fix is to tell Savitar and Arcus to install to lib/python3.5/site-packages when built as part of the environment.

twosilly commented 7 years ago

Thank you! Problem solved! But my problem is that he compiled arcus.so and moved to my setting in! Just do not know why, his power was changed from 775 to 644, I put the permissions change back then! Of course I found your way more easily to solve the problem! I hope to leave these with me the same questions to help people!