pkgsrc-Bugs archive

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

Re: pkg/58716: libatomic fails to build on sparc



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

From: "John D. Baker" <jdbaker%consolidated.net@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: pkg/58716: libatomic fails to build on sparc
Date: Sat, 28 Dec 2024 11:39:50 -0600 (CST)

 As of pkgsrc-2024Q4 and netbsd/sparc 10.1, this problem persists.
 
 $ uname -a
 NetBSD jean.technoskunk.fur 10.1 NetBSD 10.1 (JEAN) #69: Mon Dec 16 21:35:25 CST 2024  sysop%plex760.technoskunk.fur@localhost:/r0/build/netbsd-10/obj/sparc/sys/arch/sparc/compile/JEAN sparc
 
 Searching through ${WRKOBJDIR}/devel/libatomic/work/build/config.log
 shows:
 
 [...]
 configure:14867: checking for the word size
 configure:14872: gcc -o conftest -O2 -I/usr/include -fno-sync-libcalls  -mcpu=v9 -I/usr/include -L/usr/lib -Wl,-R/usr/lib -Wl,-R/usr/pkg/lib conftest.c  >&5
 configure:14872: $? = 0
 configure:14872: ./conftest
 [1]   Illegal instruction (core dumped) ./conftest${ac_exeext}
 configure:14872: $? = 132
 configure: program exited with status 132
 configure: failed program was:
 | /* confdefs.h */
 | #define PACKAGE_NAME "GNU Atomic Library"
 | #define PACKAGE_TARNAME "libatomic"
 | #define PACKAGE_VERSION "1.0"
 | #define PACKAGE_STRING "GNU Atomic Library 1.0"
 | #define PACKAGE_BUGREPORT ""
 | #define PACKAGE_URL "http://www.gnu.org/software/libatomic/";
 | #define PACKAGE "libatomic"
 | #define VERSION "1.0"
 | #define STDC_HEADERS 1
 | #define HAVE_SYS_TYPES_H 1
 | #define HAVE_SYS_STAT_H 1
 | #define HAVE_STDLIB_H 1
 | #define HAVE_STRING_H 1
 | #define HAVE_MEMORY_H 1
 | #define HAVE_STRINGS_H 1
 | #define HAVE_INTTYPES_H 1
 | #define HAVE_STDINT_H 1
 | #define HAVE_UNISTD_H 1
 | #define HAVE_DLFCN_H 1
 | #define LT_OBJDIR ".libs/"
 | #define IFUNC_RESOLVER_ARGS void
 | #define STDC_HEADERS 1
 | #define STRING_WITH_STRINGS 1
 | #define HAVE_FENV_H 1
 | #define HAVE_INT1 1  
 | #define HAVE_INT2 1  
 | #define HAVE_INT4 1  
 | #define HAVE_INT8 1  
 | #define HAVE_INT16 0 
 | #define HAVE_ATOMIC_LDST_1 1  
 | #define HAVE_ATOMIC_LDST_2 1  
 | #define HAVE_ATOMIC_LDST_4 1  
 | #define HAVE_ATOMIC_LDST_8 1  
 | #define HAVE_ATOMIC_LDST_16 0 
 | #define HAVE_ATOMIC_TAS_1 1  
 | #define HAVE_ATOMIC_TAS_2 1  
 | #define HAVE_ATOMIC_TAS_4 1  
 | #define HAVE_ATOMIC_TAS_8 1  
 | #define HAVE_ATOMIC_TAS_16 0 
 | #define HAVE_ATOMIC_EXCHANGE_1 1  
 | #define HAVE_ATOMIC_EXCHANGE_2 1  
 | #define HAVE_ATOMIC_EXCHANGE_4 1  
 | #define HAVE_ATOMIC_EXCHANGE_8 0 
 | #define HAVE_ATOMIC_EXCHANGE_16 0 
 | #define HAVE_ATOMIC_CAS_1 1  
 | #define HAVE_ATOMIC_CAS_2 1  
 | #define HAVE_ATOMIC_CAS_4 1  
 | #define HAVE_ATOMIC_CAS_8 0 
 | #define HAVE_ATOMIC_CAS_16 0 
 | #define HAVE_ATOMIC_FETCH_ADD_1 1  
 | #define HAVE_ATOMIC_FETCH_ADD_2 1  
 | #define HAVE_ATOMIC_FETCH_ADD_4 1  
 | #define HAVE_ATOMIC_FETCH_ADD_8 0 
 | #define HAVE_ATOMIC_FETCH_ADD_16 0 
 | #define HAVE_ATOMIC_FETCH_OP_1 1  
 | #define HAVE_ATOMIC_FETCH_OP_2 1  
 | #define HAVE_ATOMIC_FETCH_OP_4 1  
 | #define HAVE_ATOMIC_FETCH_OP_8 0 
 | #define HAVE_ATOMIC_FETCH_OP_16 0 
 | #define WORDS_BIGENDIAN 1
 | /* end confdefs.h.  */
 | typedef int word __attribute__((mode(word)));
 | static long int longval () { return sizeof(word); }
 | static unsigned long int ulongval () { return sizeof(word); }
 | #include <stdio.h>
 | #include <stdlib.h>
 | int
 | main ()
 | {
 | 
 |   FILE *f = fopen ("conftest.val", "w");
 |   if (! f)
 |     return 1;
 |   if ((sizeof(word)) < 0)
 |     {
 |       long int i = longval ();
 |       if (i != (sizeof(word)))
 |       return 1;
 |       fprintf (f, "%ld", i);
 |     }
 |   else
 |     {
 |       unsigned long int i = ulongval ();
 |       if (i != (sizeof(word)))
 |       return 1;
 |       fprintf (f, "%lu", i);
 |     }
 |   /* Do not output a trailing newline, as this causes \r\n confusion
 |      on some platforms.  */
 |   return ferror (f) || fclose (f) != 0;
 | 
 |   ;
 |   return 0;
 | }
 configure:14875: error: Could not determine word size.
 
 
 It it telling that for some reason, the test program is being
 compiled with "-mcpu=v9".  That is likely the source of the failure.
 It is not yet clear why this directive has been specified.  The tests
 prior to the word-size check all passed/failed based on other criteria,
 but the word-size check produced an illegal instruction fault which
 was apparently not anticipated by the "configure" script.
 
 Also noted in the "config.log" "OUTPUT VARIABLES" section was:
 
   CFLAGS='-O2 -I/usr/include -fno-sync-libcalls  -mcpu=v9'
 
 and
 
   XCFLAGS=' -mcpu=v9'
 
 
 Perhaps there should be a "SUBST" block conditioned on MACHINE_ARCH
 being "sparc" to remove the "-mcpu=v9" directives?
 
 -- 
 |/"\ 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