There are a few mistakes in libtool usage in lua-5.1-make.patch, which bite me in Prefix on AIX, because shared/static libraries are different there, although properly handled by libtool. *) Why is 'liblua.a' explicitly installed in addition to 'liblua.la'? AIX' shared libs are inside 'lib.a' - explicitly creating/installing 'lib.a' nukes the "shared library" (whatever this means on AIX). And on Linux, libtool installs both shared and static library anyway. *) Do not use '.o' with libtool, only use '.lo' - libtool knows best. On AIX, libtool does not create "*.o", just ".libs/*.o" - even for static libraries (there's no difference between pic and non-pic). *) '-Wl,-E' is not portable, use libtool's '-export-dynamic' flag instead. We do/can not use GNU linker on AIX/others.
Created attachment 182888 [details, diff] patch creating new lua-5.1-make-r1.patch and lua-5.1-make_static-r1.patch The *-r1.patch files are to not break existing ebuilds also using same patchfiles.
Created attachment 182889 [details, diff] real diff between *-r0.patch and *-r1.patch
hmm, dunno why i haven't seen this bug. i have fixed the last two issues locally and will upload them shortly. Still thinking about implications of the first suggestion. But i hope i'll be able to release a 5.1.4-r1 pretty soon with your fixes in it. Thanks!
Doh, my libtool foo is still very weak. I now discovered i could even remove the building of the static liblua.a and libtool will take care of that. I just didn't know that. Well i guess you're right - libtool knows it best. The reason for this complicated build process was that there was a request to build not only shared but static libs, too. So i obeyed and installed static libs alongside. Please check lua-5.1.4-r1 which will be on the mirrors shortly.
Just committed lua-5.1.4-r1. Let's see if it helps. If i failed at it, please reopen this bug.
Still doesn't work as expected on AIX. Btw: Why is 'luac' linked statically regardless of 'static' useflag (which only applies to 'lua') ?
Created attachment 186317 [details, diff] patch for files used in lua-5.1.4-r1.ebuild On AIX, I do have these problems, described along the patch hunks: Index: files/lua-5.1-make-r1.patch Hunk 1: Even if the make-target commands are overwritten, the dependencies still apply. But libtool does not create *.o in current directory, it just has .libs/*.o. These single-line-hunks rename the existing targets, so they don't infer with the gentoo-added ones. This also fixes that makefile-warnings 'overriding commands for target ...'. Hunk 2: Link '$(LIB_NAME)' instead of '-llua'. This isn't a problem per se (although I'm missing the '-L.'), but for consistency with the other binaries. Hunk 3: Building $(LIB_NAME) also creates the static library, no need to depend on liblua.a explicitly. There is no liblua.a in current directory, just .libs/liblua.a, handled by libtool. Index: files/lua-5.1-make_static-r1.patch Updated to apply again, no real difference otherways.
applied your patch with the latest commit. thanks for your patience!
Works now, thank you!