Closed fundudeone closed 1 year ago
I'm unable to reproduce this. The output directories not existing wouldn't cause that particular error - my guess is that either NAME or APP_INST_NAME is empty/undefined. Could you share your makefile and also the output of running V=1 make installer
?
My VM failed and I can no longer reproduce it in the new one, not sure why, sorry!
Ok managed to get it again, downloaded a release of toolchain 11.1, cloned app_tool in examples/hello_world. Output from V=1 make installer is the same as from make:
make: cedev-config: No such file or directory
python3 /home/mint/CEdev/examples/hello_world/app_tools/make_installer.py / DEMO APPINST
Traceback (most recent call last):
File "/home/mint/CEdev/examples/hello_world/app_tools/make_installer.py", line 6, in <module>
_, inpath, outdir, app_name, inst_name = sys.argv
ValueError: not enough values to unpack (expected 5, got 4)
make: *** [app_tools/makefile:32: /AppInstA.8xv] Error 1
makefile:
# ----------------------------
# Makefile Options
# ----------------------------
NAME = DEMO
ICON = icon.png
DESCRIPTION = CE C Toolchain Demo
COMPRESSED = NO
CFLAGS = -Wall -Wextra -Oz
CXXFLAGS = -Wall -Wextra -Oz
# ----------------------------
include app_tools/makefile
ran it again adding the line print(f"\nARGS:{sys.argv}\n")
directly below imports
make: cedev-config: No such file or directory
python3 /home/mint/CEdev/examples/hello_world/app_tools/make_installer.py / DEMO APPINST
ARGS:['/home/mint/CEdev/examples/hello_world/app_tools/make_installer.py', '/', 'DEMO', 'APPINST']
Traceback (most recent call last):
File "/home/mint/CEdev/examples/hello_world/app_tools/make_installer.py", line 8, in <module>
_, inpath, outdir, app_name, inst_name = sys.argv
ValueError: not enough values to unpack (expected 5, got 4)
make: *** [app_tools/makefile:32: /AppInstA.8xv] Error 1
Here is the project structure (unchanged after running make):
hello_world
├── app_tools
│ ├── app.src
│ ├── installer.bin
│ ├── linker_script
│ ├── make_8ek.py
│ ├── make_installer.py
│ ├── makefile
│ └── readme.md
├── icon.png
├── makefile
├── readme.md
├── screenshot.png
└── src
└── main.c
Seems like it's an issue with cedev-config
not being on your path - could you make sure that it's there and try again?
I should probably add a check for that and give a descriptive error rather than an internal Python error since an empty arg is passed.
Ok, I'm pretty sure this is the issue. I did edit .bashrc to add CEdev stuff to path but had opened the terminal I was using to do all this before doing so. When I opened a new one make builds successfully (note: didn't remove the print args line):
[compiling] src/main.c
[lto opt] obj/lto.bc
[convimg] icon.png
[linking] bin/DEMO.bin
python3 /home/mint/CEdev/examples/hello_world/app_tools/make_installer.py bin/DEMO.bin bin DEMO APPINST
ARGS:['/home/mint/CEdev/examples/hello_world/app_tools/make_installer.py', 'bin/DEMO.bin', 'bin', 'DEMO', 'APPINST']
[success] bin/APPINST.8xp, 2027 bytes.
[success] bin/AppInstA.8xv, 914 bytes.
When trying to build with app_tools before any other way make_installer.py crashes due to an incorrect list size while unpacking sys.argv. This is probably because BINDIR and TARGETBIN do not exist yet.