ctime_r compile failure
Description
Environment
Solaris 9, Apache 2.2.6
Activity
Scott Cantor June 23, 2009 at 12:46 PM
Closing after releases.
Scott Cantor February 18, 2009 at 11:56 PM
Also, I do not support gcc, so right there you're eliminating much chance I can help.
Scott Cantor February 18, 2009 at 11:56 PM
This is definitely not the right place for this kind of problem, as it's not a bug issue. If you need help, use the mailing list, but whatever problem you're having here is really an autotools issue.
You should clean the entire tree, start over, and then run the commands from the bootstrap script in svn to try and get a clean rebuild.
Jeff Human February 18, 2009 at 10:26 PM
Follow up:
I installed "automake" from Blastwave. This took care of the first error but now I am stuck at a more difficult (for me, anyway) error. The error is as follows: (output from "gmake")
cd . && /bin/bash /usr/local/src/shibboleth-2.1/missing --run aclocal-1.9 -I .
acinclude.m4:57: warning: underquoted definition of YAD_CHECK_INCLUDE_LIB
run info '(automake)Extending aclocal'
or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
/opt/csw/share/aclocal/log4cpp.m4:7: warning: underquoted definition of AM_PATH_LOG4CPP
/opt/csw/share/aclocal/audiofile.m4:12: warning: underquoted definition of AM_PATH_AUDIOFILE
configure.ac:18: error: AC_SUBST: `DX_FLAG_[]DX_CURRENT_FEATURE' is not a valid shell variable name
doxygen.m4:77: DX_REQUIRE_PROG is expanded from...
doxygen.m4:117: DX_ARG_ABLE is expanded from...
doxygen.m4:178: DX_INIT_DOXYGEN is expanded from...
configure.ac:18: the top level
autom4te: /opt/csw/bin/m4 failed with exit status: 1
aclocal-1.9: autom4te failed with exit status: 1
gmake: *** [aclocal.m4] Error 1
Running "aclocal-1.9 -I" (as directed) just prints out:
acinclude.m4:57: warning: underquoted definition of YAD_CHECK_INCLUDE_LIB
run info '(automake)Extending aclocal'
or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
aclocal: couldn't open directory `': No such file or directory
I hope someone can help. Thanks!
Jeff Human February 18, 2009 at 10:04 PM
Okay, so, I am having some issues. Not sure if this is really the best/most appropriate forum for this sort of question but my finding has been that JIRA comments usually do end up being a pretty good place to hash out issues.
My build environment is Solaris 10 x86_64, GCC 3.4.5 (installed from Blastwave).
I was able to build all the deps listed on this page: https://spaces.internet2.edu/display/SHIB2/NativeSPSolaris10SourceBuild, using gcc3 for all.
But it croaks on building Shibboleth SP. I tried to apply this patch as described in this JIRA entry, but it does not work. What happens is this:
1) If I do NOT apply the "patch" (which is to say, the only thing I patch is the file shibboleth-2.1/configure.ac) I can run configure (with numerous options) successfully, and I run "gmake". That runs fine, too, until it croaks on the ctime_r() func exactly as described by the reporter.
2) If I DO apply the patch, gmake doesn't work at all! I get errors saying I need to install aclocal-1.9. Now why am I getting that error?
Any help would be great. Thanks.
gcc 3.4.6
make fails with the following error:
make[3]: Entering directory `/hmt/chinchin/src/web/shibboleth-sp-1.3.1/obj/solaris9/shib-target'
if /bin/bash ../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../oncrpc -I/opt/local/include -I/opt/log4shib-1.0/include -D_REENTRANT -pthreads -Wall -O2 -DNDEBUG -I/opt/openssl-0.9.8g/include -D_REENTRANT -pthread -Wall -O2 -DNDEBUG -MT shib-mlp.lo -MD -MP -MF ".deps/shib-mlp.Tpo" -c -o shib-mlp.lo shib-mlp.cpp; \ then mv -f ".deps/shib-mlp.Tpo" ".deps/shib-mlp.Plo"; else rm -f ".deps/shib-mlp.Tpo"; exit 1; fi
g++: unrecognized option `-pthread'
shib-mlp.cpp: In member function `const char* shibtarget::ShibMLP::run(const std::string&, const shibtarget::IPropertySet*, std::string*)':
/usr/include/time.h:251: error: too many arguments to function `char* ctime_r(const time_t*, char*)'
shib-mlp.cpp:85: error: at this point in file
make[3]: *** [shib-mlp.lo] Error 1
make[3]: Leaving directory `/hmt/chinchin/src/web/shibboleth-sp-1.3.1/obj/solaris9/shib-target'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/hmt/chinchin/src/web/shibboleth-sp-1.3.1/obj/solaris9/shib-target'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/hmt/chinchin/src/web/shibboleth-sp-1.3.1/obj/solaris9'
make: *** [all] Error 2
config.h has:
/* #undef HAVE_CTIME_R_2 */
#define HAVE_CTIME_R_3 1
It looks like Solaris has multiple ctime_r() functions, depending on whether POSIX compatibility is enabled. The regular form takes 3 arguments, and the POSIX form 2 arguments (controlled by the -D_POSIX_PTHREAD_SEMANTICS flag).
configure detects the wrong ctime_r to use because it doesn't pass -D_POSIX_PTHREAD_SEMANTICS, while make does pass this f lag (defined as APXS22_CFLAGS).