michaeljclark / busybear-linux

busybear-linux is a tiny RISC-V Linux root filesystem image that targets the VirtIO board in riscv-qemu.
95 stars 33 forks source link

change_dir "/opt/riscv/sysroot/lib64" failed #3

Closed shanegibbs closed 6 years ago

shanegibbs commented 6 years ago

Before running make I need to mkdir /opt/riscv/sysroot/lib64. It looks like this could be related to https://github.com/michaeljclark/busybear-linux/commit/5427ac14e3f85ceafd38e3c15d92c3f62429e7f7. I am not using multilib. Seems straight forward, but let me know if you need more info.

The tail of my build output is

...
riscv64-unknown-linux-gnu-gcc  -o dropbearconvert dbutil.o buffer.o dbhelpers.o dss.o bignum.o signkey.o rsa.o dbrandom.o queue.o atomicio.o compat.o fake-rfc2553.o ltc_prng.o ecc.o ecdsa.o crypto_desc.o gensignkey.o gendss.o genrsa.o dropbearconvert.o keyimport.o libtomcrypt/libtomcrypt.a libtommath/libtommath.a
make[1]: Leaving directory '/u1/src/busybear-linux/build/dropbear-2017.75'
sudo -E sh scripts/image.sh
128+0 records in
128+0 records out
134217728 bytes (134 MB, 128 MiB) copied, 0.0546131 s, 2.5 GB/s
mke2fs 1.44.1 (24-Mar-2018)
Discarding device blocks: done
Creating filesystem with 131072 1k blocks and 32768 inodes
Filesystem UUID: 14d0f4e8-3f02-45df-a0ad-9367c8902717
Superblock backups stored on blocks:
        8193, 24577, 40961, 57345, 73729

Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

rsync: change_dir "/opt/riscv/sysroot/lib64" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1196) [sender=3.1.2]
make: *** [busybear.bin] Error 23
michaeljclark commented 6 years ago

Yes I must have broken non multilib builds with the last commit. You could comment the lib64 line or rewind the last commit:

git reset --hard HEAD~1

I thought while I was making the change that it might not work if the compiler is not multilib. I wasn’t sure whether there was a lib64 on non-multilib. Clearly there isn’t. The proper fix is to add something like this:

if [ -d “.../lib64” ]; then rsync -a .../lib64/ .../lib64/ fi

Obviously replacing the ... with the source and dest paths (I’m not in front of the computer at the moment and can’t remember the exact path).

Michael