Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

brew install openldap fails #1926

Closed
emerose opened this issue Jul 21, 2010 · 20 comments
Closed

brew install openldap fails #1926

emerose opened this issue Jul 21, 2010 · 20 comments

Comments

@emerose
Copy link

emerose commented Jul 21, 2010

See errors and config.log here:

http://gist.github.com/485306

@adamv
Copy link
Contributor

adamv commented Jul 21, 2010

Guessing that openldap requires bdb 4.x, not 5.x.

@emerose
Copy link
Author

emerose commented Jul 22, 2010

Yeah, that appears to be the case:

http://www.openldap.org/doc/admin24/appendix-recommended-versions.html

@emerose
Copy link
Author

emerose commented Jul 22, 2010

Yep, I reverted by homebrew repo to 180c52d (last commit to berkeley-db before it was changed to 5.x) and installed berkeley-db. Now openldap installs fine.

What's the right way to deal with this in homebrew?

@MikeMcQuaid
Copy link
Member

adamv: shouldn't openldap be in the duplicates branch?

mikebookpro # ldapwhoami -V [~]
ldapwhoami: @(#) $OpenLDAP: ldapwhoami 2.4.11 (Feb 11 2010 16:29:32) $
(LDAP library: OpenLDAP 20411)

mikebookpro # which ldapwhoami [~]
/usr/bin/ldapwhoami

@adamv
Copy link
Contributor

adamv commented Jul 22, 2010

@MikeMcQuaid: Uh, I guess? If it comes with OS X then I'll move it over to the other branch; not that that helps the bdb version problem.

@MikeMcQuaid
Copy link
Member

Aye, sorry, know it's unrelated to this bug but it seems to be there on 10.6 at least (and I'm 99% certain it's on 10.5 too).

@jjuarez
Copy link

jjuarez commented Jul 28, 2010

The dependencies between OpenLDAP and Berkeley DB has broken, I sugest to name db for the 5.X series and db4 for the 4 series, and fix the OpenLDAP dependecy... ¿how can I push this change? thanks in advance

@jone
Copy link

jone commented Oct 8, 2010

Is that already fixed?

@RoryO
Copy link

RoryO commented Oct 10, 2010

This is still ongoing. I asked Max what the best strategy would be for a library requiring legacy dependencies.

Also, if you're not on OSX server, OSX comes with the OpenLDAP client utilities, but not slapd, the OpenLDAP server. That is only installed on OSX Server. There should be something in the formula to make sure the user really, really, really wants to install this on Server, because installing this would probably break the hell out of it.

@MikeMcQuaid
Copy link
Member

What requires a newer openldap than OSX's supplied one? With what you were saying about breaking the hell out of it, I'd vote to remove this package entirely.

@jjuarez
Copy link

jjuarez commented Oct 10, 2010

OpenLDAP depends on Berkeley DB 4.7 not 5.0 version

@RoryO
Copy link

RoryO commented Oct 10, 2010

Here's the deal. OSX non-server has OpenLDAP command line utilities already installed. It does not come with slapd, the OpenLDAP server daemon. OSX Server already has a pre-configured slapd, and OpenLDAP is vital to the functionality of OSX Server. Think of it like ActiveDirectory.

People (like me, who's maintaining the RubyLDAP library) who want an LDAP server on OSX want OpenLDAP without pain. The issue will come from installing a second slapd on OSX Server. Probably making the Homebrew installed slapd isolated, like Homebrew is excellent at, and starting slapd on a different port than the default LDAP port SHOULD be okay, but I don't have OSX Server around to test.

At any rate, I can get this to build by creating a formula for berkeleydb4 and having the current formula depend on that, but I don't know if this is the right way to go about doing this. Also, even when the compile is successful I can't get slapd to start, it just exits instantly, although this may be my own stupidity.

If/when I hear back from Max on how the best way to deal with legacy dependencies I'll do some work and make this formula function.

@MikeMcQuaid
Copy link
Member

Yeh, fair enough. I guess my point isn't that there shouldn't be a formula but what you're saying makes me definitely think it should me moved from master to the duplicates branch.

@jone
Copy link

jone commented Oct 11, 2010

I just created locally a new berkeley-db4 formula (with 4.7.25) and changed my openldap formula to depend on this one and both compiled fine. Couldn't test if all the stuff works well but since I just need to have the libraries there it seems to work for me..

@RoryO
Copy link

RoryO commented Oct 11, 2010

Actually I completely take back what I said. After frustration and pain I discovered that the full slapd DOES comes with OSX client, although it is completely undocumented. It lives in /usr/libexec/slapd. I'm still figuring out how it's configured, but I propose we expediently remove openldap from Homebrew.

@emerose
Copy link
Author

emerose commented Oct 11, 2010

The slapd that comes with OSX is, in my experience, hideously broken. Apple has made extensive patches (presumably as part of their "Open Directory" product) which make the OSX-supplied slapd useless as an OpenLDAP server.

I originally tried installing the openldap formula to try and test some OpenLDAP configuration stuff. FWIW, that path is full of pain and disappointment: I ended up giving up and testing on a linux VM instead.

@MikeMcQuaid
Copy link
Member

One man's "hideously broken" is another man's "works just fine". It should be moved to the duplicates branch now and people can use that if they want.

@adamv
Copy link
Contributor

adamv commented Oct 11, 2010

Two issues here:

(A) openldap (kinda-sorta) comes with OS X, so it should probably be in the duplicates branch.

(B) openldap depends on bdb 4.x, and Homebrew supplies 5.x.

Moving to the duplicates branch won't fix (B), since there's one-and-only-one formula for bdb, and it is at 5.x.

If someone wanted to modify the openldap formula to build a private version of bdb 4 and statically link it, I would accept that mod into the duplicates branch.

@MikeMcQuaid
Copy link
Member

Sure, apologies for getting sidetracked on B. For libraries, we really should consider probably have a bdb4 and bdb5-type naming scheme.

As for A, as I think has been clarified, even regular non-server OSX comes with a full openldap installation just some people think it's broken.

Thanks Adam.

@adamv
Copy link
Contributor

adamv commented Oct 31, 2010

Added instructions in the caveats for installing OpenLDAP.

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants