[Solved]18.1 libSMDS.so not found during `install`

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
jsoo1
Posts: 20
Joined: Wed Jan 30, 2019 1:24 pm

Re: 18.1 libSMDS.so not found during `install`

Post by jsoo1 »

Here is the portion of the logs during make related to SMDS: https://paste.debian.net/1085104/

Everything seems to be going so smoothly. But sure enough lib/libSMDS.so is not there afterwards.
jsoo1
Posts: 20
Joined: Wed Jan 30, 2019 1:24 pm

Re: 18.1 libSMDS.so not found during `install`

Post by jsoo1 »

We are using a set of cmake flags aside from the freecad ones specifically for our distribution. Are any of these suspicious?

running 'cmake' with arguments ("../source" "-DCMAKE_BUILD_TYPE=RelWithDebInfo" "-DCMAKE_INSTALL_PREFIX=/gnu/store/j7k9lns2qhcxwqfzm3pz93m2hn62q0hj-freecad-0.18.2-1.dbb4cc6" "-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE" "-DCMAKE_INSTALL_RPATH=/gnu/store/j7k9lns2qhcxwqfzm3pz93m2hn62q0hj-freecad-0.18.2-1.dbb4cc6/lib" "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DBUILD_QT5=ON")
wmayer
Founder
Posts: 20324
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: 18.1 libSMDS.so not found during `install`

Post by wmayer »

[ 1%] Linking CXX shared library ../../../lib/libSMDS.so
So, here make output says it creates the library and exits with no errors...
But sure enough lib/libSMDS.so is not there afterwards.
and then the file doesn't exist. How can this happen?
"-DCMAKE_BUILD_TYPE=RelWithDebInfo"
I have to admit that I never tried this. Maybe try -DCMAKE_BUILD_TYPE=Release and see if this works.

I will try these flags the next time I run my Linux box.
jsoo1
Posts: 20
Joined: Wed Jan 30, 2019 1:24 pm

Re: 18.1 libSMDS.so not found during `install`

Post by jsoo1 »

Alright I'll try it. I will be going on vacation for two weeks so I may be quiet for a while but I'll pick this up when I get back.
jsoo1
Posts: 20
Joined: Wed Jan 30, 2019 1:24 pm

Re: 18.1 libSMDS.so not found during `install`

Post by jsoo1 »

Build type "Release" has the same problem.
wmayer
Founder
Posts: 20324
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: 18.1 libSMDS.so not found during `install`

Post by wmayer »

I tried your cmake flags today on a fresh build and for me creating the libMSDS.so lib just works and also installing doesn't exit with an error.

However, one thing at the moment is not correct:
When you set -DCMAKE_INSTALL_LIBDIR=lib then internally it changes to an absolute directory with the build directory as prefix. I have to check what needs to be changed. As a workaround for the time being you can try to set CMAKE_INSTALL_LIBDIR to an absolute path.
wmayer
Founder
Posts: 20324
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: 18.1 libSMDS.so not found during `install`

Post by wmayer »

Today I ran into a similar problem like you. When calling make the library was created but when doing make install the library was suddenly removed and the procedure stopped with an error.

Responsible for the loss of file is the use of file(RPATH_CHECK...) inside the cmake install script and this happens when the install location is the same as the build directory.

So, make sure that your install prefix directory is different to the build directory.
jsoo1
Posts: 20
Joined: Wed Jan 30, 2019 1:24 pm

Re: 18.1 libSMDS.so not found during `install`

Post by jsoo1 »

wmayer wrote: Sun Jun 02, 2019 7:34 pm When you set -DCMAKE_INSTALL_LIBDIR=lib then internally it changes to an absolute directory with the build directory as prefix. I have to check what needs to be changed. As a workaround for the time being you can try to set CMAKE_INSTALL_LIBDIR to an absolute path.
My install prefix is an absolute path: -DCMAKE_INSTALL_PREFIX=/gnu/store/j7k9lns2qhcxwqfzm3pz93m2hn62q0hj-freecad-0.18.2-1.dbb4cc6
wmayer wrote: Thu Jun 06, 2019 1:11 pm Responsible for the loss of file is the use of file(RPATH_CHECK...) inside the cmake install script and this happens when the install location is the same as the build directory.
Hmm. My build directory is in a tmp directory not in any children of the install prefix. Is there another reason file(RPATH_CHECK...) might fail? I found this earlier but it is undocumented.
jsoo1
Posts: 20
Joined: Wed Jan 30, 2019 1:24 pm

Re: 18.1 libSMDS.so not found during `install`

Post by jsoo1 »

wmayer wrote: Sun Jun 02, 2019 7:34 pm However, one thing at the moment is not correct:
When you set -DCMAKE_INSTALL_LIBDIR=lib then internally it changes to an absolute directory with the build directory as prefix. I have to check what needs to be changed. As a workaround for the time being you can try to set CMAKE_INSTALL_LIBDIR to an absolute path.
Ahh, I'm sorry, I misread that. I will try setting to an absolute path.
wmayer
Founder
Posts: 20324
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: 18.1 libSMDS.so not found during `install`

Post by wmayer »

In case you still have problems then I would suggest to use the external SMESH. I don't know if there is still a package in Debian experimental, if not then you can build the libs out of https://github.com/LaughlinResearch/SMESH
Post Reply