Jump to content

Problem compiling apache, mysql or php from source code inside a container.


Go to solution Solved by jazzman1,

Recommended Posts

Hey guys,

I'm facing an issue compiling the above stack from a source code inside lxc using centos 6.5 as a domain OS.

 

 

[lxc@lxc1 httpd-2.4.9]$ ./configure --with-included-apr
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
configure:
configure: Configuring Apache Portable Runtime library...
configure:
configuring package in srclib/apr now
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
Configuring APR library
Platform: x86_64-unknown-linux-gnu
checking for working mkdir -p... yes
APR Version: 1.5.1
checking for chosen layout... apr
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/home/lxc/httpd-2.4.9/srclib/apr':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
configure failed for srclib/apr
 

   

This problem has been detected by me when I replaced my desktop machine with new one and installed a centOS again. This such a problem never happened before using my old machine with the same version of OS and libvirt. Just to be clear, a new selinux policy into a "domain machine" has been created to be able to use the "dbus daemon" to all containers and if I try to complile this stack from source using the "domain os" this problem never happens at all. All "Development tools" is installed to this particular container, in case someone asks me why I get the following error message - "configure: error: cannot run C compiled programs"

Any ideas?    

Edited by jazzman1
  • Solution

I got it sorted out and going to set the topic to "solved". The glibc-headers library were be reinstalled again with selinux set to permissive mode in the "hosting" machine. I'm not sure what happens here, but when the "host" machine is set to selinux enforcing mode a lot of things are failed to the "guest" machine (container). For instance, I'm able to create a new user but I'm failed giving him a new password. I followed The Dan Walsh's Blog   and CentOS Guide as well to create a new selinux policy and everything looks nice but at the end I got the same shit :confused: ....anyways....it's a different story..

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.