pkgsrc-Users archive

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

"databases/db5" build fails on -current/sparc?



This was observed on pkgsrc-HEAD during the freeze for pkgsrc-2026Q2
with -current sources updated to the same time-frame, so I believe the
observation to still be relevant (for all those who'll fuss about only
using pkgsrc-HEAD w/-current).

Attempting to build "databases/db5" on -current sparc (11.99.6 as of 17
June 2026) fails during the configure phase with:

[...]
checking for socklen_t... yes
checking for ANSI C exit success/failure values... yes
checking for getopt optreset variable... yes
checking for mutexes... UNIX/fcntl
configure: error: Support for FCNTL mutexes was removed in BDB 4.8.
*** Error code 1

Stop.
make[1]: stopped making "all" in /x/pkgsrc/databases/db5
*** Error code 1

Stop.
make: stopped making "all" in /x/pkgsrc/databases/db5


$ uname -a
NetBSD oroboros 11.99.6 NetBSD 11.99.6 (GENERIC) #8: Wed Jun 17 23:30:28 CDT 2026  sysop%plex760.technoskunk.fur@localhost:/r0/build/current/obj/sparc/sys/arch/sparc/compile/GENERIC sparc


A snippet from "${WRKSRC}/build_unix/config.log" shows:

[...]
configure:20510: checking for mutexes
configure:20808: gcc -o conftest -O2 -I/usr/include  -I/usr/include -L/usr/lib -
Wl,-R/usr/lib -Wl,-R/usr/pkg/lib conftest.c  >&5
conftest.c:47:1: error: return type defaults to 'int' [-Wimplicit-int]
   47 | main() {
      | ^~~~
conftest.c: In function 'main':
conftest.c:54:9: error: implicit declaration of function 'pthread_condattr_setpshared'; did you mean 'pthread_condattr_destroy'? [-Wimplicit-function-declaration]
   54 |         pthread_condattr_setpshared(&condattr, PTHREAD_PROCESS_SHARED) ||
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |         pthread_condattr_destroy
conftest.c:56:9: error: implicit declaration of function 'pthread_mutexattr_setpshared'; did you mean 'pthread_mutexattr_settype'? [-Wimplicit-function-declaration]
   56 |         pthread_mutexattr_setpshared(&mutexattr, PTHREAD_PROCESS_SHARED) ||
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |         pthread_mutexattr_settype
configure:20808: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Berkeley DB"
| #define PACKAGE_TARNAME "db-5.3.28"
| #define PACKAGE_VERSION "5.3.28"
| #define PACKAGE_STRING "Berkeley DB 5.3.28"
| #define PACKAGE_BUGREPORT "Oracle Technology Network Berkeley DB forum"
| #define PACKAGE_URL ""
| #define HAVE_UPGRADE_SUPPORT 1
| #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 HAVE_SYSTEM_INCLUDE_FILES 1
| #define TIME_WITH_SYS_TIME 1
| #define HAVE_DIRENT_H 1
| #define HAVE_EXECINFO_H 1
| #define HAVE_SYS_SELECT_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
| #define SIZEOF_CHAR 1
| #define SIZEOF_UNSIGNED_CHAR 1
| #define SIZEOF_SHORT 2
| #define SIZEOF_UNSIGNED_SHORT 2
| #define SIZEOF_INT 4
| #define SIZEOF_UNSIGNED_INT 4
| #define SIZEOF_LONG 4
| #define SIZEOF_UNSIGNED_LONG 4
| #define SIZEOF_LONG_LONG 8
| #define SIZEOF_UNSIGNED_LONG_LONG 8
| #define SIZEOF_CHAR_P 4
| #define SIZEOF_SIZE_T 4
| #define HAVE_EXIT_SUCCESS 1
| #define HAVE_GETOPT_OPTRESET 1
| /* end confdefs.h.  */
| 
| #include <stdlib.h>
| #include <pthread.h>
| main() {
|       pthread_cond_t cond;
|       pthread_mutex_t mutex;
|       pthread_condattr_t condattr;
|       pthread_mutexattr_t mutexattr;
|       exit (
|       pthread_condattr_init(&condattr) ||
|       pthread_condattr_setpshared(&condattr, PTHREAD_PROCESS_SHARED) ||
|       pthread_mutexattr_init(&mutexattr) ||
|       pthread_mutexattr_setpshared(&mutexattr, PTHREAD_PROCESS_SHARED) ||
|       pthread_cond_init(&cond, &condattr) ||
|       pthread_mutex_init(&mutex, &mutexattr) ||
|       pthread_mutex_lock(&mutex) ||
|       pthread_mutex_unlock(&mutex) ||
|       pthread_mutex_destroy(&mutex) ||
|       pthread_cond_destroy(&cond) ||
|       pthread_condattr_destroy(&condattr) ||
|       pthread_mutexattr_destroy(&mutexattr));
| }
[...]

Similar failures appear for further "conftest.c" variants following the
one above.

Since "databases/db5" built without complaint on netbsd-11/sparc
(11.0_RC5), the problem here is likely related to GCC 14+'s stricter
behavior.  I've not yet tried building "databases/db5" on any other arch
with -current.

-- 
|/"\ 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