milkv-vega / vega-buildroot-sdk

Milk-V Vega Official buildroot SDK
Apache License 2.0
8 stars 4 forks source link

Running 'build.sh' on a fresh Ubuntu 22.04 VM fails #1

Open cibomahto opened 7 months ago

cibomahto commented 7 months ago

I'm attempting to follow the build instructions from: https://milkv.io/docs/vega/getting-started/buildroot-sdk

I started with a fresh Ubuntu 22.04 VM, and followed the build steps verbatim, but the build fails:

>>> host-m4 1.4.18 Building
PATH="/home/matt/vega-buildroot-sdk/work/buildroot_initramfs/host/bin:/home/matt/vega-buildroot-sdk/work/buildroot_initramfs/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" PKG_CONFIG="/home/matt/vega-buildroot-sdk/work/buildroot_initramfs/host/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_LIBDIR="/home/matt/vega-buildroot-sdk/work/buildroot_initramfs/host/lib/pkgconfig:/home/matt/vega-buildroot-sdk/work/buildroot_initramfs/host/share/pkgconfig"  /usr/bin/make -j29  -C /home/matt/vega-buildroot-sdk/work/buildroot_initramfs/build/host-m4-1.4.18/
/usr/bin/make  all-recursive
Making all in .
make[5]: Nothing to be done for 'all-am'.
Making all in examples
make[5]: Nothing to be done for 'all'.
Making all in lib
  GEN      alloca.h
  GEN      configmake.h
  GEN      c++defs.h
  GEN      arg-nonnull.h
  GEN      warn-on-use.h
  GEN      limits.h
  GEN      unused-parameter.h
  GEN      sys/types.h
  GEN      langinfo.h
  GEN      locale.h
  GEN      math.h
  GEN      signal.h
  GEN      spawn.h
  GEN      stdio.h
  GEN      stdlib.h
  GEN      string.h
  GEN      time.h
  GEN      unistd.h
  GEN      wchar.h
  GEN      sys/stat.h
  GEN      wctype.h
  GEN      sys/time.h
  GEN      sys/wait.h
  GEN      fcntl.h
/usr/bin/make  all-am
  CC       gl_avltree_oset.o
  CC       binary-io.o
  CC       c-ctype.o
  CC       c-stack.o
  CC       c-strcasecmp.o
  CC       c-strncasecmp.o
  CC       clean-temp.o
  CC       cloexec.o
  CC       close-stream.o
  CC       closein.o
  CC       closeout.o
  CC       dirname.o
  CC       basename.o
  CC       dirname-lgpl.o
  CC       basename-lgpl.o
  CC       stripslash.o
  CC       execute.o
  CC       exitfail.o
  CC       fatal-signal.o
  CC       fd-hook.o
  CC       fd-safer-flag.o
  CC       dup-safer-flag.o
  CC       filenamecat.o
  CC       filenamecat-lgpl.o
  CC       fopen-safer.o
  CC       freading.o
  CC       getprogname.o
In file included from /usr/include/signal.h:328,
                 from ./signal.h:52,
                 from c-stack.c:49:
c-stack.c:55:26: error: missing binary operator before token "("
   55 | #elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384
      |                          ^~~~~~~~
  CC       hard-locale.o
  CC       gl_linkedhash_list.o
  CC       gl_list.o
  CC       localcharset.o
make[6]: *** [Makefile:1915: c-stack.o] Error 1
make[6]: *** Waiting for unfinished jobs....
make[5]: *** [Makefile:1674: all] Error 2
make[4]: *** [Makefile:1572: all-recursive] Error 1
make[3]: *** [Makefile:1528: all] Error 2
make[2]: *** [package/pkg-generic.mk:269: /home/matt/vega-buildroot-sdk/work/buildroot_initramfs/build/host-m4-1.4.18/.stamp_built] Error 2
make[1]: *** [Makefile:84: _all] Error 2
make[1]: Leaving directory '/home/matt/vega-buildroot-sdk/buildroot'
make: *** [Makefile:128: /home/matt/vega-buildroot-sdk/work/buildroot_initramfs/images/rootfs.tar] Error 2
copy lib and usr/sbin and www
cp: target '/home/matt/vega-buildroot-sdk/work/buildroot_initramfs_sysroot/lib' is not a directory
cp: target '/home/matt/vega-buildroot-sdk/work/buildroot_initramfs_sysroot/usr/sbin' is not a directory
cp: cannot create directory '/home/matt/vega-buildroot-sdk/work/buildroot_initramfs_sysroot/usr': No such file or directory
copy etc files
mkdir: cannot create directory ‘/home/matt/vega-buildroot-sdk/work/buildroot_initramfs_sysroot/usr/etc’: No such file or directory
cp: target '/home/matt/vega-buildroot-sdk/work/buildroot_initramfs_sysroot/usr/etc' is not a directory
copy files to install
create file system
~/vega-buildroot-sdk/install ~/vega-buildroot-sdk
###Generating rootfs###
rootfs: ubifs web
1.gen sh
cp: cannot create regular file '../work/buildroot_initramfs_sysroot/mnt/': No such file or directory
cp: cannot create regular file '../work/buildroot_initramfs_sysroot/mnt/': No such file or directory
cp: cannot create regular file '../work/buildroot_initramfs_sysroot/mnt/': No such file or directory
2.clean /root and /dev of rootfs
3.cp file to rootfs
cp: cannot create regular file '../work/buildroot_initramfs_sysroot/mnt/': No such file or directory
cp: cannot create regular file '../work/buildroot_initramfs_sysroot/mnt/': No such file or directory
ln: failed to create symbolic link '../work/buildroot_initramfs_sysroot/etc/init.d/S40initconfig.sh': No such file or directory
cp: cannot create regular file '../work/buildroot_initramfs_sysroot/root/': No such file or directory
cp: target '../work/buildroot_initramfs_sysroot/root/' is not a directory
cp: cannot create directory '../work/buildroot_initramfs_sysroot/dev': No such file or directory
chmod: cannot access '../work/buildroot_initramfs_sysroot/bin/busybox': No such file or directory
cp: cannot create regular file '../work/buildroot_initramfs_sysroot/root/': No such file or directory
cp: cannot create regular file '../work/buildroot_initramfs_sysroot/root/': No such file or directory
cp: cannot create regular file '../work/buildroot_initramfs_sysroot/root/': No such file or directory
chmod: cannot access '../work/buildroot_initramfs_sysroot/root/': No such file or directory
cp: cannot create regular file '../work/buildroot_initramfs_sysroot/usr/sbin/': No such file or directory
cp: cannot create regular file '../work/buildroot_initramfs_sysroot/usr/sbin/': No such file or directory
chmod: cannot access '../work/buildroot_initramfs_sysroot/usr/sbin/i2c_dev_msg_muti': No such file or directory
cp: cannot create regular file '../work/buildroot_initramfs_sysroot/root/': No such file or directory
cp: cannot create regular file '../work/buildroot_initramfs_sysroot/etc/': No such file or directory
cp: cannot create regular file '../work/buildroot_initramfs_sysroot/usr/bin/': No such file or directory
./install/cp.sh: line 146: cd: ../work/buildroot_initramfs_sysroot/usr/bin: No such file or directory
./install/cp.sh: line 149: cd: ../../../../install/: No such file or directory
cp: cannot create regular file '../work/buildroot_initramfs_sysroot/etc/init.d/': No such file or directory
cp: cannot create regular file '../work/buildroot_initramfs_sysroot/etc/profile.d/': No such file or directory
4.add ssh & scp to rootfs
cp: target '../work/buildroot_initramfs_sysroot/usr/bin/' is not a directory
cp: cannot create regular file '../work/buildroot_initramfs_sysroot/usr/sbin/': No such file or directory
cp: target '../work/buildroot_initramfs_sysroot/lib/' is not a directory
mkdir: cannot create directory ‘../work/buildroot_initramfs_sysroot/etc/dropbear’: No such file or directory
cp: cannot create regular file '../work/buildroot_initramfs_sysroot/etc/dropbear': No such file or directory
cp: cannot create regular file '../work/buildroot_initramfs_sysroot/etc/dropbear': No such file or directory
5.generating ubifs rootfs
Error: bad root directory './buildroot_initramfs_sysroot/'
       No such file or directory (error 2)
done! rootfs is work/ubifs.img
~/vega-buildroot-sdk ~/vega-buildroot-sdk/work
copy images to out
cp: cannot stat 'work/ubifs.img': No such file or directory
cp: cannot stat 'freeloader_rootfs/freeloader.bin': No such file or directory
cp: cannot stat 'freeloader_rootfs/kernel.bin': No such file or directory
Image generation was successful in the 'out' directory.
michaelfuckner commented 4 months ago

this can be fixed by using m4 1.4.19 instead of 1.4.18- see pull request

KevinMX commented 4 months ago

this can be fixed by using m4 1.4.19 instead of 1.4.18- see pull request

Build passed on my machine (Ubuntu 22.04.4 LTS in Docker). LGTM so far.

cibomahto commented 4 months ago

Builds for me now as well

michaelfuckner commented 4 months ago

not a simple update in 3 months, I believe this project is dead