Location to expat

A 5 star hangout for overworked and underpaid system admins.
Post Reply
dittoct
Posts: 10
Joined: 2012/06/20 16:19:24

Location to expat

Post by dittoct » 2012/10/21 16:53:06

I am running CentOS 6.3 64bit. I am installing Apache subversion 1.7.7 from source. I have installed expat and expat-devel and neon-devel using yum. However in Apache subversion 1.7.x when doing the configure command it is needed to specify exact location of Expat in argument of --with-expat option.

I need your help to find out what the expat location to be used in the ./configure command should be on CentOS 6.3. 64bit? I have found a FreeBSD user here http://subversion.tigris.org/issues/show_bug.cgi?id=3997 wich say that on FreeBSD this is the correct location to be used in ./configure command:

--with-expat=/usr/local/include:/usr/local/lib:expat

It seems to works on CentOS also! But I would really like a confirmation on this. I have described all this in more details at serverfault 5 days ago, but nobody replies, so I am comming to this forum hoping for confirmation if I can use the FreeBSD locations, and if not, what the locations should be? Here is my question in detail at serverfault: http://serverfault.com/questions/438869/subversion-1-7-x-and-expat-location-in-configure

dittoct
Posts: 10
Joined: 2012/06/20 16:19:24

Re: Location to expat

Post by dittoct » 2012/10/22 09:53:53

Update: The configure command from the FreeBSD user does not work after all on CentOS, so I was wrong. When using this: --with-expat=/usr/local/include:/usr/local/lib:expat in a ./configure command like this:

./configure --prefix=/usr --with-ssl --with-expat=/usr/local/include:/usr/local/lib:expat --with-apxs=/usr/sbin/apxs --with-apr=/usr/bin/apr-config

I then get this error during "make" command afterwords:

