Hello!

'make check' ends like this (build succeeded, of course):

        Making check in tests
        /usr/bin/make  genfile checkseekhole ckmtime
        /opt/local/bin/gcc-mp-15 -DHAVE_CONFIG_H -I. -I..  -I../gnu -I../gnu 
-I../gnu -I../lib -DLOCALEDIR=\"/opt/local/share/locale\" -I/opt/local/include  
-pipe -Os -arch x86_64 -MT genfile.o -MD -MP -MF .deps/genfile.Tpo -c -o 
genfile.o genfile.c
        mv -f .deps/genfile.Tpo .deps/genfile.Po
        /opt/local/bin/gcc-mp-15 -DHAVE_CONFIG_H -I. -I..  -I../gnu -I../gnu 
-I../gnu -I../lib -DLOCALEDIR=\"/opt/local/share/locale\" -I/opt/local/include  
-pipe -Os -arch x86_64 -MT argcv.o -MD -MP -MF .deps/argcv.Tpo -c -o argcv.o 
argcv.c
        mv -f .deps/argcv.Tpo .deps/argcv.Po
        /opt/local/bin/gcc-mp-15  -pipe -Os -arch x86_64  -L/opt/local/lib 
-Wl,-headerpad_max_install_names -arch x86_64 -o genfile genfile.o argcv.o 
../gnu/libgnu.a           Undefined symbols for architecture x86_64:
          "_libintl_gettext", referenced from:
              _get_size.isra.0 in genfile.o
              _generate_sparse_file in genfile.o
              _verify_file in genfile.o
              _parse_opt in genfile.o
              _generate_simple_file in genfile.o
              _read_name_from_file in genfile.o
              _generate_files_from_list in genfile.o
              ...
          "_libintl_bindtextdomain", referenced from:
              _main in genfile.o
          "_libintl_textdomain", referenced from:
              _main in genfile.o
          "_libintl_setlocale", referenced from:
              _main in genfile.o
          "_libintl_dgettext", referenced from:
              _arg in libgnu.a(libgnu_a-argp-help.o)
              _hol_usage in libgnu.a(libgnu_a-argp-help.o)
              _usage_argful_short_opt in libgnu.a(libgnu_a-argp-help.o)
              _argp_args_usage in libgnu.a(libgnu_a-argp-help.o)
              _argp_doc in libgnu.a(libgnu_a-argp-help.o)
              _print_header in libgnu.a(libgnu_a-argp-help.o)
              _argp_failure in libgnu.a(libgnu_a-argp-help.o)
              ...
        ld: symbol(s) not found for architecture x86_64
        collect2: error: ld returned 1 exit status
        make[2]: *** [genfile] Error 1
        make[1]: *** [check-am] Error 2
        make: *** [check-recursive] Error 1
        Command failed:  cd 
"/opt/local/var/macports/build/gnutar-7f9e2dd8/work/tar-1.35" && /usr/bin/make 
check  Exit code: 2

While building with MacPorts *tar* was built this way:

        /opt/local/bin/gcc-mp-15   -pipe -Os -arch x86_64  -L/opt/local/lib 
-Wl,-headerpad_max_install_names -arch x86_64 -o tar buffer.o checkpoint.o 
compare.o create.o delete.o exit.o exclist.o extract.o xheader.o incremen.o 
list.o map.o misc.o names.o sparse.o suffix.o system.o tar.o transform.o 
unlink.o update.o utf8.o warning.o xattrs.o  ../lib/libtar.a ../gnu/libgnu.a    
      -lintl -Wl,-framework -Wl,CoreFoundation -liconv

"-lintl -Wl,-framework -Wl,CoreFoundation -liconv" obviously allows tar to 
build. This addition was introduced by this patch:


        root 426 /\ cat 
/opt/mports/macports-ports/archivers/gnutar/files/patch-Makefile.patch
        From 8632df398b2f548465ebe68b8f494c0d6f8d913d Mon Sep 17 00:00:00 2001
        From: Sergey Poznyakoff <[email protected]>
        Date: Tue, 18 Jul 2023 17:02:23 +0300
        Subject: Fix savannah bug #64441
        
        * src/Makefile.am (tar_LDADD): Add libiconv libraries.
        
        --- src/Makefile.am
        +++ src/Makefile.am
        @@ -52,4 +52,5 @@ AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
         tar_LDADD = $(LIBS) ../lib/libtar.a ../gnu/libgnu.a\
          $(LIB_ACL) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS)\
          $(LIB_GETRANDOM) $(LIB_HARD_LOCALE) $(FILE_HAS_ACL_LIB) 
$(LIB_MBRTOWC)\
        - $(LIB_SELINUX) $(LIB_SETLOCALE_NULL)
        + $(LIB_SELINUX) $(LIB_SETLOCALE_NULL) \
        + $(LIBINTL) $(LIBICONV)

The same seems to be needed for all test programmes…

--

Greetings

  Pete

If it does exist, it's out of date. 
                                – Arnold's Second Law of Documentation


Reply via email to