# mysql 57.37: error: no matching function for call to 'my_atomic_store64'



## ndoody (Apr 25, 2022)

Hi, I have 2 questions really which either could give me a solution.  So normally I am trying to compile and install mysql 57.37 from the source tar, but eventually I run into this compile issue "error: no matching function for call to 'my_atomic_store64'" when Building CXX object sql/CMakeFiles/sql.dir/locks/shared_spin_lock.cc.o.

Now the reason I put this is the ports section is, if I start compiling from ports I don't face this issue?  I had extracted the following cmake options from the port and run them the same, still same issue as above :-

```
-DINSTALL_LAYOUT=FREEBSD \
                -DWITH_BOOST="/usr/local/src/mysql-5.7.37/boost" \
                -DWITH_EDITLINE=system \
                -DWITH_LIBEVENT=system \
                -DWITH_LZ4=system \
                -DWITH_ZLIB=system \
                -DWITH_PROTOBUF=system \
                -DWITH_CURL=system \
                -DINSTALL_MYSQLTESTDIR=0 \
                -DWITH_DEBUG=0 \
-DWITH_SSL=system \
-DWITH_AUTHENTICATION_LDAP=0 \
 -DWITH_EMBEDDED_SERVER="ON"
```

I was wondering if anyone knows what specifically it is in the ports version that resolves this compile issue?  I'm running FreeBSD 11.4.

My second question, if I was to install from ports - how do I control the final installation path?  I have always had my mysql installation in /usr/local/mysql as the base for everything, how can I configure that in the port so it installs over the same location?


----------



## covacat (Apr 25, 2022)

look at the port patches in the files subdir of the port


----------



## ndoody (Apr 26, 2022)

covacat said:


> look at the port patches in the files subdir of the port


Thanks, I gave up somewhat and just installed the port / moved my databases.


----------



## richardtoohey2 (Apr 26, 2022)

If you look at the script at /usr/local/etc/rc.d/mysql-server you'll see some options you can set in /etc/rc.conf (I've NOT tried any of these, but will be soon e.g. want to set a different data directory ... but might just use a symlink for that):
	
	



```
#
# Add the following line to /etc/rc.conf to enable mysql:
# mysql_enable (bool):    Set to "NO" by default.
#            Set it to "YES" to enable MySQL.
# mysql_dbdir (str):    Default to "/var/db/mysql"
#            Base database directory.
# mysql_confdir (str):    Default to "/usr/local/etc/mysql"
#            Base configuration directory.
# mysql_optfile (str):    Server-specific option file.
#            Set it in the rc.conf or default behaviour of
#            `mysqld_safe` itself, will be picking
#            ${mysql_confdir}/my.cnf if it exists.
# mysql_pidfile (str):    Custum PID file path and name.
#            Default to "${mysql_dbdir}/${hostname}.pid".
# mysql_args (str):    Custom additional arguments to be passed
#            to mysqld_safe (default empty).
#
```

Note also that a security update is pending: https://www.vuxml.org/freebsd/add683be-bd76-11ec-a06f-d4c9ef517024.html


----------



## Alain De Vos (Apr 26, 2022)

Or switch to mariadb ?


----------



## SirDice (Apr 26, 2022)

ndoody said:


> I'm running FreeBSD 11.4.


FreeBSD 11.4 is end-of-life (the entire 11 branch is EoL).



richardtoohey2 said:


> If you look at the script at /usr/local/etc/rc.d/mysql-server you'll see some options you can set in /etc/rc.conf (I've NOT tried any of these, but will be soon e.g. want to set a different data directory


`mysql_dbdir` does exactly what you think it does.


----------

