Is Dietpi for developers

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Mpoint
Posts: 14
Joined: Sun Sep 12, 2021 12:59 am

Is Dietpi for developers

Post by Mpoint »

Debian distro has been very kind to developers and it kept well updated. And Raspberry OS is build on Debian However is Dietpi for developers ?
I am saying this because I am getting file errors and trying to build firmware I have installed using
sudo apt-get install gcc-arm-none-eabi
and it was a success
but that is how it would normally work in Raspbian OS, Perhaps that is a switch in Dietpi-Config that I missed
As the all the dot h file are not recongized by dietpi it has installed https://pastebin.pl/view/789fc4ba

how to I configure gcc+ so dietpi will serve as a developer platform to build firmware

thanks in Advance

Mpoint :P
User avatar
Joulinar
Posts: 5996
Joined: Sat Nov 16, 2019 12:49 am

Re: Is Dietpi for developers

Post by Joulinar »

to avoid a misunderstanding. DietPi is not an own OS, it's a set of bash scripts on top of a base image. In case of Raspberry Pi device, we use Raspberry OS as base. However DietPi is an extrem slim/diet version of Raspberry OS. Means, DietPi is running half of apt package installed compare to Raspberry OS. This explains as well why you had to install additional packages.

If you need some packages to compile software, you could have a look to dietpi-software. There we have a section Development & Programming offering a couple of tools to be installed.

Code: Select all

[ ]      ●─ Development & Programming ───────────────────────────────────────────●
[ ] 8    Java JDK: OpenJDK Development Kit                                        
[ ] 9    Node.js: JavaScript runtime environment                                  
[ ] 16   Build-Essential: GNU C/C++ compiler, development libraries and headers   
[ ] 17   Git: Clone and manage Git repositories locally                           
[ ] 130  Python 3: Runtime system, pip package installer and development headers  
[ ] 150  Mono: runtime libraries and repo                                         
[ ] 188  Go: Runtime environment and package installer                            
[ ] 189  VSCodium: FLOSS version of MS VSCode                                     
[ ] 196  Java JRE: OpenJDK Runtime Environment
but it might be still something missing. In this case you would need to install these packages manually.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Mpoint
Posts: 14
Joined: Sun Sep 12, 2021 12:59 am

Re: Is Dietpi for developers

Post by Mpoint »

Thanks for your response. Yea but how to verify if it is manually installed.
Here is what I have install

Code: Select all

