Why are development dependencies pulled in when installing a package?

The most emblematic case is LibreOffice's, that pulls in perl5, mysql-client-5.7 and even openldap-client!
But other packages install gcc, automake, etc.

1. Most people will never use LibreOffice to access a database or an LDAP directory, so these should NOT be required.

2. If you're a developer, you'll likely want to use a much more recent version of MySQL, or even MariaDB. But if you try and do so, it will uninstall LibreOffice.

3. If you're not a developer, you should not be bothered with such things as perl5 or automake - you just want to use the package, not build it.

I also don't understand why so many packages bring in other p5-... packages, even though not developed in perl themselves. These dependencies look like API to use the main package in perl programs, but they are only useful to those who intend to develop such an application, not for the 99.999% other users.

I'm very surprised that such issues still exist in 2020, so I guess there is a reason for this - technical or human.

So here are my questions:

- Is there any indispensable reason for such dependencies to be required at run-time?

- If not, would any effort to clean up that mess be welcome?

I mean, I'm willing to make that effort for packages I have an issue with, but I'd like to be sure these efforts will not be > /dev/null.
 
2) build from ports and set DEFAULT_VERSIONS correctly. See /usr/ports/Mk/bsd.default-versions.mk

Can't comment on the Perl or OpenLDAP requirements (not for LibreOffice at least).
 
But other packages install gcc

I once had a look into that one, because I wanted to get rid of the bloat (postgres is concerned, as are many others).
It seems there is a runtime part of gcc (the thing that happens to call main() ), and you need that when compiling with gcc. I would still prefer to only have some small "gcc-runtime" port to install, I don't remember what is the problem with that, but it probably was already discussed on some list.
 
Code:
% pkg info -d libreoffice | grep mysql
    mysql57-client-5.7.29_1

This is likely for Base. Afaik, pkg doesn't have any concept of alternative dependencies (a dependency which can be satisfied by one of the multiple suitable packages), which is admittedly a problem here.

Instead we have shared library tracking bullshit borrowed from RPM; no idea if that is used in dependency resolution. I'm less, less and less satisfied with pkg, to be honest.
 
2) build from ports and set DEFAULT_VERSIONS correctly. See /usr/ports/Mk/bsd.default-versions.mk

I cannot see any setting regarding the use of MySQL or MariaDB in that file. Here‘s my way to get MariaDB & LibreOffice: Compile and install databases/akonadi first, and choose SQLite here. Then a self compiled LibreOffice doesn‘t need MySQL anymore:

Code:
jo@freya ~>  pkg info -d libreoffice | grep mysql
jo@freya ~>  pkg info -d libreoffice | grep mariadb
        mariadb104-client-10.4.12

The problem with the database dependency is know by the package maintainer. Solutions an helping hands are welcome ;)
 
When I was saying 'developer', I didn't mean 'FreeBSD developer'...

I do Java development as part of my job and I also test training material before giving my trainings, so I frequently have to install MySQL/MariaDB or PostgreSQL, depending on the application or training.

In short, if I install a recent version of MySQL or MariaDB, I no longer can work on my handouts... :/
It's sad to have to build a monster like LibreOffice from ports just because of wrong run-time dependencies.
 
so I frequently have to install MySQL/MariaDB or PostgreSQL, depending on the application or training.
Use a jail for this. You can easily manage a few of them. One for MySQL, one for MariaDB, etc. Start the jail you need at that time.
 
Simplest and cleanest solution in your case I believe. You can get fancy too with ZFS. Snapshot a clean jail with a configured MySQL for example. You can start it when you do your training. Then when you're finished stop the jail and revert the snapshot. And you're all neat and clean for the next training.
 
Back
Top