1

Hey folks I'm trying to compile a ELF binary server files from here:https://github.com/LibVNC/libvncserver

To do this I follow the steps here: (starting line 10 - 31). I set the NDK toolchains correctly and now I'm trying to run the $configure command

I'm using a 14.04 Ubuntu Machine.

The following command is succesful

$./configure --host=arm-eabi CC=arm-linux-androideabi-gcc

I then run

$make

and get the following error ($make clean ... doesn't help):

root@ip-172-31-35-74:~/Desktop/libvncserver-LibVNCServer-0.9.10# 
root@ip-172-31-35-74:~/Desktop/libvncserver-LibVNCServer-0.9.10# make
make  all-recursive
make[1]: Entering directory `/home/ubuntu/Desktop/libvncserver-LibVNCServer-0.9.10'
Making all in libvncserver
make[2]: Entering directory `/home/ubuntu/Desktop/libvncserver-LibVNCServer-0.9.10/libvncserver'
  CC       main.lo
  CC       rfbserver.lo
rfbserver.c: In function 'rfbProcessFileTransfer':
rfbserver.c:1690:69: warning: pointer targets in passing argument 1 of 'gmtime' differ in signedness [-Wpointer-sign]
               strftime(timespec, sizeof(timespec), "%m/%d/%Y %H:%M",gmtime(&statbuf.st_ctime));
                                                                     ^
In file included from rfbserver.c:87:0:
/tmp/my-android-toolchain/sysroot/usr/include/time.h:76:20: note: expected 'const time_t *' but argument is of type 'long unsigned int *'
 extern struct tm*  gmtime(const time_t *timep);
                    ^

  CC       rfbregion.lo
  CC       auth.lo
  CC       sockets.lo
  CC       websockets.lo
  CC       rfbssl_none.lo
  CC       rfbcrypto_included.lo
In file included from rfbcrypto_included.c:25:0:
../common/md5.h: In function '__md5_init_ctx':
../common/md5.h:101:50: error: expected declaration specifiers before '__THROW'
 extern void __md5_init_ctx (struct md5_ctx *ctx) __THROW;
                                                  ^
../common/md5.h:108:39: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__THROW'
                  struct md5_ctx *ctx) __THROW;
                                       ^
../common/md5.h:115:39: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__THROW'
                  struct md5_ctx *ctx) __THROW;
                                       ^
../common/md5.h:124:67: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__THROW'
 extern void *__md5_finish_ctx (struct md5_ctx *ctx, void *resbuf) __THROW;
                                                                   ^
../common/md5.h:133:71: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__THROW'
 extern void *__md5_read_ctx (const struct md5_ctx *ctx, void *resbuf) __THROW;
                                                                       ^
../common/md5.h:139:56: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__THROW'
 extern int __md5_stream (FILE *stream, void *resblock) __THROW;
                                                        ^
../common/md5.h:146:32: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__THROW'
                void *resblock) __THROW;
                                ^
In file included from rfbcrypto_included.c:26:0:
../common/sha1.h:62:1: warning: empty declaration
 enum
 ^
../common/sha1.h:89:3: error: storage class specified for parameter 'SHA1Context'
 } SHA1Context;
   ^
../common/sha1.h:94:17: error: expected declaration specifiers or '...' before 'SHA1Context'
 int SHA1Reset(  SHA1Context *);
                 ^
../common/sha1.h:95:17: error: expected declaration specifiers or '...' before 'SHA1Context'
 int SHA1Input(  SHA1Context *,
                 ^
../common/sha1.h:98:17: error: expected declaration specifiers or '...' before 'SHA1Context'
 int SHA1Result( SHA1Context *,
                 ^
rfbcrypto_included.c:30:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
rfbcrypto_included.c:41:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
In file included from rfbcrypto_included.c:25:0:
../common/md5.h:101:13: error: old-style parameter declarations in prototyped function definition
 extern void __md5_init_ctx (struct md5_ctx *ctx) __THROW;
             ^
rfbcrypto_included.c:49:1: error: expected '{' at end of input
 }
 ^
make[2]: *** [rfbcrypto_included.lo] Error 1
make[2]: Leaving directory `/home/ubuntu/Desktop/libvncserver-LibVNCServer-0.9.10/libvncserver'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ubuntu/Desktop/libvncserver-LibVNCServer-0.9.10'
make: *** [all] Error 2
root@ip-172-31-35-74:~/Desktop/libvncserver-LibVNCServer-0.9.10# 
root@ip-172-31-35-74:~/Desktop/libvncserver-LibVNCServer-0.9.10#
Vel
  • 51
  • 6
  • Looks like those compilers don't like the file you are trying to compile. Is there a language version you need (that needs an option maybe)? – Etan Reisner Jan 08 '16 at 17:56
  • Sorry could you eloborate on what you mean "language version"? I'm trying to compile this source: https://github.com/LibVNC/libvncserver/issues which I thought a lot of other people did so I didn't think there was an issue with the source code but instead in me missing something to finish the build :( thank you – Vel Jan 08 '16 at 21:37
  • It looks like the libvncserver source code expects system C header files that define `__THROW` appropriately for C usage and the android compiler/headers you are trying to use don't do that. You can try defining it away yourself or finding out what, potentially more appropriate, value it should have for your target platform. – Etan Reisner Jan 10 '16 at 23:09

0 Answers0