Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#53889 closed defect (fixed)

libarchive @3.3.1: error: possibly undefined macro: AC_MSG_FAILURE

Reported by: tideofwords Owned by: tobypeterson
Priority: Normal Milestone:
Component: ports Version: 2.4.1
Keywords: Cc: tideofwords@…, michaelld (Michael Dickens), dliessi (Davide Liessi), neubig (Graham Neubig), ionic
Port: libarchive

Description

I'm running:

  • Mac OS Sierra Version 10.12.3 (16D32)
  • XCode Version 8.3 (8E162)

I tried to install kdenlive ("sudo port install kdenlive"). It gave me the following error message:

--->  Applying patches to libarchive
Error: Failed to patch libarchive: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_archivers_libarchive/libarchive/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port kdenlive failed

I'm new to MacPorts, and this is quite a bit more complicated than any install I've ever done -- please help!

Attachments (1)

main.log (57.9 KB) - added by tideofwords 7 years ago.
main.log

Download all attachments as: .zip

Change History (10)

Changed 7 years ago by tideofwords

Attachment: main.log added

main.log

comment:1 in reply to:  description Changed 7 years ago by deszoeke (Simon de Szoeke)

This appears to be a problem with the dependency libarchive. For me libarchive-3.3.1_1.darwin_16.x86_64 fails to patch with

sudo port upgrade outdated

after updating to Xcode 8.3 8E162 (MacOS 10.12.4).

From my log, something in autoconf seems to break:

168 :debug:patch Executing proc-post-org.macports.patch-patch-0
169 :debug:patch system -W /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_archivers_libarchive/libarchive/work/libarchive-3.3.1: build/autogen.sh
170 :info:patch + aclocal -I build/autoconf
171 :info:patch + case `uname` in
172 :info:patch ++ uname
173 :info:patch + glibtoolize --automake -c
174 :info:patch + autoconf
175 :info:patch configure.ac:136: error: possibly undefined macro: AC_MSG_FAILURE
176 :info:patch       If this token and others are legitimate, please use m4_pattern_allow.
177 :info:patch       See the Autoconf documentation.
178 :info:patch configure.ac:310: error: possibly undefined macro: AC_CHECK_LIB
179 :info:patch Command failed: build/autogen.sh
180 :info:patch Exit code: 1
181 :error:patch Failed to patch libarchive: command execution failed
182 :debug:patch Error code: NONE
183 :debug:patch Backtrace: command execution failed
184 :debug:patch     while executing
185 :debug:patch "$post $targetname"
186 :error:patch See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_archivers_libarchive/libarchive/main.log for details.
187 version:1

Similarly in @tideofwords's log, some autoconf macros appear to be missing. Perhaps that's relevant.

Replying to tideofwords:

I'm running:

  • Mac OS Sierra Version 10.12.3 (16D32)
  • XCode Version 8.3 (8E162)

I tried to install kdenlive ("sudo port install kdenlive"). It gave me the following error message:

--->  Applying patches to libarchive
Error: Failed to patch libarchive: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_archivers_libarchive/libarchive/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port kdenlive failed

I'm new to MacPorts, and this is quite a bit more complicated than any install I've ever done -- please help!

Last edited 7 years ago by deszoeke (Simon de Szoeke) (previous) (diff)

comment:2 Changed 7 years ago by deszoeke (Simon de Szoeke)

Based on a suggestion at https://github.com/sleuthkit/sleuthkit/issues/263 running

sudo port install autoconf automake libtool pkgconfig
sudo port clean libarchive

first, then continuing my upgrade/installation made it work.

Last edited 7 years ago by deszoeke (Simon de Szoeke) (previous) (diff)

comment:3 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to tobypeterson
Port: libarchive added; kdenlive removed
Status: newassigned
Summary: kdenlive @0.9.10_3 Cannot install -- "Failed to patch libarchive"libarchive @3.3.1: error: possibly undefined macro: AC_MSG_FAILURE

This seems to be fallout from fixing #53712.

comment:4 Changed 7 years ago by michaelld (Michael Dickens)

Maybe it's because I used "depends_build" instead of "depends_lib"? I can't imagine that pkgconfig makes any difference, but maybe so? Otherwise the other 3 dependencies are included for "build" (even though they are used in post-patch).

comment:5 Changed 7 years ago by michaelld (Michael Dickens)

Cc: michaelld added

comment:6 Changed 7 years ago by dliessi (Davide Liessi)

Cc: dliessi added

comment:7 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: neubig added

Has duplicate #53897 which says pkgconfig is needed.

depends_build is correct for autoconf, automake, libtool and pkgconfig. depends_lib would not be correct as those are not used at runtime, only at build time.

It is not correct to call programs installed by dependencies in a post-patch block, because you cannot guarantee that the programs have been installed by then; that's only guaranteed by the start of the configure phase.

comment:8 Changed 7 years ago by Mihai Moldovan <ionic@…>

Resolution: fixed
Status: assignedclosed

In c8485fe8e579277abb8024c6fcb480be241ba8df/macports-ports:

archivers/libarchive: use automatic autoreconf, add pkgconfig dependency.

Fixes: #53889.

comment:9 Changed 7 years ago by Ionic (Mihai Moldovan)

Cc: ionic added
Note: See TracTickets for help on using tickets.