[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Trying to build svn 1.12.2 from tarball

From: swdev <swdev1_at_gmail.com>
Date: Tue, 3 Sep 2019 16:40:50 +0300

Hi

I downloaded the following tarball
http://mirrors.netix.net/apache/subversion/subversion-1.12.2.tar.bz2 and
verified its checksum.
I want to be able to build subversin so that I can run the static analysis
tool PVS-Studio (https://www.viva64.com/en/pvs-studio/).

I ran get-deps.sh.
I built the various libraries as follows:

APR (from get-deps.sh)
===
cd apr
./buildconf --verbose
./configure --verbose --enable-maintainer-mode
--prefix=/home/jonny/subversion
make check
make install
cd ..

APR-UTIL (from get-deps.sh)
========
cd apr-util
./buildconf --verbose
./configure --verbose --prefix=/home/jonny/subversion
--with-apr=/home/jonny/subversion
make check
make install
cd ..

ZLIB (from get-deps.sh)
====
cd zlib
make maintainer-clean
./configure --prefix=/home/jonny/subversion
make
make check
make install
cd ..

OPENSSL (manual download)
=======
cd openssl
git clone git://git.openssl.org/openssl.git .
./config --prefix=/home/jonny/subversion
--openssldir=/home/jonny/subversion/etc/ssl/openssl.cnf
make
make test
make install
cd ..

SERF (from get-deps.sh)
====
cd serf
# clean the build
scons -c
scons APR=/home/jonny/subversion APU=/home/jonny/subversion
ZLIB=/home/jonny/subversion OPENSSL=/home/jonny/subversion
PREFIX=/home/jonny/subversion

APR, APR-UTIL, ZLIB and OPENSSL all built and installed successfully and
passed their own tests.

When building SERF, I ran into the following errors

scons APR=/home/jonny/subversion APU=/home/jonny/subversion
ZLIB=/home/jonny/subversion OPENSSL=/home/jonny/subversion
PREFIX=/home/jonny/subversion CFLAGS="-I/home/jonny/subversion/include"
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
gcc -o buckets/ssl_buckets.o -c -I/home/jonny/subversion/include -std=c89
-Wdeclaration-after-statement -g -O2 -Wall -Wmissing-prototypes
-Wstrict-prototypes -Wmissing-declarations -pthread -DDEBUG -D_DEBUG
-D_REENTRANT -D_GNU_SOURCE -I. -I/home/jonny/subversion/include/apr-1
-I/home/jonny/subversion/include buckets/ssl_buckets.c
buckets/ssl_buckets.c: In function 'bio_bucket_read':
buckets/ssl_buckets.c:250:34: error: dereferencing pointer to incomplete
type 'BIO {aka struct bio_st}'
     serf_ssl_context_t *ctx = bio->ptr;
                                  ^~
buckets/ssl_buckets.c: At top level:
buckets/ssl_buckets.c:402:1: error: variable 'bio_bucket_method' has
initializer but incomplete type
 static BIO_METHOD bio_bucket_method = {
 ^~~~~~
In file included from buckets/ssl_buckets.c:49:0:
/home/jonny/subversion/include/openssl/bio.h:34:34: warning: excess
elements in struct initializer
 # define BIO_TYPE_MEM ( 1|BIO_TYPE_SOURCE_SINK)
                                  ^
buckets/ssl_buckets.c:403:5: note: in expansion of macro 'BIO_TYPE_MEM'
     BIO_TYPE_MEM,
     ^~~~~~~~~~~~
/home/jonny/subversion/include/openssl/bio.h:34:34: note: (near
initialization for 'bio_bucket_method')
 # define BIO_TYPE_MEM ( 1|BIO_TYPE_SOURCE_SINK)
                                  ^
buckets/ssl_buckets.c:403:5: note: in expansion of macro 'BIO_TYPE_MEM'
     BIO_TYPE_MEM,
     ^~~~~~~~~~~~
buckets/ssl_buckets.c:404:5: warning: excess elements in struct initializer
     "Serf SSL encryption and decryption buckets",
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
buckets/ssl_buckets.c:404:5: note: (near initialization for
'bio_bucket_method')
buckets/ssl_buckets.c:405:5: warning: excess elements in struct initializer
     bio_bucket_write,
     ^~~~~~~~~~~~~~~~
buckets/ssl_buckets.c:405:5: note: (near initialization for
'bio_bucket_method')
buckets/ssl_buckets.c:406:5: warning: excess elements in struct initializer
     bio_bucket_read,
     ^~~~~~~~~~~~~~~
buckets/ssl_buckets.c:406:5: note: (near initialization for
'bio_bucket_method')
buckets/ssl_buckets.c:407:5: warning: excess elements in struct initializer
     NULL, /* Is this called? */
     ^~~~
buckets/ssl_buckets.c:407:5: note: (near initialization for
'bio_bucket_method')
buckets/ssl_buckets.c:408:5: warning: excess elements in struct initializer
     NULL, /* Is this called? */
     ^~~~
buckets/ssl_buckets.c:408:5: note: (near initialization for
'bio_bucket_method')
buckets/ssl_buckets.c:409:5: warning: excess elements in struct initializer
     bio_bucket_ctrl,
     ^~~~~~~~~~~~~~~
buckets/ssl_buckets.c:409:5: note: (near initialization for
'bio_bucket_method')
buckets/ssl_buckets.c:410:5: warning: excess elements in struct initializer
     bio_bucket_create,
     ^~~~~~~~~~~~~~~~~
buckets/ssl_buckets.c:410:5: note: (near initialization for
'bio_bucket_method')
buckets/ssl_buckets.c:411:5: warning: excess elements in struct initializer
     bio_bucket_destroy,
     ^~~~~~~~~~~~~~~~~~
buckets/ssl_buckets.c:411:5: note: (near initialization for
'bio_bucket_method')
buckets/ssl_buckets.c:413:5: warning: excess elements in struct initializer
     NULL /* sslc does not have the callback_ctrl field */
     ^~~~
buckets/ssl_buckets.c:413:5: note: (near initialization for
'bio_bucket_method')
buckets/ssl_buckets.c:417:1: error: variable 'bio_file_method' has
initializer but incomplete type
 static BIO_METHOD bio_file_method = {
 ^~~~~~
In file included from buckets/ssl_buckets.c:49:0:
/home/jonny/subversion/include/openssl/bio.h:35:34: warning: excess
elements in struct initializer
 # define BIO_TYPE_FILE ( 2|BIO_TYPE_SOURCE_SINK)
                                  ^
buckets/ssl_buckets.c:418:5: note: in expansion of macro 'BIO_TYPE_FILE'
     BIO_TYPE_FILE,
     ^~~~~~~~~~~~~
/home/jonny/subversion/include/openssl/bio.h:35:34: note: (near
initialization for 'bio_file_method')
 # define BIO_TYPE_FILE ( 2|BIO_TYPE_SOURCE_SINK)
                                  ^
buckets/ssl_buckets.c:418:5: note: in expansion of macro 'BIO_TYPE_FILE'
     BIO_TYPE_FILE,
     ^~~~~~~~~~~~~
buckets/ssl_buckets.c:419:5: warning: excess elements in struct initializer
     "Wrapper around APR file structures",
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
buckets/ssl_buckets.c:419:5: note: (near initialization for
'bio_file_method')
buckets/ssl_buckets.c:420:5: warning: excess elements in struct initializer
     bio_file_write,
     ^~~~~~~~~~~~~~
buckets/ssl_buckets.c:420:5: note: (near initialization for
'bio_file_method')
buckets/ssl_buckets.c:421:5: warning: excess elements in struct initializer
     bio_file_read,
     ^~~~~~~~~~~~~
buckets/ssl_buckets.c:421:5: note: (near initialization for
'bio_file_method')
buckets/ssl_buckets.c:422:5: warning: excess elements in struct initializer
     NULL, /* Is this called? */
     ^~~~
buckets/ssl_buckets.c:422:5: note: (near initialization for
'bio_file_method')
buckets/ssl_buckets.c:423:5: warning: excess elements in struct initializer
     bio_file_gets, /* Is this called? */
     ^~~~~~~~~~~~~
buckets/ssl_buckets.c:423:5: note: (near initialization for
'bio_file_method')
buckets/ssl_buckets.c:424:5: warning: excess elements in struct initializer
     bio_bucket_ctrl,
     ^~~~~~~~~~~~~~~
buckets/ssl_buckets.c:424:5: note: (near initialization for
'bio_file_method')
buckets/ssl_buckets.c:425:5: warning: excess elements in struct initializer
     bio_bucket_create,
     ^~~~~~~~~~~~~~~~~
buckets/ssl_buckets.c:425:5: note: (near initialization for
'bio_file_method')
buckets/ssl_buckets.c:426:5: warning: excess elements in struct initializer
     bio_bucket_destroy,
     ^~~~~~~~~~~~~~~~~~
buckets/ssl_buckets.c:426:5: note: (near initialization for
'bio_file_method')
buckets/ssl_buckets.c:428:5: warning: excess elements in struct initializer
     NULL /* sslc does not have the callback_ctrl field */
     ^~~~
buckets/ssl_buckets.c:428:5: note: (near initialization for
'bio_file_method')
buckets/ssl_buckets.c: In function 'get_subject_alt_names':
buckets/ssl_buckets.c:465:32: warning: pointer targets in passing argument
1 of 'strlen' differ in signedness [-Wpointer-sign]
                         strlen(nm->d.ia5->data) != nm->d.ia5->length)
                                ^~
In file included from /home/jonny/subversion/include/apr-1/apr_want.h:63:0,
                 from /home/jonny/subversion/include/apr-1/apr_pools.h:47,
                 from buckets/ssl_buckets.c:37:
/usr/include/string.h:394:15: note: expected 'const char *' but argument is
of type 'unsigned char *'
 extern size_t strlen (const char *__s)
               ^~~~~~
buckets/ssl_buckets.c: In function 'init_ssl_libraries':
buckets/ssl_buckets.c:1074:9: warning: 'OpenSSL_version_num' is deprecated
[-Wdeprecated-declarations]
         long libver = SSLeay();
         ^~~~
In file included from
/home/jonny/subversion/include/openssl/opensslconf.h:122:0,
                 from /home/jonny/subversion/include/openssl/e_os2.h:13,
                 from /home/jonny/subversion/include/openssl/bio.h:13,
                 from buckets/ssl_buckets.c:49:
/home/jonny/subversion/include/openssl/crypto.h:161:30: note: declared here
 DEPRECATEDIN_3(unsigned long OpenSSL_version_num(void))
                              ^
/home/jonny/subversion/include/openssl/macros.h:36:38: note: in definition
of macro 'DECLARE_DEPRECATED'
 # define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated));
                                      ^
/home/jonny/subversion/include/openssl/crypto.h:161:1: note: in expansion
of macro 'DEPRECATEDIN_3'
 DEPRECATEDIN_3(unsigned long OpenSSL_version_num(void))
 ^~~~~~~~~~~~~~
buckets/ssl_buckets.c:1084:9: warning: implicit declaration of function
'CRYPTO_malloc_init' [-Wimplicit-function-declaration]
         CRYPTO_malloc_init();
         ^~~~~~~~~~~~~~~~~~
buckets/ssl_buckets.c: At top level:
buckets/ssl_buckets.c:402:19: error: storage size of 'bio_bucket_method'
isn't known
 static BIO_METHOD bio_bucket_method = {
                   ^~~~~~~~~~~~~~~~~
buckets/ssl_buckets.c:417:19: error: storage size of 'bio_file_method'
isn't known
 static BIO_METHOD bio_file_method = {
                   ^~~~~~~~~~~~~~~
buckets/ssl_buckets.c:1028:22: warning: 'ssl_id' defined but not used
[-Wunused-function]
 static unsigned long ssl_id(void)
                      ^~~~~~
buckets/ssl_buckets.c:1018:13: warning: 'ssl_lock' defined but not used
[-Wunused-function]
 static void ssl_lock(int mode, int n, const char *file, int line)
             ^~~~~~~~
buckets/ssl_buckets.c:1012:13: warning: 'ssl_dyn_destroy' defined but not
used [-Wunused-function]
 static void ssl_dyn_destroy(CRYPTO_dynlock_value *l, const char *file,
             ^~~~~~~~~~~~~~~
buckets/ssl_buckets.c:1001:13: warning: 'ssl_dyn_lock' defined but not used
[-Wunused-function]
 static void ssl_dyn_lock(int mode, CRYPTO_dynlock_value *l, const char
*file,
             ^~~~~~~~~~~~
buckets/ssl_buckets.c:988:30: warning: 'ssl_dyn_create' defined but not
used [-Wunused-function]
 static CRYPTO_dynlock_value *ssl_dyn_create(const char* file, int line)
                              ^~~~~~~~~~~~~~
scons: *** [buckets/ssl_buckets.o] Error 1
scons: building terminated because of errors.

It would appear that the BIO structure (bio_st) is not defined in any of
the included header.
It is defined in the openssl/crypto/bio/bio_lcl.h file, but this file is
not in any of the included directories.

Any ideas as to how I can build SERF?

Thanks
Received on 2019-09-03 15:41:35 CEST

This is an archived mail posted to the Subversion Users mailing list.