Opened 2 years ago
Last modified 17 months ago
#66425 assigned defect
libdeflate @1.15 does not build on < 10.13, unconditional use of futimens
Reported by: | ballapete (Peter "Pete" Dyballa) | Owned by: | herbygillot (Herby Gillot) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.0 |
Keywords: | Cc: | dankamongmen (nick black) | |
Port: | libdeflate |
Description
make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_archivers_libdeflate/libdeflate/work/build' [ 96%] Building C object programs/CMakeFiles/libdeflate-gzip.dir/gzip.c.o cd /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_archivers_libdeflate/libdeflate/work/build/programs && /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_POSIX_C_SOURCE=200809L -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_archivers_libdeflate/libdeflate/work/build/programs -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_archivers_libdeflate/libdeflate/work/libdeflate-1.15 -pipe -Os -DNDEBUG -I/opt/local/include -arch ppc -mmacosx-version-min=10.4 -Wall -Wdeclaration-after-statement -Wmissing-field-initializers -Wmissing-prototypes -Wshadow -Wstrict-prototypes -Wundef -std=gnu99 -MD -MT programs/CMakeFiles/libdeflate-gzip.dir/gzip.c.o -MF CMakeFiles/libdeflate-gzip.dir/gzip.c.o.d -o CMakeFiles/libdeflate-gzip.dir/gzip.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_archivers_libdeflate/libdeflate/work/libdeflate-1.15/programs/gzip.c /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_archivers_libdeflate/libdeflate/work/libdeflate-1.15/programs/gzip.c: In function 'restore_timestamps': /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_archivers_libdeflate/libdeflate/work/libdeflate-1.15/programs/gzip.c:364: warning: implicit declaration of function 'futimens' [100%] Linking C executable libdeflate-gzip cd /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_archivers_libdeflate/libdeflate/work/build/programs && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/libdeflate-gzip.dir/link.txt --verbose=ON /opt/local/bin/gcc-apple-4.2 -pipe -Os -DNDEBUG -I/opt/local/include -arch ppc -mmacosx-version-min=10.4 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/local/lib -Wl,-headerpad_max_install_names "CMakeFiles/libdeflate-gzip.dir/gzip.c.o" -o libdeflate-gzip libdeflate_prog_utils.a ../libdeflate.a Undefined symbols: "_futimens", referenced from: _restore_metadata in gzip.c.o ld: symbol(s) not found collect2: ld returned 1 exit status make[2]: *** [programs/libdeflate-gzip] Error 1 make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_archivers_libdeflate/libdeflate/work/build' make[1]: *** [programs/CMakeFiles/libdeflate-gzip.dir/all] Error 2
The declaration extern int futimens(int fd, const struct timespec _times_in[2])
can be found here, /opt/local/include/LegacySupport/sys/stat.h
, and LegacySupport
is used.
gzip @1.12_0 (active) requested_variants='' platform='darwin 8' archs='ppc' date='2022-04-12T01:17:21+0200'
is installed, it could be built from source here, so libdeflate
should build too.
Attachments (4)
Change History (19)
Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
comment:1 Changed 2 years ago by jmroot (Joshua Root)
Cc: | dankamongmen added; nickblack@… herby.gillot@… removed |
---|---|
Keywords: | tiger ppc removed |
Owner: | set to herbygillot |
Status: | new → assigned |
Summary: | libdeflate @1.15 does not build on PPC Tiger, Mac OS X 10.4.11, because ld is missing a _futimens function → libdeflate @1.15 does not build on < 10.13, unconditional use of futimens |
It fails to build on 10.12 and older because futimens
was added in 10.13. Configure actually checks for it, and there is code in gzip.c
to fall back to using futimes
, but it doesn't seem to have its logic quite right.
comment:2 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
The tests CMake
performs report:
-- Looking for futimens -- Looking for futimens - not found -- Looking for futimes -- Looking for futimes - found
and …/libdeflate/work/build/CMakeFiles/CMakeError.log
contains:
Determining if the futimens exist failed with the following output: Change Dir: /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_archivers_libdeflate/libdeflate/work/build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/make -f Makefile cmTC_3f020/fast && /usr/bin/make -f CMakeFiles/cmTC_3f020.dir/build.make CMakeFiles/cmTC_3f020.dir/build Building C object CMakeFiles/cmTC_3f020.dir/CheckSymbolExists.c.o /opt/local/bin/gcc-apple-4.2 -pipe -Os -DNDEBUG -I/opt/local/include -arch ppc -mmacosx-version-min=10.4 -o CMakeFiles/cmTC_3f020.dir/CheckSymbolExists.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_archivers_libdeflate/libdeflate/work/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_archivers_libdeflate/libdeflate/work/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: In function 'main': /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_archivers_libdeflate/libdeflate/work/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:9: error: 'futimens' undeclared (first use in this function) /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_archivers_libdeflate/libdeflate/work/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:9: error: (Each undeclared identifier is reported only once /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_archivers_libdeflate/libdeflate/work/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:9: error: for each function it appears in.) make[1]: *** [CMakeFiles/cmTC_3f020.dir/CheckSymbolExists.c.o] Error 1 make: *** [cmTC_3f020/fast] Error 2 File /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_archivers_libdeflate/libdeflate/work/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: /* */ #include <fcntl.h> #include <sys/stat.h> int main(int argc, char** argv) { (void)argv; #ifndef futimens return ((int*)(&futimens))[argc]; #else (void)argc; return 0; #endif }
Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
Attachment: | CMakeError.log added |
---|
/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_archivers_libdeflate/libdeflate/work/build/CMakeFiles/CMakeError.log
Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
Attachment: | CMakeOutput.log added |
---|
/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_archivers_libdeflate/libdeflate/work/build/CMakeFiles/CMakeOutput.log
comment:3 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
Same failure on PPC Leoprad, Mac OS X 10.5.8:
/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_archivers_libdeflate/libdeflate/work/libdeflate-1.15/programs/gzip.c:364: warning: implicit declaration of function ‘futimens’ [100%] Linking C executable libdeflate-gzip cd /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_archivers_libdeflate/libdeflate/work/build/programs && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/libdeflate-gzip.dir/link.txt --verbose=ON /usr/bin/gcc-4.2 -pipe -Os -DNDEBUG -I/opt/local/include -arch ppc -mmacosx-version-min=10.5 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/local/lib -Wl,-headerpad_max_install_names "CMakeFiles/libdeflate-gzip.dir/gzip.c.o" -o libdeflate-gzip -Wl,-rpath,/opt/local/lib libdeflate_prog_utils.a ../libdeflate.a Undefined symbols: "_futimens", referenced from: _restore_metadata in gzip.c.o ld: symbol(s) not found collect2: ld returned 1 exit status make[2]: *** [programs/libdeflate-gzip] Error 1 make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_archivers_libdeflate/libdeflate/work/build'
Isn't it just a simple -lMacportsLegacySupport
that is missing?
comment:4 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
In another log file I saw these lines that are missing here:
MACPORTS_LEGACY_SUPPORT_CPPFLAGS='-isystem/opt/local/include/LegacySupport' MACPORTS_LEGACY_SUPPORT_ENABLED='1' MACPORTS_LEGACY_SUPPORT_LDFLAGS='-L/opt/local/lib -lMacportsLegacySupport'
which are probably introduced by this line in Portfile
:
PortGroup legacysupport 1.1
comment:5 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
By adding this line to Portfile
I have now:
libdeflate @1.14_0 requested_variants='' platform='darwin 9' archs='ppc' date='2022-09-18T19:17:07+0200' libdeflate @1.15_0 (active) requested_variants='' platform='darwin 9' archs='ppc' date='2022-12-10T10:42:04+0100'
comment:6 Changed 2 years ago by herbygillot (Herby Gillot)
comment:7 Changed 2 years ago by herbygillot (Herby Gillot)
OK, legacysupport
has been added in the previously referenced commit. I think this should resolve the issue.
comment:8 Changed 2 years ago by herbygillot (Herby Gillot)
Can someone confirm that this is resolved now?
comment:9 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
After having rebuilt texlive-bin
and OpenBLAS
, starting yesterday, I selfupdate
d shortly and am upgrad
ing. There is no update of libdeflate
listed – was its Portfile
changed and has it now a more up-to-date timestamp?
comment:10 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
1596 2022-12-10 11:29
seems to be a newer version.
comment:11 Changed 2 years ago by herbygillot (Herby Gillot)
OK, I bumped revision on libdeflate
- it should now show up as updated.
comment:12 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
At night it built with Portfile
from Saturday. Now another selfupdate
is running and I'll run an upgrade
.
comment:13 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
It also worked to upgrade
. This is on PPC Mac OS X 10.5.8, Leopard. I'll boot into PPC Tiger, Mac OS X 10.4.11, after backup with TimeMachine. Then I'll upgrade
old Tiger ports of which libdeflate
will be one…
comment:14 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)
It also worked to upgrade on PPC Tiger, Mac OS X 10.4.11
.
comment:15 Changed 17 months ago by lukaso (Lukas Oberhuber)
Not working on 10.12 (using SDK and cross build). Log attached.
Changed 17 months ago by lukaso (Lukas Oberhuber)
Attachment: | libdeflate.log added |
---|
Build using 10.12 SDK
Main.log from PPC Tiger, Mac OS X 10.4.11