Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 765712 - dev-lang/lua undefined references when build with sys-devel/slibtool
Summary: dev-lang/lua undefined references when build with sys-devel/slibtool
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords: PATCH
: 778779 (view as bug list)
Depends on:
Blocks: slibtool
  Show dependency tree
 
Reported: 2021-01-17 03:22 UTC by orbea
Modified: 2022-09-23 05:53 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info.txt,5.47 KB, text/plain)
2021-01-17 03:22 UTC, orbea
Details
build log for 5.1.5-r4 (lua-5.1.5-r4.log,20.58 KB, text/x-log)
2021-01-17 03:23 UTC, orbea
Details
build log for 5.1.5-r106 (lua-5.1.5-r106.log,20.62 KB, text/x-log)
2021-01-17 03:24 UTC, orbea
Details
build log for 5.2.4-r3 (lua-5.2.4-r3.log,49.88 KB, text/x-log)
2021-01-17 03:24 UTC, orbea
Details
build log for 5.3.6-r2 (lua-5.3.6-r2.log,53.17 KB, text/x-log)
2021-01-17 03:24 UTC, orbea
Details
build log for 5.5.2-r1 (lua-5.4.2-r1.log,52.18 KB, text/x-log)
2021-01-17 03:25 UTC, orbea
Details
patch for 5.1.4-r4 (lua-5.1-r4-slibtool.patch,592 bytes, patch)
2021-01-17 03:26 UTC, orbea
Details | Diff
patch for 5.1.5-r105 (lua-5.1-r105-slibtool.patch,597 bytes, patch)
2021-01-17 03:26 UTC, orbea
Details | Diff
Patch for 5.2.4-r3 and 5.3.6-r2 (lua-5.2-slibtool.patch,574 bytes, patch)
2021-01-17 03:27 UTC, orbea
Details | Diff
patch for 5.4.2-r1 (lua-5.4-slibtool.patch,573 bytes, patch)
2021-01-17 03:28 UTC, orbea
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description orbea 2021-01-17 03:22:27 UTC
Created attachment 683230 [details]
emerge --info

When building any lua version with slibtool the build fails.

For lua-5.1:

  MAKEFLAGS='LIBTOOL=slibtool' emerge -av1 dev-lang/lua

For other versions:

  MAKEFLAGS='LIBTOOL=rlibtool' emerge -av1 dev-lang/lua

This is because unlike other distros gentoo patches lua to use libtool, but GNU libtool silently ignores undefined references while slibtool exposes them.

This can be fixed by patching the builds to account for the undefined references.
Comment 1 orbea 2021-01-17 03:23:21 UTC
Created attachment 683233 [details]
build log for 5.1.5-r4
Comment 2 orbea 2021-01-17 03:24:03 UTC
Created attachment 683236 [details]
build log for 5.1.5-r106
Comment 3 orbea 2021-01-17 03:24:25 UTC
Created attachment 683239 [details]
build log for 5.2.4-r3
Comment 4 orbea 2021-01-17 03:24:45 UTC
Created attachment 683242 [details]
build log for 5.3.6-r2
Comment 5 orbea 2021-01-17 03:25:03 UTC
Created attachment 683245 [details]
build log for 5.5.2-r1
Comment 6 orbea 2021-01-17 03:26:00 UTC
Created attachment 683248 [details, diff]
patch for 5.1.4-r4
Comment 7 orbea 2021-01-17 03:26:53 UTC
Created attachment 683251 [details, diff]
patch for 5.1.5-r105
Comment 8 orbea 2021-01-17 03:27:33 UTC
Created attachment 683254 [details, diff]
Patch for 5.2.4-r3 and 5.3.6-r2
Comment 9 orbea 2021-01-17 03:28:04 UTC
Created attachment 683257 [details, diff]
patch for 5.4.2-r1
Comment 10 tt_1 2021-03-27 11:49:06 UTC
eme
Comment 11 tt_1 2021-03-27 11:51:29 UTC
I'm sorry for the double post, but here is what I wanted to say:

the patch doesn't work for me. how to reproduce:

