Issues with CMake for Opencv

April 7, 2024, 09:03

jacked_ripper

I have been following this guide https://pimylifeup.com/raspberry-pi-opencv/ when i run Cmake to prepare OPENCV for comp it gives me this "Configuring Incomplete, Errors Occurred!" please help

thunder07337

What does the CMakeError.log say?

jacked_ripper

a lot like it's a lot of lines

jacked_ripper

build output check failed

thunder07337

This statement does not help to find the error... Post the issue on https://pastebin.com/ if it is too long for the chat!

jacked_ripper

it's pretty big ngl

thunder07337

It looks like you tried it, changed it a bit, tried again, changed it a bit and tried again. Am I right?

jacked_ripper

actually the first time it installed there was a an error i had to try again for it to finish downloading i then ran the rest of the code

jacked_ripper

but yeah in short i kinda did that?

thunder07337

You need to know exactly what you did... Try writing down exactly what you have done so far. Example: sudo apt install sudo apt update sudo apt install xyz sudo nano file.txt I have changed this and that. So maybe we can find out what happened.

jacked_ripper

i just used the commands on this guide

jacked_ripper

i changed nothing

jacked_ripper

at all

jacked_ripper

do i just restart from scratch?

thunder07337

A little tip: enter the word
history
` to see what command you have used so far.

jacked_ripper

Here you go

thunder07337

So if you don't have anything important on the Pi, start again from the beginning. But leave out the Ubuntu repository. Better just use apt. So either
sudo apt update/upgrade/install
or
sudo apt-get update/upgrade/install.
And since the libjasper-dev package is optional according to OpenCV, try it without. https://docs.opencv.org/3.4/d7/d9f/tutorial_linux_install.html

jacked_ripper

want me to format and do a new new install?

jacked_ripper

i am new to all this so i am a bit confused

thunder07337

Yes

jacked_ripper

oh god

jacked_ripper

wait you mean i just need to delete open cv and contrib and restart

jacked_ripper

or do you mean my pi entirely from start

thunder07337

Reinstall the OS.

jacked_ripper

ok i will do it

thunder07337

Believe me, it's easier than uninstalling everything... It's usually not as clean as reinstalling the OS.

jacked_ripper

i can imagine that

jacked_ripper

ill go get some rest then i haven't slept because of this

jacked_ripper

28 hours

jacked_ripper

ill update you when i am back

jacked_ripper

thank you for your time thunder

thunder07337

This is the worst mistake you can make. Don't drink, you can hold out for a few days. Not eating for a few weeks, depending. Not sleeping clouds your mind. Don't do that. Solutions usually come in your sleep!

jacked_ripper

That's true

jacked_ripper

I'll rest a bit

jacked_ripper

Yo I am back

jacked_ripper

Reinstalled the os

jacked_ripper

Ok so i did a different method

jacked_ripper

i followed this tutorial

jacked_ripper

no errors but it's a bit confusing given i do not know what to do next for the facial recognition

jacked_ripper

<@1071178789939331253>

jacked_ripper

i have followed this tutorial

jacked_ripper

start to finish

k9t33n

Ping me tomorrow my brain is just not working rn

jacked_ripper

i have now a virtual env

jacked_ripper

ah

jacked_ripper

ok

k9t33n

Sorry

jacked_ripper

ah i do have a quick question

jacked_ripper

in thonny

jacked_ripper

when i try to save

jacked_ripper

the windo is too damn big

k9t33n

Yes

jacked_ripper

for me to save

jacked_ripper

i can't resize it down

jacked_ripper

you know to actually type and all

k9t33n

😂

k9t33n

I use nano and vim myself

k9t33n

I use lite os so I only see the terminal

k9t33n

No VNC. And it's been a while since I've been on desktop.

k9t33n

May you show me what part is too big?

jacked_ripper


jacked_ripper

too vertically big

jacked_ripper

can't resize it down

jacked_ripper

used alt

jacked_ripper

did nothing

jacked_ripper

i am on VNC so it's not a screen issue

k9t33n

Idk

k9t33n

God it's been a while since I've seen RPi is desktop

jacked_ripper

i can resize horizontally not vertically

jacked_ripper

update i am now losing my motivation and will it keeps showing me errors

jacked_ripper

I did a new fresh os I'll retry

jacked_ripper

i did a full env install

jacked_ripper

then i wrote down a code in thonny

jacked_ripper

i then sent a picture to show

jacked_ripper

import cv2
img=cv2.imread ("lkma.jpg")
cv2.namedWindow('image',cv2.WINDOW_NORMAL)
cv2.imshow('image',img)
cv2.waitKey(0)
cv2.destroyAllWindows()

jacked_ripper

it results in this

jacked_ripper

(env) lkma@raspberrypi:~/project $ python3 test_opencv.py
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in "/home/lkma/project/env/lib/python3.11/site-packages/cv2/qt/plugins"

jacked_ripper

the image shows up tho

jacked_ripper

apparently there is some big issues with the Qtwayland plugin?

jacked_ripper

right now i am installing the facial recognition lib

jacked_ripper

it's taking a bit long

jacked_ripper

with dlib being so damn slow

thunder07337

Do you use Bookworm? If the program has problems with Wayland you should switch to X.11.
sudo raspi-config
Advanced options If this does not work and there is no other solution, the only option is to install Bullseye... By the way, get used to it, in IT everything rarely works immediately and without problems.

jacked_ripper

i am not sure what to say let me check

jacked_ripper


thunder07337

A6

thunder07337

Change to X

jacked_ripper

ill do it once the face recog fails for now i need to write down a few lines of code since i am still trying to "send notif to an app/email" from the pi

thunder07337

For email you need to set up msmtp and specify an SMTP server. For App I have seen this here https://pimylifeup.com/raspberry-pi-ntfy/, but have not tried it myself. I prefer to use email.

jacked_ripper

one hiccup is google disable less secure apps ?

jacked_ripper

kinda confused trying to figure it out

thunder07337

No idea what exactly you mean...

k9t33n

Let me send you a screenshot

k9t33n

Oh this has changed

k9t33n

jacked_ripper

i legit don't know what to do

k9t33n

Yeah me neither actually

k9t33n

I did do this before

k9t33n

No clue where it's gone now

k9t33n

Maybe it's on by default so try continuing on

jacked_ripper

.