2

I am working on Linux from Scratch and currently, I am on this page. While compiling binutils-2.32, I am getting this error:

lfs@pop-os:/mnt/lfs/sources/binutils-2.32/build$ ../configure --prefix=/tools            \
>              --with-sysroot=$LFS        \
>              --with-lib-path=/tools/lib \
>              --target=$LFS_TGT          \
>              --disable-nls              \
>              --disable-werror
../configure: line 1345: cd: /mnt/lfs/sources/binutils-2.32/build: Not a directory
configure: error: working directory cannot be determined
lfs@pop-os:/mnt/lfs/sources/binutils-2.32/build$

As you can see from the prompt, build is a directory. Still, it shows the error that it is not a directory. I tried to understand the code at line 1345 of configure file but unable to understand. What mistake I did in this process?

12
  • 1
    Posted as text. – narayanpatra Jun 12 '19 at 18:15
  • Did you do anything between the cd build step and the configure step? What if you do cd . and then run configure again? – Kusalananda Jun 12 '19 at 18:23
  • Looks like the build directory has been deleted since you entered it. – jordanm Jun 12 '19 at 19:43
  • What OS and shell are you using? – rici Jun 12 '19 at 20:51
  • @jordanm : build directory is still there. – narayanpatra Jun 13 '19 at 3:00
0

I think you have a permissions problem. Most likely somewhere in the path /mnt/lfs/sources/binutils-2.32/build, there is directory which lacks x permission for the user you are using. (It might also lack r permission; it should have both.) This is usually the result of creating as directory as root.

1
  • Yes, user lacked permission on the lfs folder. Rectified it, now its working. – narayanpatra Jun 13 '19 at 20:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.