Hi Thomas et all,
I'm amazed that people are still working on this problem. The Solaris environment I settled in with is no-longer pkgsrc based but rather a mix of OpenCSW and my own builds-- It's still GCC 4.9.2 though so there shouldn't be any problem with it to retest.
I went ahead and did the build with the patched src but unfortunately, I'm still seeing (the same?) core dumps:
-bash-3.2# ./gpg-error --version
gpg-error (libgpg-error) 1.21
Assertion failed: !"sizeof lock obj", file posix-lock.c, line 119
Abort (core dumped)
-bash-3.2# pstack core
core 'core' of 17551: ./gpg-error --version
ff25ebfc _lwp_kill (6, 0, 0, ff23e0a4, ffffffff, 6) + 8
ff1d29a8 abort (ffbff4f0, 1, ff2d3400, ffb58, ff2d5518, 0) + 110
ff1d2be4 _assert (ff33cc08, ff33cbf8, 77, ff3337a8, ff874, ff34faf8) + 64
ff333744 get_lock_object (ff3501b8, ff3330ac, ff3372a4, ff3370d4, 1, 0) + 5c
ff3337ac _gpgrt_lock_lock (ff3501b8, ffbff80c, 0, ff, 0, 1) + 4
ff33719c _gpgrt_fflush (0, 0, ff3501b8, 0, 0, 0) + c8
ff3372a4 do_deinit (1, 1cc4, ff2d7940, ff2d92c0, ff302a00, 1c00) + 10
ff1d3170 _exithandle (ff2d9540, ff2d7940, 1c00, 1, 1e, 15166) + 40
ff1c1178 exit (0, 1, 1e, 25710, ff2d78c4, 92bec) + 4
000118f0 main (2, ffbffa0c, ffbffa18, 25840, ff300140, ffbffb10) + 57c
00010c68 _start (0, 0, 0, 0, 0, 0) + 5c
The tests all still fail when built with gcc (2/6 fail when built with Sun's compiler but that's another story)
I don't consider myself a seasoned builder so there is always the possibility that I'm doing something wonky in my environment. For that reason, I hope some other Solaris users (few as they may be) might also chime in.