Created attachment 256767 [details] patch to fix build on FreeBSD-15
1. LIB_DEPENDS=libGL.so:graphics/libglvnd => USES=gl USE_GL=gl 2. LIB_DEPENDS=libintl.so:devel/gettext-runtime don't need - port already have USES=gettext-runtime.
(In reply to Vladimir Druzenko from comment #1) Both noted, thanks.
====> Running Q/A tests (stage-qa) Warning: you might not need LIB_DEPENDS on libboost_serialization.so Warning: you might not need LIB_DEPENDS on libdouble-conversion.so Warning: you might not need LIB_DEPENDS on libfreetype.so Warning: you might not need LIB_DEPENDS on libglib-2.0.so Warning: you might not need LIB_DEPENDS on libgraphite2.so Warning: you might not need LIB_DEPENDS on libicuuc.so Warning: you might not need LIB_DEPENDS on libiconv.so Warning: you might not need LIB_DEPENDS on libharfbuzz.so Warning: you might not need LIB_DEPENDS on libpcre.so Warning: you might not need LIB_DEPENDS on libpcre2-16.so Warning: you might not need LIB_DEPENDS on libzstd.so Warning: you might not need LIB_DEPENDS on libintl.so Warning: you might not need LIB_DEPENDS on libGL.so Warning: you might not need LIB_DEPENDS on libglib-2.0.so Warning: you might not need LIB_DEPENDS on libintl.so The port does not link with these libraries.
Build without errors in poudriere 13.4 and 14.2 amd64: BUILD_DEPENDS= sane-config:graphics/sane-backends \ boost-libs>0:devel/boost-libs LIB_DEPENDS= libpng.so:graphics/png \ libtiff.so:graphics/tiff RUN_DEPENDS= avahi-browse:net/avahi-app USES= cmake jpeg localbase qt:5 xorg USE_LDCONFIG= ${PREFIX}/lib/epsonscan2 USE_QT= buildtools:build core gui qmake:build widgets USE_XORG= x11 xau xcb xdmcp Port link with libdl.so.1, so possible it dynamically load some of libraries from this list: libdouble-conversion.so libfreetype.so libglib-2.0.so libgraphite2.so libicuuc.so libiconv.so libharfbuzz.so libpcre.so libpcre2-16.so libzstd.so libintl.so libGL.so libglib-2.0.so If so then add to RUN_DEPENDS something like: ${LOCALBASE}/lib/libfreetype.so:print/freetype2
I haven't found a single use of these libraries.
I appreciate your attention to this detail, Vladimir. Unfortunately, I have no idea whether these library dependencies are still needed. The background is that I did this port three years ago in January 2022; my only work was to plough through the code and come up with the 50+ patches to get it to work. I have not looked at it since. The scanner here works, now on FreeBSD-14.1, and is in regular use. I presume that these dependencies were needed back then (FreeBSD-12? or maybe FreeBSD-13.0). If it seems they weren't even needed then, I have no idea any more why I would've added them. I cannot really take the scanner here out of service while I test removal of all these dependencies on the server-side scanner driver code. However, I have built it without the dependencies and the GUI client tool (bin/epsonscan2) does seem to work without them. I'm uploading a version of the Makefile without all those library dependencies. If anyone else is able to test the server-side code with their scanner and report back, that would be appreciated.
Created attachment 256784 [details] Proposed Makefile without many of the LIB_DEPENDS
Created attachment 256786 [details] Proposed Makefile without many of the LIB_DEPENDS
Comment on attachment 256786 [details] Proposed Makefile without many of the LIB_DEPENDS 1. LIB_DEPENDS= libboost_serialization.so:devel/boost-libs Where it use boost in runtime? I see that it is only for build. 2. What do you think about add default option AVAHI: OPTIONS_DEFINE= AVAHI OPTIONS_DEFAULT= AVAHI AVAHI_DESC= Use avahi to find scanners AVAHI_RUN_DEPENDS= avahi-browse:net/avahi-app
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=abf9862fa9c98bd68956aa9573d97399ae5e0f7d commit abf9862fa9c98bd68956aa9573d97399ae5e0f7d Author: J.R. Oldroyd <fbsd@opal.com> AuthorDate: 2025-01-22 12:59:16 +0000 Commit: Vladimir Druzenko <vvd@FreeBSD.org> CommitDate: 2025-01-22 12:59:16 +0000 graphics/epsonscan2: Fix build on FreeBSD 15 PR: 284127 graphics/epsonscan2/Makefile | 2 +- .../files/patch-src_ES2Command_Src_Utils_ESAccessor.h (new) | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-)
A commit in branch 2025Q1 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=4e8dacd288c62ff082f3bef87069fbab3ac8e745 commit 4e8dacd288c62ff082f3bef87069fbab3ac8e745 Author: J.R. Oldroyd <fbsd@opal.com> AuthorDate: 2025-01-22 12:59:16 +0000 Commit: Vladimir Druzenko <vvd@FreeBSD.org> CommitDate: 2025-01-22 13:02:43 +0000 graphics/epsonscan2: Fix build on FreeBSD 15 PR: 284127 (cherry picked from commit abf9862fa9c98bd68956aa9573d97399ae5e0f7d) graphics/epsonscan2/Makefile | 2 +- .../files/patch-src_ES2Command_Src_Utils_ESAccessor.h (new) | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-)
Fix build on 15 committed. Lets "work" on "improve port".
(In reply to commit-hook from comment #11) The build and installation went well. Unfortunately, epsonscan2 aborts at startup with a core dump: Illegal instruction (core dump) This happens on a recent 15.0-CURRENT amd64.
I see there is newer versions: https://repology.org/project/epsonscan2/versions
Created attachment 257152 [details] Improve port v1
I had to update the port as my scanner wasn't supported. I will attach my patches. They were tested with an Epson Perfection V39II on FreeBSD 14.1 with linux_base-c7. (I didn't test this on a clean system, but on my daily driver.) I mostly just adapted the existing patches. Just a few notes: - They changed the download URLs. They stopped putting new releases at the same places as the old ones. - They included some build artifacts in the source distribution, so I had to add a pre-configure to the Makefile to remove an offending CMakeCache.txt - I removed the dependency on pcre. It wasn't necessary and it is EOL. - I included the two patches from Arch Linux that fix crashes. I didn't include the xdg-open patch that replaces the probing of the various file managers. - I also stole the method to stop building the included zlib and use the one on the system. (done by removing the zlib files from src/Controller/CMakeLists.txt) - I *didn't* update the Read_me.FreeBSD file
Created attachment 257261 [details] upgrade epsonscan2 to 6.7.70.0
Created attachment 257262 [details] upgrade epsonscan2-non-free-plugin to 6.7.70
Thanks, Daniel, for sending these updates. That's a great amount of work. Thank you. Since you say you worked on 14.1 and that's what I have too, Rainer, would you be able to test this on 15-cur, please? Maybe the SIGILL you had will be gone after this version update?
(In reply to J.R. Oldroyd from comment #19) >Since you say you worked on 14.1 and that's what I have too, Rainer, >would you be able to test this on 15-cur, please? Maybe the SIGILL >you had will be gone after this version update? @Daniel: thanks from me too for this patch with current version update. @J.R.: I finally got around to testing the latest patches #257261 and #257262 under a current 15.0-CURRENT amd64. Both build and install fine. With this version 6.7.70.0 epsonscan2 runs as usual again! I tested with an Epson Perfection V600 Photo. LGTM, from my side a go for the commit. Thank you very much! And please let me know if this short response is not sufficient.
Great news, thanks for testing, Rainer. I have also tested the 6.7.70 client on 14.2 and it is working here talking to the scanner over a network connection. I do get the following when I install the 6.7.70 version: # make install ===> Installing for epsonscan2-6.7.70.0 ===> Checking if epsonscan2 is already installed ===> Registering installation for epsonscan2-6.7.70.0 pkg-static: duplicate file listing: /usr/local/libdata/ldconfig/epsonscan2, ignoring Installing epsonscan2-6.7.70.0... There is only one instance of "libdata/ldconfig/epsonscan2" in pkg-plist. Should it not be there? Other than that, looks like this is good to go. Thanks, again, for this update, Daniel.
(In reply to Daniel Tameling from comment #17) Can you attach tarball (tar.xz) with port graphics/epsonscan2? Also I want to improve port: fix dependencies and add option AVAHI. (https://bugs.freebsd.org/bugzilla/attachment.cgi?id=257152&action=diff)
Created attachment 257370 [details] tar file of epsonscan2-6.7.70 and epsonscan2-non-free-plugin-6.7.70 Attached is a tar of both ports (epsonscan2-6.7.70 and epsonscan2-non-free-plugin) with both Daniel's changes and yours, Vladimir. I removed the ldconfig from the pkg-plist because that failed check-plist.
(In reply to J.R. Oldroyd from comment #21) That was my mistake. Sorry about that. Glad the update improved the general situation.