[MacPorts] #53712: libarchive @3.3.1: error: use of undeclared identifier 'ACL_SYNCHRONIZE'

MacPorts noreply at macports.org
Sat Mar 18 08:52:30 UTC 2017


#53712: libarchive @3.3.1: error: use of undeclared identifier 'ACL_SYNCHRONIZE'
-------------------------+-------------------------------------------------
  Reporter:  Gord-       |      Owner:  tobypeterson
  Butler                 |
      Type:  defect      |     Status:  assigned
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:  2.4.1
Resolution:              |   Keywords:  leopard snowleopard lion
      Port:  libarchive  |  mountainlion mavericks
-------------------------+-------------------------------------------------

Comment (by ballapete):

 Replying to [comment:56 thetrial]:
 > Well, maybe I’m absolutely too dumb … but I haven’t found out how to
 patch :-( Which file exactly? I thought, Macport would patch automatically
 … no.

 Right, it does not patch automatically. Patching has to be programmed into
 the Portfile (``'port file libarchive'``). And the patch file supplied by
 Michael has bugs. It contains at its beginning a patch of Portfile

 {{{
 diff --git libarchive/Portfile libarchive/Portfile
 index 3678221b87..0c1f098326 100644
 --- libarchive/Portfile
 +++ libarchive/Portfile
 @@ -25,9 +25,27 @@ depends_lib      port:bzip2 port:zlib port:libxml2
 port:xz \

  patchfiles       patch-libarchive__archive_read_support_format_lha.c.diff

 +####
 +# the following section is to be removed when 3.3.2 is released. it is
 +# a temporary fix for older Mac OS X versions, and is already upstream.
 +
 +revision         1
 +
 +patchfiles-append \
 +                 patch-3.3.1_to_master.diff \
 +                 patch-Makefile.am.diff
 +
 +depends_build    port:autoconf port:automake port:libtool
 +
 +post-patch {
 +    system -W ${worksrcpath} "build/autogen.sh"
 +}
 +
 +####
 +
  configure.args   --enable-bsdtar=shared --enable-bsdcpio=shared \
                   --disable-silent-rules --without-nettle \
 -                 --without-openssl --without-lzmadec
 +                 --without-openssl

  livecheck.type  regex
  livecheck.regex libarchive-(\[0-9.\]+)\\.tar.gz
 }}}
 which has to be removed and applied separately to Portfile. Then his patch
 file needs to be split to match the names ``patch-3.3.1_to_master.diff``
 and ``patch-Makefile.am.diff``. These files belong into the ``files`` sub-
 directory in the directory where the ``Portfile`` resides. The second
 patch file is just this block at the end:

 {{{
 diff --git libarchive/files/patch-Makefile.am.diff libarchive/files/patch-
 Makefile.am.diff
 new file mode 100644
 index 0000000000..05e51c0eb0
 --- /dev/null
 +++ libarchive/files/patch-Makefile.am.diff
 @@ -0,0 +1,11 @@
 +--- Makefile.am.orig
 ++++ Makefile.am
 +@@ -23,7 +23,7 @@
 + DISTCHECK_CONFIGURE_FLAGS = --enable-bsdtar --enable-bsdcpio
 + # The next line is commented out by default in shipping libarchive
 releases.
 + # It is uncommented by default in trunk.
 +-DEV_CFLAGS=-Werror -Wextra -Wunused -Wshadow -Wmissing-prototypes
 -Wcast-qual -g
 ++# DEV_CFLAGS=-Werror -Wextra -Wunused -Wshadow -Wmissing-prototypes
 -Wcast-qual -g
 + AM_CFLAGS=$(DEV_CFLAGS)
 + PLATFORMCPPFLAGS = @PLATFORMCPPFLAGS@
 + AM_CPPFLAGS=$(PLATFORMCPPFLAGS)
 }}}

 Before you start splitting the patches file you need to correct the paths
 it uses by substituting all occurrences of `` [ab]/archivers/`` with ``
 ``.


 Anyway, on my Snow Leopard Power Book with Mac OS X 10.6.8 libarchive
 @3.3.1 does not build because of:

 {{{
 libtool: compile:  /usr/bin/llvm-gcc-4.2 -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_data_into_fd.lo -MD -MP -MF
 libarchive/.deps/archive_read_data_into_fd.Tpo -c
 libarchive/archive_read_data_into_fd.c -o
 libarchive/archive_read_data_into_fd.o >/dev/null 2>&1
 libarchive/archive_read_disk_entry_from_file.c:677: error:
 ‘ACL_SYNCHRONIZE’ undeclared here (not in a function)
 libarchive/archive_read_disk_entry_from_file.c: In function
 ‘translate_guid’:
 libarchive/archive_read_disk_entry_from_file.c:757: warning: implicit
 declaration of function ‘getpwuuid’
 libarchive/archive_read_disk_entry_from_file.c:757: warning: assignment
 makes pointer from integer without a cast
 libarchive/archive_read_disk_entry_from_file.c:767: warning: implicit
 declaration of function ‘getgruuid’
 libarchive/archive_read_disk_entry_from_file.c:767: warning: assignment
 makes pointer from integer without a cast
 make[1]: *** [libarchive/archive_read_disk_entry_from_file.lo] Error 1
 }}}

--
Ticket URL: <https://trac.macports.org/ticket/53712#comment:58>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list