Missing Regex.h

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
Posts: 2
Joined: Wed Jul 25, 2018 4:22 am

Missing Regex.h

Post by EdO » Fri Aug 03, 2018 3:11 pm

Helllo, I'm new to micropython on ESP8266. I downloaded Micropython from github. went to C:\micropython\ports\esp8266
and did a make axtls.
First time i got missing regex.h. I added a regex.h.
Now I get errors

gcc conf.o zconf.tab.o -o conf
conf.o:conf.c:(.text+0x161): undefined reference to `random'
conf.o:conf.c:(.text+0xb67): undefined reference to `random'
conf.o:conf.c:(.text.startup+0x2f6): undefined reference to `srandom'
zconf.tab.o:zconf.tab.c:(.text+0x5858): undefined reference to `regcomp'
zconf.tab.o:zconf.tab.c:(.text+0x58c3): undefined reference to `regexec'
zconf.tab.o:zconf.tab.c:(.text+0x5908): undefined reference to `regfree'
I'm wondering if the regex.h I added isn't correct one.

Does anyone know what I'm doing wrong?
Which regex.h should I use?
O BTW I'm using mingw-W64.
Building lunix stuff on windows is hard for me. I mostly work VB. Did some Lua on ESP8266. So sorry I just don't understand this stuff very well.

Thank You for any help you can give.
Ed O

User avatar
Posts: 3209
Joined: Fri Jul 18, 2014 8:01 am
Location: UK

Re: Missing Regex.h

Post by pythoncoder » Fri Aug 03, 2018 6:03 pm

If there are missing files I think something went wrong when you copied the MicroPython repository to your PC. You definitely should not need to ferret around for files.

This is the script I run to update the local copy prior to building. I've removed Pyboard lines and just left those relevant to ESP8266. This should be run from your micropython directory. The -j 8 assumes 8 cores: adjust to suit your PC.

Code: Select all

git checkout master
git pull origin master
git submodule update --init
cd mpy-cross
make clean
make -j 8
cd ../esp8266
make clean
cd ../unix
make clean
make -j 8 axtls
# The following builds the Unix version 
make -j 8
Peter Hinch

Posts: 2
Joined: Wed Jul 25, 2018 4:22 am

Re: Missing Regex.h

Post by EdO » Fri Aug 10, 2018 3:23 pm

Thanks for the help.
the arg -j 8 is interesting but still no go. Oh well.
Seems mingw on Windows is always missing something or another.
I'm trying to setup a Raspberry pi in lunix and will try that to see if it can make the code correctly.

Post Reply