Skip to content

Regression in so3/usr build.sh #162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
daniel-rossier opened this issue Apr 24, 2025 · 9 comments · May be fixed by #163
Open

Regression in so3/usr build.sh #162

daniel-rossier opened this issue Apr 24, 2025 · 9 comments · May be fixed by #163
Assignees

Comments

@daniel-rossier
Copy link
Contributor

It looks like sh doesn't support the function keyword, unlike bash.

Furthermore, I get the following error related to pcpp:


  161-enhance-avz-to-support-portainer-tasks U:2 ?:4  🏠/soo/soo/ME/so3/usr  ✅  ./build.sh 
Platform is virt64
Starting Debug build
Not searching for unused variables given on the command line.
System is unknown to cmake, create:
Platform/SO3_usr to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
Your CMakeCache.txt file was copied to CopyOfCMakeCache.txt. Please post that file on discourse.cmake.org.
Traceback (most recent call last):
  File "/home/rossierd/soo/soo/ME/so3/usr/lib/lvgl/scripts/preprocess_lv_conf_internal.py", line 96, in <module>
    main()
  File "/home/rossierd/soo/soo/ME/so3/usr/lib/lvgl/scripts/preprocess_lv_conf_internal.py", line 91, in main
    preprocess_file(args.input, args.tmp_file, args.output, args.include, args.defs)
  File "/home/rossierd/soo/soo/ME/so3/usr/lib/lvgl/scripts/preprocess_lv_conf_internal.py", line 51, in preprocess_file
    subprocess.run(pcpp_command, check=True)
  File "/usr/lib/python3.12/subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.12/subprocess.py", line 1955, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'pcpp'
CMake Error at lib/lvgl/env_support/cmake/custom.cmake:89 (message):
  preprocess_lv_conf_internal.py failed with return code: 1
Call Stack (most recent call first):
  lib/lvgl/CMakeLists.txt:23 (include)
@AndreCostaaa
Copy link
Contributor

AndreCostaaa commented Apr 24, 2025

It looks like sh doesn't support the function keyword, unlike bash.

What problem are you having ? The lvperf docker images use that script and they don't have bash installed

Furthermore, I get the following error related to pcpp:

Yes pcpp is a required dependency for lvgl in the current version pointed at by the submodule

You can install pcpp with:

pip3 install --user pcpp

and i'll update the submodule next week when lvgl 9.3 is released

Or, if you prefer, you can update the submodule already as that dependency has already been removed in lvgl:

git submodule update --remote

@daniel-rossier
Copy link
Contributor Author

It looks like sh doesn't support the function keyword, unlike bash.

What problem are you having ? The lvperf docker images use that script and they don't have bash installed

I get the following error:

  161-enhance-avz-to-support-portainer-tasks S:2 U:3 ?:4  🏠/soo/soo/ME/so3/usr  ❌130  ./build.sh 
./build.sh: 5: function: not found
  161-enhance-avz-to-support-portainer-tasks S:2 U:3 ?:4  🏠/soo/soo/ME/so3/usr  ❌127 

Maybe something wrong with my loca/bin/sh

@daniel-rossier
Copy link
Contributor Author

daniel-rossier commented Apr 24, 2025

pip3 install --user pcpp

I did that, but I keep getting the error mentioned above.

@AndreCostaaa
Copy link
Contributor

AndreCostaaa commented Apr 24, 2025

And what happens when you run:

pcpp --version

If you can't find pcpp it means it needs to be added to your PATH. It should exist somewhere in ~/.local/bin

@daniel-rossier
Copy link
Contributor Author

According to our debug session this morning, it turned out that my binary pcpp was installed in a dedicated directory called /usr/lib/python3/dist-packages" as it is normally the case for Ubuntu 24.04. I had to add a symlink in /usr/local/bin/pcpp`` and it fixed the issue.

@daniel-rossier
Copy link
Contributor Author

It still remains the sh issue :-)

@AndreCostaaa
Copy link
Contributor

AndreCostaaa commented Apr 28, 2025

That's interesting, in my setup sh points to bash whereas your setup probably has sh pointing to dash.

Using dash, i can reproduce your error:

> dash build.sh
build.sh: 5: function: not found

And after fixing the function issues, other issues arise:

> dash build.sh
Platform is virt64
build.sh: 64: [: n: unexpected operator
build.sh: 76: [: y: unexpected operator
Starting Release build
build.sh: 87: [: virt64: unexpected operator
build.sh: 89: [: virt64: unexpected operator

I will open a PR to remove all bash specific features from the script but I wouldn't call it a regression since the lines causing problems have been around since 2021:

Image

I'm wondering if this is new with ubuntu 24.04

@AndreCostaaa AndreCostaaa linked a pull request Apr 28, 2025 that will close this issue
@daniel-rossier
Copy link
Contributor Author

You're perfectly right. I have a symlink of sh to dash. I suppose it came with Ubuntu 24.04.

@AndreCostaaa
Copy link
Contributor

I opened #163 to fix it

The pcpp dependency will be removed with the lvgl v9.3 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants