You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by Scott Cantor <ca...@osu.edu> on 2006/04/19 19:37:29 UTC

configure.ac issues in xmlsec-c

I've run into a number of configure issues in the past porting to various
platforms, particular when not using gcc/g++.

A couple of noteworthy ones on Solaris using Sun's compiler:

You have gcc-specific flags here:

if test "$enable_debug" = "yes" ; then
	CFLAGS="${CFLAGS} -g"
	CXXFLAGS="${CXXFLAGS} -g"
else
	CFLAGS="${CFLAGS} -O2 -DNDEBUG"
	CXXFLAGS="${CXXFLAGS} -O2 -DNDEBUG"
fi

-O2 isn't legal on Sun's compiler (it's -xO2) so I would suggest you add a
conditional around this for at least that flag and not include it unless gcc
is used.

Also, for Sun CC, you can't properly link test cases that run with
AC_LANG(C) if your LDFLAGS already includes C++ code, like Xerces or Xalan.
This results in the openssl func checks failing because AC_LANG(C) appears
ahead of those tests.

I would suggest either moving the OpenSSL tests ahead of the C++ library
checks, or removing AC_LANG(C), which works ok too.

-- Scott


Re: configure.ac issues in xmlsec-c

Posted by Berin Lautenbach <be...@wingsofhermes.org>.
I'll take you up on that.  I'm very close.  I want to cut a RC this 
weekend and get on the list.  I'll then separately update the docs.  But 
I've changed a bit in configure.ac, so the more testing it gets the 
happier I will be.

As an aside - are you interested in committer access to the code base? 
If you run into things like this I'm always happy to put the fixes in, 
but it might be quicker for you to just commit the changes directly. 
You're call - I just appreciate the feedback :>.

Cheers - and thanks!
	Berin


Scott Cantor wrote:

> I've run into a number of configure issues in the past porting to various
> platforms, particular when not using gcc/g++.
> 
> A couple of noteworthy ones on Solaris using Sun's compiler:
> 
> You have gcc-specific flags here:
> 
> if test "$enable_debug" = "yes" ; then
> 	CFLAGS="${CFLAGS} -g"
> 	CXXFLAGS="${CXXFLAGS} -g"
> else
> 	CFLAGS="${CFLAGS} -O2 -DNDEBUG"
> 	CXXFLAGS="${CXXFLAGS} -O2 -DNDEBUG"
> fi
> 
> -O2 isn't legal on Sun's compiler (it's -xO2) so I would suggest you add a
> conditional around this for at least that flag and not include it unless gcc
> is used.
> 
> Also, for Sun CC, you can't properly link test cases that run with
> AC_LANG(C) if your LDFLAGS already includes C++ code, like Xerces or Xalan.
> This results in the openssl func checks failing because AC_LANG(C) appears
> ahead of those tests.
> 
> I would suggest either moving the OpenSSL tests ahead of the C++ library
> checks, or removing AC_LANG(C), which works ok too.
> 
> -- Scott
> 
> 
> 

Re: configure.ac issues in xmlsec-c

Posted by Berin Lautenbach <be...@wingsofhermes.org>.
Scott Cantor wrote:
> Basically I get undefined symbols that are in the libCrun library because it
> tries to link the openssl func test program with cc, but with -lxerces-c.

Got it.  I've been using CC as the c compiler as well as the C++ 
compiler (cheating :>).

Will fix.

Cheers,
	Berin

RE: configure.ac issues in xmlsec-c

Posted by Scott Cantor <ca...@osu.edu>.
> This is a new one on me - I've been building using SunCC and haven't run 
> into this issue - or at least not that I've recognised.  Will go back 
> and have another look.

Alright, next time I have that VM instance up, I'll get the config.log for
you.

Basically I get undefined symbols that are in the libCrun library because it
tries to link the openssl func test program with cc, but with -lxerces-c.

It might be that your Xerces build is different (possibly more correct) than
mine.

-- Scott


Re: configure.ac issues in xmlsec-c

Posted by Berin Lautenbach <be...@wingsofhermes.org>.
Scott Cantor wrote:
> I've run into a number of configure issues in the past porting to various
> platforms, particular when not using gcc/g++.
> 
> A couple of noteworthy ones on Solaris using Sun's compiler:
> 
> You have gcc-specific flags here:
> 
> if test "$enable_debug" = "yes" ; then
> 	CFLAGS="${CFLAGS} -g"
> 	CXXFLAGS="${CXXFLAGS} -g"
> else
> 	CFLAGS="${CFLAGS} -O2 -DNDEBUG"
> 	CXXFLAGS="${CXXFLAGS} -O2 -DNDEBUG"
> fi

Hmm.  Ran into something similar the other day with -Werror vs. 
-errwarn.  Will use the same solution.

> 
> -O2 isn't legal on Sun's compiler (it's -xO2) so I would suggest you add a
> conditional around this for at least that flag and not include it unless gcc
> is used.

I've now changed some things in configure.ac to set specific flag types 
depending on compiler, so will update to include this as well.

> 
> Also, for Sun CC, you can't properly link test cases that run with
> AC_LANG(C) if your LDFLAGS already includes C++ code, like Xerces or Xalan.
> This results in the openssl func checks failing because AC_LANG(C) appears
> ahead of those tests.
> 
> I would suggest either moving the OpenSSL tests ahead of the C++ library
> checks, or removing AC_LANG(C), which works ok too.

This is a new one on me - I've been building using SunCC and haven't run 
into this issue - or at least not that I've recognised.  Will go back 
and have another look.

Cheers,
	Berin