Details about brew install bottle pouring #92
Replies: 2 comments
-
The full details of this are in Note that the |
Beta Was this translation helpful? Give feedback.
-
Looking at the code it seems that, when a
I guess Even if users cannot expect a tool to expose the internals, it would be amazing to take advantage of this install bottles manually without recompiling all from scratch. Regarding the [email protected] bottleSymbolic links [email protected]/10.3.25/bin/mysql.server -> ../support-files/mysql.server
[email protected]/10.3.25/bin/mysql_install_db -> ../scripts/mysql_install_db
[email protected]/10.3.25/bin/rcmysql -> ../../../../etc/init.d/mysql
[email protected]/10.3.25/bin/wsrep_sst_rsync_wan -> wsrep_sst_rsync
[email protected]/10.3.25/lib/libmariadb.dylib -> libmariadb.3.dylib
[email protected]/10.3.25/lib/libmysqlclient.a -> libmariadbclient.a
[email protected]/10.3.25/lib/libmysqlclient.dylib -> libmariadb.3.dylib
[email protected]/10.3.25/lib/libmysqlclient_r.a -> libmariadbclient.a
[email protected]/10.3.25/lib/libmysqlclient_r.dylib -> libmariadb.3.dylib Files causing it to be non-relocatable |
Beta Was this translation helpful? Give feedback.
-
Disclaimer
I am quite new to the macOS world so I apologize in case I ask things that are well known to anyone else.
Goal
When binary packages are provided for some software, there is the possibility to:
The MariaDB team provides binaries for Windows and Linux and, once extracted, they do not need to be compiled, they just work.
If they provided binaries for macOS the behaviour would probably be the same.
I was hoping to use the precompiled binaries in Homebrew bottles to be able to run MariaDB from any directory but I am having a hard time in doing so.
Issues
I have been trying to grasp how Homebrew works in detail without success.
I read that when
brew --prefix
is the standardusr/local
bottles are poured i.e. binaries inside them are used.A compilation occurs if:
brew install <formula>
Let's take into consideration the [email protected] formula:
I installed the formula on a Catalina machine expecting the installation to pour the bottle i.e. to place the binaries in
brew --cellar
add a link to them inbrew --prefix
and maybe set some system configuration.After downloading and extracting the Catalina bottle I found out that not only text files had
@@HOMEBREW_*@@
variables replaced (sounds reasonable) but also binaries differed as can be seen in the log of the Travis CI build job.Considerations and help request
I understand that one possibility is building binaries on my own and this would probably allow to use them as it happens for Windows and Linux.
Nonetheless I would like to understand what happens when a
brew install <formula>
is performed i.e.:make
than the one happening on compilationSince it is not possible to decide which version of a formula to install (like with Linux package managers) and providing a formula file results in a full compilation as well as using a separate Homebrew installation, it would be nice to be able to manually reproduce what bottle pouring does.
In cases like the MariaDB one, the software already provides for the possibility of multiple installations in different non-standard directories by means of command-line parameters: it would be great to extract a bottle and run the software.
I hope you can give me help, if not achieving the goal, at least understanding what Homebrew does when it pours a bottle and how it changes the extracted binaries: in which way and with which command/function of the formula code.
Beta Was this translation helpful? Give feedback.
All reactions