f3d
f3d copied to clipboard
Static version of f3d installs lib/xxx.a files which are not required
Describe the bug
When building and installing F3D with BUILD_SHARED_LIBS=OFF, the lib folder contains .a files that do not seem required to launch the application (ldd f3d does not output these files):
libf3d.a
libVTKExtensionsCore.a
libVTKExtensionsRendering.a
libVTKExtensionsApplicative.a
libVTKExtensionsReaders.a
To Reproduce Steps to reproduce the behavior:
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=install -DBUILD_SHARED_LIBS=OFF ../f3dninja installtree install- output shows files in the
libfolder:
install
+ bin
+- f3d
+ lib
+- libf3d.a
+- libVTKExtensionsApplicative.a
+- libVTKExtensionsCore.a
+- libVTKExtensionsReaders.a
+- libVTKExtensionsRendering.a
+ share
(...)
Expected behavior
Not lib folder when building and installing f3d statically.
System Information:
- OS: Debian unstable
- GPU and GPU driver: N/A
F3D version 1.3.1
Additional context If this is intentional behavior, could you please provide an option to avoid installing this lib folder?
Thanks!
Building f3d completelly statically is not a good idea as it will not help users to use the libf3d, see the release notes: https://github.com/f3d-app/f3d/releases/tag/v1.3.1
No, you can use libf3d if it's built statically. However, in this case you need to link indirectly with its dependencies too so it makes sense to install the vtkext static libraries. My problem right now is the vtkext libraries are always installed regardless of the build type of libf3d, but they shouldn't be installed if libf3d is a shared lib.
My problem right now is the vtkext libraries are always installed regardless of the build type of libf3d, but they shouldn't be installed if libf3d is a shared lib.
See vtkModule.cmake and vtk_module_build.
Building f3d completelly statically is not a good idea as it will not help users to use the libf3d, see the release notes: https://github.com/f3d-app/f3d/releases/tag/v1.3.1
The release notes state "Introducing an alpha version of the libf3d" so it sounds like relevant for advanced developers only. I would wait for a "stable" version of this lib to make it available to Debian because no other application uses it at the moment and library transition is very time consuming. (For instance SONAME bump triggers a complex transition process, see here if you are interested.)
By the way, I can just remove these extra files in the deb package. Not a show stopper.
Ok, I suppose that BUILD_SHARED_LIBS=OFF + F3D_INSTALL_SDK=OFF should not install any libs.
Indeed, if libf3d is not packaged, BUILD_SHARED_LIBS=OFF and F3D_INSTALL_SDK=OFF are the correct options.
However, I think F3D_INSTALL_SDK=OFF does not work in 1.3.1 (fixed in master only), so you can remove manually libf3d.a and all vtkext static libs, and public headers in include/f3d too.
#436 and #433 will be needed for this to be fixed
not closed yet
Fixed by #436 and #433