You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and the result looked good, at least the library was about twice as big and my program using libarchive.a did run. But the same command on an Intel Mac (same OS, same compiler, practically the same setup) stopped with an error:
checking for libxml-2.0... yes
checking for xmlInitParser in -lxml2... no
configure: error: in `/Users/dlorenz/Downloads/libarchive-3.7.4':
configure: error: Missing xml2 library
Just using ./configure worked fine on that machine, but obviously does not create a universal library.
I tried installing from macports, but that won't result in a universal binary.
I tried simply coping the universal library and the 2 headers over to the intel Machine, but when trying to compile my program with it, I got the "Undefined symbols for architecture x86_64" errors below.
Undefined symbols for architecture x86_64:
"_BZ2_bzDecompress", referenced from:
_bzip2_filter_read in libarchive.a[x86_64]40
_extract_pack_stream in libarchive.a[x86_64]54
_rd_contents in libarchive.a[x86_64]69
_archive_read_format_zip_read_data in libarchive.a[x86_64]70
"_BZ2_bzDecompressEnd", referenced from:
_bzip2_filter_read in libarchive.a[x86_64]40
_bzip2_filter_close in libarchive.a[x86_64]40
_archive_read_format_7zip_cleanup in libarchive.a[x86_64]54
_extract_pack_stream in libarchive.a[x86_64]54
_init_decompression in libarchive.a[x86_64]54
_xar_cleanup in libarchive.a[x86_64]69
_rd_contents_init in libarchive.a[x86_64]69
...
"_BZ2_bzDecompressInit", referenced from:
_bzip2_filter_read in libarchive.a[x86_64]40
_bzip2_filter_read in libarchive.a[x86_64]40
_init_decompression in libarchive.a[x86_64]54
_init_decompression in libarchive.a[x86_64]54
_rd_contents_init in libarchive.a[x86_64]69
_rd_contents_init in libarchive.a[x86_64]69
_archive_read_format_zip_read_data in libarchive.a[x86_64]70
...
"_crc32", referenced from:
_gzip_filter_read in libarchive.a[x86_64]44
_archive_read_format_7zip_bid in libarchive.a[x86_64]54
_archive_read_format_7zip_read_header in libarchive.a[x86_64]54
_archive_read_format_7zip_read_header in libarchive.a[x86_64]54
_archive_read_format_7zip_read_header in libarchive.a[x86_64]54
_archive_read_format_7zip_read_data in libarchive.a[x86_64]54
_header_bytes in libarchive.a[x86_64]54
...
"_iconv", referenced from:
_iconv_strncat_in_locale in libarchive.a[x86_64]71
"_iconv_close", referenced from:
_free_sconv_object in libarchive.a[x86_64]71
_free_sconv_object in libarchive.a[x86_64]71
"_iconv_open", referenced from:
_get_sconv_object in libarchive.a[x86_64]71
"_inflate", referenced from:
_gzip_filter_read in libarchive.a[x86_64]44
_extract_pack_stream in libarchive.a[x86_64]54
_cab_read_ahead_cfdata in libarchive.a[x86_64]58
_archive_read_format_iso9660_read_data in libarchive.a[x86_64]61
_rd_contents in libarchive.a[x86_64]69
_archive_read_format_zip_seekable_read_header in libarchive.a[x86_64]70
_zip_read_data_deflate in libarchive.a[x86_64]70
...
"_inflateEnd", referenced from:
_gzip_filter_read in libarchive.a[x86_64]44
_gzip_filter_close in libarchive.a[x86_64]44
_archive_read_format_7zip_cleanup in libarchive.a[x86_64]54
_archive_read_format_cab_cleanup in libarchive.a[x86_64]58
_archive_read_format_iso9660_cleanup in libarchive.a[x86_64]61
_xar_cleanup in libarchive.a[x86_64]69
_archive_read_format_zip_cleanup in libarchive.a[x86_64]70
...
"inflateInit2", referenced from:
_gzip_filter_read in libarchive.a[x86_64]44
_init_decompression in libarchive.a[x86_64]54
_cab_read_ahead_cfdata in libarchive.a[x86_64]58
_archive_read_format_zip_seekable_read_header in libarchive.a[x86_64]70
_zip_read_data_deflate in libarchive.a[x86_64]70
"inflateInit", referenced from:
_archive_read_format_iso9660_read_data in libarchive.a[x86_64]61
_xar_read_header in libarchive.a[x86_64]69
_rd_contents_init in libarchive.a[x86_64]69
"_inflateReset", referenced from:
_init_decompression in libarchive.a[x86_64]54
_cab_read_ahead_cfdata in libarchive.a[x86_64]58
_cab_read_ahead_cfdata in libarchive.a[x86_64]58
_archive_read_format_iso9660_read_data in libarchive.a[x86_64]61
_xar_read_header in libarchive.a[x86_64]69
_rd_contents_init in libarchive.a[x86_64]69
_archive_read_format_zip_seekable_read_header in libarchive.a[x86_64]70
...
"_inflateSetDictionary", referenced from:
_cab_read_ahead_cfdata in libarchive.a[x86_64]58
"_xmlCleanupParser", referenced from:
_xml2_read_toc in libarchive.a[x86_64]69
"_xmlFreeTextReader", referenced from:
_xml2_read_toc in libarchive.a[x86_64]69
"_xmlReaderForIO", referenced from:
_xml2_read_toc in libarchive.a[x86_64]69
"_xmlTextReaderConstLocalName", referenced from:
_xml2_read_toc in libarchive.a[x86_64]69
_xml2_read_toc in libarchive.a[x86_64]69
"_xmlTextReaderConstValue", referenced from:
_xml2_read_toc in libarchive.a[x86_64]69
_xml2_read_toc in libarchive.a[x86_64]69
"_xmlTextReaderIsEmptyElement", referenced from:
_xml2_read_toc in libarchive.a[x86_64]69
"_xmlTextReaderMoveToFirstAttribute", referenced from:
_xml2_read_toc in libarchive.a[x86_64]69
"_xmlTextReaderMoveToNextAttribute", referenced from:
_xml2_read_toc in libarchive.a[x86_64]69
"_xmlTextReaderNodeType", referenced from:
_xml2_read_toc in libarchive.a[x86_64]69
"_xmlTextReaderRead", referenced from:
_xml2_read_toc in libarchive.a[x86_64]69
_xml2_read_toc in libarchive.a[x86_64]69
"_xmlTextReaderSetErrorHandler", referenced from:
_xml2_read_toc in libarchive.a[x86_64]69
The text was updated successfully, but these errors were encountered:
On my M1 (current OS, current Xcode) I tried
./configure CC="gcc -arch x86_64 -arch arm64"
and the result looked good, at least the library was about twice as big and my program using libarchive.a did run. But the same command on an Intel Mac (same OS, same compiler, practically the same setup) stopped with an error:
checking for libxml-2.0... yes
checking for xmlInitParser in -lxml2... no
configure: error: in `/Users/dlorenz/Downloads/libarchive-3.7.4':
configure: error: Missing xml2 library
Just using ./configure worked fine on that machine, but obviously does not create a universal library.
I tried installing from macports, but that won't result in a universal binary.
I tried simply coping the universal library and the 2 headers over to the intel Machine, but when trying to compile my program with it, I got the "Undefined symbols for architecture x86_64" errors below.
Undefined symbols for architecture x86_64:
"_BZ2_bzDecompress", referenced from:
_bzip2_filter_read in libarchive.a[x86_64]40
_extract_pack_stream in libarchive.a[x86_64]54
_rd_contents in libarchive.a[x86_64]69
_archive_read_format_zip_read_data in libarchive.a[x86_64]70
"_BZ2_bzDecompressEnd", referenced from:
_bzip2_filter_read in libarchive.a[x86_64]40
_bzip2_filter_close in libarchive.a[x86_64]40
_archive_read_format_7zip_cleanup in libarchive.a[x86_64]54
_extract_pack_stream in libarchive.a[x86_64]54
_init_decompression in libarchive.a[x86_64]54
_xar_cleanup in libarchive.a[x86_64]69
_rd_contents_init in libarchive.a[x86_64]69
...
"_BZ2_bzDecompressInit", referenced from:
_bzip2_filter_read in libarchive.a[x86_64]40
_bzip2_filter_read in libarchive.a[x86_64]40
_init_decompression in libarchive.a[x86_64]54
_init_decompression in libarchive.a[x86_64]54
_rd_contents_init in libarchive.a[x86_64]69
_rd_contents_init in libarchive.a[x86_64]69
_archive_read_format_zip_read_data in libarchive.a[x86_64]70
...
"_crc32", referenced from:
_gzip_filter_read in libarchive.a[x86_64]44
_archive_read_format_7zip_bid in libarchive.a[x86_64]54
_archive_read_format_7zip_read_header in libarchive.a[x86_64]54
_archive_read_format_7zip_read_header in libarchive.a[x86_64]54
_archive_read_format_7zip_read_header in libarchive.a[x86_64]54
_archive_read_format_7zip_read_data in libarchive.a[x86_64]54
_header_bytes in libarchive.a[x86_64]54
...
"_iconv", referenced from:
_iconv_strncat_in_locale in libarchive.a[x86_64]71
"_iconv_close", referenced from:
_free_sconv_object in libarchive.a[x86_64]71
_free_sconv_object in libarchive.a[x86_64]71
"_iconv_open", referenced from:
_get_sconv_object in libarchive.a[x86_64]71
"_inflate", referenced from:
_gzip_filter_read in libarchive.a[x86_64]44
_extract_pack_stream in libarchive.a[x86_64]54
_cab_read_ahead_cfdata in libarchive.a[x86_64]58
_archive_read_format_iso9660_read_data in libarchive.a[x86_64]61
_rd_contents in libarchive.a[x86_64]69
_archive_read_format_zip_seekable_read_header in libarchive.a[x86_64]70
_zip_read_data_deflate in libarchive.a[x86_64]70
...
"_inflateEnd", referenced from:
_gzip_filter_read in libarchive.a[x86_64]44
_gzip_filter_close in libarchive.a[x86_64]44
_archive_read_format_7zip_cleanup in libarchive.a[x86_64]54
_archive_read_format_cab_cleanup in libarchive.a[x86_64]58
_archive_read_format_iso9660_cleanup in libarchive.a[x86_64]61
_xar_cleanup in libarchive.a[x86_64]69
_archive_read_format_zip_cleanup in libarchive.a[x86_64]70
...
"inflateInit2", referenced from:
_gzip_filter_read in libarchive.a[x86_64]44
_init_decompression in libarchive.a[x86_64]54
_cab_read_ahead_cfdata in libarchive.a[x86_64]58
_archive_read_format_zip_seekable_read_header in libarchive.a[x86_64]70
_zip_read_data_deflate in libarchive.a[x86_64]70
"inflateInit", referenced from:
_archive_read_format_iso9660_read_data in libarchive.a[x86_64]61
_xar_read_header in libarchive.a[x86_64]69
_rd_contents_init in libarchive.a[x86_64]69
"_inflateReset", referenced from:
_init_decompression in libarchive.a[x86_64]54
_cab_read_ahead_cfdata in libarchive.a[x86_64]58
_cab_read_ahead_cfdata in libarchive.a[x86_64]58
_archive_read_format_iso9660_read_data in libarchive.a[x86_64]61
_xar_read_header in libarchive.a[x86_64]69
_rd_contents_init in libarchive.a[x86_64]69
_archive_read_format_zip_seekable_read_header in libarchive.a[x86_64]70
...
"_inflateSetDictionary", referenced from:
_cab_read_ahead_cfdata in libarchive.a[x86_64]58
"_xmlCleanupParser", referenced from:
_xml2_read_toc in libarchive.a[x86_64]69
"_xmlFreeTextReader", referenced from:
_xml2_read_toc in libarchive.a[x86_64]69
"_xmlReaderForIO", referenced from:
_xml2_read_toc in libarchive.a[x86_64]69
"_xmlTextReaderConstLocalName", referenced from:
_xml2_read_toc in libarchive.a[x86_64]69
_xml2_read_toc in libarchive.a[x86_64]69
"_xmlTextReaderConstValue", referenced from:
_xml2_read_toc in libarchive.a[x86_64]69
_xml2_read_toc in libarchive.a[x86_64]69
"_xmlTextReaderIsEmptyElement", referenced from:
_xml2_read_toc in libarchive.a[x86_64]69
"_xmlTextReaderMoveToFirstAttribute", referenced from:
_xml2_read_toc in libarchive.a[x86_64]69
"_xmlTextReaderMoveToNextAttribute", referenced from:
_xml2_read_toc in libarchive.a[x86_64]69
"_xmlTextReaderNodeType", referenced from:
_xml2_read_toc in libarchive.a[x86_64]69
"_xmlTextReaderRead", referenced from:
_xml2_read_toc in libarchive.a[x86_64]69
_xml2_read_toc in libarchive.a[x86_64]69
"_xmlTextReaderSetErrorHandler", referenced from:
_xml2_read_toc in libarchive.a[x86_64]69
The text was updated successfully, but these errors were encountered: