How to compile sqlite3 for esp32?

frappe123
Posts: 7
Joined: Tue Mar 30, 2021 1:35 pm

How to compile sqlite3 for esp32?

Postby frappe123 » Wed Mar 31, 2021 8:26 am

There occured an error "#include <sys/ioctl.h> file not found" while I was compiling sqlite3 by xtensa-esp32-elf-gcc(esp-2020r3-8.4.0).Is there any solution for it? Thx.

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Re: How to compile sqlite3 for esp32?

Postby PeterR » Wed Mar 31, 2021 11:23 pm

Search for ioctrl.h in the ESP folder.
If it does not exists download and add somewhere (but eventually this might cause other issues which you then have to resolve).

Next & also if IDF has icotrl.h you need to update your search path.
In your 'component.mk' add something like:
COMPONENT_ADD_INCLUDEDIRS += the relative path to the file
In current search path is easiest but structurally not quite 'right'.
Finding the relative path will pain most people. Just add multiple guesses with a few extra ../ Once it works you can binary chop.

It is likely (& especially if yo download) that you then get linker errors. If so you then have to figure how you implement the missing functionality. Typically the missing stuff is POSIX and ESP are quite POSIX so lets hope you don't have an issue. If you do though remember its POSIX, Google will solve.
If you get linker errors then maybe look for an ESP port. Its really hard to say, its a work through it kind of issue.
& I also believe that IDF CAN should be fixed.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: How to compile sqlite3 for esp32?

Postby WiFive » Thu Apr 01, 2021 4:39 am


Who is online

Users browsing this forum: No registered users and 80 guests