Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile the source code under ubuntu16.10 make error undefined type ‘struct iovec’ #160

Closed
jdpxiaoming opened this issue Feb 17, 2017 · 4 comments

Comments

@jdpxiaoming
Copy link

jdpxiaoming commented Feb 17, 2017

I try to autogen.sh ->configure->make [0.9.11] then i got the error as follows.
but it is OK when i switch to 0.9.10,
I need some help, I am newer to c,c++,I can not find any struct iovec{iov_base...} define in the source
linvnc_log201701171021

make all-recursive make[1]: Entering directory '/home/poe/develop/vnc/libvncserver-master' Making all in libvncserver make[2]: Entering directory '/home/poe/develop/vnc/libvncserver-master/libvncserver' CC libvncserver_la-main.lo CC libvncserver_la-rfbserver.lo CC libvncserver_la-rfbregion.lo CC libvncserver_la-auth.lo CC libvncserver_la-sockets.lo CC libvncserver_la-websockets.lo websockets.c: In function ‘webSocketsGenSha1Key’: websockets.c:223:5: warning: implicit declaration of function ‘digestsha1’ [-Wimplicit-function-declaration] digestsha1(iov, 2, hash); ^ websockets.c: In function ‘webSocketsGenMd5’: websockets.c:518:5: warning: implicit declaration of function ‘digestmd5’ [-Wimplicit-function-declaration] digestmd5(iov, 1, target); ^ CC libvncserver_la-rfbssl_openssl.lo CC libvncserver_la-rfbcrypto_openssl.lo rfbcrypto_openssl.c:29:29: warning: ‘struct iovec’ declared inside parameter list void digestmd5(const struct iovec *iov, int iovcnt, void *dest) ^ rfbcrypto_openssl.c:29:29: warning: its scope is only this definition or declaration, which is probably not what you want rfbcrypto_openssl.c: In function ‘digestmd5’: rfbcrypto_openssl.c:36:2: error: invalid use of undefined type ‘struct iovec’ MD5_Update(&c, iov[i].iov_base, iov[i].iov_len); ^ rfbcrypto_openssl.c:36:20: error: dereferencing pointer to incomplete type ‘const struct iovec’ MD5_Update(&c, iov[i].iov_base, iov[i].iov_len); ^ rfbcrypto_openssl.c:36:2: error: invalid use of undefined type ‘struct iovec’ MD5_Update(&c, iov[i].iov_base, iov[i].iov_len); ^ rfbcrypto_openssl.c: At top level: rfbcrypto_openssl.c:40:30: warning: ‘struct iovec’ declared inside parameter list void digestsha1(const struct iovec *iov, int iovcnt, void *dest) ^ rfbcrypto_openssl.c: In function ‘digestsha1’: rfbcrypto_openssl.c:47:2: error: invalid use of undefined type ‘struct iovec’ SHA1_Update(&c, iov[i].iov_base, iov[i].iov_len); ^ rfbcrypto_openssl.c:47:21: error: dereferencing pointer to incomplete type ‘const struct iovec’ SHA1_Update(&c, iov[i].iov_base, iov[i].iov_len); ^ rfbcrypto_openssl.c:47:2: error: invalid use of undefined type ‘struct iovec’ SHA1_Update(&c, iov[i].iov_base, iov[i].iov_len); ^ Makefile:719: recipe for target 'libvncserver_la-rfbcrypto_openssl.lo' failed make[2]: *** [libvncserver_la-rfbcrypto_openssl.lo] Error 1 make[2]: Leaving directory '/home/poe/develop/vnc/libvncserver-master/libvncserver' Makefile:548: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/home/poe/develop/vnc/libvncserver-master' Makefile:395: recipe for target 'all' failed make: *** [all] Error 2

@The-42
Copy link
Contributor

The-42 commented Feb 17, 2017

The symptoms point to a missing <sys/uio.h> header. However, you're likely to have it since 0.9.10 seems to build and its inclusion was made conditional with release 0.9.11. The condition was needed as some systems don't have that header and a substitute is used for those cases.

Now the condition for this header is determined by the build system, which has been switched to CMake. Autotools is about to be dropped from this project (see #156), hence it is lacking the fixes CMake has had since 0.9.11, and this conditional is one of them. So either have a try at CMake or, if you really need autotools for now, include #152 in your sources.

@bk138 bk138 added the building label Feb 21, 2017
@bk138 bk138 added this to the Release 0.9.12 milestone Feb 21, 2017
@bk138
Copy link
Member

bk138 commented Feb 21, 2017

@jdpxiaoming What does running 'locate uio.h' yield for you?

@bk138
Copy link
Member

bk138 commented Mar 25, 2017

@jdpxiaoming any news on this?

@bk138
Copy link
Member

bk138 commented Apr 10, 2017

As there was no answer in 2 weeks, I am closing this. feel free to reopen if issue persists.

@bk138 bk138 closed this as completed Apr 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants