{"id":6819,"date":"2020-08-01T12:17:05","date_gmt":"2020-08-01T17:17:05","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=6819"},"modified":"2021-06-11T22:35:37","modified_gmt":"2021-06-12T03:35:37","slug":"building-lib_mysqludf_sys-on-fedora-31","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=6819","title":{"rendered":"Building LIB_MYSQLUDF_SYS On Fedora 31"},"content":{"rendered":"<p>I moved my MariaDB server to a new host and could not follow my previously working instructions to build <a href=\"https:\/\/github.com\/mysqludf\/lib_mysqludf_sys.git\" target=\"_blank\" rel=\"noopener\">lib_mysqludf_sys<\/a>. The error indicated that my_atomic.h was not found.<\/p>\n<pre>[lisa@server03 lib_mysqludf_sys]# make\r\ngcc -fPIC -Wall -I\/usr\/include\/mysql\/server -I. -shared lib_mysqludf_sys.c -o \/usr\/lib64\/mariadb\/plugin\/\/lib_mysqludf_sys.so\r\nIn file included from \/usr\/include\/mysql\/server\/my_sys.h:34,\r\nfrom lib_mysqludf_sys.c:41:\r\n\/usr\/include\/mysql\/server\/my_pthread.h:26:10: fatal error: my_atomic.h: No such file or directory\r\n26 | #include &lt;my_atomic.h&gt;\r\n| ^~~~~~~~~~~~~\r\ncompilation terminated.\r\nmake: *** [Makefile:4: install] Error 1<\/pre>\n<p>The missing file is located in \/usr\/include\/mysql\/server\/private &#8230; so I had to include that file in the gcc command as well. My new Makefile reads as follows:<\/p>\n<pre>[lisa@server03 lib_mysqludf_sys]# cat Makefile\r\nLIBDIR=\/usr\/lib64\/mariadb\/plugin\/\r\n\r\ninstall:\r\ngcc -fPIC -Wall -I\/usr\/include\/mysql\/server -I\/usr\/include\/mysql\/server\/private -I. -shared lib_mysqludf_sys.c -o $(LIBDIR)\/lib_mysqludf_sys.so<\/pre>\n<p>I was then able to make and use install.sh to load it into MariaDB.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I moved my MariaDB server to a new host and could not follow my previously working instructions to build lib_mysqludf_sys. The error indicated that my_atomic.h was not found. [lisa@server03 lib_mysqludf_sys]# make gcc -fPIC -Wall -I\/usr\/include\/mysql\/server -I. -shared lib_mysqludf_sys.c -o \/usr\/lib64\/mariadb\/plugin\/\/lib_mysqludf_sys.so In file included from \/usr\/include\/mysql\/server\/my_sys.h:34, from lib_mysqludf_sys.c:41: \/usr\/include\/mysql\/server\/my_pthread.h:26:10: fatal error: my_atomic.h: No such file or &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[47,1068,804,56,1067,61],"class_list":["post-6819","post","type-post","status-publish","format-standard","hentry","category-system-administration","tag-fedora","tag-lib_mysqludf_sys","tag-mariadb","tag-mysql","tag-udf","tag-zoneminder"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/6819","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6819"}],"version-history":[{"count":2,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/6819\/revisions"}],"predecessor-version":[{"id":7933,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/6819\/revisions\/7933"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6819"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6819"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6819"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}