Undeclared identifier errors while cross-compiling the dependencies

Moderator: Project members

Post Reply
Message
Author
test
426 Connection timed out
Posts: 51
Joined: 2020-03-24 06:36

Undeclared identifier errors while cross-compiling the dependencies

#1 Post by test » 2020-05-12 08:02

Hi!

I am trying to cross-compile FileZilla for Windows from Ubuntu by following https://wiki.filezilla-project.org/Cros ... _GNU/Linux

I have successfully compiled upto Nettle dependency.

While compiling GnuTLS 3.6.8:

1) On executing

Code: Select all

./configure --host=$TARGET_HOST --enable-shared --disable-static --without-p11-kit --with-included-libtasn1 --with-included-unistring --enable-local-libopts --disable-srp-authentication --disable-dtls-srtp-support --disable-heartbeat-support --disable-psk-authentication --disable-anon-authentication --disable-openssl-compatibility --without-tpm --disable-cxx
I got the error:

Code: Select all

checking for __gmpz_cmp in -lgmp... no
configure: error:
***
*** gmp was not found.
Then, I tried:

Code: Select all

./configure --host=$TARGET_HOST --enable-shared --disable-static --without-p11-kit --with-included-libtasn1 --with-included-unistring --enable-local-libopts --disable-srp-authentication --disable-dtls-srtp-support --disable-heartbeat-support --disable-psk-authentication --disable-anon-authentication --disable-openssl-compatibility --without-tpm --disable-cxx LDFLAGS="-L$HOME/prefix/lib"
2) After the ./configure step, when I run the make command, I get the following error:

Code: Select all

tlsproxy/crypto-gnutls.c:113:23: error: 'F_GETFL' undeclared (first use in this function)
   int sf = fcntl (fd, F_GETFL, 0);
                       ^~~~~~~
tlsproxy/crypto-gnutls.c:113:23: note: each undeclared identifier is reported only once for each function it appears in
tlsproxy/crypto-gnutls.c:116:21: error: 'F_SETFL' undeclared (first use in this function); did you mean 'F_GETFL'?
   return fcntl (fd, F_SETFL, nb ? (sf | O_NONBLOCK) : (sf & ~O_NONBLOCK));
                     ^~~~~~~
                     F_GETFL
tlsproxy/crypto-gnutls.c:116:41: error: 'O_NONBLOCK' undeclared (first use in this function); did you mean 'SMTO_BLOCK'?
   return fcntl (fd, F_SETFL, nb ? (sf | O_NONBLOCK) : (sf & ~O_NONBLOCK));
                                         ^~~~~~~~~~
                                         SMTO_BLOCK
tlsproxy/crypto-gnutls.c:117:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
Makefile:1833: recipe for target 'tlsproxy/crypto-gnutls.o' failed
make[4]: *** [tlsproxy/crypto-gnutls.o] Error 1
Kindly help
Thanks

User avatar
botg
Site Admin
Posts: 33041
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse
Contact:

Re: Undeclared identifier errors while cross-compiling the dependencies

#2 Post by botg » 2020-05-12 11:09

Try adding --disable-doc to the configure args, the documentation and examples aren't needed.

test
426 Connection timed out
Posts: 51
Joined: 2020-03-24 06:36

Re: Undeclared identifier errors while cross-compiling the dependencies

#3 Post by test » 2020-05-12 19:20

It worked! Thanks again! :D :D

Post Reply