Summary: | devel/e2fsprogs-libss: fails to build with /bin/sh: compile_et: not found | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Felix Palmen <zirias> | ||||||||||||
Component: | Individual Port(s) | Assignee: | Matthias Andree <mandree> | ||||||||||||
Status: | Closed FIXED | ||||||||||||||
Severity: | Affects Only Me | CC: | bjk, fernape, kaduk-fbsd, mandree, osidorkin, portmgr, tech-lists | ||||||||||||
Priority: | --- | Flags: | mandree:
maintainer-feedback-
|
||||||||||||
Version: | Latest | ||||||||||||||
Hardware: | Any | ||||||||||||||
OS: | Any | ||||||||||||||
Bug Depends on: | |||||||||||||||
Bug Blocks: | 261217 | ||||||||||||||
Attachments: |
|
Created attachment 223796 [details]
workaround for build error
I made it build successfully with this patch, but I think it's the wrong thing to do. libcom_err.so will still be installed by e2fsprogs and yet be linked here…
Thanks for the report. The compile_et that I was expecting to be used is /usr/bin/compile_et, which is only built conditionally on MK_KERBEROS_SUPPORT. Since January 2020 (0ce9d0af5b7fdfde335c753cb3310650a9d31d09) MK_KERBEROS_SUPPORT is forced off when KERBEROS itself is off, so if you are disabling either in your environment then this behavior for the port build is unsurprising. I will take a look at what the best option is; it may well just be marking the port as not usable when /usr/bin/compile_et is not available. Aha! Thanks for the pointer. I had no idea compile_et is related to kerberos. Indeed, I build my base without kerberos and use MIT krb5 from ports. Will have a look whether compile_et is provided there… Would this also solve the other problem I came across (circular dependency around libcom_err)? Or did I misunderstand something there? (In reply to Felix Palmen from comment #3) > I had no idea compile_et is related to kerberos. Indeed, I build my base without kerberos and use MIT krb5 from ports. Will have a look whether compile_et is provided there… MIT krb5 does have a compile_et script in its build (bourne shell and awk), and it's in the pkg-plist for the FreeBSD port, so I think it should be suitable for this purpose. > Would this also solve the other problem I came across (circular dependency around libcom_err)? Or did I misunderstand something there? I think so -- despite the name being for a "common error-reporting library", there are quite a number of libcom_err implementations around, including from the major kerberos implementations. Created attachment 224472 [details]
Add option for kerberos support from MIT krb5
Ok, this enabled me to have a better solution for my usecase. I tried to support heimdal from ports as well, but unfortunately, this doesn't install compile_et. Another option would be to also support the in-tree tools, but this would require more change, because right now, the included libcom_err is installed with sysutils/e2fsprogs, so this would create the circular dependency again…
Created attachment 225529 [details]
use local compile_et in build
If it's solely about building the e2fsprogs-libss port, we might leverage the shipped lib/et/compile_et, as proposed in this patch.
This would require tests of its users and a PORTREVISION bump if applied, which my patch does not currently do.
claiming bug after maintainer timeout A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=8e6ae6036714dc541ce5b31aad23bf568e422710 commit 8e6ae6036714dc541ce5b31aad23bf568e422710 Author: Matthias Andree <mandree@FreeBSD.org> AuthorDate: 2021-12-14 23:03:20 +0000 Commit: Matthias Andree <mandree@FreeBSD.org> CommitDate: 2021-12-15 00:26:28 +0000 devel/e2fsprogs-libss: use local compile_et, in order to avoid build failures when Kerberos support is missing. PR: 254751 Reported by: Felix Palmen Approved by: maintainer timeout (kaduk-fbsd@mit.edu, 6 months) devel/e2fsprogs-libss/Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) maintainer timeout 6 months Sorry for the late response. I didn't build that package for a while... This fix unfortunately isn't complete, you will get a linker error later, trying to link libcom_err: ---- (cd elfshared; cc -o libss.so.2.0 \ -L../../../lib -pthread -fstack-protector-strong -fPIC -shared \ -Wl,-soname,libss.so.2 ss_err.o std_rqs.o invocation.o help.o execute_cmd.o listen.o parse.o error.o prompt.o request_tbl.o list_rqs.o pager.o requests.o data.o get_readline.o -lcom_err -ldl) ld: error: unable to find library -lcom_err cc: error: linker command failed with exit code 1 (use -v to see invocation) ---- I think if you don't use base kerberos, this lib should be linked from the package providing kerberos as well. Of course, you will only see the error when your base was built without kerberos. Created attachment 231038 [details] patch to build and use local libcom_err.a and steal maintainership from Ben Kaduk (In reply to Felix Palmen from comment #10) Thanks for the test, reopening. I am proposing a patch, Felix, please test if that works for you, then I can rebase and push it to the FreeBSD repo. Since Ben Kaduk is MIA and I haven't seen any mail from him in many months, we've had a previous maintainer timeout, I am claiming the port maintainership and adding Cc: portmgr. Rationale inside https://bugs.freebsd.org/bugzilla/attachment.cgi?id=231038&action=diff sorry, this is the right link: https://bz-attachments.freebsd.org/attachment.cgi?id=231038 (In reply to Matthias Andree from comment #11) > patch to build and use local libcom_err.a This builds fine, thanks! Still a bit weird to statically link exactly the same library that e2fsprogs will install as a shared lib :o but that's probably the cleanest solution if this must be a separate port :) Hi mandree@ the last patch was never committed, is there anything preventing us from doing it? fernape@ it's not mature yet, let us fix things first. Felix is right that it is strange to link libcom_err statically when we could instead depend on sysutils/e2fsprogs's libcom_err. (In reply to Fernando Apesteguía from comment #15) why are you saying the previous patch was not committed? https://cgit.freebsd.org/ports/commit/?id=8e6ae6036714dc541ce5b31aad23bf568e422710 This is a bit messy, because digging deeper, we find a dependency cycle. 1. e2fsprogs-libss installs a header ss_err.h that depends on et/libcom_err.h - which gets installed by e2fsprogs. 2. e2fsprogs depends on libss e2fsprogs-libss itself. One way of breaking the cycle at link-time is the static link. But ss_err.h would still be unable to #include <et/com_err.h> at run-time unless e2fsprogs is installed and in the -I path. So no good solution. Another way might be splitting out the local com_err out of e2fsprogs into a separate port that e2fsprogs-libss and e2fsprogs could depend on. That would add one more port. A third way is reintegrating libss with e2fsprogs, because there are no other ports that require e2fsprogs-libss. So let's go that way. *** Bug 261217 has been marked as a duplicate of this bug. *** A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=29b349b2dba2a188140cb73fe451a9b9793178d4 commit 29b349b2dba2a188140cb73fe451a9b9793178d4 Author: Matthias Andree <mandree@FreeBSD.org> AuthorDate: 2022-01-16 12:09:14 +0000 Commit: Matthias Andree <mandree@FreeBSD.org> CommitDate: 2022-01-17 22:17:48 +0000 devel/e2fsprogs-libss: merge to sysutils/e2fsprogs This is to break dependency cycles between e2fsprogs-libss and e2fsprogs (see 254751 comment #18 for details), and to avoid creating yet another split-out port, then for e2fsprogs's libcom_err. Bump PORTREVISION of the four e2fsprogs consumers to flush out their e2fsprogs-libss dependency records. PR: 254751 Reported by: Felix Palmen PR: 261217 Reported by: tech-lists@zyxst.net Fixes: 8e6ae60 devel/e2fsprogs-libss: use local compile_et... Approved by: prior maintainer timeout (Ben Kaduk, 7 months) on 254751 MOVED | 1 + devel/Makefile | 1 - devel/e2fsprogs-libss/Makefile (gone) | 33 ---------------------- devel/e2fsprogs-libss/pkg-descr (gone) | 5 ---- devel/e2fsprogs-libss/pkg-plist (gone) | 11 -------- sysutils/e2fsprogs/Makefile | 7 +++-- .../e2fsprogs}/files/fix-ss_err.h.sed | 0 sysutils/e2fsprogs/files/unwanted | 13 --------- sysutils/e2fsprogs/pkg-plist | 13 +++++++++ sysutils/e2tools/Makefile | 2 +- sysutils/fusefs-ext2/Makefile | 2 +- sysutils/unetbootin/Makefile | 1 + sysutils/vzvol/Makefile | 2 +- 13 files changed, 22 insertions(+), 69 deletions(-) This commit should fix both PRs, by reintegrating e2fsprogs-libss and its various build hacks back into e2fsprogs, and should be robust against systems without Kerberos in base. Felix and tech-lists@, please test, and if it still does not work, holler. (In reply to Matthias Andree from comment #21) Hi, confirm it's fixed, many thanks! (In reply to Matthias Andree from comment #17) Hi Matthias, Thanks for fixing this. I was referring to the second patch. The one in which you take maintainership (https://bz-attachments.freebsd.org/attachment.cgi?id=231038). Cheers. Thanks, that looks like the sanest solution! :) Unfortunately, it causes a problem that looks to me like a little regression: pkg-static: krb5-1.19.2 conflicts with e2fsprogs-1.46.4_2 (installs files into the same place). Problematic file: /usr/local/man/man3/com_err.3.gz e2fsprogs didn't install that manpage before (but DID install the shared lib), I can only assume because of that very conflict with krb5 packages... A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=cee87a1eefc85598a47f07fed7052b118e2992b1 commit cee87a1eefc85598a47f07fed7052b118e2992b1 Author: Matthias Andree <mandree@FreeBSD.org> AuthorDate: 2022-01-18 19:01:55 +0000 Commit: Matthias Andree <mandree@FreeBSD.org> CommitDate: 2022-01-18 19:03:32 +0000 sysutils/e2fsprogs: resolve krb5 conflict with man3/com_err.3.gz PR: 254751 Reported by: Felix Palmen sysutils/e2fsprogs/Makefile | 6 ++++-- sysutils/e2fsprogs/files/patch-lib_et_com__err.3 (new) | 11 +++++++++++ sysutils/e2fsprogs/pkg-plist | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) (In reply to Fernando Apesteguía from comment #23) Fernando, yes - it was somehow "incomplete"... that's why I hadn't committed right away. A commit in branch 2022Q1 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=85c96d2be272fbb91f714b2241d694db90505004 commit 85c96d2be272fbb91f714b2241d694db90505004 Author: Matthias Andree <mandree@FreeBSD.org> AuthorDate: 2022-01-18 19:01:55 +0000 Commit: Matthias Andree <mandree@FreeBSD.org> CommitDate: 2022-01-27 23:55:51 +0000 sysutils/e2fsprogs: resolve krb5 conflict with man3/com_err.3.gz PR: 254751 Reported by: Felix Palmen (cherry picked from commit cee87a1eefc85598a47f07fed7052b118e2992b1) sysutils/e2fsprogs/Makefile | 6 ++++-- sysutils/e2fsprogs/files/patch-lib_et_com__err.3 (new) | 11 +++++++++++ sysutils/e2fsprogs/pkg-plist | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) A commit in branch 2022Q1 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=69d35222fd84c30922c302fb08873d371cea333e commit 69d35222fd84c30922c302fb08873d371cea333e Author: Matthias Andree <mandree@FreeBSD.org> AuthorDate: 2022-01-16 12:09:14 +0000 Commit: Matthias Andree <mandree@FreeBSD.org> CommitDate: 2022-01-27 23:55:46 +0000 devel/e2fsprogs-libss: merge to sysutils/e2fsprogs This is to break dependency cycles between e2fsprogs-libss and e2fsprogs (see 254751 comment #18 for details), and to avoid creating yet another split-out port, then for e2fsprogs's libcom_err. Bump PORTREVISION of the four e2fsprogs consumers to flush out their e2fsprogs-libss dependency records. PR: 254751 Reported by: Felix Palmen PR: 261217 Reported by: tech-lists@zyxst.net Fixes: 8e6ae60 devel/e2fsprogs-libss: use local compile_et... Approved by: prior maintainer timeout (Ben Kaduk, 7 months) on 254751 (cherry picked from commit 29b349b2dba2a188140cb73fe451a9b9793178d4) MOVED | 1 + devel/Makefile | 1 - devel/e2fsprogs-libss/Makefile (gone) | 33 ---------------------- devel/e2fsprogs-libss/pkg-descr (gone) | 5 ---- devel/e2fsprogs-libss/pkg-plist (gone) | 11 -------- sysutils/e2fsprogs/Makefile | 7 +++-- .../e2fsprogs}/files/fix-ss_err.h.sed | 0 sysutils/e2fsprogs/files/unwanted | 13 --------- sysutils/e2fsprogs/pkg-plist | 13 +++++++++ sysutils/e2tools/Makefile | 2 +- sysutils/fusefs-ext2/Makefile | 2 +- sysutils/unetbootin/Makefile | 1 + sysutils/vzvol/Makefile | 2 +- 13 files changed, 22 insertions(+), 69 deletions(-) A very belated comment to say thank you to Matthias and Felix for your efforts, it's much appreciated while I've been preoccupied by other things. |
Created attachment 223795 [details] poudriere build log FreeBSD 13.0-RC5, building with poudriere for i386, building fails with this: ===> Building for e2fsprogs-libss-1.46.2 (cd /wrkdirs/usr/ports/devel/e2fsprogs-libss/work/e2fsprogs-1.46.2/lib/ss && compile_et ss_err.et && /usr/bin/sed -i.bak -f /usr/ports/devel/e2fsprogs-libss/files/fix-ss_err.h.sed ss_err.h) /bin/sh: compile_et: not found *** Error code 127 Full poudriere log attached. Trying to fix this myself, I found I can build and use compile_et from inside the source tree itself, which leads to the next problem: libcom_err is required. This is part of e2fsprogs package, which *depends* on e2fsprogs-libss.