Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#64727 closed defect (fixed)

gettext-runtime: Can't build on clean macOS Lion

Reported by: catap (Kirill A. Korinsky) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: mascguy (Christopher Nielsen)
Port: gettext-runtime

Description

Let assume that I've installed MacPorts to brand new prefix: /opt/bootstrap.

An attempt to run sudo /opt/bootstrap/bin/port install --unrequested gettext-runtime fails with error:

--->  Building gettext-runtime
Executing:  cd "/opt/bootstrap/var/macports/build/_opt_bootstrap_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gettext/gettext-runtime/work/gettext-0.21/gettext-runtime" && /usr/bin/make -j1 -w all 
make: Entering directory `/opt/bootstrap/var/macports/build/_opt_bootstrap_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gettext/gettext-runtime/work/gettext-0.21/gettext-runtime'
/usr/bin/make  all-recursive
make[1]: Entering directory `/opt/bootstrap/var/macports/build/_opt_bootstrap_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gettext/gettext-runtime/work/gettext-0.21/gettext-runtime'
Making all in doc
make[2]: Entering directory `/opt/bootstrap/var/macports/build/_opt_bootstrap_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gettext/gettext-runtime/work/gettext-0.21/gettext-runtime/doc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/opt/bootstrap/var/macports/build/_opt_bootstrap_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gettext/gettext-runtime/work/gettext-0.21/gettext-runtime/doc'
Making all in intl
make[2]: Entering directory `/opt/bootstrap/var/macports/build/_opt_bootstrap_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gettext/gettext-runtime/work/gettext-0.21/gettext-runtime/intl'
/usr/bin/make  all-am
make[3]: Entering directory `/opt/bootstrap/var/macports/build/_opt_bootstrap_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gettext/gettext-runtime/work/gettext-0.21/gettext-runtime/intl'
sed -e '/IN_LIBGLOCALE/d' \
	    -e 's,@''HAVE_POSIX_PRINTF''@,1,g' \
	    -e 's,@''HAVE_ASPRINTF''@,1,g' \
	    -e 's,@''HAVE_SNPRINTF''@,1,g' \
	    -e 's,@''HAVE_WPRINTF''@,1,g' \
	    -e 's,@''HAVE_NAMELESS_LOCALES''@,0,g' \
	    -e 's,@''HAVE_NEWLOCALE''@,1,g' \
	  < ./libgnuintl.in.h \
	| if test 'no' = yes; then \
	    sed -e 's/extern \([^()]*\);/extern __declspec (dllimport) \1;/'; \
	  else \
	    cat; \
	  fi \
	| sed -e 's/extern \([^"]\)/extern LIBINTL_DLL_EXPORTED \1/' \
	      -e "/#define _LIBINTL_H/r ./export.h" \
	| sed -e 's,@''HAVE_VISIBILITY''@,1,g' \
	  > libgnuintl.h
/bin/sh ../libtool  --tag=CC   --mode=compile /usr/bin/clang -DHAVE_CONFIG_H -I. -I..  -DLOCALEDIR=\"/opt/bootstrap/share/locale\" -DLOCALE_ALIAS_PATH=\"\" -DLIBDIR=\"/opt/bootstrap/lib\" -DBUILDING_LIBINTL -DBUILDING_DLL -DIN_LIBINTL  -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/opt/bootstrap/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -Drelocate2=libintl_relocate2 -DDEPENDS_ON_LIBICONV=1 -I/opt/bootstrap/include -fvisibility=hidden -pipe -Os -arch x86_64 -c -o bindtextdom.lo ./bindtextdom.c
libtool: compile:  /usr/bin/clang -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR=\"/opt/bootstrap/share/locale\" -DLOCALE_ALIAS_PATH=\"\" -DLIBDIR=\"/opt/bootstrap/lib\" -DBUILDING_LIBINTL -DBUILDING_DLL -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/opt/bootstrap/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -Drelocate2=libintl_relocate2 -DDEPENDS_ON_LIBICONV=1 -I/opt/bootstrap/include -fvisibility=hidden -pipe -Os -arch x86_64 -c ./bindtextdom.c  -fno-common -DPIC -o .libs/bindtextdom.o
In file included from ./bindtextdom.c:18:
../config.h:1148:5: error: builtin feature check macro requires a parenthesized identifier
#if _GL_HAS_ATTRIBUTE (const)
    ^
../config.h:1089:34: note: expanded from macro '_GL_HAS_ATTRIBUTE'
# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__)
                                 ^
../config.h:1148:5: error: expected end of line in preprocessor expression
#if _GL_HAS_ATTRIBUTE (const)
    ^
../config.h:1089:63: note: expanded from macro '_GL_HAS_ATTRIBUTE'
# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__)
                                                              ^
2 errors generated.
make[3]: *** [bindtextdom.lo] Error 1
make[3]: Leaving directory `/opt/bootstrap/var/macports/build/_opt_bootstrap_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gettext/gettext-runtime/work/gettext-0.21/gettext-runtime/intl'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/opt/bootstrap/var/macports/build/_opt_bootstrap_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gettext/gettext-runtime/work/gettext-0.21/gettext-runtime/intl'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/bootstrap/var/macports/build/_opt_bootstrap_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gettext/gettext-runtime/work/gettext-0.21/gettext-runtime'
make: *** [all] Error 2
make: Leaving directory `/opt/bootstrap/var/macports/build/_opt_bootstrap_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gettext/gettext-runtime/work/gettext-0.21/gettext-runtime'
Command failed:  cd "/opt/bootstrap/var/macports/build/_opt_bootstrap_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gettext/gettext-runtime/work/gettext-0.21/gettext-runtime" && /usr/bin/make -j1 -w all 

Change History (11)

comment:1 Changed 2 years ago by jmroot (Joshua Root)

Owner: set to ryandesign
Status: newassigned
Summary: Can't build on clean macOS Liongettext-runtime: Can't build on clean macOS Lion

comment:2 Changed 2 years ago by catap (Kirill A. Korinsky)

The minimal code that fails:

macOS-Lion:tmp catap$ cat test.c 
# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__)

#if _GL_HAS_ATTRIBUTE (const)
# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
#else
# define _GL_ATTRIBUTE_CONST
#endif

macOS-Lion:tmp catap$ clang test.c 
test.c:3:5: error: builtin feature check macro requires a parenthesized identifier
#if _GL_HAS_ATTRIBUTE (const)
    ^
test.c:1:34: note: expanded from macro '_GL_HAS_ATTRIBUTE'
# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__)
                                 ^
test.c:3:5: error: expected end of line in preprocessor expression
#if _GL_HAS_ATTRIBUTE (const)
    ^
test.c:1:63: note: expanded from macro '_GL_HAS_ATTRIBUTE'
# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__)
                                                              ^
2 errors generated.
macOS-Lion:tmp catap$ clang --version
Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.4.2
Thread model: posix
macOS-Lion:tmp catap$ 

comment:3 Changed 2 years ago by catap (Kirill A. Korinsky)

naive approach with blacklisting this clang fails with cycling dependnecy:

Error: The following dependencies were not installed because all of them have unmet dependencies (likely due to a dependency cycle): clang-3.7 cctools libunwind-headers xz gettext gettext-runtime gettext-tools-libs libtextstyle llvm-3.4 zlib clang-3.4 ld64 ld64-274 libcxx perl5 perl5.28 gdbm python27 openssl11 sqlite3 llvm-3.7

comment:5 Changed 2 years ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:6 Changed 2 years ago by catap (Kirill A. Korinsky)

Resolution: fixed
Status: assignedclosed

In 78f8dbbd898e04173bda83e9c1ac0f138cdda7fb/macports-ports (master):

gettext: fixed build on macOS 10.7 and 10.8

Closes: #64727

comment:7 Changed 2 years ago by catap (Kirill A. Korinsky)

The same issue exist in m4, texinfo, libunistring and libidn2

Last edited 2 years ago by catap (Kirill A. Korinsky) (previous) (diff)

comment:8 Changed 2 years ago by catap (Kirill A. Korinsky)

In 743fb40e6260c01804d0da468a2d8f313076104f/macports-ports (master):

libunistring: fixed build on macOS 10.7 and 10.8

See: #64727

comment:9 Changed 2 years ago by catap (Kirill A. Korinsky)

In 959e12e4ac246305a3985c9aaf567ccd8a803c52/macports-ports (master):

texinfo: fixed build on macOS 10.7 and 10.8

See: #64727

comment:10 Changed 2 years ago by catap (Kirill A. Korinsky)

In c1a7cb680b5be645a8a6abe8c4e774fa2175cb00/macports-ports (master):

libidn2: fixed build on macOS 10.7 and 10.8

See: #64727

comment:11 Changed 2 years ago by catap (Kirill A. Korinsky)

In b67fe7da75d830a70520f910710a5fd531b28718/macports-ports (master):

m4: fixed build on macOS 10.7 and 10.8

See: #64727

Note: See TracTickets for help on using tickets.