Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 775170 - app-text/texlive-core-2020-r12 cannot find -lweb2c when using slibtool
Summary: app-text/texlive-core-2020-r12 cannot find -lweb2c when using slibtool
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Alexis Ballier
URL:
Whiteboard:
Keywords: PATCH
: 829814 (view as bug list)
Depends on:
Blocks: slibtool
  Show dependency tree
 
Reported: 2021-03-09 23:58 UTC by Alessandro Barbieri
Modified: 2022-09-23 01:47 UTC (History)
6 users (show)

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


Attachments
texlive-core-2020-r12:20210309-224945.log (texlive-core-2020-r12:20210309-224945.log,803.17 KB, text/plain)
2021-03-09 23:59 UTC, Alessandro Barbieri
Details
texlive-core-2021-web2c-slibtool-fix.patch (texlive-core-2021-web2c-slibtool-fix.patch,2.73 KB, patch)
2022-09-21 14:05 UTC, Michael Orlitzky
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alessandro Barbieri 2021-03-09 23:58:45 UTC
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/app-text/texlive-core-2020-r12/work/texlive-20200406-source/texk/web2c/web2c -I./kpathsea  -I/var/tmp/portage/app-text/texlive-core-2020-r12/work/texlive-20200406-source/texk/web2c/web2c/../..  -Wimplicit -Wreturn-type -Os -pipe -march=native -Os -pipe -march=native -Wimplicit-function-declaration -Wno-error=implicit-function-declaration -c -o main.o /var/tmp/portage/app-text/texlive-core-2020-r12/work/texlive-20200406-source/texk/web2c/web2c/main.c
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/app-text/texlive-core-2020-r12/work/texlive-20200406-source/texk/web2c/web2c -I./kpathsea  -I/var/tmp/portage/app-text/texlive-core-2020-r12/work/texlive-20200406-source/texk/web2c/web2c/../..  -Wimplicit -Wreturn-type -Os -pipe -march=native -Os -pipe -march=native -Wimplicit-function-declaration -Wno-error=implicit-function-declaration -c -o fixwrites.o /var/tmp/portage/app-text/texlive-core-2020-r12/work/texlive-20200406-source/texk/web2c/web2c/fixwrites.c
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/app-text/texlive-core-2020-r12/work/texlive-20200406-source/texk/web2c/web2c -I./kpathsea  -I/var/tmp/portage/app-text/texlive-core-2020-r12/work/texlive-20200406-source/texk/web2c/web2c/../..  -Wimplicit -Wreturn-type -Os -pipe -march=native -Os -pipe -march=native -Wimplicit-function-declaration -Wno-error=implicit-function-declaration -c -o splitup.o /var/tmp/portage/app-text/texlive-core-2020-r12/work/texlive-20200406-source/texk/web2c/web2c/splitup.c
slibtool  --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc -Wimplicit -Wreturn-type -Os -pipe -march=native -Os -pipe -march=native -Wimplicit-function-declaration -Wno-error=implicit-function-declaration  -Wl,-O1 -Wl,--as-needed -o splitup splitup.o -L. -lweb2c 
slibtool: link: x86_64-pc-linux-gnu-gcc splitup.o -Wimplicit -Wreturn-type -Os -pipe -march=native -Os -pipe -march=native -Wimplicit-function-declaration -Wno-error=implicit-function-declaration -Wl,-O1 -Wl,--as-needed -L./.libs -lweb2c -o .libs/splitup
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lweb2c
collect2: error: ld returned 1 exit status
slibtool: exec error upon slbt_exec_link_create_executable(), line 1613: (see child process error messages).
slibtool: < returned to > slbt_exec_link(), line 1902.
make[6]: *** [Makefile:509: splitup] Error 2
make[6]: *** Waiting for unfinished jobs....
slibtool  --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc -Wimplicit -Wreturn-type -Os -pipe -march=native -Os -pipe -march=native -Wimplicit-function-declaration -Wno-error=implicit-function-declaration  -Wl,-O1 -Wl,--as-needed -o fixwrites fixwrites.o -L. -lweb2c 
slibtool: link: x86_64-pc-linux-gnu-gcc fixwrites.o -Wimplicit -Wreturn-type -Os -pipe -march=native -Os -pipe -march=native -Wimplicit-function-declaration -Wno-error=implicit-function-declaration -Wl,-O1 -Wl,--as-needed -L./.libs -lweb2c -o .libs/fixwrites
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lweb2c
collect2: error: ld returned 1 exit status
slibtool: exec error upon slbt_exec_link_create_executable(), line 1613: (see child process error messages).
slibtool: < returned to > slbt_exec_link(), line 1902.
make[6]: *** [Makefile:501: fixwrites] Error 2
make[6]: Leaving directory '/var/tmp/portage/app-text/texlive-core-2020-r12/work/texlive-core-2020_build/texk/web2c/web2c'
make[5]: *** [Makefile:432: all] Error 2
make[5]: Leaving directory '/var/tmp/portage/app-text/texlive-core-2020-r12/work/texlive-core-2020_build/texk/web2c/web2c'
make[4]: *** [Makefile:16966: all-recursive] Error 1
make[4]: Leaving directory '/var/tmp/portage/app-text/texlive-core-2020-r12/work/texlive-core-2020_build/texk/web2c'
make[3]: *** [Makefile:5089: all] Error 2
make[3]: Leaving directory '/var/tmp/portage/app-text/texlive-core-2020-r12/work/texlive-core-2020_build/texk/web2c'
make[2]: *** [Makefile:909: recurse] Error 1
make[2]: Leaving directory '/var/tmp/portage/app-text/texlive-core-2020-r12/work/texlive-core-2020_build/texk'
make[1]: *** [Makefile:486: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/app-text/texlive-core-2020-r12/work/texlive-core-2020_build/texk'
make: *** [Makefile:577: all-recursive] Error 1
 * ERROR: app-text/texlive-core-2020-r12::gentoo failed (compile phase):
 *   emake failed
Comment 1 Alessandro Barbieri 2021-03-09 23:59:50 UTC
Created attachment 690396 [details]
texlive-core-2020-r12:20210309-224945.log

buildlog
Comment 2 orbea 2021-03-16 17:53:16 UTC
I haven't found a fix yet, but this works with GNU libtool because it silently filters out -lweb2c (And -no-undefined).

https://www.tug.org/svn/texlive/trunk/Build/source/texk/web2c/web2c/Makefile.am?revision=57915&view=markup#l58

Removing -lweb2c is not enough because it will then fail on undefined references.
Comment 3 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2021-03-19 07:46:54 UTC
Given how calcified texlive upstream is I am not enthusiastic about slibtool there, it is likely never  to be fixed.
Comment 4 orbea 2021-03-22 19:40:33 UTC
rdlibtool show the command:

  rdlibtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -Wimplicit -Wreturn-type -O2 -pipe -Wl,-O1 -Wl,--as-needed -o fixwrites fixwrites.o -L. -lweb2c

and then the actual command executed:

  rdlibtool: link: x86_64-pc-linux-gnu-gcc fixwrites.o -Wimplicit -Wreturn-type -O2 -pipe -Wl,-O1 -Wl,--as-needed -L./.libs -lweb2c -o .libs/fixwrites

Also proftpd has this same issue. 

https://github.com/proftpd/proftpd/pull/1203
Comment 5 orbea 2021-03-23 14:49:55 UTC
This PR should of been tagged here I thought?

https://github.com/gentoo/gentoo/pull/20069
Comment 6 Toralf Förster gentoo-dev 2021-12-22 16:07:55 UTC
*** Bug 829814 has been marked as a duplicate of this bug. ***
Comment 7 Michael Orlitzky gentoo-dev 2022-01-15 17:19:43 UTC
For the record, since the PR was closed:

This stems from passing `-L. -lweb2c` to libtool to link the non-libtool library libweb2c.a. It could be fixed by using libtool to make libweb2c, but the easy fix is to simply provide the fixed name of the library (libweb2c.a) instead of `-L. -lweb2c`.

A small patch or sed to

  https://tug.org/svn/texlive/trunk/Build/source/texk/web2c/web2c/Makefile.in?view=markup#l419

in src_prepare() should take care of it.
Comment 8 Michael Orlitzky gentoo-dev 2022-01-15 20:06:44 UTC
Upstream report:

https://tug.org/pipermail/tex-k/2022-January/003748.html
Comment 9 orbea 2022-01-16 13:02:23 UTC
The correct solution is to pass libweb2c.la, not libweb2c.a.
Comment 10 Michael Orlitzky gentoo-dev 2022-01-16 14:14:08 UTC
(In reply to orbea from comment #9)
> The correct solution is to pass libweb2c.la, not libweb2c.a.

Well, I agree, but I didn't want to dig through the build system to figure out where .a needs to be changed to .la. Upstream accepted the workaround so at least we'll be able to build it in the meantime.
Comment 11 Michael Orlitzky gentoo-dev 2022-01-16 19:41:11 UTC
Also recorded the slibtool-libtool incompatibility as https://dev.midipix.org/cross/slibtool/issue/49
Comment 12 Michael Orlitzky gentoo-dev 2022-01-18 20:02:38 UTC
This actually needed an additional bit of hacking,

  https://tug.org/svn/texlive?view=revision&revision=61639

But it should be safe(ish) to backport now.
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-18 20:18:02 UTC
(In reply to Michael Orlitzky from comment #12)
> This actually needed an additional bit of hacking,
> 
>   https://tug.org/svn/texlive?view=revision&revision=61639
> 
> But it should be safe(ish) to backport now.

Please feel free (it was on my list to look at but you're better positioned to test it right now anyway)
Comment 14 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2022-01-18 21:48:54 UTC
(In reply to Sam James from comment #13)
> (In reply to Michael Orlitzky from comment #12)
> > This actually needed an additional bit of hacking,
> > 
> >   https://tug.org/svn/texlive?view=revision&revision=61639
> > 
> > But it should be safe(ish) to backport now.
> 
> Please feel free (it was on my list to look at but you're better positioned
> to test it right now anyway)

no point in doing it right now, it can wait up until the next release which is soon in anyway
Comment 15 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2022-01-18 21:51:55 UTC
(In reply to Mikle Kolyada from comment #14)
> (In reply to Sam James from comment #13)
> > (In reply to Michael Orlitzky from comment #12)
> > > This actually needed an additional bit of hacking,
> > > 
> > >   https://tug.org/svn/texlive?view=revision&revision=61639
> > > 
> > > But it should be safe(ish) to backport now.
> > 
> > Please feel free (it was on my list to look at but you're better positioned
> > to test it right now anyway)
> 
> no point in doing it right now, it can wait up until the next release which
> is soon in anyway

(... but thank you for taking it upstream in anywa)
Comment 16 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-09-21 01:07:39 UTC
I don't think anyone is actiely working on TL 2022 so feel free to attach a version which applies cleanly.
Comment 17 Michael Orlitzky gentoo-dev 2022-09-21 14:05:09 UTC
Created attachment 813328 [details, diff]
texlive-core-2021-web2c-slibtool-fix.patch

I had forgotten how much fun the SVN web interface is.
Comment 18 Larry the Git Cow gentoo-dev 2022-09-23 01:47:06 UTC
The bug has been closed via the following commit(s):

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

commit f496f44c04b285b80c7c987eb12ea8d5eb5722a7
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-09-23 01:39:55 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-09-23 01:46:54 +0000

    app-text/texlive-core: backport slibtool patch
    
    May as well given there's nobody working on the 2022 bump right now.
    
    This was also one of the few (notable, at least) packages left which didn't
    build w/ slibtool.
    
    Closes: https://bugs.gentoo.org/775170
    Thanks-to: Michael Orlitzky <mjo@gentoo.org>
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/texlive-core-2021-slibtool.patch         |  98 ++++++
 app-text/texlive-core/texlive-core-2021-r4.ebuild  | 366 +++++++++++++++++++++
 2 files changed, 464 insertions(+)