Open ceremcem opened 3 years ago
First try is not successful:
/home/aea/fc-build/Release/bin/FreeCAD: error while loading shared libraries: libCoin.so.80: cannot open shared object file: No such file or directory
Script to install 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
The sun is shining and it casts shadows :)
To install realthunders coin lib, i followed the INSTALL documentation which is pretty much the same as your script. Beforehand i removed the libcoin-dev
and libcoin80c
packages.
But after that i rebuild FreeCAD manually. The build.sh script is trying to install libcoin-dev (and libcoin80c). This maybe leads to some problems.
The location of the libCoin files are like so:
freecad@fc:~/fc2-build$ locate libCoin
/home/freecad/coin_build/lib/libCoin.so
/home/freecad/coin_build/lib/libCoin.so.80
/home/freecad/coin_build/lib/libCoin.so.80.0.1
/usr/lib/x86_64-linux-gnu/libCoin.so
/usr/lib/x86_64-linux-gnu/libCoin.so.4.0.0
/usr/lib/x86_64-linux-gnu/libCoin.so.80c
/usr/local/lib/libCoin.so
/usr/local/lib/libCoin.so.80
FreeCAD looks in the following directory for libCoin
freecad@fc:~/fc2-build$ sudo strace -t -e trace=file -o fc-file-access.strace -vvv -s 1024 -ff -- bin/FreeCAD report > /dev/null
freecad@fc:~/fc2-build$ grep libCoin fc-file-access.strace*
fc-file-access.strace.136594:15:20:15 openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/hdf5/openmpi/libCoin.so.80", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
fc-file-access.strace.136594:15:20:15 openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/openmpi/lib/libCoin.so.80", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
fc-file-access.strace.136594:15:20:15 openat(AT_FDCWD, "/home/freecad/fc2-build/lib/libCoin.so.80", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
fc-file-access.strace.136594:15:20:15 openat(AT_FDCWD, "tls/x86_64/x86_64/libCoin.so.80", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
fc-file-access.strace.136594:15:20:15 openat(AT_FDCWD, "tls/x86_64/libCoin.so.80", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
fc-file-access.strace.136594:15:20:15 openat(AT_FDCWD, "tls/x86_64/libCoin.so.80", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
fc-file-access.strace.136594:15:20:15 openat(AT_FDCWD, "tls/libCoin.so.80", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
fc-file-access.strace.136594:15:20:15 openat(AT_FDCWD, "x86_64/x86_64/libCoin.so.80", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
fc-file-access.strace.136594:15:20:15 openat(AT_FDCWD, "x86_64/libCoin.so.80", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
fc-file-access.strace.136594:15:20:15 openat(AT_FDCWD, "x86_64/libCoin.so.80", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
fc-file-access.strace.136594:15:20:15 openat(AT_FDCWD, "libCoin.so.80", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
fc-file-access.strace.136594:15:20:15 openat(AT_FDCWD, "/usr/local/lib/libCoin.so.80", O_RDONLY|O_CLOEXEC) = 3
Now there are just some mounting problems left.
Wow, great news!
Beforehand i removed the libcoin-dev and libcoin80c packages.
I think my mistake was not removing libcoin80c. However, when I compiled again, I can not find /usr/lib/x86_64-linux-gnu/libCoin.so.80c
:
$ find /usr -name "libCoin*"
/usr/local/lib/libCoin.so.80.0.1
/usr/local/lib/libCoin.so.80
/usr/local/lib/libCoin.so
The build.sh script is trying to install libcoin-dev (and libcoin80c). This maybe leads to some problems.
Btw, you can skip using build.sh
and use build-fc.sh
, which will skip trying to install the dependencies listed in packages.txt
.
However, when I compiled again, I can not find
/usr/lib/x86_64-linux-gnu/libCoin.so.80c
i think the libCoin.so.80c is some kind of remnant. Also the 4.0.0 is the version of the older repository lib version (libCoin.so.4.0.0). The version of the realthunder coin lib is 4.0.1.
The make install
doesn't mention it. Only the following libs:
...
-- Up-to-date: /usr/local/share/Coin/scxml/navigation/plane.xml
-- Up-to-date: /usr/local/share/Coin/profiler
-- Installing: /usr/local/lib/libCoin.so.80.0.1
-- Installing: /usr/local/lib/libCoin.so.80
-- Up-to-date: /usr/local/lib/libCoin.so
-- Up-to-date: /usr/local/lib/pkgconfig/Coin.pc
-- Up-to-date: /usr/local/bin/coin-config
...
Did you build from scratch instead of performing an incremental build after installing realthunder's Coin?
Yes i build FreeCAD from scratch afterwards. But i guess it should also work with incremental building, but i didn't try.
I tried the same compilation 3 times now (starting from same backup) and all went wrong. However, this time I also run ldconfig
, and now FreeCAD launches at least.
Currently I'm getting <class 'ModuleNotFoundError'>: No module named 'pivy'
error.
How come we use the same build environment (Debian Buster, right?) and the same build scripts and we get different results? What are you possibly doing something differently?
How come we use the same build environment (Debian Buster, right?) and the same build scripts and we get different results? What are you possibly doing something differently?
Yes, it's the build environment according to your instructions, Debian Buster.
I used cmake
like
freecad@fc:~/fc2-build$ cmake ../FreeCAD/ -DBUILD_QT5=ON -DPYTHON_EXECUTABLE=/usr/bin/python3cmake
and then just make
I don't know what could be the reason for the difference. If you feel archeological you can try to find something in my console log: lxc_debian_freecad_build.log
That's very good idea to keep your entire command line history with outputs.
The only thing I didn't try is compiling from scratch. Now it's being compiled.
When "View/Draw Style/Shadow" mode is enabled, following error is seen on the console window:
This coin3d shading error seems to be known and solved if realthunders coin fork is used. https://github.com/realthunder/coin
Originally posted by @wohltat in https://github.com/ceremcem/build-freecad-asm3/issues/11#issuecomment-794123139