pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/56498: "devel/m4" build fails on netbsd-9/sparc



The following reply was made to PR pkg/56498; it has been noted by GNATS.

From: "John D. Baker" <jdbaker%consolidated.net@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: pkg/56498: "devel/m4" build fails on netbsd-9/sparc
Date: Sun, 14 Nov 2021 09:42:56 -0600 (CST)

 During the configure phase, right after the check for sparcV8+ instructions,
 all subsequent compilations of the "conftest" proglets unconditionally
 include "-mcpu=v9":
 
 [...]
 configure:8810: checking whether SPARC v8+ instructions are supported
 configure:8827: gcc -c -O2 -D_FORTIFY_SOURCE=2  conftest.c >&5
 /tmp/cccJEe4g.s: Assembler messages:
 /tmp/cccJEe4g.s:12: Error: Architecture mismatch on "membar 2".
 /tmp/cccJEe4g.s:12: (Requires v9|v9a|v9b|v9c|v9d|v9e|v9v|v9m|m8; requested architecture is sparclite.)
 configure:8827: $? = 1
 configure: failed program was:
 | /* confdefs.h */
 | #define PACKAGE_NAME "GNU M4"
 | #define PACKAGE_TARNAME "m4"
 | #define PACKAGE_VERSION "1.4.19"
 | #define PACKAGE_STRING "GNU M4 1.4.19"
 | #define PACKAGE_BUGREPORT "bug-m4%gnu.org@localhost"
 | #define PACKAGE_URL "https://www.gnu.org/software/m4/";
 | #define PACKAGE "m4"
 | #define VERSION "1.4.19"
 | #define HAVE_STDIO_H 1
 | #define HAVE_STDLIB_H 1
 | #define HAVE_STRING_H 1
 | #define HAVE_INTTYPES_H 1
 | #define HAVE_STDINT_H 1
 | #define HAVE_STRINGS_H 1
 | #define HAVE_SYS_STAT_H 1
 | #define HAVE_SYS_TYPES_H 1
 | #define HAVE_UNISTD_H 1
 | #define HAVE_WCHAR_H 1
 | #define HAVE_PTHREAD_H 1
 | #define HAVE_SYS_PARAM_H 1
 | #define HAVE_SYS_SOCKET_H 1
 | #define HAVE_DIRENT_H 1
 | #define HAVE_GETOPT_H 1
 | #define HAVE_SYS_CDEFS_H 1
 | #define HAVE_THREADS_H 1
 | #define HAVE_ICONV_H 1
 | #define HAVE_LIMITS_H 1
 | #define HAVE_WCTYPE_H 1
 | #define HAVE_LANGINFO_H 1
 | #define HAVE_MATH_H 1
 | #define HAVE_SYS_MMAN_H 1
 | #define HAVE_MALLOC_H 1
 | #define HAVE_SPAWN_H 1
 | #define HAVE_SYS_TIME_H 1
 | #define HAVE_SYS_WAIT_H 1
 | #define HAVE_ARPA_INET_H 1
 | #define HAVE_SEMAPHORE_H 1
 | #define HAVE_NETDB_H 1
 | #define HAVE_NETINET_IN_H 1
 | #define HAVE_SYS_SELECT_H 1
 | #define HAVE_SYS_IOCTL_H 1
 | #define HAVE_SYS_UIO_H 1
 | #define STDC_HEADERS 1
 | #define _ALL_SOURCE 1
 | #define _DARWIN_C_SOURCE 1
 | #define _GNU_SOURCE 1
 | #define _HPUX_ALT_XOPEN_SOCKET_API 1
 | #define _NETBSD_SOURCE 1
 | #define _OPENBSD_SOURCE 1
 | #define _POSIX_PTHREAD_SEMANTICS 1
 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1
 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
 | #define __STDC_WANT_LIB_EXT2__ 1
 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1
 | #define _TANDEM_SOURCE 1
 | #define __EXTENSIONS__ 1
 | #define HAVE_FSEEKO 1
 | /* end confdefs.h.  */
 | 
 | int
 | main (void)
 | {
 | asm volatile ("membar 2");
 |   ;
 |   return 0;
 | }
 configure:8836: result: no
 configure:9612: checking for unsigned long long int
 configure:9652: gcc -mcpu=v9 -o conftest -O2 -D_FORTIFY_SOURCE=2  -Wl,-R/usr/pkg/lib conftest.c  >&5
 configure:9652: $? = 0
 configure:9662: result: yes
 configure:9672: checking for long long int
 configure:9712: gcc -mcpu=v9 -o conftest -O2 -D_FORTIFY_SOURCE=2  -Wl,-R/usr/pkg/lib conftest.c  >&5
 configure:9712: $? = 0
 configure:9712: ./conftest
 [1]   Illegal instruction (core dumped) ./conftest${ac_exeext}
 configure:9712: $? = 132
 configure: program exited with status 132
 configure: failed program was:
 | /* confdefs.h */
 | #define PACKAGE_NAME "GNU M4"
 | #define PACKAGE_TARNAME "m4"
 | #define PACKAGE_VERSION "1.4.19"
 | #define PACKAGE_STRING "GNU M4 1.4.19"
 | #define PACKAGE_BUGREPORT "bug-m4%gnu.org@localhost"
 | #define PACKAGE_URL "https://www.gnu.org/software/m4/";
 | #define PACKAGE "m4"
 | #define VERSION "1.4.19"
 | #define HAVE_STDIO_H 1
 | #define HAVE_STDLIB_H 1
 | #define HAVE_STRING_H 1
 | #define HAVE_INTTYPES_H 1
 | #define HAVE_STDINT_H 1
 | #define HAVE_STRINGS_H 1
 | #define HAVE_SYS_STAT_H 1
 | #define HAVE_SYS_TYPES_H 1
 | #define HAVE_UNISTD_H 1
 | #define HAVE_WCHAR_H 1
 | #define HAVE_PTHREAD_H 1
 | #define HAVE_SYS_PARAM_H 1
 | #define HAVE_SYS_SOCKET_H 1
 | #define HAVE_DIRENT_H 1
 | #define HAVE_GETOPT_H 1
 | #define HAVE_SYS_CDEFS_H 1
 | #define HAVE_THREADS_H 1
 | #define HAVE_ICONV_H 1
 | #define HAVE_LIMITS_H 1
 | #define HAVE_WCTYPE_H 1
 | #define HAVE_LANGINFO_H 1
 | #define HAVE_MATH_H 1
 | #define HAVE_SYS_MMAN_H 1
 | #define HAVE_MALLOC_H 1
 | #define HAVE_SPAWN_H 1
 | #define HAVE_SYS_TIME_H 1
 | #define HAVE_SYS_WAIT_H 1
 | #define HAVE_ARPA_INET_H 1
 | #define HAVE_SEMAPHORE_H 1
 | #define HAVE_NETDB_H 1
 | #define HAVE_NETINET_IN_H 1
 | #define HAVE_SYS_SELECT_H 1
 | #define HAVE_SYS_IOCTL_H 1
 | #define HAVE_SYS_UIO_H 1
 | #define STDC_HEADERS 1
 | #define _ALL_SOURCE 1
 | #define _DARWIN_C_SOURCE 1
 | #define _GNU_SOURCE 1
 | #define _HPUX_ALT_XOPEN_SOCKET_API 1
 | #define _NETBSD_SOURCE 1
 | #define _OPENBSD_SOURCE 1
 | #define _POSIX_PTHREAD_SEMANTICS 1
 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
 | #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
 | #define __STDC_WANT_IEC_60559_DFP_EXT__ 1
 | #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
 | #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
 | #define __STDC_WANT_LIB_EXT2__ 1
 | #define __STDC_WANT_MATH_SPEC_FUNCS__ 1
 | #define _TANDEM_SOURCE 1
 | #define __EXTENSIONS__ 1
 | #define HAVE_FSEEKO 1
 | #define GNULIB_REGEX_SINGLE_THREAD 1
 | #define GNULIB_MBRTOWC_SINGLE_THREAD 1
 | #define GNULIB_WCHAR_SINGLE_LOCALE 1
 | #define HAVE_UNSIGNED_LONG_LONG_INT 1
 | /* end confdefs.h.  */
 | #include <limits.h>
 |                  #ifndef LLONG_MAX
 |                  # define HALF                           (1LL << (sizeof (long long int) * CHAR_BIT - 2))
 |                  # define LLONG_MAX (HALF - 1 + HALF)
 |                  #endif
 | int
 | main (void)
 | {
 | long long int n = 1;
 |                  int i;
 |                  for (i = 0; ; i++)
 |                    {
 |                      long long int m = n << i;
 |                      if (m >> i != n)
 |                        return 1;
 |                      if (LLONG_MAX / 2 < m)
 |                        break;
 |                    }
 |                  return 0;
 |   ;
 |   return 0;
 | }
 configure:9725: result: no
 [...]
 
 Some "conftest" proglets pass, so apparently no sparcV9 instructions
 were emitted by the compiler, but a number of them fail with Illegal
 Instruction, causing the configure script to assume that a particular
 feature or capability is not available, prompting substitution with its
 own implementation in "lib", and then failing later.
 
 Perhaps the configure script assumes that on a non-V9 system using
 "-mcpu=v9" is a NOP, but that's clearly not the case on NetBSD, since
 running sparc userland on sparc64 hardware will try to take advantage
 of v9 instructions where it can.
 
 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645
 


Home | Main Index | Thread Index | Old Index