emerge slibtool, remove libtool, then put your patch into /etc/portage/patches/dev-lang/lua-5.2.4 and fire up emerge: 


 MAKEFLAGS='LIBTOOL=rlibtool' emerge -av1 dev-lang/lua:5.2

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] dev-lang/lua-5.2.4-r3:5.2::gentoo  USE="deprecated readline -test -test-complete" ABI_X86="(64) -32 (-x32)" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No] 

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) dev-lang/lua-5.2.4-r3::gentoo
 * lua-5.2.4.tar.gz BLAKE2B SHA512 size ;-) ...                                                                                                                                  [ ok ]
>>> Unpacking source...
>>> Unpacking lua-5.2.4.tar.gz to /var/tmp/portage/dev-lang/lua-5.2.4-r3/work
>>> Source unpacked in /var/tmp/portage/dev-lang/lua-5.2.4-r3/work
>>> Preparing source in /var/tmp/portage/dev-lang/lua-5.2.4-r3/work/lua-5.2.4 ...
 * Applying lua-5.2.4-make.patch ...
patching file Makefile
Hunk #1 succeeded at 12 with fuzz 1 (offset 1 line).
Hunk #2 succeeded at 112 with fuzz 1 (offset -15 lines).
patching file src/Makefile
Hunk #3 succeeded at 62 (offset 8 lines).
Hunk #4 succeeded at 65 (offset 8 lines).                                                                                                                                        [ ok ]
 * Applying 0001-fix-slibtool.patch ...                                                                                                                                          [ ok ]
 * User patches applied.
 * Running eautoreconf in '/var/tmp/portage/dev-lang/lua-5.2.4-r3/work/lua-5.2.4' ...
 * Running libtoolize --install --copy --force ...                                                                                                                               [ !! ]

 * Failed Running libtoolize !
 * 
 * Include in your bugreport the contents of:
 * 
 *   /var/tmp/portage/dev-lang/lua-5.2.4-r3/temp/libtoolize.out

 * ERROR: dev-lang/lua-5.2.4-r3::gentoo failed (prepare phase):
 *   Failed Running libtoolize !
 * 
 * Call stack:
 *     ebuild.sh, line  125:  Called src_prepare
 *   environment, line 2104:  Called eautoreconf
 *   environment, line  867:  Called _elibtoolize '--auto-ltdl' '--install' '--copy' '--force'
 *   environment, line  403:  Called autotools_run_tool 'libtoolize' '--install' '--copy' '--force'
 *   environment, line  581:  Called die
 * The specific snippet of code:
 *           die "Failed Running $1 !";
 * 
 * If you need support, post the output of `emerge --info '=dev-lang/lua-5.2.4-r3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-lang/lua-5.2.4-r3::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-lang/lua-5.2.4-r3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-lang/lua-5.2.4-r3/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-lang/lua-5.2.4-r3/work/lua-5.2.4'
 * S: '/var/tmp/portage/dev-lang/lua-5.2.4-r3/work/lua-5.2.4'
Comment 12 tt_1 2021-03-27 11:52:40 UTC
and here is the output from the libtoolize log:


cat /var/tmp/portage/dev-lang/lua-5.2.4-r3/temp/libtoolize.out
***** libtoolize *****
***** PWD: /var/tmp/portage/dev-lang/lua-5.2.4-r3/work/lua-5.2.4
***** libtoolize --install --copy --force

*** missing command: libtoolize
Comment 13 orbea 2021-03-27 14:00:34 UTC
> I'm sorry for the double post, but here is what I wanted to say:

Your test was wrong, do not remove libtool, slibtool does not have a replacement for libtoolize yet.
Comment 14 Toralf Förster gentoo-dev 2021-03-27 19:04:34 UTC
*** Bug 778779 has been marked as a duplicate of this bug. ***
Comment 15 tt_1 2021-03-28 10:45:46 UTC
(In reply to orbea from comment #13)
> > I'm sorry for the double post, but here is what I wanted to say:
> 
> Your test was wrong, do not remove libtool, slibtool does not have a
> replacement for libtoolize yet.

well okay, then there is no reason to test this out before there is a replacement for libtoolize available through slibtool 

thanks the hint though
Comment 16 orbea 2021-03-28 14:01:46 UTC
> well okay, then there is no reason to test this out before there is a replacement for libtoolize available through slibtool 

I strongly disagree, this is a real bug regardless if GNU libtool hides it or not. Using slibtool has a lot of benefits over libtool even if libtoolize is still required.
Comment 17 sr20det 2021-04-21 19:25:47 UTC
why autotools?  http://ix.io/2WT7 works fine
Comment 18 orbea 2022-07-20 17:44:07 UTC
Can we please get some action on this issue?
Comment 19 Larry the Git Cow gentoo-dev 2022-09-05 08:20:09 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=678e40a0f28403a4e6ef76695e33429fe6cefe00

commit 678e40a0f28403a4e6ef76695e33429fe6cefe00
Author:     David Seifert <soap@gentoo.org>
AuthorDate: 2022-09-05 08:20:00 +0000
Commit:     David Seifert <soap@gentoo.org>
CommitDate: 2022-09-05 08:20:00 +0000

    dev-lang/lua: update EAPI 7 -> 8
    
    Closes: https://github.com/gentoo/gentoo/pull/27061
    Bug: https://bugs.gentoo.org/472230
    Bug: https://bugs.gentoo.org/627330
    Bug: https://bugs.gentoo.org/689598
    Bug: https://bugs.gentoo.org/706378
    Bug: https://bugs.gentoo.org/765712
    Bug: https://bugs.gentoo.org/791451
    Bug: https://bugs.gentoo.org/834911
    Signed-off-by: David Seifert <soap@gentoo.org>

 dev-lang/lua/Manifest              |  1 +
 dev-lang/lua/lua-5.4.4-r100.ebuild | 39 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=818a17909877d016c6baa9ab04ea875e98fd80bb

commit 818a17909877d016c6baa9ab04ea875e98fd80bb
Author:     David Seifert <soap@gentoo.org>
AuthorDate: 2022-09-05 08:19:59 +0000
Commit:     David Seifert <soap@gentoo.org>
CommitDate: 2022-09-05 08:19:59 +0000

    dev-lang/lua: update EAPI 7 -> 8
    
    Bug: https://bugs.gentoo.org/472230
    Bug: https://bugs.gentoo.org/627330
    Bug: https://bugs.gentoo.org/689598
    Bug: https://bugs.gentoo.org/706378
    Bug: https://bugs.gentoo.org/765712
    Bug: https://bugs.gentoo.org/791451
    Bug: https://bugs.gentoo.org/834911
    Signed-off-by: David Seifert <soap@gentoo.org>

 dev-lang/lua/Manifest              |  1 +
 dev-lang/lua/lua-5.3.6-r100.ebuild | 39 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fab25cc8ac44fa73bb14821560ac1ba1829447df

commit fab25cc8ac44fa73bb14821560ac1ba1829447df
Author:     David Seifert <soap@gentoo.org>
AuthorDate: 2022-09-05 08:19:58 +0000
Commit:     David Seifert <soap@gentoo.org>
CommitDate: 2022-09-05 08:19:58 +0000

    dev-lang/lua: add 5.1.6
    
    * add two patches from Debian
    
    Bug: https://bugs.gentoo.org/472230
    Bug: https://bugs.gentoo.org/627330
    Bug: https://bugs.gentoo.org/689598
    Bug: https://bugs.gentoo.org/706378
    Bug: https://bugs.gentoo.org/765712
    Bug: https://bugs.gentoo.org/791451
    Bug: https://bugs.gentoo.org/834911
    Signed-off-by: David Seifert <soap@gentoo.org>

 dev-lang/lua/Manifest                              |  1 +
 dev-lang/lua/files/5.1/0001-extern_C.patch         | 20 +++++++++
 ...02-Fix-stack-overflow-in-vararg-functions.patch | 17 ++++++++
 dev-lang/lua/lua-5.1.6.ebuild                      | 49 ++++++++++++++++++++++
 4 files changed, 87 insertions(+)
Comment 20 orbea 2022-09-23 05:53:35 UTC
This now works with:

dev-lang/lua-5.1.5-r200
dev-lang/lua-5.3.6-r102
dev-lang/lua-5.4.4-r102

Thanks!