Raspberry Pi Poco error


#1

I just went to setup a fresh pi for OF. I get an error in the install dependencies that I cannot solve. I followed the steps from the setup guide for the RPI 2, however I am using an RPI 3.

http://openframeworks.cc/setup/raspberrypi/raspberry-pi-getting-started/

The whole readout from the installs scripts is here

https://pastebin.com/RM9z0GJy

But I am pretty sure this is the offending section

/    home/pi/openFrameworks/scripts/apothecary/build/poco/Crypto/obj/Linux/armv7l/debug_static/RSAKeyImpl.o
src/CipherImpl.cpp:80:21: error: field '_ctx' has incomplete type 'EVP_CIPHER_CTX {aka evp_cipher_ctx_st}'
   EVP_CIPHER_CTX    _ctx;
                     ^~~~
In file included from /usr/include/openssl/crypto.h:31:0,
                 from include/Poco/Crypto/OpenSSLInitializer.h:26,
                 from include/Poco/Crypto/CipherKeyImpl.h:24,
                 from include/Poco/Crypto/CipherKey.h:24,
                 from include/Poco/Crypto/CipherImpl.h:25,
                 from src/CipherImpl.cpp:17:
/usr/include/openssl/ossl_typ.h:90:16: note: forward declaration of 'EVP_CIPHER_CTX {aka struct evp_cipher_ctx_st}'
 typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
                ^~~~~~~~~~~~~~~~~
