guysoft / OctoPi

Scripts to build OctoPi, a Raspberry PI distro for controlling 3D printers over the web
GNU General Public License v3.0
2.45k stars 367 forks source link

Fix building against bullseye #757

Closed foosel closed 2 years ago

foosel commented 2 years ago

This removes the version pin on cmake and removes wiringpi, which is no longer maintained and now not even available in the repository anymore.

Note that this currently will in all likelihood not build because there's an unrelated issue with a Python dependency regex currently ongoing that the OctoPrint build is depending on (see mrabarnett/mrab-regex#443). I'm hopeful that that will be fixed soon though (the dependency was updated today and the release lacks some mandatory files). Marking this as draft for now until I can confirm.

I was temporarily able to work around the aforementioned issue by injecting

  sudo -u "${BASE_USER}" /home/"${BASE_USER}"/oprint/bin/pip install regex==2021.11.2

into the chroot script, and can confirm that the build runs through then after the changes in this PR.

guysoft commented 2 years ago

Looks good, ready to merge.

guysoft commented 2 years ago

Build fails on something reguarding regex.h missing:

running build_ext
  building 'regex._regex' extension
  creating build/temp.linux-armv7l-3.9
  creating build/temp.linux-armv7l-3.9/regex_3
  arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/pi/oprint/include -I/usr/include/python3.9 -c regex_3/_regex.c -o build/temp.linux-armv7l-3.9/regex_3/_regex.o
  regex_3/_regex.c:53:10: fatal error: _regex.h: No such file or directory
foosel commented 2 years ago

Did you actually read what I wrote in the PR and why I marked it as draft and not actually yet ready to merge while this issue gets sorted out outside of our control? 😅

guysoft commented 2 years ago

My eyes passed over the text, but clearly I didn't read it.

I did read the code, which made sense since we still need to remove writing pi and also remove that apt-get line (its now the same as ubuntu).

I think I should not merge anything else until tomorrow, and will keep posted regarding regex.h

foosel commented 2 years ago

I'll have to keep an eye on the regex situation anyhow and will give you a ping once it's clear if/how it gets resolved.

foosel commented 2 years ago

A new regex release was pushed last night that fixed the issue, and build #562 went through as anticipated 🥳