[[ ]      ●─ Development & Programming ─────────────────────────────────────
│    [*] 8    Java JDK: OpenJDK Development Kit
│    [*] 9    Node.js: JavaScript runtime environment
│    [*] 16   Build-Essential: GNU C/C++ compiler, development libraries and hea
│    [*] 17   Git: Clone and manage Git repositories locally
│    [*] 130  Python 3: Runtime system, pip package installer and development he
│    [ ] 150  Mono: runtime libraries and repo
│    [*] 188  Go: Runtime environment and package installer
│    [*] 189  VSCodium: FLOSS version of MS VSCode
│    [*] 196  Java JRE: OpenJDK Runtime Environment
│    [ ]      ●─ Text Editors ──────────────────────────────────────────────────
│    [*] 18   Emacs: gnu emacs editor
│    [*] 19   Jed: editor for programmers
So I have not installed the mono runtime libraries and I will try that FOR Git I can do git --version for python3, pip3 and nodejs I can ask for version and I know it is installed manually. This dietpi-software automatically updated when git is installed manually so that is pretty good. Thank you again, Once I get it working I update the post
User avatar
Joulinar
Posts: 5996
Joined: Sat Nov 16, 2019 12:49 am

Re: Is Dietpi for developers

Post by Joulinar »

The overview will list software installed by or scripts only. Manually installed software will not be listed.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Mpoint
Posts: 14
Joined: Sun Sep 12, 2021 12:59 am

Re: Is Dietpi for developers

Post by Mpoint »

OK I am using micropython for development and It does work on Raspberry Pi here are the instructions https://www.raspberrypi.org/forums/view ... p?t=191744

However not on Diepi as you mention it is a slim version of the Raspberry Pi OS so I have to install library manually and i have had success installing micropython UNTILL I reach STEP 4 the make test part fails

With Error code 1 that means it IS an OS error ? Right ? Here is the list of all the test it passes and some of the test it skips
https://pastebin.pl/view/5d885562

I still get missing dot h files when I try and build the firmware and I have installed the whole Development Package in Dietpi-Software section
User avatar
Joulinar
Posts: 5996
Joined: Sat Nov 16, 2019 12:49 am

Re: Is Dietpi for developers

Post by Joulinar »

looks like some python modules/packages are missing as your check is failing

Code: Select all

735 FAIL  float/float_parse.py
774 FAIL  float/float_parse_doubleprec.py

2 tests failed: float_parse float_parse_doubleprec
Probably they would need to be installed using pip?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3357
Joined: Sat Nov 18, 2017 6:21 pm

Re: Is Dietpi for developers

Post by MichaIng »

It is these tests which fail: https://github.com/micropython/micropyt ... t_parse.py
and: https://github.com/micropython/micropyt ... bleprec.py
Please run those individually and paste the output.

It checks how the compiled MicroPython deals with floating point numbers. Can you also run the whole test script individually and show the output: https://github.com/micropython/micropyt ... n-tests.py
I didn't find yet where the tests outputs are checked (and what is hence expected), but probably we can derive the issue already from those outputs.

Just to be sure, since I recognised your post at the PINE64 forum, it is a Raspberry Pi you are trying this on, right? If it works OOTB on current Raspberry Pi OS, it is not a hardware limitation, and the left major difference is that DietPi images are based on Debian Bullseye already while Raspberry Pi OS is still based on Debian Buster. Probably the compiler or toolchain behaves a bit different. With the output of the tests above, I suggest you report it at their GitHub: https://github.com/micropython/micropython/issues
Mpoint
Posts: 14
Joined: Sun Sep 12, 2021 12:59 am

Re: Is Dietpi for developers

Post by Mpoint »

Thank you for your response Actually I am running Pine64 2GB Ram version that I purchase during the Kickstart funding few years ago
I did try running those two test seperately and they RUN fine its only during the run_tests it fails on those two test
Here are the output you request for me to share https://pastebin.pl/view/7c983b9b
Notice it also skips certain test perhaps those are not important

If you ask me since when I run the Make command make -j `nproc` BOARD=pinetime all
It does give me error regarding stdint.h not found

Code: Select all

 In file included from src/main.c:36:0:
/usr/lib/gcc/arm-none-eabi/7.3.1/include/stdint.h:9:16: fatal error: stdint.h: No such file or directory
 # include_next <stdint.h>
So my guess it there is a package of bash script that needs to be installed to it finds all the dot h extensions
It a matter of configure the PACKAGE PATH in dietpi as the find command does find the stdint.h file

Code: Select all

root@Rajpi:/# find -name stdint.h
./usr/include/stdint.h
./usr/include/c++/8/tr1/stdint.h
./usr/lib/gcc/aarch64-linux-gnu/8/include/stdint.h
./usr/lib/gcc/arm-none-eabi/7.3.1/include/stdint.h
./root/micropython/lib/tinyusb/hw/mcu/sony/cxd56/spresense-exported-sdk/nuttx/include/stdint.h
./root/micropython/lib/pico-sdk/lib/tinyusb/hw/mcu/sony/cxd56/spresense-exported-sdk/nuttx/include/stdint.h
root@Rajpi:/#
I found this thread viewtopic.php?t=2650
maybe I just need to update the etc/profile
Here is my echo PATH

Code: Select all

root@Rajpi:/# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin:/mnt/dietpi_userdata/go/bin
root@Rajpi:/#
SO I added the usr/lib to the above path

Code: Select all

root@Rajpi:~/wasp-os/micropython/tests# echo $PATH
/usr/lib/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin:/mnt/dietpi_userdata/go/bin
root@Rajpi:~/wasp-os/micropython/tests#
STILL I GET The same results when I run make I get Error2 with all dot h file as NOT found
:? I am not sure or should have edited the .bashrc ? but my etc does not have a .bashrc and the echo $LD_LIBRARY_PATH returns BLANK line
ALSO PLEASE NOTE https://pastebin.pl/view/789fc4ba there are so many dot h files and they are not all in one location so may be there is another solution to this problem i am having :x
Mpoint
Posts: 14
Joined: Sun Sep 12, 2021 12:59 am

Re: Is Dietpi for developers

Post by Mpoint »

As anybody seen this warning and know what it means

Code: Select all

root@Dietpi:~# pip3 install pyserial
Requirement already satisfied: pyserial in /usr/lib/python3/dist-packages (3.4)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
root@Dietpi:~# 
I cannot get my bluetooth adapter to respond and the system is behaving in an unpredictable manner I was wondering if this is because root cannot be used as default user if you doing any development on dietpi and must be a non-root user.

When I try to create a new user issued a password IT NOW does not boot to the MATE Desktop so it seems the user root is not ideal if you using the dietpi as development environment
User avatar
MichaIng
Site Admin
Posts: 3357
Joined: Sat Nov 18, 2017 6:21 pm

Re: Is Dietpi for developers

Post by MichaIng »

Why are you adding a library path to the executable PATH :)? The library is in a default library path and make finds it, so no need to set LD_LIBRARY_PATH either, which is expected to be empty and serves for non standard extensions or overrides only. The error may be misleading in that it is the stdint header itself which does not find something, AFAIK. As you say, the exact stdint.h exists on the path make looks for it.

Can you check /usr/lib/gcc/arm-none-eabi/7.3.1/include/stdint.h line 9 column 16?

The pip question is answered on GitHub and not a reason for any issue you face.

If you mean onboard Bluetooth, I think there is some task required to bind the Bluetooth interface, answered in the other topic you opened.

That you cannot start a desktop directly as non-root user is expected. Use the LightDM login manager for this.

Please lets keep discussing the individual issues in their individual threads/issues you opened here and on GitHub (onboard Bluetooth and pip question). They are not related to each other or the MicroPython build, which we may discuss here now.
Post Reply