Summary: | www/wt: update to 4.8.0 | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Mamadou Babaei <info> | ||||||||||||
Component: | Individual Port(s) | Assignee: | Fernando Apesteguía <fernape> | ||||||||||||
Status: | Closed FIXED | ||||||||||||||
Severity: | Affects Only Me | CC: | fernape | ||||||||||||
Priority: | --- | ||||||||||||||
Version: | Latest | ||||||||||||||
Hardware: | Any | ||||||||||||||
OS: | Any | ||||||||||||||
URL: | https://www.webtoolkit.eu/wt/doc/reference/html/Releasenotes.html | ||||||||||||||
Attachments: |
|
Description
Mamadou Babaei
2022-08-17 14:43:33 UTC
Created attachment 235968 [details]
www/wt 4.7.2 to 4.8.0
Hi Mohammad, There are some issues with the plist. Would you have a look? ====> Running Q/A tests (stage-qa) ====> Checking for pkg-plist issues (check-plist) ===> Parsing plist ===> Checking for items in STAGEDIR missing from pkg-plist Error: Orphaned: lib/cmake/wt/wt-target-dbo-%%CMAKE_BUILD_TYPE%%.cmake Error: Orphaned: lib/cmake/wt/wt-target-dbosqlite3-%%CMAKE_BUILD_TYPE%%.cmake Error: Orphaned: lib/cmake/wt/wt-target-fcgi-%%CMAKE_BUILD_TYPE%%.cmake Error: Orphaned: lib/cmake/wt/wt-target-http-%%CMAKE_BUILD_TYPE%%.cmake Error: Orphaned: lib/cmake/wt/wt-target-test-%%CMAKE_BUILD_TYPE%%.cmake Error: Orphaned: lib/cmake/wt/wt-target-wt-%%CMAKE_BUILD_TYPE%%.cmake Error: Orphaned: lib/libwtd.so Error: Orphaned: lib/libwtd.so.%%VERSION%% Error: Orphaned: lib/libwtdbod.so Error: Orphaned: lib/libwtdbod.so.%%VERSION%% Error: Orphaned: lib/libwtdbosqlite3d.so Error: Orphaned: lib/libwtdbosqlite3d.so.%%VERSION%% Error: Orphaned: lib/libwtfcgid.so Error: Orphaned: lib/libwtfcgid.so.%%VERSION%% Error: Orphaned: lib/libwthttpd.so Error: Orphaned: lib/libwthttpd.so.%%VERSION%% Error: Orphaned: lib/libwttestd.so Error: Orphaned: lib/libwttestd.so.%%VERSION%% ===> Checking for items in pkg-plist which are not in STAGEDIR Error: Missing: lib/cmake/wt/wt-target-dbo-release.cmake Error: Missing: lib/cmake/wt/wt-target-dbosqlite3-release.cmake Error: Missing: lib/cmake/wt/wt-target-fcgi-release.cmake Error: Missing: lib/cmake/wt/wt-target-http-release.cmake Error: Missing: lib/cmake/wt/wt-target-test-release.cmake Error: Missing: lib/cmake/wt/wt-target-wt-release.cmake Error: Missing: lib/libwt.so Error: Missing: lib/libwt.so.%%VERSION%% Error: Missing: lib/libwtdbo.so Error: Missing: lib/libwtdbo.so.%%VERSION%% Error: Missing: lib/libwtdbosqlite3.so Error: Missing: lib/libwtdbosqlite3.so.%%VERSION%% Error: Missing: lib/libwtfcgi.so Error: Missing: lib/libwtfcgi.so.%%VERSION%% Error: Missing: lib/libwthttp.so Error: Missing: lib/libwthttp.so.%%VERSION%% Error: Missing: lib/libwttest.so Error: Missing: lib/libwttest.so.%%VERSION%% ===> Error: Plist issues found. *** Error code 1 Thank you for informing me. I did not change the pkg-plist file for this release since there were not any file changes. For me make stage and stage-qa pass successfully. But, I see the 'd' prefix in your logs which indicates this is a debug build not a release, hence the issue. Somehow your build builds the Debug variant (probably instead of the Release variant wihtout thr d prefix). That's why for example you get: Error: Orphaned: lib/libwtdbod.so And: Error: Missing: lib/libwtdbo.so In the Port itself, we do not have any options for building a Debug variant. Shouldn't it by default build the release all the time in that case? If so, I can add the option to the CMake arguments list to always build the release variant. If you thing, a Debug build is necessary as well for development, I could add the Option to the port to switch between Debug/Release and then modify the pkg-plist to handle separate Debug/Release produced files. OK, I've figured it out. I ended up adding a DEBUG option and it seems to work with the default options. Now testing the other options which require Qt, Postgres, Firebird, etc to build and after it's done, I'll submit a new patch. Created attachment 235990 [details]
www/wt 4.7.2 to 4.8.0 with DEBUG option
This patch works with DEBUG options enabled/disabled. Just wondering something. Why this works:
.if ${PORT_OPTIONS:MDEBUG}
WITH_DEBUG= yes
PLIST_SUB+= DEBUG_BUILD=""
PLIST_SUB+= RELEASE_BUILD="@comment "
.else
PLIST_SUB+= DEBUG_BUILD="@comment "
PLIST_SUB+= RELEASE_BUILD=""
.endif
But, not this one:
.if ${PORT_OPTIONS:MDEBUG}
WITH_DEBUG= yes
.endif
.if defined(${WITH_DEBUG})
PLIST_SUB+= DEBUG_BUILD=""
PLIST_SUB+= RELEASE_BUILD="@comment "
.else
PLIST_SUB+= DEBUG_BUILD="@comment "
PLIST_SUB+= RELEASE_BUILD=""
.endif
Created attachment 235991 [details]
www/wt 4.7.2 to 4.8.0 with simplified DEBUG option
This is even more simplified. Instead of defining two variables in order to be used by pkg-plist. It just defines one.
(In reply to Mohammad S. Babaei from comment #6) Nice work! Would you have a look at a simpler way to do this? DEBUG_CMAKE_ON=...? Thank you! I don't mind updating the patch, just I don't get where DEBUG_CMAKE_ON could be useful, except for passing variables to cmake in case of debug builds. I looked up https://docs.freebsd.org/en/books/porters-handbook/book/ and found no information about it and it seems not so many ports are using it. $ find /usr/ports/ -iname 'Makefile' | xargs grep -s 'DEBUG_CMAKE_ON' /usr/ports/textproc/ctpp2/Makefile:DEBUG_CMAKE_ON= -DDEBUG_MODE=ON /usr/ports/deskutils/owncloudclient/Makefile:DEBUG_CMAKE_ON= -DCMAKE_BUILD_TYPE:STRING=Debug /usr/ports/multimedia/x265/Makefile:DEBUG_CMAKE_ON= -DCMAKE_ASM_NASM_FLAGS:STRING="-g -O0" /usr/ports/audio/audacity/Makefile:DEBUG_CMAKE_ON= wxWidgets_USE_DEBUG /usr/ports/mail/spmfilter-clamav/Makefile:DEBUG_CMAKE_ON= -DENABLE_DEBUG=TRUE /usr/ports/www/webkit2-gtk3/Makefile:DEBUG_CMAKE_ON= -DCMAKE_AR=${LOCALBASE}/bin/ar \ /usr/ports/www/webkit2-gtk4/Makefile:DEBUG_CMAKE_ON= -DCMAKE_AR=${LOCALBASE}/bin/ar \ /usr/ports/devel/caf/Makefile:DEBUG_CMAKE_ON= -DCAF_ENABLE_RUNTIME_CHECKS:BOOL=yes /usr/ports/devel/caf/Makefile:LOG_LEVEL_DEBUG_CMAKE_ON= -DCAF_LOG_LEVEL:STRING=DEBUG /usr/ports/x11-toolkits/termit/Makefile:DEBUG_CMAKE_ON= -DDEBUG:BOOL=YES According to the handbook WITH_DEBUG enables "DEBUG_CMAKE_ON= -DCMAKE_BUILD_TYPE:STRING=Debug" as in the case of deskutils/owncloudclient. And also, WITH_DEBUG exports lower-cased value of CMAKE_BUILD_TYPE to PLIST_SUB in order for the the port to install *.cmake depending on the build type (www/wt use case). So, that's why I am not sure what can I do with DEBUG_CMAKE_ON other than passing cmake flags. I'd appreciate it if you could elaborate. Thank you! Created attachment 235994 [details]
www/wt 4.7.2 to 4.8.0
Sorry, the attached patch was the wrong one. Here is the correct one.
I was thinking of something like (UNTESTED): DEBUG_CMAKE_ON = -DCMAKE_BUILD_TYPE=Debug And then, the PLIST_SUB in a condition like this (as in www/squid): if ${PORT_OPTIONS:MDEBUG} || defined(WITH_DEBUG) ... In fact I triggered the problem using (accidentally) WITH_DEBUG. So we need to do the prefix thing in both cases. Created attachment 235995 [details]
www/wt 4.7.2 to 4.8.0
Thank you very much for the hints!
I guess this patch should address everything now. It builds with(out) DEBUG option whether WITH_DEBUG is defined inside make.conf or through env vars, or not.
I was doing this wrong in the snippet above:
.if defined(${WITH_DEBUG})
Which should be:
.if defined(WITH_DEBUG)
But, yours was a more compact solution that I like as well:
.if ${PORT_OPTIONS:MDEBUG} || defined(WITH_DEBUG)
WITH_DEBUG?= yes
PLIST_SUB+= DEBUG_LIBS_POSTFIX="d"
.else
PLIST_SUB+= DEBUG_LIBS_POSTFIX=""
.endif
Since WITH_DEBUG adds -DCMAKE_BUILD_TYPE=Debug or Release depending on the build type, the following seems redundant:
DEBUG_CMAKE_ON = -DCMAKE_BUILD_TYPE=Debug
And without it, everything works in any of the cases.
(In reply to Mohammad S. Babaei from comment #11) Super! Thanks! A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=48e45257a7225100a3e11f476cb0bd0911f2a096 commit 48e45257a7225100a3e11f476cb0bd0911f2a096 Author: Mohammad S. Babaei <info@babaei.net> AuthorDate: 2022-08-18 15:45:03 +0000 Commit: Fernando Apesteguía <fernape@FreeBSD.org> CommitDate: 2022-08-18 17:17:59 +0000 www/wt: update to 4.8.0 ChangeLog: https://www.webtoolkit.eu/wt/doc/reference/html/Releasenotes.html PR: 265904 Reported by: info@babaei.net (maintainer) www/wt/Makefile | 11 ++++++-- www/wt/distinfo | 6 ++--- www/wt/files/patch-CMakeLists.txt | 6 +++-- www/wt/pkg-plist | 54 +++++++++++++++++++-------------------- 4 files changed, 43 insertions(+), 34 deletions(-) Committed, Thanks! |