-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
problems compiling on ubuntu 20.04 #11
Comments
@wohltat I don't have Ubuntu 20.04 at hand, but Can you check if any of the following solves your problem: If that doesn't work, I can install Ubuntu 20.04 and then try creating lxc container in it. |
Great, that solved the issue with the debian lxc template.
build-fc.sh:110 only works if the folder already exists, otherwise build_dir (new) will be empty even if build_dir (old) was not empty (build_dir was '../fc-build'): build_dir=$(readlink -f $build_dir) mkdir -p $build_dir Why are there these two repos in the first place? |
This repo started its life as an alternative to the Assembly3/Wiki instructions. As I'm not authorized to add it to any repository, it exists as a separate one.
Thanks, I fixed it.
Confusion comes from the history: Back in the days we had many place to track issues, like FreeCAD forum, LinkStage3/issues, Assembly3/issues. In the first days issues were tracked via the forum entry. It was very complex to track the issues there, so we started using Assembly3/issues for Assembly3 related questions. Since build instructions was on Assembly3/README, I also posted many build related question the Assembly3/issues. Since I can't know whether exact reason for an issue is related to Assembly3 WB or LinkStage3, I kept posting every question to Assembly3/issues. Then some folks started posting issues to LinkStage3/issues when they were exactly sure that the issue is related to LinkStage3. So we started tracking both trackers. I don't know if anyone still posting issues to that forum entry. So, I guess because of both Assembly3/issues was the main issue tracker and the build instructions was on Assembly3/README, realthunder decided to put the releases to Assembly3 repo.
I may not quite get this. What do you mean by that? |
Btw, if you have RAM constraints, sometimes Linux freezes and does not respond. I strongly suggest using https://github.com/rfjakob/earlyoom. This kills any memory hungry application in case of an Out Of Memory situation, which I encounter from time to time while compiling FreeCAD. |
build-fc.sh:137 - 138
so this (as well as the place for the release) suggests that realthunder/FreeCAD_assembly3 is the repo to compile instead of realthunder/FreeCAD:LinkStage3. Or in other words i don't see how the build script is connected to the Assembly3 Workbench build script since it only compiles Linkstage3 and not realthunder/FreeCAD_assembly3. |
This sounds pretty interesting. I had situations before when the computer froze because of out of memory situations Nice to know that something like that exists. |
If you separately compiled LinkStage3, you can directly use
|
ah, ok. I missed that. Makes more sense now. |
Should we close the issue? (No need to rush, just let me know) |
I compiled on host system and it went through to the end.
cmake says:
The package I'll try the lxc path now. |
This is strange.
It's the same on my side. However, I never noticed any slowdown. (Am I missing something?) Here is the full log in case you want to compare with yours: Build log
|
Please update build-freecad-asm3 repo, I recently pushed some more path fixes. |
now it doesn't work anymore. Something with the folder
beforehand it was build in /home/user/fc-build also i had to remove gmsh from packages.txt because it created an unsolvable package dependency situation for me with libocct7.3 vs libocct7.5. This maybe has to do with the freecad-daily PPA i'm using. |
How did that happen? What commands did you issue till you get there? |
Where is your |
The lxc build completed now, but i needed to do some additional things to make it work:
So far so good. But there is still the error
This coin3d shading error seems to be known and solved if realthunders coin fork is used. And there is still the problem that the settings from my user folder are not used. All precompiled FreeCAD versions i've tried so far use my settings. But the official FreeCAD main branch also has that problem. |
That was on purpose. But if you know what you are doing, that's okay I guess.
Where is it located? You need to copy your
How do we turn on shading, so I can verify when it's solved? |
Why this? Seems like a necessary step that can be automated. Without a user folder there is no ssh connection.
$HOME is /home/freecad on the xlc guest. I have copied my settings (host) via scp to the guest and checked that its there at /home/freecad/.FreeCAD and /home/freecad/.config/FreeCAD. But strangely it did not change anything.
via keypress: V,9 |
I can verify that 3D navigation is extremely slowed down when switched to Shadow mode. I'll handle installing Coin from realthunder ASAP.
I thought you said you didn't create the
|
I've compiled and installed realthunders coin and restarted the build.sh script. It a long time to compile so i expect that it integrated that new coin library.
But its the same error message when running FreeCAD. Besides from that the graphics is extremely slow even if i don't use shadows. Like 5 FPS or so. Feels like a remote computer session.
I wanted to say, 'useradd -m' is reasonable because the userfolder (aka $HOME) has to be created anyways. The copied settings are used now. I don't know what i did wrong before. So copying the settings to the lxc container worked. |
Ah! Now I get it. You are correct, I made a mistake by writing
Was it that way before compiling against realthunder's Coin3D? I experienced the 5 FPS response when I switch to shadow mode, but it's pretty responsive when I switch to "As Is" mode.
Nice. Let me try the Coin3D switch. |
@wohltat Can you try |
much better now concerning framerate but still not as fluid as running on the host system. Furthermore this takes much more resources. If i create a torus and rotate it. It completely uses up all the cpu. If i do the same on the host it uses like around 25% whilst being more responsive. (tested without shadows) What about using the lxc container just for reproducible compiling and generate some kind of package like AppImage or so that can be used outside? |
I had the same idea for a while: #8. I was planning to use the LXC containers for AppImage updater server and maybe quick local hacks. Maybe it's time. |
After no success with simply running the copied files from lxc container on the host, i tried again to build on host. build log
CMakeError.log
|
Are you able to make it work after you compiled Coin3D from realthunder? I got the following error:
This is how I installed Coin3D: #!/bin/bash
set -ue
cd $HOME
[[ -d coin ]] \
|| git clone --recurse-submodules https://github.com/realthunder/coin coin \
&& (cd coin; git pull)
cmake \
-Hcoin \
-Bcoin_build \
-G "Unix Makefiles" \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_BUILD_TYPE=Release \
-DCOIN_BUILD_DOCUMENTATION=OFF
cd coin_build
make
sudo make install
You can't simply copy the compiled files from guest to host, files are compiled using the actual paths. You can't even move the folder inside guest, or rename it. Anyhow, I was thinking about running FreeCAD via Would you like to try the
FreeCAD should run with your user settings and you can reach your files by those |
i compiled coin without -DCMAKE_INSTALL_PREFIX. Or without any additional parameters at all.
I'm not 100% sure if it was compiled into FreeCAD but at least i had no error message when starting and the cmake output indicates that it was used. I'll try your chroot script now. |
Works great. Now it feels like an application on the host. Ok it is exactly that :) What about a comment like follows, so it is more clear how to change the settings:
Still have not figured out why the attempt to use realthunders coin library didn't work. |
It does, doesn't it? :D I think the current approach is very much like how AppImage works under the hood.
I'll look into that again. I also wonder why.
I think the clearer approach might be directly parsing LXC container's |
Did you mean it should use my "normal" settings(.Freecad,.config/FreeCAD) from my host system? Id like it to do that but it does not. It takes the settings from the lxc container.
Actually i start to like this more than an AppImage because there is still an easy way to access the file system of the application. One thing i miss, besides the settings from my user folder, is that the application does not see the host file system yet. So i cannot save my models to a folder like i used to. Ideally the container file system would be invisible when saving files. |
No, I meant it will use
That's on purpose. That's the point of using a sandboxed application. I don't know how AppImage does this, but you can mount any number of directories you want into your container. I don't know if we could just expose whole filesystem to the container, but even if we could, I wouldn't prefer this approach. Here the AppImage is being reinvented :D |
@wohltat FYI: I've refactored ./run-in-chroot.sh -n yourContainerName -u freecad '~/fc-build/Release/bin/FreeCAD' (Pay attention to the single quotes, or the I'm going to close the issue here. We can still continue discussion here, or you can open a new one. |
Hmm, actually i don't want a sandbox. I just want a reproducible environment for compiling.
I tried realthunders AppImage builder (conda) and found these lines in the output. I don't know exactly what to make of it but i found it interesting:
|
I understand that you need to reach your files easily. I directly mounted my
However, I don't know if Until then, it's safe to separately mount your folders into the guest. |
I'm a bit confused. I didn't work on that project for the last days and now can't find the lxc container anymore. Not as user and not as root. i used
nothing. Any ideas how this could happen? |
That's quite weird. |
Yes, Ok, i just found it. In that situation i find If i do
i get that error message. Strangely |
Glad you solved it. I had multiple attempts over time to switch to LXD, but I couldn't make it work, so I'm a little bit unfamiliar with LXD. There is no way for me to support it without using it.
While using LXC, I've rarely experienced such strange issues. I'm just starting the container with In rare occurrences, I'm trying to cover those type of pitfalls for LXC. |
First i tried building on host. The commands do not work as is.
With a minor modification the packages.txt is found:
Building directly on host failed with
E: Unable to locate package python3-pyside2uic
i then removed that package from packages.txt and tried again. Then it fails silently with
trying the lxc path, i got stuck at the following point after a long time setting up lxd / lxc and trying a lot of things:
The text was updated successfully, but these errors were encountered: