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

Subversion 1.6.2 static building problem

From: Hamza Saglam <hamzasaglam_at_googlemail.com>
Date: Mon, 25 May 2009 13:13:25 +0100

Hi folks,

I am trying to build subversion from source on a machine I do not have
much control over and I have a major problem.

Because I want to distribute binaries to a few accounts on the same
machine I am building it with '--enable-all-static' but when it comes
to building apr it fails with the following error messages:

--------------

/home/h/src/subversion-1.6.2/subversion/libsvn_subr/.libs/libsvn_subr-1.a(sqlite.o)(.text+0x787e):
In function `unixDlOpen':
/home/h/src/subversion-1.6.2/sqlite-amalgamation/sqlite3.c:24673:
Using 'dlopen' in statically linked applications requires at runtime
the shared libraries from the glibc version used for linking
/home/h/src/subversion-1.6.2/apr/.libs/libapr-1.a(groupinfo.o)(.text+0x24):
In function `apr_gid_name_get':
user/unix/groupinfo.c:44: Using 'getgrgid_r' in statically linked
applications requires at runtime the shared libraries from the glibc
version used for linking
/home/h/src/subversion-1.6.2/apr/.libs/libapr-1.a(groupinfo.o)(.text+0x7c):
In function `apr_gid_get':
user/unix/groupinfo.c:72: Using 'getgrnam_r' in statically linked
applications requires at runtime the shared libraries from the glibc
version used for linking
/usr/kerberos/lib/libgssapi_krb5.a(import_name.o)(.text+0x362): In
function `krb5_gss_import_name':
: Using 'getpwuid' in statically linked applications requires at
runtime the shared libraries from the glibc version used for linking
/home/h/src/subversion-1.6.2/apr/.libs/libapr-1.a(userinfo.o)(.text+0x19):
In function `getpwnam_safe':
user/unix/userinfo.c:48: Using 'getpwnam_r' in statically linked
applications requires at runtime the shared libraries from the glibc
version used for linking
/home/h/src/subversion-1.6.2/apr/.libs/libapr-1.a(userinfo.o)(.text+0xf0):
In function `apr_uid_name_get':
user/unix/userinfo.c:129: Using 'getpwuid_r' in statically linked
applications requires at runtime the shared libraries from the glibc
version used for linking
/home/h/src/subversion-1.6.2/apr/.libs/libapr-1.a(sockaddr.o)(.text+0x4ce):
In function `call_resolver':
network_io/unix/sockaddr.c:347: Using 'getaddrinfo' in statically
linked applications requires at runtime the shared libraries from the
glibc version used for linking
/usr/kerberos/lib/libkrb5.a(fcc_gennew.o)(.text+0x6c): In function
`krb5_fcc_generate_new':
: the use of `mktemp' is dangerous, better use `mkstemp'
/usr/kerberos/lib/libkrb5.a(sn2princ.o)(.text+0x22b): In function
`krb5_sname_to_principal':
: Using 'gethostbyaddr' in statically linked applications requires at
runtime the shared libraries from the glibc version used for linking
/usr/kerberos/lib/libkrb5.a(def_realm.o)(.text+0x162): In function
`krb5_get_default_realm':
: Using 'gethostbyname' in statically linked applications requires at
runtime the shared libraries from the glibc version used for linking
/usr/kerberos/lib/libkrb5.a(locate_kdc.o)(.text+0x250): In function
`krb5_locate_srv_conf':
: Using 'getservbyname' in statically linked applications requires at
runtime the shared libraries from the glibc version used for linking
/home/h/src/subversion-1.6.2/apr/.libs/libapr-1.a(sockaddr.o)(.text+0x850):
In function `apr_getservbyname':
network_io/unix/sockaddr.c:735: Using 'getservbyname_r' in statically
linked applications requires at runtime the shared libraries from the
glibc version used for linking
/usr/kerberos/lib/libkrb5.a(hst_realm.o)(.text+0x9d): In function
`krb5_try_realm_txt_rr':
: undefined reference to `__res_search'
/usr/kerberos/lib/libkrb5.a(hst_realm.o)(.text+0x131): In function
`krb5_try_realm_txt_rr':
: undefined reference to `__dn_expand'
/usr/kerberos/lib/libkrb5.a(hst_realm.o)(.text+0x1ae): In function
`krb5_try_realm_txt_rr':
: undefined reference to `__dn_expand'
/usr/kerberos/lib/libkrb5.a(locate_kdc.o)(.text+0x859): In function
`krb5_locate_srv_dns':
: undefined reference to `__res_search'
/usr/kerberos/lib/libkrb5.a(locate_kdc.o)(.text+0x8dd): In function
`krb5_locate_srv_dns':
: undefined reference to `__dn_expand'
/usr/kerberos/lib/libkrb5.a(locate_kdc.o)(.text+0x95a): In function
`krb5_locate_srv_dns':
: undefined reference to `__dn_expand'
/usr/kerberos/lib/libkrb5.a(locate_kdc.o)(.text+0xc05): In function
`krb5_locate_srv_dns':
: undefined reference to `__dn_expand'
collect2: ld returned 1 exit status
make: *** [subversion/svn/svn] Error 1

--------------

After a bit of googling I came across
http://www.trilithium.com/johan/2005/06/static-libstdc/ and tried to
apply the tweaks mentioned there but that did not help as well. (I
modified the Makefile and changed the CXX line to read: CXX = g++
-static-libgcc)

The configuration options I am using are:
./configure --prefix=$HOME/subversion --without-apxs --without-serf
--without-berkeley-db --disable-shared --enable-static
--enable-all-static --with-ssl

And some information about the machine:
h_at_box [~/src/subversion-1.6.2]# uname -a
Linux server 2.4.21-27.0.2.ELsmp #1 SMP Wed Jan 19 01:53:23 GMT 2005
i686 i686 i386 GNU/Linux

h_at_box [~/src/subversion-1.6.2]# gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--host=i386-redhat-linux
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-59)

h_at_box [~/src/subversion-1.6.2]# rpm -q glibc
glibc-2.3.2-95.50

I suspect it is a compiler version issue as I was able to use the same
options and compile it on my desktop machine which runs a more
up-to-date toolchain... or maybe I was just lucky :)

Keeping in mind I do not have root access, can you suggest any fixes?

Comments appreciated!

Cheers,
Hamza.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2353460

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-05-25 14:15:30 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.