You are not logged in.
Hi all,
I'm trying to build a static version of my executable to run in an environment where the library versions are not easily controllable (AWS Lambda).
In order to create a static executable, I need static libraries. Since my code needs to connect to a MySQL database, I need a static version of libmysqlclient.
I cannot however work out how to compile this. I downloaded the PKGBUILD for mariadb and added this line near the top:
options=('staticlibs')
However when I compile it with makepkg, it always shows the step where it deletes static libraries, so although the libmysqlclient.a file gets built, it never makes it into libmariadbclient*.xz so when I go to compile my own code, it complains that it can't find the (static) MySQL library.
What am I doing wrong? Why does "options=('staticlibs')" not do what it says and preserve the static libraries?
EDIT: Forgot to say I already removed these lines but they didn't help:
# remove static libraries
rm "$pkgdir"/usr/lib/*.a
Last edited by Malvineous (2017-10-06 02:34:57)
Offline
Figured out the problem. Turns out there's a line for some of the packages that overrides the options=() variable, so my global "staticlibs" option set at the start of the PKGBUILD was getting removed.
Removing that (along with the command that deleted *.a) fixed the problem.
Last edited by Malvineous (2017-10-06 02:35:23)
Offline