Bug 273836 - net-p2p/transmission: failed to build transmission-full-4.0.4
Summary: net-p2p/transmission: failed to build transmission-full-4.0.4
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Robert Clausecker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-15 23:57 UTC by Igor Pavlov
Modified: 2023-09-22 05:12 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (mondo.debater_0q)


Attachments
build log (14.93 KB, application/x-gzip)
2023-09-15 23:57 UTC, Igor Pavlov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Pavlov 2023-09-15 23:57:24 UTC
Created attachment 244909 [details]
build log

FreeBSD 13.2-RELEASE-p2

...
====> Compressing man pages (compress-man)
===> Staging rc.d startup script(s)
===>  Installing for transmission-full-4.0.4
===>  Checking if transmission-full is already installed
===>   Registering installation for transmission-full-4.0.4
pkg-static: Unable to access file /usr/ports/net-p2p/transmission/work-full/stage/usr/local/share/metainfo/transmission-gtk.metainfo.xml:No such file or directory
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/net-p2p/transmission
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/net-p2p/transmission
*** Error code 1

Stop.
make: stopped in /usr/ports/net-p2p/transmission
Comment 1 Robert Clausecker freebsd_committer freebsd_triage 2023-09-16 04:31:34 UTC
Hm... this built when I tested it.  Are your dependencies up to date?
Comment 2 Igor Pavlov 2023-09-16 10:00:36 UTC
All ports are up to date.
There was no issue with the previous (3.x) version of transmission.
Comment 3 Rafe 2023-09-16 10:17:06 UTC
(In reply to Igor Pavlov from comment #2)
Thanks for the bug report! 

Did you configure any options for the port?

I just rebuilt -full with poudriere and did not have this issue. I will dig into your build log early next week to see what I can figure out.
Comment 4 Rafe 2023-09-16 10:45:45 UTC
(In reply to Igor Pavlov from comment #2)
Also, is anything in your make.conf? The log shows you’re building fewer components than should be the case for -full.
Comment 5 Igor Pavlov 2023-09-16 10:58:20 UTC
> cat /etc/rc.conf
KERNCONF=GENERIC
MACHINE_CPUARCH?=amd64
CPUTYPE?=broadwell
OPTIONS_UNSET=X11 DEBUG CUPS NLS
OPTIONS_SET=OPTIMIZED_CFLAGS
MK_PROFILE=no
OPTIMIZED_CFLAGS=YES
BUILD_OPTIMIZED=YES
BUILD_STATIC=YES
WITH_PKGNG=yes
WITH_CPUFLAGS=YES
DEFAULT_VERSIONS += perl5=5.36
DEFAULT_VERSIONS += python=3.9 python3=3.9

> make config
[ ] CLI
[x] DAEMON
[ ] DOCS
[ ] NLS
[ ] TESTS
[x] UTILS
[x] WEB
Comment 6 Igor Pavlov 2023-09-16 11:00:16 UTC
I mean /etc/make.conf of course, not /etc/rc.conf
Comment 7 Rafe 2023-09-16 15:23:13 UTC
(In reply to Igor Pavlov from comment #5)
The transmission-full build is intended to provide as much as possible, which includes building against both QT and GTK+. This doesn't work with your invocation of OPTIONS_UNSET=X11.

What you want is to build transmission with FLAVOR=daemon. This would build with precisely the options you already have configured, and without the X11 toolkits.

Please try "make reinstall clean FLAVOR=daemon" and let us know if it builds cleanly that way.
Comment 8 Robert Clausecker freebsd_committer freebsd_triage 2023-09-16 16:48:42 UTC
(In reply to Rafe from comment #7)

You should redesign the port such that it is not possible to chose option combinations leading to a failing build.
Comment 9 Igor Pavlov 2023-09-16 18:58:22 UTC
> Please try "make reinstall clean FLAVOR=daemon" and let us know if it builds cleanly that way.

Yep, it works. Thanks.
Is configuration with make config deprecated? The flavor usage is rather unobvious, especially when make config is doing something.
Comment 10 Owen Carter 2023-09-18 14:01:23 UTC
I've run into this with poudriere. When the update from 3.x to 4 arrived I ran:

`poudrire options <build,jail> net-p2p/transmission`

- I had looked in UPDATING to see if there was a note there, but not seeing anything I simply assumed the old `transmission-*` ports had been combined into one.

And so I set the options I was presented with as:
```
 [ ] CLI    Build remote & command-line (deprecated) clients
 [ ] DOCS   Build and/or install documentation
 [ ] NLS    Native Language Support
 [ ] TESTS  Build & run unit tests
 [x] UTILS  Build utilities (create, edit, show)
 [x] WEB    Install web client
```

I the rebuilt it
`poudrire bulks <build,jail> net-p2p/transmission`

And promptly got the same failure as the OP, It was easy to resolve by building the flavors I want, but what confused me as that I did not realise you had added FLAVORS to this.

This is in part because I do not really associate the FLAVOR mechanism with building different discreet parts of a port. I think of it as a way to have otherwise conflicting builds present (eg python3.y and python3.z built and installed on the same system, or GTK3 and GTK4 builds, etc..)

AFIK you need to remove the local `make config` options entirely where they conflict with flavor selection. There can still be config entries for (eg) man pages, documentation or tests. But the options now controlled by flavor need to be removed.
Comment 11 Rafe 2023-09-18 14:08:37 UTC
(In reply to Owen from comment #10)
Thanks, see also Bug 273841, where a discussion of the appropriate design is ongoing. 

I am working on a revision whereby transmission (the default flavor) will provide all relevant config options, but there will also be separate flavors for each standalone component (with appropriately reduced compile-time options). That's what the committers are suggesting, but if you have other thoughts please do add them. I hope to get this submitted in the next day or two. 

Sorry this was not announced through UPDATING. I appreciate that changing the approach resulted in unexpected issues for those updating.
Comment 12 Owen Carter 2023-09-18 16:26:58 UTC
(In reply to Rafe from comment #11)
Thank you for the followup and reference, and for working to bring this port up to date!
I'll chip in on #273841 as appropriate.
Comment 13 Rafe 2023-09-19 13:17:52 UTC
(In reply to Owen Carter from comment #12)
To close this out, the issue was that transmission only installs the gtk appindicator metainfo.xml file if NLS is selected as a compile-time option. I had not recognized this. The issue will be fixed in the next port revision.
Comment 14 Rafe 2023-09-19 19:55:25 UTC
Please see Bug 273841 for a proposed patch with a fix for this issue.
Comment 15 commit-hook freebsd_committer freebsd_triage 2023-09-22 05:09:05 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f40cba02c2f877b8e9e5e1a591c49ff118831c19

commit f40cba02c2f877b8e9e5e1a591c49ff118831c19
Author:     Rafe <mondo.debater_0q@icloud.com>
AuthorDate: 2023-09-19 19:37:51 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-09-22 04:56:47 +0000

    net-p2p/transmission: Refine flavors, port fixes

     *Fixes flavor conflicts in Bug 273841
     *Patches to build with libfmt>=10.0. Bug 273887
     *Adds log-location and log-level options. Bug 269392
     *Fixes build errors arising from pkg-plist issues. Bug 273836

     See UPDATING for additional information on the usage of flavors.

    PR:             273841, 273887, 269392, 273836
    Reported by:    Benjamin Takacs <nimaje+fbz@bureaucracy.de>
    Reported by:    diizzy, dereckson@gmail.com
    Reported by:    Igor Pavlov <igor.arabesc.pavlov@gmail.com>

 UPDATING                                           |  13 ++
 net-p2p/transmission/Makefile                      |  87 +++++++-----
 .../files/extra-patch-CMakeLists.txt (new)         |  23 +++
 .../files/patch-gtk_Application.cc (new)           |  11 ++
 .../patch-libtransmission_file-posix.cc (new)      |  11 ++
 .../patch-libtransmission_variant-json.cc (new)    |  11 ++
 net-p2p/transmission/files/transmission.in         |  12 +-
 net-p2p/transmission/pkg-plist.cli                 |  27 ----
 net-p2p/transmission/pkg-plist.daemon              |  12 +-
 net-p2p/transmission/pkg-plist.default (new)       | 155 +++++++++++++++++++++
 net-p2p/transmission/pkg-plist.full (gone)         | 155 ---------------------
 net-p2p/transmission/pkg-plist.gtk                 |  30 +---
 net-p2p/transmission/pkg-plist.qt                  |  27 ----
 net-p2p/transmission/pkg-plist.utils               |  10 --
 14 files changed, 290 insertions(+), 294 deletions(-)