/home/pi/openFrameworks/scripts/apothecary/build/poco/build/rules/compile:37: recipe for target '/home/pi/openFrameworks/scripts/apothecary/build/poco/Crypto/obj/Linux/armv7l/debug_static/CipherImpl.o' failed
make[1]: *** [/home/pi/openFrameworks/scripts/apothecary/build/poco/Crypto/obj/Linux/armv7l/debug_static/CipherImpl.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make -C /home/pi/openFrameworks/scripts/apothecary/build/poco/MongoDB
make[1]: Entering directory '/home/pi/openFrameworks/scripts/apothecary/build/poco/MongoDB'
src/RSAKeyImpl.cpp: In member function 'Poco::Crypto::RSAKeyImpl::ByteVec Poco::Crypto::RSAKeyImpl::modulus() const':
src/RSAKeyImpl.cpp:210:31: error: invalid use of incomplete type 'RSA {aka struct rsa_st}'
  return convertToByteVec(_pRSA->n);
                               ^~
In file included from /usr/include/openssl/crypto.h:31:0,
                 from include/Poco/Crypto/OpenSSLInitializer.h:26,
                 from include/Poco/Crypto/RSAKeyImpl.h:24,
                 from src/RSAKeyImpl.cpp:17:
/usr/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'RSA {aka struct rsa_st}'
 typedef struct rsa_st RSA;
                ^~~~~~
src/RSAKeyImpl.cpp: In member function 'Poco::Crypto::RSAKeyImpl::ByteVec Poco::Crypto::RSAKeyImpl::encryptionExponent() const':
src/RSAKeyImpl.cpp:216:31: error: invalid use of incomplete type 'RSA {aka struct rsa_st}'
  return convertToByteVec(_pRSA->e);
                               ^~
In file included from /usr/include/openssl/crypto.h:31:0,
                 from include/Poco/Crypto/OpenSSLInitializer.h:26,
                 from include/Poco/Crypto/RSAKeyImpl.h:24,
                 from src/RSAKeyImpl.cpp:17:
/usr/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'RSA {aka struct rsa_st}'
 typedef struct rsa_st RSA;
                ^~~~~~
src/RSAKeyImpl.cpp: In member function 'Poco::Crypto::RSAKeyImpl::ByteVec Poco::Crypto::RSAKeyImpl::decryptionExponent() const':
src/RSAKeyImpl.cpp:222:31: error: invalid use of incomplete type 'RSA {aka struct rsa_st}'
  return convertToByteVec(_pRSA->d);
                               ^~
In file included from /usr/include/openssl/crypto.h:31:0,
                 from include/Poco/Crypto/OpenSSLInitializer.h:26,
                 from include/Poco/Crypto/RSAKeyImpl.h:24,
                 from src/RSAKeyImpl.cpp:17:
/usr/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'RSA {aka struct rsa_st}'
 typedef struct rsa_st RSA;

If anyone knows how to solve this it would be great.

Cheers

Fred


Compiling OF in raspbian Stretch
#2

0.9.8 is not compatible anymore with latest linux distributions, you need to use the nightly builds


#3

Cheers, I can compile OF, but none of the examples will work. I get
[notice ] ofAppEGLWindow: display(): eglSwapBuffers failed:

And no window appears. Any clues on how to fix this?


#4

Hey for what its worth I just reinstalled Raspbian on my pi, not knowing that they had moved from Jessie to Stretch. I never did get oF to compile in Stretch. The recompile of the Poco libs had issues during install_dependencies.sh, and then I had a hot mess of error(s) when compiling the oF libs of the nightly arm6 build.

So, I found and reloaded the most recent distribution of Jessie (via Noobs 2.4.2) and everything installed/compiled/worked just peachy. I think they moved to Stretch starting with 2.4.3. Various older images and etc are archived here: http://downloads.raspberrypi.org/.


#5

Im getting the exact same error. Im about try @TimChi solution


#6

Use Jessie and the Nightly build. Stretch or 0.9.8 don’t work with oF.


#7

Hi @ayruos,

Hey are there any particular reasons why you prefer the nightly builds over 0.9.8 armv6? Both seem to compile and work just fine with Jessie on a Pi3 (as well as a Pi Zero W).


#8

Huh, I couldn’t get 0.9.8 to compile on the latest Jessie when I tried a couple of months ago. There were some issues with the GCC compiler and Poco.


#9

Finally I get it work with a Jessie distribution that I get from torrenting an of_v20170714_linuxarmv6l_release !


#10

I installed the image raspbian-2017-07-05, which includes gcc 4.9.2. I know that when I’ve installed oF 0.9.8 on my linux (Mint 18.x) desktops with gcc 5.x, the compile script recompiles the Poco libs, and this did not happen with gcc 4.9.2 on the Pi3, or with gcc 4.9.3 on a linux desktop. I’m speculating, but maybe the armv6 nightly build compiles with gcc 5.x, where the 0.9.8 release would/will not?

There is a forum post here that describes how to compile oF with Stretch, but I haven’t tried it yet: Compiling OF in raspbian Stretch

Also @Julian_Puppo I’m glad you got it working!


#11

I got the same error too,


libEGL warning: DRI3: xcb_connect failed
libEGL warning: DRI2: xcb_connect failed
libEGL warning: DRI2: xcb_connect failed
[ error ] ofAppEGLWindow: createSurface(): eglInitialize returned EGL_FALSE
[notice ] ofAppEGLWindow: setupPeripherals(): peripheral setup complete
[notice ] ofAppEGLWindow: setupNativeUDev(): created udev object
[ error ] ofAppEGLWindow: setupMouse(): did not open mouse
[ error ] ofAppEGLWindow: setupMouse(): did not open mouse, mouse_fd < 0
[ error ] ofAppEGLWindow: setupKeyboard(): did not open keyboard
[ error ] ofAppEGLWindow: setupKeyboard(): did not open keyboard, keyboard_fd < 0
[notice ] ofAppEGLWindow: setupPeripherals(): native event setup complete
[notice ] ofAppEGLWindow: display(): eglSwapBuffers failed:
[notice ] ofAppEGLWindow: display(): eglSwapBuffers failed:

does anyone has solved the problem yet and can help me with that.
I installed the "Raspbian Stretch with desktop"´as OS and used the
of_v20170714_linuxarmv6l_nightly.tar.gz
for my Raspberry 1.

Im desperate.


#12

Hi @Jonas_Sorgenfrei,
Hey if possible just try installing Raspbian Jessie on the Pi instead of Stretch. The last release of Jessie was (around) July 5th of 2017. The nightly builds should compile and run fine, and likely the oF 0.9.8 distribution will as well. There is a link above in one of my previous posts as to where to find past releases of Raspbian.


#13

Hey Tim,
thanks for your help.
I managed it to run.
I used method 1 from this Topic:


#14

Hey Jonas,
Glad you got oF working with Stretch and thanks for referencing the other post in the forum! I’ll give Stretch a try this week with Method 1 from @bakercp to see if I can get oF to compile and run some examples.


#15

I try to compile linuxarmv6l_realease at arm7 (raspberry pi 3).
PRETTY_NAME=“Raspbian GNU/Linux 9 (stretch)”
NAME=“Raspbian GNU/Linux”
VERSION_ID=“9”
VERSION=“9 (stretch)”
ID=raspbian
ID_LIKE=debian

processor : 0
model name : ARMv7 Processor rev 4 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4

but the error is the same at the Crypto thing.


In file included from /usr/include/openssl/crypto.h:31:0,
from include/Poco/Crypto/OpenSSLInitializer.h:26,
from include/Poco/Crypto/RSAKeyImpl.h:24,
from src/RSAKeyImpl.cpp:17:
/usr/include/openssl/ossl_typ.h:110:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
typedef struct rsa_st RSA;
^~~~~~
src/RSAKeyImpl.cpp: In member function ‘Poco::Crypto::RSAKeyImpl::ByteVec Poco::Crypto::RSAKeyImpl::decryptionExponent() const’:
src/RSAKeyImpl.cpp:222:31: error: invalid use of incomplete type ‘RSA {aka struct rsa_st}’
return convertToByteVec(_pRSA->d);
^~
In file included from /usr/include/openssl/crypto.h:31:0,
from include/Poco/Crypto/OpenSSLInitializer.h:26,
from include/Poco/Crypto/RSAKeyImpl.h:24,
from src/RSAKeyImpl.cpp:17:
/usr/include/openssl/ossl_typ.h:110:16: note: forward declaration of ‘RSA {aka struct rsa_st}’
typedef struct rsa_st RSA;
^~~~~~
/home/pi/openFrameworks/scripts/apothecary/build/poco/build/rules/compile:37: recipe for target ‘/home/pi/openFrameworks/scripts/apothecary/build/poco/Crypto/obj/Linux/armv7l/debug_static/RSAKeyImpl.o’ failed
make[1]: *** [/home/pi/openFrameworks/scripts/apothecary/build/poco/Crypto/obj/Linux/armv7l/debug_static/RSAKeyImpl.o] Error 1
make[1]: Leaving directory ‘/home/pi/openFrameworks/scripts/apothecary/build/poco/Crypto’
Makefile:139: recipe for target ‘Crypto-libexec’ failed
make: *** [Crypto-libexec] Error 2

^ Received error ^
pi@xtal:~/openFrameworks/scripts/linux/debian $