Issue 8612 - lmdb build fails on illumos / solaris
Summary: lmdb build fails on illumos / solaris
Status: VERIFIED FIXED
Alias: None
Product: LMDB
Classification: Unclassified
Component: liblmdb (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
: 8670 (view as issue list)
Depends on:
Blocks:
 
Reported: 2017-03-06 18:21 UTC by lorban@bitronix.be
Modified: 2020-03-23 15:03 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description lorban@bitronix.be 2017-03-06 18:21:08 UTC
Full_Name: Ludovic Orban
Version: 
OS: OmniOS r151020
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (2a02:a03f:1cdc:c300:384b:af79:f57c:b134)


Building lmdb on illumos fails with the following error:

	mdb.c: In function 'mdb_env_copythr':
	mdb.c:9036:6: error: too many arguments to function 'sigwait'
		  sigwait(&set, &tmp);
		  ^
	In file included from mdb.c:132:0:
	/usr/include/signal.h:165:12: note: declared here
	 extern int sigwait(sigset_t *);
				^

This happens because to use sigwait on illumos, you have to add the
-D_POSIX_PTHREAD_SEMANTICS switch to the compiler. Changing the Makefile THREADS
line to add the switch solves the problem:

THREADS = -pthread -D_POSIX_PTHREAD_SEMANTICS

FYI, I haven't tested on sun/oracle solaris but I guess it suffers from the
exact same problem.
Comment 1 Quanah Gibson-Mount 2017-03-17 16:42:04 UTC
moved from Incoming to Software Bugs
Comment 2 Quanah Gibson-Mount 2017-09-22 20:56:49 UTC
--On Monday, March 06, 2017 6:21 PM +0000 lorban@bitronix.be wrote:

> Full_Name: Ludovic Orban
> Version:
> OS: OmniOS r151020
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (2a02:a03f:1cdc:c300:384b:af79:f57c:b134)

Thanks for the report!  I was able to reproduce this issue under Solaris as 
well.

My proprosed fix is in:

<https://github.com/quanah/openldap-scratch/tree/its8612>

Regards,
Quanah

--

Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
<http://www.symas.com>


Comment 3 Quanah Gibson-Mount 2017-09-22 20:57:37 UTC
changed notes
Comment 4 lorban@bitronix.be 2017-09-23 16:14:01 UTC
LGTM. Thanks for the fix!

On Fri, Sep 22, 2017 at 10:56 PM, Quanah Gibson-Mount <quanah@symas.com>
wrote:

> --On Monday, March 06, 2017 6:21 PM +0000 lorban@bitronix.be wrote:
>
> Full_Name: Ludovic Orban
>> Version:
>> OS: OmniOS r151020
>> URL: ftp://ftp.openldap.org/incoming/
>> Submission from: (NULL) (2a02:a03f:1cdc:c300:384b:af79:f57c:b134)
>>
>
> Thanks for the report!  I was able to reproduce this issue under Solaris
> as well.
>
> My proprosed fix is in:
>
> <https://github.com/quanah/openldap-scratch/tree/its8612>
>
> Regards,
> Quanah
>
> --
>
> Quanah Gibson-Mount
> Product Architect
> Symas Corporation
> Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
> <http://www.symas.com>
>
>
Comment 5 Quanah Gibson-Mount 2017-10-06 18:39:56 UTC
changed notes
changed state Open to Test
Comment 6 Quanah Gibson-Mount 2017-10-06 18:49:28 UTC
changed notes
Comment 7 Quanah Gibson-Mount 2018-02-09 18:46:30 UTC
changed notes
changed state Test to Release
Comment 8 OpenLDAP project 2018-03-22 19:25:37 UTC
fixed in mdb.master
Fixed in mdb.RE09 (0.9.22/OL 2.4.46)
Comment 9 Quanah Gibson-Mount 2018-03-22 19:25:37 UTC
changed notes
changed state Release to Closed
Comment 10 Quanah Gibson-Mount 2020-03-23 15:03:58 UTC
*** Issue 8670 has been marked as a duplicate of this issue. ***