flobernd / raspi-fanshim

Lightweight library to control the pimoroni Fan SHIM device on a Raspberry Pi
MIT License
13 stars 2 forks source link

RPi 3b+ Ubuntu 20.04.1 LTS (arm64) compile error #4

Closed h45h3ncryp73d closed 2 years ago

h45h3ncryp73d commented 3 years ago

I was trying to compile raspi-fanshim on my RPi and I can"t get past sudo cmake .. CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: wiringPi_LIB linked by target "RaspiFanshim" in directory /home/ubuntu/raspi-fanshim linked by target "RaspiAPA102" in directory /home/ubuntu/raspi-fanshim/dependencies/raspi-apa102

-- Configuring incomplete, errors occurred! See also "/home/ubuntu/raspi-fanshim/build/CMakeFiles/CMakeOutput.log".

wiringpi is installed ...

Any ideas how to solve this? Thanks.

flobernd commented 3 years ago

It seems like you did not install the wiringPi library.

sudo apt install wiringpi

Not sure if the lib is available in the default Ubuntu repositories tho.

h45h3ncryp73d commented 3 years ago

$ sudo apt install wiringpi Reading package lists... Done Building dependency tree Reading state information... Done wiringpi is already the newest version (2.50-0ubuntu1). 0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.

No it is already installed ...

flobernd commented 3 years ago

Strange. Cmake does not seem to be able to detect wiringPi on your machine using the find_library() function.

Can you tell me at what location the library got installed?

h45h3ncryp73d commented 3 years ago

Strange. Cmake does not seem to be able to detect wiringPi on your machine using the find_library() function.

Can you tell me at what location the library got installed?

$ sudo dpkg -L wiringpi /. /usr /usr/bin /usr/bin/gpio /usr/share /usr/share/doc /usr/share/doc/wiringpi /usr/share/doc/wiringpi/People /usr/share/doc/wiringpi/README.TXT /usr/share/doc/wiringpi/copyright /usr/share/man /usr/share/man/man1 /usr/share/man/man1/gpio.1.gz /usr/share/doc/wiringpi/changelog.Debian.gz

flobernd commented 3 years ago

Can you try copying it to /usr/lib and test again?

Or try out cmake -DCMAKE_LIBRARY_PATH=/mypath to make Cmake search at the correct location.

h45h3ncryp73d commented 3 years ago

Can you try copying it to /usr/lib and test again?

Hmm ... can you please be more precise ... Copy /usr/lib/aarch64-linux-gnu/libwiringPi.so.2 or /usr/bin/gpio?

Or try out cmake -DCMAKE_LIBRARY_PATH=/mypath to make Cmake search at the correct location.

Tried sudo cmake -DCMAKE_LIBRARY_PATH=/usr/bin and got ~/raspi-fanshim$ sudo cmake -DCMAKE_LIBRARY_PATH=/usr/bin CMake Warning: No source or binary directory provided. Both will be assumed to be the same as the current working directory, but note that this warning will become a fatal error in future CMake releases.

-- The C compiler identification is GNU 9.3.0 -- The CXX compiler identification is GNU 9.3.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success -- Performing Test COMPILER_HAS_DEPRECATED_ATTR -- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: wiringPi_LIB linked by target "RaspiFanshim" in directory /home/ubuntu/raspi-fanshim linked by target "RaspiAPA102" in directory /home/ubuntu/raspi-fanshim/dependencies/raspi-apa102

-- Configuring incomplete, errors occurred!

Tried all of sudo cmake -DCMAKE_LIBRARY_PATH= /. /usr /usr/bin /usr/bin/gpio /usr/share

and got the same error. Even tried re-installing wiringpi ...

Funny ...

flobernd commented 3 years ago

Sadly I don't have a Pi up and running right now so I can't even check on the default Raspbian installation. Never worked with Ubuntu on these devices as well ...

Trying out the different pathes was just a wild guess. Found out there seems to be a debug command-line option. Please invoke cmake using cmake -DCMAKE_FIND_DEBUG_MODE=true and paste me the debug output.

h45h3ncryp73d commented 3 years ago

Thanks for trying anyway .. Ubuntu wasn't my first choice but the only one supporting arm64 at the time ... I see Debian is getting there too ... And Raspian hmm ... slowly? getting there ...

$ sudo cmake -DCMAKE_FIND_DEBUG_MODE=true .. CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: wiringPi_LIB linked by target "RaspiFanshim" in directory /home/ubuntu/raspi-fanshim linked by target "RaspiAPA102" in directory /home/ubuntu/raspi-fanshim/dependencies/raspi-apa102

-- Configuring incomplete, errors occurred! See also "/home/ubuntu/raspi-fanshim/CMakeFiles/CMakeOutput.log".

I've posted whole CMakeOutput.log here - https://pastebin.com/fvfaG622 (password: 6twgsP4tmN)