Opened 17 months ago
Closed 17 months ago
#67635 closed defect (fixed)
tiff @4.5.1: opportunistic use of libdeflate
Reported by: | dershow | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ryandesign (Ryan Carsten Schmidt) | |
Port: | tiff |
Description
I'm trying to upgrade the tiff port from 4.5.0_0 to 4.5.1_0 and I'm getting an error on staging:
% sudo port -u upgrade outdated ---> Computing dependencies for tiff ---> Fetching archive for tiff ---> Attempting to fetch tiff-4.5.1_0+universal.darwin_22.arm64-x86_64.tbz2 from https://packages.macports.org/tiff ---> Attempting to fetch tiff-4.5.1_0+universal.darwin_22.arm64-x86_64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/tiff ---> Attempting to fetch tiff-4.5.1_0+universal.darwin_22.arm64-x86_64.tbz2 from http://mirror.fcix.net/macports/packages/tiff ---> Staging tiff into destroot Error: Failed to destroot tiff: error copying "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_tiff/tiff/work/destroot-x86_64//Developer" to "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_tiff/tiff/work/destroot-intel/Developer": file already exists Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_tiff/tiff/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
This is on an Apple Silicon machine, so the fact that it's reporting an intel related error is interesting.
Attachments (3)
Change History (13)
comment:1 Changed 17 months ago by ryandesign (Ryan Carsten Schmidt)
Changed 17 months ago by dershow
comment:2 Changed 17 months ago by dershow
I probably should have mentioned in the initial ticket that I tried that before I created the ticket.
Log is attached.
comment:3 Changed 17 months ago by ryandesign (Ryan Carsten Schmidt)
Thanks. The log says:
Failed to destroot tiff: libtiff-4.pc differs in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_tiff/tiff/work/destroot-arm64//opt/local/lib/pkgconfig and /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_tiff/tiff/work/destroot-ppc-intel//opt/local/lib/pkgconfig and cannot be merged
Could you please attach the two files
- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_tiff/tiff/work/destroot-arm64/opt/local/lib/pkgconfig/libtiff-4.pc
and
- /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_tiff/tiff/work/destroot-ppc-intel/opt/local/lib/pkgconfig/libtiff-4.pc
so we can see how they differ?
comment:4 Changed 17 months ago by dershow
I've added them. Although, the actual files have the same name, so one was renamed as libtiff-4.2.pc.
comment:5 Changed 17 months ago by ryandesign (Ryan Carsten Schmidt)
Owner: | set to ryandesign |
---|---|
Status: | new → accepted |
Summary: | Tiff upgrade fails to install → tiff @4.5.1: opportunistic use of libdeflate |
Ok great, one of them mentions libdeflate, the other doesn't:
-
libtiff-4.
old new 7 7 Description: Tag Image File Format (TIFF) library. 8 8 Version: 4.5.1 9 9 Libs: -L${libdir} -ltiff 10 Libs.private: -lzstd -llzma -lLerc -ljpeg -l z10 Libs.private: -lzstd -llzma -lLerc -ljpeg -ldeflate -lz 11 11 Cflags: -I${includedir} 12 Requires.private: libzstd liblzma libjpeg zlib12 Requires.private: libzstd liblzma libjpeg libdeflate zlib
Looks like optional support for libdeflate was added to the tiff software in 4.2.0 and I didn't notice.
I need to either add the libdeflate dependency to the tiff port, or else make sure the tiff port doesn't use libdeflate even if it is installed.
You probably have the libdeflate port installed without the universal variant. One workaround you can use is to deactivate libdeflate before building tiff:
sudo port -f deactivate libdeflate sudo port clean tiff
After building tiff, you can reactivate libdeflate if desired.
comment:6 Changed 17 months ago by dershow
That work around worked. Although, macports then found that gdal was broken, so it rebuilt it (I assume that libdeflate is used by gdal when found, and otherwise not). So, after I reactivated libdeflate I then forced gdal to rebuild, for it to find libdeflate.
comment:7 Changed 17 months ago by ryandesign (Ryan Carsten Schmidt)
Right, gdal depends on libdeflate, so deactivating libdeflate would cause MacPorts to see gdal as broken, and trying to run gdal would crash; you would have to reactivate libdeflate, as you did, to resolve both of those issues. (No rebuild was necessary.)
comment:8 follow-up: 9 Changed 17 months ago by dershow
Just to clarify: I deactivated libdeflate, and updated tiff and MacPorts then saw that gdal as broken so it then rebuilt it as part of the update of tiff:
---> Scanning binaries for linking errors ---> Found 1 broken file, matching files to ports ---> Found 1 broken port, determining rebuild order You can always run 'port rev-upgrade' again to fix errors. The following ports will be rebuilt: gdal @3.7.0+postgresql15+proj9 Continue? [Y/n]: Y ---> Computing dependencies for gdal ---> Dependencies to be installed: libdeflate ---> Activating libdeflate @1.18_0 ---> Cleaning libdeflate ---> Cleaning gdal ---> Scanning binaries for linking errors ---> No broken files found. ---> No broken ports found.
I assume that gdal would then work, but would be missing a "feature" that used libdeflate. So, it would have created a new minor issue. So, I then did this:
sudo port activate libdeflate sudo port -n upgrade --force gdal
in order to make sure that I had a "full" install of gdal.
And, all seems fine. Thanks for the help.
comment:9 Changed 17 months ago by ryandesign (Ryan Carsten Schmidt)
Replying to dershow:
I assume that gdal would then work, but would be missing a "feature" that used libdeflate.
As you can see in the output you posted, MacPorts automatically reactivated libdeflate for you since it is listed as a dependency of gdal, and in fact it didn't reinstall or rebuild gdal since reactivating libdeflate was all that was needed to fix the problem.
comment:10 Changed 17 months ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Please
sudo port clean tiff
and then try again. If it fails again, please attach the main.log file.