mongoose-os / mos

The Mongoose OS Command Line Tool - https://mongoose-os.com/docs/mongoose-os/quickstart/setup.md
Other
45 stars 31 forks source link

Error running makepkg in Manjaro (Arch Linux) #6

Open PRO2XY opened 5 years ago

PRO2XY commented 5 years ago

After cloning this repo to a folder on my Manjaro laptop.

$ git clone https://github.com/mongoose-os/mos.git
$ cd mos/mos/archlinux_pkgbuild/mos-release
$ makepkg
==> Making package: mos 2.13.1-1 (Mon 20 May 2019 12:24:37 PM IST)
==> Checking runtime dependencies...
...
==> Validating source files with md5sums...
    mos-tool ... Skipped
==> Extracting sources...
  -> Creating working copy of mos-tool git repo...
Cloning into 'mos-tool'...
done.
Switched to a new branch 'makepkg'
==> Starting prepare()...
mv: cannot stat '/media/storage/Tools/mos/mos/archlinux_pkgbuild/mos-release/src/mos': No such file or directory
==> ERROR: A failure occurred in prepare().
    Aborting...

Before this I had installed the dependencies. Just required to install ...

sudo pacman -S libftdi-compat
sudo pacman -S go jshon

How to install?

PRO2XY commented 5 years ago

When running makepkg for mos-latest

Switched to a new branch 'makepkg'
==> Starting prepare()...
==> Starting pkgver()...
==> ERROR: pkgver is not allowed to be empty.
==> ERROR: pkgver() generated an invalid version: 

Further debugging leads to modifying PKGBUILD: make version/version.json > /dev/null 2>&1 changed to make version/version.json in pkgver() which gives the following output:

==> Starting prepare()...
==> Starting pkgver()...
make[1]: *** No rule to make target 'version/version.json'.  Stop.
make: *** [Makefile:4: version/version.json] Error 2
==> ERROR: pkgver is not allowed to contain colons, forward slashes, hyphens or whitespace.
==> ERROR: pkgver() generated an invalid version: make -C mos version/version.json
make[1]: Entering directory '/media/storage/Tools/mos/mos/archlinux_pkgbuild/mos-latest/src/go/src/github.com/mongoose-os/mos/mos'
make[1]: Leaving directory '/media/storage/Tools/mos/mos/archlinux_pkgbuild/mos-latest/src/go/src/github.com/mongoose-os/mos/mos'
PRO2XY commented 5 years ago

More debugging.

$ pwd
/media/storage/Tools/mos/mos/archlinux_pkgbuild/mos-latest/src/go/src/github.com/mongoose-os/mos

$ make version/version.json
make -C mos version/version.json
make[1]: Entering directory '/media/storage/Tools/mos/mos/archlinux_pkgbuild/mos-latest/src/go/src/github.com/mongoose-os/mos/mos'
make[1]: Nothing to be done for 'version/version.json'.
make[1]: Leaving directory '/media/storage/Tools/mos/mos/archlinux_pkgbuild/mos-latest/src/go/src/github.com/mongoose-os/mos/mos'

$ ls
common  fwbuild  go  LICENSE  Makefile  mos  README.md  tools  vendor

So no version/version.json exists...

rojer commented 5 years ago

version/version.json is generated here

if you can fix this, a PR will be appreciated.

PRO2XY commented 5 years ago

I am not exactly sure how to do that. I had a look at the Makefile at mos/archlinux_pkgbuild/mos-latest/src/go/src/github.com/mongoose-os/mos/ which had only this in it..

.DEFAULT_GOAL := all

%:
    $(MAKE) -C mos $*

I am not sure what to add in here. Any help would be appreciated. I will make a PR once I can get this working.

PRO2XY commented 5 years ago

Also there seems to be a lot of recursive directories... Is it supposed to be so?