Jump to content

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


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?    

Link to post
Share on other sites

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..

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.