[MacPorts] #51711: libarchive @3.2.1 - Build failure
#51711: libarchive @3.2.1 - Build failure --------------------+-------------------------------- Reporter: eric@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Keywords: | Port: libarchive --------------------+-------------------------------- A new version of `libarchive(@3.2.1)` arrived last night when I ran the update… But, the build fails. Did try to clean->reinstall etc. I have no idea how to solve this. Last part of: `sudo port -v -s upgrade libarchive` (from 1st error) {{{ libarchive/archive_read_support_format_lha.c:1730:3: error: use of unknown builtin '__builtin_bswap16' [-Wimplicit-function-declaration] CRC16W; ^ libarchive/archive_read_support_format_lha.c:1725:11: note: expanded from macro 'CRC16W' crc ^= bswap16(*buff); buff++; \ ^ libarchive/archive_read_support_format_lha.c:1719:22: note: expanded from macro 'bswap16' # define bswap16(x) __builtin_bswap16(x) ^ 1 error generated. make[1]: *** [libarchive/archive_read_support_format_lha.lo] Error 1 make[1]: *** Waiting for unfinished jobs.... libtool: compile: /usr/bin/clang -DHAVE_CONFIG_H -I. -I/opt/local/include -I/opt/local/include/libxml2 -pipe -Os -arch x86_64 -Wall -Wformat -Wformat-security -MT libarchive/archive_read_support_format_mtree.lo -MD -MP -MF libarchive/.deps/archive_read_support_format_mtree.Tpo -c libarchive/archive_read_support_format_mtree.c -fno-common -DPIC -o libarchive/.libs/archive_read_support_format_mtree.o libtool: compile: /usr/bin/clang -DHAVE_CONFIG_H -I. -I/opt/local/include -I/opt/local/include/libxml2 -pipe -Os -arch x86_64 -Wall -Wformat -Wformat-security -MT libarchive/archive_read_support_format_iso9660.lo -MD -MP -MF libarchive/.deps/archive_read_support_format_iso9660.Tpo -c libarchive/archive_read_support_format_iso9660.c -o libarchive/archive_read_support_format_iso9660.o >/dev/null 2>&1 libtool: compile: /usr/bin/clang -DHAVE_CONFIG_H -I. -I/opt/local/include -I/opt/local/include/libxml2 -pipe -Os -arch x86_64 -Wall -Wformat -Wformat-security -MT libarchive/archive_read_support_format_cab.lo -MD -MP -MF libarchive/.deps/archive_read_support_format_cab.Tpo -c libarchive/archive_read_support_format_cab.c -o libarchive/archive_read_support_format_cab.o >/dev/null 2>&1 libtool: compile: /usr/bin/clang -DHAVE_CONFIG_H -I. -I/opt/local/include -I/opt/local/include/libxml2 -pipe -Os -arch x86_64 -Wall -Wformat -Wformat-security -MT libarchive/archive_read_support_format_mtree.lo -MD -MP -MF libarchive/.deps/archive_read_support_format_mtree.Tpo -c libarchive/archive_read_support_format_mtree.c -o libarchive/archive_read_support_format_mtree.o >/dev/null 2>&1 make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_libarchive/libarchive/work/libarchive-3.2.1' make: *** [all] Error 2 make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_libarchive/libarchive/work/libarchive-3.2.1' Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_libarchive/libarchive/work/libarchive-3.2.1" && /usr/bin/make -j5 -w all Exit code: 2 Error: org.macports.build for port libarchive returned: command execution failed Warning: targets not executed for libarchive: org.macports.install org.macports.build org.macports.destroot Please see the log file for port libarchive for details: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_libarchive/libarchive/main.log Error: Unable to upgrade port: 1 To report a bug, follow the instructions in the guide: http://guide.macports.org/#project.tickets :: code: 1 [Me@hostname] ~$ }}} //Attaching the `**/main.log`// Current working: {{{ $ port echo outdated libarchive @3.1.2_2 }}} ---- //OS X: 10.7.5, MacPorts: 2.3.4, Xcode: 4.4.3// -- Ticket URL: <https://trac.macports.org/ticket/51711> MacPorts <https://www.macports.org/> Ports system for OS X
#51711: libarchive @3.2.1 - Build failure -------------------------+-------------------------------- Reporter: eric@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: libarchive | -------------------------+-------------------------------- Comment (by toby@…): OS X: 10.7.5, MacPorts: 2.3.4, Xcode: 4.4.3 Uhhhhhh -- Ticket URL: <https://trac.macports.org/ticket/51711#comment:1> MacPorts <https://www.macports.org/> Ports system for OS X
#51711: libarchive @3.2.1 - Build failure -------------------------+-------------------------------- Reporter: eric@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: libarchive | -------------------------+-------------------------------- Comment (by toby@…): Here's the check, which is apparently wrong for your compiler: {{{ #if defined(_MSC_VER) && _MSC_VER >= 1400 /* Visual Studio */ # define bswap16(x) _byteswap_ushort(x) #elif (defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 8) \ || defined(__clang__) # define bswap16(x) __builtin_bswap16(x) #else # define bswap16(x) ((((x) >> 8) & 0xff) | ((x) << 8)) #endif }}} If you can provide the output of the following command, I might be able to help: {{{ cc -E -dM -xc /dev/null }}} -- Ticket URL: <https://trac.macports.org/ticket/51711#comment:2> MacPorts <https://www.macports.org/> Ports system for OS X
#51711: libarchive @3.2.1 - Build failure -------------------------+-------------------- Reporter: eric@… | Owner: toby@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: libarchive | -------------------------+-------------------- Changes (by toby@…): * owner: macports-tickets@… => toby@… -- Ticket URL: <https://trac.macports.org/ticket/51711#comment:3> MacPorts <https://www.macports.org/> Ports system for OS X
#51711: libarchive @3.2.1 - Build failure -------------------------+-------------------- Reporter: eric@… | Owner: toby@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: libarchive | -------------------------+-------------------- Comment (by eric@…): Thanks for you reply… I have GCC @5.4.0 installed to, so `cc` alone in Terminal would reflect to that one. And when using `sudo port ...` it's using the Apple bundled version, right? The error in the first post also list `/usr/bin/clang` So, I ran the command on both. _See attachment “cc_test.txt”_ -- Ticket URL: <https://trac.macports.org/ticket/51711#comment:4> MacPorts <https://www.macports.org/> Ports system for OS X
#51711: libarchive @3.2.1 - Build failure -------------------------+-------------------- Reporter: eric@… | Owner: toby@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: libarchive | -------------------------+-------------------- Comment (by toby@…): So it probably needs a more specific __clang__ version check. I'll try to figure out when __builtin_bswap16 was added. -- Ticket URL: <https://trac.macports.org/ticket/51711#comment:5> MacPorts <https://www.macports.org/> Ports system for OS X
#51711: libarchive @3.2.1 - Build failure -------------------------+-------------------- Reporter: eric@… | Owner: toby@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: libarchive | -------------------------+-------------------- Comment (by toby@…): Or could use __has_builtin(__builtin_bswap16) if that's supported on that clang version -- Ticket URL: <https://trac.macports.org/ticket/51711#comment:6> MacPorts <https://www.macports.org/> Ports system for OS X
#51711: libarchive @3.2.1 - Build failure -------------------------+-------------------- Reporter: eric@… | Owner: toby@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: libarchive | -------------------------+-------------------- Comment (by toby@…): Speculative fix: r149678 -- Ticket URL: <https://trac.macports.org/ticket/51711#comment:8> MacPorts <https://www.macports.org/> Ports system for OS X
#51711: libarchive @3.2.1 - Build failure -------------------------+-------------------- Reporter: eric@… | Owner: toby@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: fixed | Keywords: Port: libarchive | -------------------------+-------------------- Changes (by toby@…): * status: new => closed * resolution: => fixed -- Ticket URL: <https://trac.macports.org/ticket/51711#comment:9> MacPorts <https://www.macports.org/> Ports system for OS X
#51711: libarchive @3.2.1 - Build failure -------------------------+-------------------- Reporter: eric@… | Owner: toby@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: fixed | Keywords: Port: libarchive | -------------------------+-------------------- Comment (by eric@…): Replying to [comment:8 toby@…]:
Speculative fix: r149678
Thank you! 👍 Installation went fine. · Eric -- Ticket URL: <https://trac.macports.org/ticket/51711#comment:10> MacPorts <https://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts