Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm hoping someone can help shed some light on my current issue.

Scenario: Installing libmcrypt, mhash and mcrypt from source in order to compile PHP5.4 with the mcrypt extension enabled.

OS: RHEL-6 (on openshift)

Steps: Compiled and installed libmcrypt and mhash with no issues. Moved on to install mcrypt and initially, I had an issue with it not finding the mhash lib. I followed the instructions here!

After exporting the env vars, I was able to get pass that error but now mcrypt fails to compile because of the following error:

configure: WARNING: mcrypt.h: accepted by the compiler, rejected by the preprocessor!

I pulled the config.log and I am seeing this error:

configure:6289: checking how to run the C preprocessor
configure:6329: gcc -E  conftest.c
configure:6335: $? = 0
configure:6366: gcc -E  conftest.c
conftest.c:13:28: error: ac_nonexistent.h: No such file or directory
configure:6372: $? = 1

I've been searching across the Internet and no luck so far. Any ideas on what I need to do in order to successfully compile/install mcrypt?

Do I need to export another env var to help my preprocessor find the right libs or?

Here are the commands I passed:

export LD_LIBRARY_PATH=/var/lib/openshift/515b7bbd4382eca7d500002a/diy-0.1/runtime/srv/libmcrypt/lib:/var/lib/openshift/515b7bbd4382eca7d500002a/diy-0.1/runtime/srv/mhash/lib

export LDFLAGS="-L/var/lib/openshift/515b7bbd4382eca7d500002a/diy-0.1/runtime/srv/mhash/lib"

export CFLAGS="-I/var/lib/openshift/515b7bbd4382eca7d500002a/diy-0.1/runtime/srv/mhash/include"

 ./configure --prefix=/var/lib/openshift/515b7bbd4382eca7d500002a/diy-0.1/runtime/srv/mcrypt --with-libmcrypt-prefix=/var/lib/openshift/515b7bbd4382eca7d500002a/diy-0.1/runtime/srv/libmcrypt
share|improve this question

You must log in to answer this question.

Browse other questions tagged .