If you want a working Python 3 package you could always make a Debian Unstable VM which has the libexpat problem fixed as well. The process is basically just grabbing a Debian Testing ISO, installing it on a VM, and then editing /etc/apt/sources.list as outlined here: https://www.freecadweb.org/wiki/DebianUnstableJoel_graff wrote: ↑Sun Mar 10, 2019 8:31 pm At the moment, I can't get the docker image to pick up the environment variables. Will maybe give an Ubuntu VM a try, since it works for NormandC.
Coin/Pivy issue on Py3 / Qt5 build
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- kkremitzki
- Veteran
- Posts: 2515
- Joined: Thu Mar 03, 2016 9:52 pm
- Location: Illinois
Re: Coin/Pivy issue on Py3 / Qt5 build
- Joel_graff
- Veteran
- Posts: 1949
- Joined: Fri Apr 28, 2017 4:23 pm
- Contact:
Re: Coin/Pivy issue on Py3 / Qt5 build
kkremitzki wrote: ↑Sun Mar 10, 2019 8:45 pm If you want a working Python 3 package you could always make a Debian Unstable VM which has the libexpat problem fixed as well.... [
Just a final note on this point, I did a fresh install of Linux Mint 19.1. added the FreeCAD-daily ppa and ran build-dep. Then followed NormandC's instructions on building FreeCAD.
At first, it told me it couldn't import QtCore. Fixed that with:
Code: Select all
sudo apt install python3-pyside2.qtcore
Then, on a whim, I renamed my .FreeCAD folder... and it starts perfectly - no crash when I try to import lxml.
So.. ummm.. nevermind.
Going to see if I can track down the offending module code, though...
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
- Joel_graff
- Veteran
- Posts: 1949
- Joined: Fri Apr 28, 2017 4:23 pm
- Contact:
Re: Coin/Pivy issue on Py3 / Qt5 build
Looks like the problem is in microelly's geodata wb.
Specifically:
If I try to import it in the FreeCAD python console, the same crash occurs. I'm guessing it's another library binary incompatibility issue as it imports without issue in the Python3 console.
Since it's related to the OpenCV module, I checked to see if I had python3-opencv installed. It was missing, so I fixed that. No effect, unfortunately.
Specifically:
Code: Select all
import cv2
Since it's related to the OpenCV module, I checked to see if I had python3-opencv installed. It was missing, so I fixed that. No effect, unfortunately.
microelly2 wrote:
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
Re: Coin/Pivy issue on Py3 / Qt5 build
I have recently fixed a few issues with the docker image. If you pull it again, your issue may have been fixed. Failing that, if you explain what env vars you're having difficulty with, I might be able to help.Joel_graff wrote: ↑Sun Mar 10, 2019 8:31 pm At the moment, I can't get the docker image to pick up the environment variables. Will maybe give an Ubuntu VM a try, since it works for NormandC.
- Joel_graff
- Veteran
- Posts: 1949
- Joined: Fri Apr 28, 2017 4:23 pm
- Contact:
Re: Coin/Pivy issue on Py3 / Qt5 build
I was trying to work past compilation issues, which I'm slowly sorting out. In any case, I don't use docker at all, so when I tried it, I could have been doing something wrong. The issue I had was getting it to pick up on the source / build environment variables. I defined the vars, exported them before running the image, and even defined them in the commandline when running the image and it still defaulted to the /mnt values.
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
Re: Coin/Pivy issue on Py3 / Qt5 build
Ah, so a few things to keep in mind there, that may be the cause of your issue.Joel_graff wrote: ↑Tue Mar 12, 2019 8:47 pmI was trying to work past compilation issues, which I'm slowly sorting out. In any case, I don't use docker at all, so when I tried it, I could have been doing something wrong. The issue I had was getting it to pick up on the source / build environment variables. I defined the vars, exported them before running the image, and even defined them in the commandline when running the image and it still defaulted to the /mnt values.
First, env vars defined on the host machine are not carried over into the docker container (Unless you explicitly make them). You have to define them from within the docker container. I'd be interested to hear what they are, and why you want to use them.
Second, assuming you're using the build bash script included with the docker image:
Code: Select all
/root/build_script.sh
- Joel_graff
- Veteran
- Posts: 1949
- Joined: Fri Apr 28, 2017 4:23 pm
- Contact:
Re: Coin/Pivy issue on Py3 / Qt5 build
I'm referring to the fc_build / fc_source variable definitions laid out in the readme file on your gitlab repo under the 'run image' section.David_D wrote: ↑Tue Mar 12, 2019 9:21 pm First, env vars defined on the host machine are not carried over into the docker container (Unless you explicitly make them). You have to define them from within the docker container. I'd be interested to hear what they are, and why you want to use them.
Second, assuming you're using the build bash script included with the docker image:
It indicated fc_source and fc_build needed to be defined before running the image, then it appears they're also defined in the commandline switches when loading the image - which seemed redundant to me. Nevertheless I did both, providing the same values in both cases...
Having never used docker, I'm sure there's something I didn't understand.
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
Re: Coin/Pivy issue on Py3 / Qt5 build
Ah, I see. There's a small misunderstanding. See relevant docs here. The variables are not getting defined a second time. The second value after the semicolon in:Joel_graff wrote: ↑Tue Mar 12, 2019 10:43 pm I'm referring to the fc_build / fc_source variable definitions laid out in the readme file on your gitlab repo under the 'run image' section.
It indicated fc_source and fc_build needed to be defined before running the image, then it appears they're also defined in the commandline switches when loading the image - which seemed redundant to me. Nevertheless I did both, providing the same values in both cases...
Having never used docker, I'm sure there's something I didn't understand.
Code: Select all
-v $fc_source:/mnt/source
You can tell this is the case, because with bash, an environment variable prefixed with a dollar sign causes the value of the environment variable to be substituted in. As an example, this:
Code: Select all
fc_source=/home/my_name/code/freecad_source
echo "$fc_source:/mnt/source"
Code: Select all
echo "/home/my_name/code/freecad_source:/mnt/source"
To use the environment variables as intended, assign fc_source and fc_build to the locations of your source directory and your build directories on your host machine, and don't worry about where they'll end up on the docker container. The build script will find them in the correct location.
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: Coin/Pivy issue on Py3 / Qt5 build
I put it on my task list to test with the new CV3/CV4.Joel_graff wrote: ↑Tue Mar 12, 2019 1:18 pm Looks like the problem is in microelly's geodata wb.
Specifically:
If I try to import it in the FreeCAD python console, the same crash occurs. I'm guessing it's another library binary incompatibility issue as it imports without issue in the Python3 console.Code: Select all
import cv2
Since it's related to the OpenCV module, I checked to see if I had python3-opencv installed. It was missing, so I fixed that. No effect, unfortunately.
microelly2 wrote: