Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fatal error: 'sasl/sasl.h' file not found #756

Closed
rjma30 opened this issue Feb 13, 2018 · 5 comments
Closed

fatal error: 'sasl/sasl.h' file not found #756

rjma30 opened this issue Feb 13, 2018 · 5 comments
Assignees
Labels

Comments

@rjma30
Copy link

rjma30 commented Feb 13, 2018

Hello,

Getting error below on FreeBSD 11 when install mongodb driver using pecl.

c/src/mongoc/ -I/tmp/pear/mongodb/src/libbson/src/ -I/tmp/pear/mongodb/src/libbson/src/jsonsl/ -I/tmp/pear/mongodb/src/libbson/src/bson/ -DHAVE_CONFIG_H -g -O2 -D_THREAD_SAFE -pthread -c /tmp/pear/mongodb/src/libmongoc/src/mongoc/mongoc-cluster-cyrus.c  -fPIC -DPIC -o src/libmongoc/src/mongoc/.libs/mongoc-cluster-cyrus.o
In file included from /tmp/pear/mongodb/src/libmongoc/src/mongoc/mongoc-cluster-cyrus.c:21:
/tmp/pear/mongodb/src/libmongoc/src/mongoc/mongoc-cyrus-private.h:28:10: fatal error: 'sasl/sasl.h' file not found
#include <sasl/sasl.h>
         ^~~~~~~~~~~~~
1 error generated.
*** Error code 1

Stop.
make: stopped in /tmp/pear/pear-build-toordHPlAL/mongodb-1.4.0
ERROR: `make' failed
@jmikola
Copy link
Member

jmikola commented Feb 13, 2018

Can you share the full output from configure? Additionally, the first line in your paste appears to have been cut off and starts with the end of an include path. Please share that entire line, which should begin with the compiler command (e.g. gcc, cc).

mongoc-cyrus-private.h, which attempts to include sasl/sasl.h, is itself only included if MONGOC_ENABLE_SASL_CYRUS is defined as 1. We initialize it to 0 and only assign 1 if libsasl is found during configure time (see: config.m4).

@rjma30
Copy link
Author

rjma30 commented Feb 15, 2018

Hello, I've attached the complete output. Thanks!

mongodb driver installation.txt

@jmikola
Copy link
Member

jmikola commented Feb 15, 2018

I believe I've diagnosed the cause of this in PHPC-1124. If possible, would you mind attempting to compile the driver from source with my patch in #759 to see if that resolves it? Instructions for doing so can be found in CONTRIBUTING.md, and you can certainly unpack the PECL archive instead of cloning the repository.

If that resolves things, we'll aim to get that out in a forthcoming 1.4.1 release.

In the meantime, if you would like to workaround this in 1.4.0, you can disable SASL by compiling from source and providing --with-mongodb-sasl=no to configure. Unfortunately, the "auto" behavior for SASL cannot currently be changed when installing through PECL.

@jmikola jmikola added the bug label Feb 15, 2018
@jmikola jmikola self-assigned this Feb 15, 2018
@rjma30
Copy link
Author

rjma30 commented Feb 15, 2018

Your patch has resolved it! Thanks jmikola! Appreciate your help!

@rjma30 rjma30 closed this as completed Feb 15, 2018
@jmikola
Copy link
Member

jmikola commented Feb 15, 2018

Good to hear. We can leave this closed. Feel free to follow PHPC-1124 for further updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants