Opened 2 years ago
Closed 2 years ago
#66084 closed defect (fixed)
icoutils @0.32.3_1: build failure on Ventura. archive member 'libgnu.a' with length 49080 is not mach-o or llvm bitcode file
Reported by: | kencu (Ken) | Owned by: | kencu (Ken) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | ventura | Cc: | |
Port: | icoutils |
Description
/usr/bin/clang -fno-common -W -Wabi -Waddress -Waggressive-loop-optimizations -Wall -Wattributes -Wbad-function-cast -Wbool-compare -Wbool-operation -Wbuiltin-declaration-mismatch -Wbuiltin-macro-redefined -Wcast-align -Wchar-subscripts -Wchkp -Wclobbered -Wcomment -Wcomments -Wcoverage-mismatch -Wcpp -Wdangling-else -Wdate-time -Wdeprecated -Wdeprecated-declarations -Wdesignated-init -Wdisabled-optimization -Wdiscarded-array-qualifiers -Wdiscarded-qualifiers -Wdiv-by-zero -Wdouble-promotion -Wduplicated-branches -Wduplicated-cond -Wduplicate-decl-specifier -Wempty-body -Wendif-labels -Wenum-compare -Wexpansion-to-defined -Wextra -Wformat-contains-nul -Wformat-extra-args -Wformat-nonliteral -Wformat-security -Wformat-signedness -Wformat-y2k -Wformat-zero-length -Wframe-address -Wfree-nonheap-object -Whsa -Wignored-attributes -Wignored-qualifiers -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wincompatible-pointer-types -Winit-self -Winline -Wint-conversion -Wint-in-bool-context -Wint-to-pointer-cast -Winvalid-memory-model -Winvalid-pch -Wjump-misses-init -Wlogical-not-parentheses -Wlogical-op -Wmain -Wmaybe-uninitialized -Wmemset-elt-size -Wmemset-transposed-args -Wmisleading-indentation -Wmissing-braces -Wmissing-field-initializers -Wmissing-include-dirs -Wmissing-parameter-type -Wmultichar -Wnarrowing -Wnested-externs -Wnonnull -Wnonnull-compare -Wnull-dereference -Wodr -Wold-style-declaration -Wold-style-definition -Wopenmp-simd -Woverflow -Woverlength-strings -Woverride-init -Wpacked-bitfield-compat -Wparentheses -Wpointer-arith -Wpointer-compare -Wpointer-sign -Wpointer-to-int-cast -Wpragmas -Wpsabi -Wrestrict -Wreturn-local-addr -Wreturn-type -Wscalar-storage-order -Wsequence-point -Wshadow -Wshift-count-negative -Wshift-count-overflow -Wshift-negative-value -Wsizeof-array-argument -Wsizeof-pointer-memaccess -Wstack-protector -Wstrict-aliasing -Wstrict-overflow -Wsuggest-attribute=noreturn -Wsuggest-final-methods -Wsuggest-final-types -Wswitch -Wswitch-bool -Wswitch-unreachable -Wsync-nand -Wsystem-headers -Wtautological-compare -Wtrampolines -Wtrigraphs -Wtype-limits -Wuninitialized -Wunknown-pragmas -Wunsafe-loop-optimizations -Wunused -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-function -Wunused-label -Wunused-local-typedefs -Wunused-parameter -Wunused-result -Wunused-value -Wunused-variable -Wvarargs -Wvariadic-macros -Wvector-operation-performance -Wvolatile-register-var -Wwrite-strings -Walloc-size-larger-than=9223372036854775807 -Warray-bounds=2 -Wformat-overflow=2 -Wformat-truncation=2 -Wimplicit-fallthrough=5 -Wnormalized=nfc -Wshift-overflow=2 -Wstringop-overflow=2 -Wunused-const-variable=2 -Wvla-larger-than=4031 -Wno-unused-parameter -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch x86_64 -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch x86_64 -o icotool create.o extract.o main.o palette.o win32-endian.o -lpng -lz -lm ../common/libcommon.a ../lib/libgnu.a -lintl -Wl,-framework -Wl,CoreFoundation ld: in ../common/libcommon.a(libgnu.a), archive member 'libgnu.a' with length 49080 is not mach-o or llvm bitcode file '../common/libcommon.a' for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [icotool] Error 1
% file ./lib/libgnu.a ./lib/libgnu.a: current ar archive random library % lipo -info ./lib/libgnu.a Non-fat file: ./lib/libgnu.a is architecture: x86_64 % file ./common/libcommon.a ./common/libcommon.a: current ar archive random library % lipo -info ./common/libcommon.a Non-fat file: ./common/libcommon.a is architecture: x86_64
Attachments (2)
Change History (10)
Changed 2 years ago by kencu (Ken)
Attachment: | icoutils-ventura-intel-fail-less-noisy.log added |
---|
Changed 2 years ago by kencu (Ken)
Attachment: | icoutils-ventura-intel-fail.log added |
---|
comment:1 Changed 2 years ago by kencu (Ken)
comment:2 Changed 2 years ago by kencu (Ken)
trying with clang-14 fails too. Here's a more detailed look at what happens with this failing link:
% /opt/local/bin/clang-mp-14 -fno-common -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch x86_64 -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch x86_64 -o icotool create.o extract.o main.o palette.o win32-endian.o -lpng -lz -lm ../common/libcommon.a ../lib/libgnu.a -lintl -Wl,-framework -Wl,CoreFoundation -Wl,-v -v clang version 14.0.6 Target: x86_64-apple-darwin22.1.0 Thread model: posix InstalledDir: /opt/local/libexec/llvm-14/bin "/opt/local/libexec/llvm-14/bin/ld" -demangle -lto_library /opt/local/libexec/llvm-14/lib/libLTO.dylib -dynamic -arch x86_64 -platform_version macos 13.0.0 13.0 -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -o icotool -L/opt/local/lib -headerpad_max_install_names -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk create.o extract.o main.o palette.o win32-endian.o -lpng -lz -lm ../common/libcommon.a ../lib/libgnu.a -lintl -framework CoreFoundation -v -lSystem /opt/local/libexec/llvm-14/lib/clang/14.0.6/lib/darwin/libclang_rt.osx.a @(#)PROGRAM:ld PROJECT:ld64-820.1 BUILD 18:42:34 Sep 11 2022 configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em Library search paths: /opt/local/lib /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/lib /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/lib Framework search paths: /Library/Frameworks/ /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/ /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks/ ld: in ../common/libcommon.a(libgnu.a), archive member 'libgnu.a' with length 49168 is not mach-o or llvm bitcode file '../common/libcommon.a' for architecture x86_64
some kind of LTO error?
comment:3 Changed 2 years ago by kencu (Ken)
For the moment, I just installed the binary from darwin21, using some thwackery that I know I am not supposed to explain to folks -- and that works for me until this gets fixed.
comment:4 follow-up: 6 Changed 2 years ago by jmroot (Joshua Root)
Is this one of those things that combines multiple static archives into one, without excluding __.SYMDEF*
files, thus ending up with several of them in the new archive?
comment:5 Changed 2 years ago by kencu (Ken)
comment:6 Changed 2 years ago by kencu (Ken)
Replying to jmroot:
Is this one of those things that combines multiple static archives into one, without excluding
__.SYMDEF*
files, thus ending up with several of them in the new archive?
looks like something to look into, for sure.
comment:7 Changed 2 years ago by kencu (Ken)
I think the linker doesn't handle one entire archive being embedded into another:
ar cr libcommon.a error.o hmap.o io-utils.o intutil.o llist.o strbuf.o string-utils.o tmap.o ../lib/libgnu.a
comment:8 Changed 2 years ago by kencu (Ken)
Owner: | set to kencu |
---|---|
Resolution: | → fixed |
Status: | new → closed |
The less noisy log is after adding this to the portfile: