What you do not show is what the value of the parameter CLFS is. It looks like ${CLFS} gives a file that does not exist (No such file or directory). Thus first show:
I’ve set environment right and followed the book in totality. Didnt get any errors till bash build and later had to rebuild ncurses & bash. Should I set environment again.
As you may have noticed I am not even looking into clfs (I do not even know what it is) or if you build/installed that correct. I am simply looking at the chroot statement you typed and the error it gives.
So you want to chroot to* /mnt/clfs.* Now the next mini-step (I thought you would have found that yourself) in this troubleshooting is of course checking if /mnt/clfs exists:
ls -l /mnt/clfs
Thus, little step by little step, one checks all the parameters of the chroot statement to see if we can see the same a chroot sees: No such file or directory.
Sorry abt that. Check the corrected version. I got this off typescript and there may be few errors in the text body. Files ‘errors’ & ‘progress’ are text files with various details and are not part of build.
It seems that /mnt/clfs exists (even if you gave me a different output then I asked for). I see also that /mnt/clfs/tools exists. What about /mnt/clfs/tools/bin/env?
EDIT: I do not know why you gave me the other iinformation. Do not know how to interprete in connection with the chroot error.
From what I understand is that there is a linking error. I have bash with staticlib but a dynamic link is needed (its still unclear to me). Some other guys at clfs irc asked that information too so I thought it might be appropriate.
For /mnt/clfs/tools/bin/env, I will have to login and check. Will get the details in few minutes.
Well, not knowiing anything about that product, I know something about chroot. In the end all files you mention there must exist. That is, the directories that go into the PATH variable used by env must not exist in the sense that they do not give an error here. That means that */mnt/clfs/tools/bin/env *must be there, but also /mnt/clfs/tools/bin/bash. When one of them is not there a “No such file or directory” can be expected, but I admit that chroot shows it in s strange place. I think it gets a non zero return code and then says that it can not chroot and then places the message that it got after that. Which gives the strange combination.
When you say that */mnt/clfs/tools/bin/bash *might be corrupted, I am not sure that “No such file or directory” would be the result. But on the other hand, who knows whith those old Unix/Linux tools with cryptic error messages.
And /mnt/clfs/tools/bin/bash?, you forgot about that one? But it looks if they are all there. (btw* ls -l* gives better information, we coould e.g. see if they are executable).
About static/dynamic linking. The theory is that you either:
. link static and thus have the library within the same file as the tool;
or
. link dynamic, but you then must have a that library in a proper place within the chroot-ed directory tree.
Thus your idea about static linking seems logical enouigh to me.
In general the setting up of a chroot-ed environment is tedious enough, because there is allway something that you forgot to copy: /etc/passwd and friends, static libraries, tools called from tools, you name it. But in this case it seems that you think your product must cope with it. It could be that the product fails because the openSUSE places of having things differ a bit from where other distros have them. Not easy to find.
As I said earlier, in a chrooted environment it is very easy to forget something that one needs. OTOH putting there to much denies the principle of the chrooted environnment
You mean licensing zypper and/or YaST? They are Open Source. Look for GPL and GPL2 licences. In general as long as you provide the source when asked for there is no problem imho.