Is Dietpi for developers

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 :stuck_out_tongue:

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.

[ ]      ●─ 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.

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

[[ ]      ●─ 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

The overview will list software installed by or scripts only. Manually installed software will not be listed.

OK I am using micropython for development and It does work on Raspberry Pi here are the instructions https://www.raspberrypi.org/forums/viewtopic.php?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

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

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?

It is these tests which fail: https://github.com/micropython/micropython/blob/master/tests/float/float_parse.py
and: https://github.com/micropython/micropython/blob/master/tests/float/float_parse_doubleprec.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/micropython/blob/master/tests/run-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

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

 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

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 [u]https://dietpi.com/forum/t/add-script-path-to-path/1799/1]
maybe I just need to update the etc/profile
Here is my echo PATH

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

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
:thinking: 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 :face_with_raised_eyebrow:

As anybody seen this warning and know what it means

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

Why are you adding a library path to the executable PATH :slight_smile:? 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.

I have issues with corrupts files now so I am unable to check /usr/lib/gcc/arm-none-eabi/7.3.1/include/stdint.h line 9 column 16?
Apparently this is a known problem https://dietpi.com/forum/t/any-way-to-check-for-file-system-corruption/3217/1

Re-installation of gcc is not an option so I will have to run dietpi-device_manager and run a root file system check

The root fs is OK there is no problem. Let me know if you able to figure out how to put together a Dietpi package for developers Once can use Dietpi-software to install the dev package and that should solve the problem. I removed the SD card from my pine64 and using another distro as there are too many issues that I am unable to figure out right now. Here is the output that calls for rebuilding the new image and I have done that once and try to run sudo apt-get update many times along here is the output if it helps https://pastebin.pl/view/1a8edb56

I don’t know what you mean by “dev package”. There is no dev package. You can install “Build-Essential” via dietpi-software or apt install build-essential, which includes C and C++ compiler, make and standard C development headers, but it is pretty normal that for compiling software you need to manually install additional libraries/development headers. There are hundreds or thousands of libraries and development headers for C and various other languages and every software/source links different ones. No OS has “a package for developers”, either the developers of the code you want to compile tell you which libraries/headers it requires, or you need to figure it out by reading the usually quite clear (with some experience) error messages that tell you what is missing.

File corruption is a known issue on each and every OS and storage hardware, with various triggers. Some filesystems are more prone to it when facing power loss or voltage fluctuations, others less. DietPi images come with the standard ext4 root filesystem, standard at Debian, Raspbian and all their variations at least, which uses journaling and checksuming in attempt to keep the risk minimal, but there is no 100% guarantee. Hence it is always advised to have backups or important data and the OS as a whole, on every OS and every filesystem type.

To fix the error you face:

/boot/dietpi/func/dietpi-set_software apt-cache clean
apt update

OK I posted this problem on wasp-os bug issue https://github.com/daniel-thompson/wasp-os/issues/252 and it seems to me that problem with with gcc++ library installation wrong source file can cause issues SO i did search the forum https://dietpi.com/forum/t/dietpi-how-to-cross-compile-customized-c-software-package/5301/1 and it does have somewhat different instruction to intall the gcc complier. Now if I do apt install build-essentials will it install the gcc along with gdb and required library files from the right source ? How do I make sure it does use the right source libraries/scripts ?
OR should i be using sometihing from diepi-software menu ? Most of the script work well when installed with Diepi-sofware menu rather than with apt install from the terminal

:slight_smile: https://ibb.co/4pCphtN Thank for updated the dietpi-software now I should be able to install gcc complier and node and javascript for IOT development
Just to let you know it does not install gdb but It is not need in this setup

Not sure what you mean but we didn’t release any update and we did not add any software title in this category.

Yes all those software options were available before :wink:. And to install gdb:

apt install gdb

:stuck_out_tongue: Sorry Guys May because I tried to install gcc using sudo apt-get install gcc-arm-none-eabi it did install but did not work property but when I install it using dietpi-software ( I did not see this option before for some reason :frowning: :frowning: ) Now that I install the right way it works the following command did work on my raspbian os now that I have installed gcc it using dietpi-software menu I get

root@DietPi:~# arm-none-eabi-gcc --version
-bash: arm-none-eabi-gcc: command not found
root@DietPi:~# sudo arm-none-eabi-gcc --version
sudo: arm-none-eabi-gcc: command not found

However once when correct gcc complier is installed on dietpi-software to check if the correct version is installed

root@DietPi:~# gcc --version
gcc (Debian 8.3.0-6) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

What I should have done is installed it using the command sudo apt install gcc :stuck_out_tongue:
I am new to dietpi sorry guys !

apt install gcc as well as apt install build-essentials will of course always pull the right packages for the used system architecture and dietpi-software does exactly this. This is the same on all Debian-based distros and I believe on most others as well. Compiler packages with an architecture suffix are for cross-compiling.