I have been trying endlessly to
figure out why I can't compile from a chroot environment.
I even configured that same partition to be bootable as a
separate operating system on my office machine.
There are no problems with booting that partition in a
chroot or actual machine boot.
Yet very time I try to build arts I see the following
configure error message:
ldd: ./conftest.out: No such file or directory
The build always fails.
I never see that error message in my virtual machine.
My /etc/ld.so.conf is the same as in my virtual machine.
Anybody have any ideas what causes this error? I find
nothing conclusive or helpful on the web.
Finally!
I partially solved the mystery why I can't build trinity in an actual environment but
can in a virtual environment.
The problem was caused by the environment variable BASH_ENV. Beats me why this caused the
build script to falter or generated that strange message about ldd and conftest.out.
Removing the environment variable from my global /etc/bashrc solved the problem.
For root the variable was set to /root/.bashrc.
Now I can build with either rebooting or using that same partition in a chroot
environment.
The cause is repeatable and certain. Add the variable and trinity won't build.
Specifically arts. Remove the variable and arts builds.
The greater mystery is why that same variable being set in the virtual machine did not
cause the same build problem. I'm happy the cause is solved but the reason remains a
mystery. If anybody has a clue please share.
Building arts took about 4 minutes in the physical machine and about 14 minutes in the
VM.
The $HOME/.bashrc file sourced /etc/bashrc. I wonder whether there is a bug in the make
process that gets confused about the BASH_ENV variable. Perhaps some kind of second
sourcing of /etc/bashrc by sourcing $HOME/.bashrc set by the BASH_ENV variable and causing
some kind of recursive effect that deleted another variable that tripped the build
process.