<div dir="ltr">Thanks to all for the useful suggestions.   I guess the main point is to read the MariaDB updated instructions; I had looked at Release Notes but what seems to have changed is the packaging, so that MariaDB-shared is now required if using <font face="monospace">-lmariadb</font> in the build.   I can see that it is likely also possible to make it use a static library to avoid having to install MariaDB-shared in target systems.   In fact I do only use SlurmDBD so the MariaDB hooks are only needed in that package, not in slurmd at all.  I expect if I read the Slurm build notes more carefully I can set options to not install MySQL for slurmd while keeping for slurmdbd; it was installed because the server on which I was building has the 'mysql_config' file, which is enough to trigger building as if --with-mysql.<div><br></div><div>Ole, thanks for updating your pages - I have them bookmarked and have used them for several years as an easy quick start.</div><div><br></div><div>As to why use MariaDB 10.x - mostly because the 5.x code path is not maintained since Oracle bought MySQL, but also 10.2 and later include backup tools, though I admit that I have yet to use them.</div><div><br></div><div>I cannot answer about Galera as I have not used it, but it does seem strange that MariaDB having brought Galera into the main package only a few versions ago have now split it again.</div><div><br></div><div>William</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 12 Nov 2019 at 08:14, Ole Holm Nielsen <<a href="mailto:Ole.H.Nielsen@fysik.dtu.dk">Ole.H.Nielsen@fysik.dtu.dk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Daniel,<br>
<br>
Thanks for sharing your insights!  I have updated my Wiki page <br>
<a href="https://wiki.fysik.dtu.dk/niflheim/Slurm_installation#install-mariadb-database" rel="noreferrer" target="_blank">https://wiki.fysik.dtu.dk/niflheim/Slurm_installation#install-mariadb-database</a> <br>
now.<br>
<br>
/Ole<br>
<br>
On 11/12/19 8:52 AM, Daniel Letai wrote:<br>
> <br>
> On 11/12/19 9:34 AM, Ole Holm Nielsen wrote:<br>
>> On 11/11/19 10:14 PM, Daniel Letai wrote:<br>
>>> Why would you need galera-4 as a build require?<br>
>><br>
>> This is the MariaDB recommendation in <br>
>> <a href="https://mariadb.com/kb/en/library/yum/" rel="noreferrer" target="_blank">https://mariadb.com/kb/en/library/yum/</a>, see the section "Installing <br>
>> MariaDB Packages with YUM".  I have no clue why this would be needed.<br>
> <br>
> Yes, it's required for mariadb multimaster cluster. This has nothing to do <br>
> with the mariadb api required for linking against mariadb libs.<br>
> <br>
> <br>
> You don't even need the mariadb-server pkg for build purposes - it's only <br>
> required for deployment of slurmdbd.<br>
> <br>
> On a build machine, you should only require the client section: <br>
> <a href="https://mariadb.com/kb/en/library/yum/#installing-mariadb-clients-and-client-libraries-with-yum" rel="noreferrer" target="_blank">https://mariadb.com/kb/en/library/yum/#installing-mariadb-clients-and-client-libraries-with-yum</a>, <br>
> as well as the devel pkg.<br>
> <br>
>><br>
>> /Ole<br>
>><br>
>><br>
>>> If it's required by any of the mariadb packages, it'll get pulled <br>
>>> automatically. If not, you don't need it on the build system.<br>
>>><br>
>>><br>
>>> On 11/11/19 10:56 PM, Ole Holm Nielsen wrote:<br>
>>>> Hi William,<br>
>>>><br>
>>>> Interesting experiences with MariaDB 10.4!  I tried to collect the <br>
>>>> instructions from the MariaDB page, but I'm unsure about how to get <br>
>>>> the galera-4 RPM.<br>
>>>><br>
>>>> Could you kindly review and correct my updated instructions?<br>
>>>> <a href="https://wiki.fysik.dtu.dk/niflheim/Slurm_installation#build-slurm-rpms" rel="noreferrer" target="_blank">https://wiki.fysik.dtu.dk/niflheim/Slurm_installation#build-slurm-rpms</a><br>
>>>><br>
>>>> That said, what are the main reasons for installing MariaDB 10 in <br>
>>>> stead of the 5.5 delivered by RedHat?  I'm not sure how well SchedMD <br>
>>>> has tested MariaDB 10 with Slurm?<br>
>>>><br>
>>>> /Ole<br>
>>>><br>
>>>><br>
>>>> On 11-11-2019 21:23, William Brown wrote:<br>
>>>>> I have in fact found the answer by looking harder.<br>
>>>>><br>
>>>>> The config.log clearly showed that the build of the test MySQL <br>
>>>>> program failed, which is why it was set to be excluded.<br>
>>>>><br>
>>>>> It failed to link against '-lmariadb'.  It turns out that library is <br>
>>>>> no longer in MariaDB or MariaDB-devel, it is separately packaged in <br>
>>>>> MariaDB-shared.  That may of course be because I have built MariaDB <br>
>>>>> 10.4 from the <a href="http://mariadb.org" rel="noreferrer" target="_blank">mariadb.org</a> site, because CentOS 7 only ships with the <br>
>>>>> extremely old version 5.5.<br>
>>>>><br>
>>>>> Once I installed the missing package it built the RPMs just fine.  <br>
>>>>> However it would be easier to use it linked to static MariaDB <br>
>>>>> libraries, as I now have to installed MariaDB-shared on every server <br>
>>>>> that will run slurmd, i.e. all compute nodes.  I expect that if I <br>
>>>>> looked harder at the build options there may be a way to do this, <br>
>>>>> perhaps with linker flags.<br>
>>>>><br>
>>>>> For now, I can progress.<br>
>>>>><br>
>>>>> Thanks<br>
>>>>><br>
>>>>> William<br>
>>>>><br>
>>>>> -----Original Message-----<br>
>>>>> From: slurm-users <<a href="mailto:slurm-users-bounces@lists.schedmd.com" target="_blank">slurm-users-bounces@lists.schedmd.com</a>> On Behalf <br>
>>>>> Of Ole Holm Nielsen<br>
>>>>> Sent: 11 November 2019 20:02<br>
>>>>> To: <a href="mailto:slurm-users@lists.schedmd.com" target="_blank">slurm-users@lists.schedmd.com</a><br>
>>>>> Subject: Re: [slurm-users] RPM build error - accounting_storage_mysql.so<br>
>>>>><br>
>>>>> Hi,<br>
>>>>><br>
>>>>> Maybe my Slurm Wiki can help you build SLurm on CentOS/RHEL 7? See <br>
>>>>> <a href="https://wiki.fysik.dtu.dk/niflheim/Slurm_installation#build-slurm-rpms" rel="noreferrer" target="_blank">https://wiki.fysik.dtu.dk/niflheim/Slurm_installation#build-slurm-rpms</a><br>
>>>>><br>
>>>>> Note in particular:<br>
>>>>>> Important: Install the MariaDB (a replacement for MySQL) packages <br>
>>>>>> before you build Slurm RPMs (otherwise some libraries will be missing):<br>
>>>>>><br>
>>>>>> yum install mariadb-server mariadb-devel<br>
>>>>><br>
>>>>> /Ole<br>
>>>>><br>
>>>>><br>
>>>>> On 11-11-2019 15:22, William Brown wrote:<br>
>>>>>> Fabio<br>
>>>>>><br>
>>>>>> Did you ever resolve the problem building accounting_storage_mysql.so?<br>
>>>>>><br>
>>>>>> I have the exact same problem with CentOS 7.6, building Slurm 19.05.03.<br>
>>>>>> My command:<br>
>>>>>><br>
>>>>>> rpmbuild -ta slurm-19.05.3-2.tar.bz2 | tee /var/tmp/slurm-build.log<br>
>>>>>><br>
>>>>>> The directory with the plugin source is all there:<br>
>>>>>> /home/users/slurm/rpmbuild/BUILD/slurm-19.05.3-2/src/plugins/accountin<br>
>>>>>> g_storage/mysql, with a Makefile that is the same date/time as the<br>
>>>>>> other accounting_storage alternatives.<br>
>>>>>><br>
>>>>>> In the log I can see:<br>
>>>>>><br>
>>>>>> checking for mysql_config... /usr/bin/mysql_config<br>
>>>>>><br>
>>>>>> Looking at the process of building the RPMs it looks as if it has<br>
>>>>>> skipped trying to create the missing library file, but then expects to<br>
>>>>>> find it in the RPM.<br>
>>>>>><br>
>>>>>> This is what I see when it is building, it builds the<br>
>>>>>> accounting_storage .so files for _fileext, _none and _slurmdbd, but<br>
>>>>>> not for _mysql.  I do have MariaDB-devel 10.4.10 installed<br>
>>>>>><br>
>>>>>> .<br>
>>>>>><br>
>>>>>> .<br>
>>>>>><br>
>>>>>> Making all in mysql<br>
>>>>>><br>
>>>>>> make[5]: Entering directory<br>
>>>>>> `/home/users/slurm/rpmbuild/BUILD/slurm-19.05.3-2/src/plugins/accounting_storage/mysql' <br>
>>>>>><br>
>>>>>><br>
>>>>>> make[5]: Nothing to be done for `all'.<br>
>>>>>><br>
>>>>>> make[5]: Leaving directory<br>
>>>>>> `/home/users/slurm/rpmbuild/BUILD/slurm-19.05.3-2/src/plugins/accounting_storage/mysql' <br>
>>>>>><br>
>>>>>><br>
>>>>>> .<br>
>>>>>><br>
>>>>>> .<br>
>>>>>><br>
>>>>>> Making install in mysql<br>
>>>>>><br>
>>>>>> make[4]: Entering directory<br>
>>>>>> `/home/users/slurm/rpmbuild/BUILD/slurm-19.05.3-2/src/plugins/accounting_storage/mysql' <br>
>>>>>><br>
>>>>>><br>
>>>>>> make[5]: Entering directory<br>
>>>>>> `/home/users/slurm/rpmbuild/BUILD/slurm-19.05.3-2/src/plugins/accounting_storage/mysql' <br>
>>>>>><br>
>>>>>><br>
>>>>>> make[5]: Nothing to be done for `install-data-am'.<br>
>>>>>><br>
>>>>>> make[5]: Leaving directory<br>
>>>>>> `/home/users/slurm/rpmbuild/BUILD/slurm-19.05.3-2/src/plugins/accounting_storage/mysql' <br>
>>>>>><br>
>>>>>><br>
>>>>>> make[4]: Leaving directory<br>
>>>>>> `/home/users/slurm/rpmbuild/BUILD/slurm-19.05.3-2/src/plugins/accounting_storage/mysql' <br>
>>>>>><br>
>>>>>><br>
>>>>>> The error stream shows the problem a little later:<br>
>>>>>><br>
>>>>>> Processing files: slurm-19.05.3-2.el7.x86_64<br>
>>>>>><br>
>>>>>> warning: File not found:<br>
>>>>>> /home/users/slurm/rpmbuild/BUILDROOT/slurm-19.05.3-2.el7.x86_64/home/a<br>
>>>>>> pps/slurm/lib64/slurm/accounting_storage_mysql.so<br>
>>>>>><br>
>>>>>> .<br>
>>>>>><br>
>>>>>> .<br>
>>>>>><br>
>>>>>> Processing files: slurm-slurmdbd-19.05.3-2.el7.x86_64<br>
>>>>>><br>
>>>>>> error: File not found:<br>
>>>>>> /home/users/slurm/rpmbuild/BUILDROOT/slurm-19.05.3-2.el7.x86_64/home/a<br>
>>>>>> pps/slurm/lib64/slurm/accounting_storage_mysql.so<br>
>>>>>><br>
>>>>>> File not found:<br>
>>>>>> /home/users/slurm/rpmbuild/BUILDROOT/slurm-19.05.3-2.el7.x86_64/home/a<br>
>>>>>> pps/slurm/lib64/slurm/accounting_storage_mysql.so<br>
>>>>>><br>
>>>>>> File not found:<br>
>>>>>> /home/users/slurm/rpmbuild/BUILDROOT/slurm-19.05.3-2.el7.x86_64/home/a<br>
>>>>>> pps/slurm/lib64/slurm/accounting_storage_mysql.so<br>
>>>>>><br>
>>>>>> RPM build errors:<br>
>>>>>><br>
>>>>>> I looked at the Makefile for the accounting_storage_mysql as compared<br>
>>>>>> to the Makefile for accounting_storage_slurmdbd to try to understand <br>
>>>>>> them.<br>
>>>>>><br>
>>>>>> This is a selection from the Makefile for mysql:<br>
>>>>>><br>
>>>>>> all: all-am<br>
>>>>>><br>
>>>>>> all-am: Makefile $(LTLIBRARIES)<br>
>>>>>><br>
>>>>>> LTLIBRARIES = $(pkglib_LTLIBRARIES)<br>
>>>>>><br>
>>>>>> #pkglib_LTLIBRARIES = <a href="http://accounting_storage_mysql.la" rel="noreferrer" target="_blank">accounting_storage_mysql.la</a><br>
>>>>>> <<a href="http://accounting_storage_mysql.la" rel="noreferrer" target="_blank">http://accounting_storage_mysql.la</a>><br>
>>>>>><br>
>>>>>> And this is for slurmdbd:<br>
>>>>>><br>
>>>>>> all: all-am<br>
>>>>>><br>
>>>>>> all-am: Makefile $(LTLIBRARIES)<br>
>>>>>><br>
>>>>>> LTLIBRARIES = $(pkglib_LTLIBRARIES)<br>
>>>>>><br>
>>>>>> pkglib_LTLIBRARIES = <a href="http://accounting_storage_slurmdbd.la" rel="noreferrer" target="_blank">accounting_storage_slurmdbd.la</a><br>
>>>>>> <<a href="http://accounting_storage_slurmdbd.la" rel="noreferrer" target="_blank">http://accounting_storage_slurmdbd.la</a>><br>
>>>>>><br>
>>>>>> So I think that the problem is that the definition of<br>
>>>>>> pkglib_LTLIBRARIES is commented out in the accounting_storage_mysql<br>
>>>>>> Makefile, hence nothing to build.<br>
>>>>>><br>
>>>>>> Is that intended?  Is it a consequence of something in my environment?<br>
>><br>
<br>
</blockquote></div>