/etc/httpd/lib/libaprutil-1.so: undefined reference to `XML_StopParser'
collect2: ld returned 1 exit status
make: *** [subversion/svnadmin/svnadmin] Error 1

So at the moment my only solution is to use this instead: --with-expat=includes:lib_search_dirs:libs in a ./configure command like this:

./configure --prefix=/usr --with-ssl --with-expat=includes:lib_search_dirs:libs --with-apxs=/usr/sbin/apxs --with-apr=/usr/bin/apr-config

However that does give this warning during configure command:

"configure: WARNING: Expat found amongst libraries used by APR-Util, but Subversion libraries might be needlessly linked against additional unused libraries. It can be avoided by specifying exact location of Expat in argument of --with-expat option."

So I would like to avoid it. Does anybody know how what the location of expat should look like in the expat configure command for CentOS? Like this on FreeBSD:

--with-expat=/usr/local/include:/usr/local/lib:expat

What should that be changed to in order to work in CentOS? I do not find this information when searching on Internet, all the information I can find about it is from my own posting asking for help.

User avatar
jlehtone
Posts: 4531
Joined: 2007/12/11 08:17:33
Location: Finland

Location to expat

Post by jlehtone » 2012/10/22 10:40:01

[quote]dittoct wrote:
./configure --with-expat=/usr/local/include:/usr/local/lib:expat
./configure --with-expat=includes:lib_search_dirs:libs[/quote]
The failure of the first one is more obvious: the expat* packages place files elsewhere. Check with:
[code]# rpm -ql expat
# rpm -ql expat-devel[/code]
However, both examples do create the question: [i]What does configure do with that option string?[/i]

Are the colon-separated "words" in the string keywords and if yes, what do they mean?


Presumably you do have very good reasons to compile Subversion 1.7.7 rather than using the 1.6.11-7.el6 supplied by the distro?

dittoct
Posts: 10
Joined: 2012/06/20 16:19:24

Re: Location to expat

Post by dittoct » 2012/10/22 10:50:28

Thanks. I am already running Apache Subversion 1.6.19 without problems. And when installing Apache Subversion 1.6.19 it is not needed to specify expat in configure command, and this work without problems:

./configure --prefix=/usr --with-ssl --with-apxs=/usr/sbin/apxs --with-apr=/usr/bin/apr-config

However it does not work when installing Apache Subversion 1.7.x, as I have described already. Here is output from the two commands you gave me:

[root@server ~]# rpm -ql expat
/lib64/libexpat.so.1
/lib64/libexpat.so.1.5.2
/usr/bin/xmlwf
/usr/share/doc/expat-2.0.1
/usr/share/doc/expat-2.0.1/COPYING
/usr/share/doc/expat-2.0.1/README
/usr/share/man/man1/xmlwf.1.gz
[root@server ~]# rpm -ql expat-devel
/usr/include/expat.h
/usr/include/expat_external.h
/usr/lib64/libexpat.a
/usr/lib64/libexpat.so
/usr/share/doc/expat-devel-2.0.1
/usr/share/doc/expat-devel-2.0.1/Changes
/usr/share/doc/expat-devel-2.0.1/doc
/usr/share/doc/expat-devel-2.0.1/doc/expat.png
/usr/share/doc/expat-devel-2.0.1/doc/reference.html
/usr/share/doc/expat-devel-2.0.1/doc/style.css
/usr/share/doc/expat-devel-2.0.1/doc/valid-xhtml10.png
/usr/share/doc/expat-devel-2.0.1/doc/xmlwf.1
/usr/share/doc/expat-devel-2.0.1/doc/xmlwf.sgml
/usr/share/doc/expat-devel-2.0.1/examples
/usr/share/doc/expat-devel-2.0.1/examples/elements.c
/usr/share/doc/expat-devel-2.0.1/examples/outline.c
[root@server ~]#

dittoct
Posts: 10
Joined: 2012/06/20 16:19:24

Re: Location to expat

Post by dittoct » 2012/10/22 11:04:14

[quote]
jlehtone wrote:
However, both examples do create the question: [i]What does configure do with that option string?[/i]

Are the colon-separated "words" in the string keywords and if yes, what do they mean?
[/quote]

I don't know. After running your two commands rpm -ql expat and rpm -ql expat-devel I tried to guess what the configure command shold look like, and tried to change it to this:

--with-expat=/usr/include:/usr/lib:expat

So that the configure now looks like this:

./configure --prefix=/usr --with-ssl --with-expat=/usr/include:/usr/lib:expat --with-apxs=/usr/sbin/apxs --with-apr=/usr/bin/apr-config

However that is also wrong, as it still give this error after running "make":

/etc/httpd/lib/libaprutil-1.so: undefined reference to `XML_StopParser'
collect2: ld returned 1 exit status
make: *** [subversion/svnadmin/svnadmin] Error 1

I feel I am very close. However if I don't find out how to write the expat configure command, I will have to use this instead:

--with-expat=includes:lib_search_dirs:libs

But I don't like it because of this warning:

"configure: WARNING: Expat found amongst libraries used by APR-Util, but Subversion libraries might be needlessly linked against additional unused libraries. It can be avoided by specifying exact location of Expat in argument of --with-expat option."

Edit: I will try this instead: --with-expat=/usr/include:/usr/lib64:expat

dittoct
Posts: 10
Joined: 2012/06/20 16:19:24

Re: Location to expat

Post by dittoct » 2012/10/22 11:25:49

Hmm. This worked: --with-expat=/usr/include:/usr/lib64:expat - so I did this:

./configure --prefix=/usr --with-ssl --with-expat=/usr/include:/usr/lib64:expat --with-apxs=/usr/sbin/apxs --with-apr=/usr/bin/apr-config

However, even though the error after "make" command is gone, there is now a new warning after doing "make" wich says this:

/usr/bin/ld: warning: libexpat.so.0, needed by /etc/httpd/lib/libaprutil-1.so, may conflict with libexpat.so.1

Post Reply