help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems configuring cfengine 2.1.17 on Solaris10


From: Kurt Reimer
Subject: Re: Problems configuring cfengine 2.1.17 on Solaris10
Date: Fri, 23 Dec 2005 10:29:01 -0500 (EST)


Mark,
AFter exchanging some posts with Jason Martin (they're in the archive for this list), we've figured out that the problem does not lie with any difficulty in finding and resolving references to the BerkeleyDB libraries. The -L and /or -R compile switches referencing /usr/local/Berkeyey.4.4/lib seem to handle this.

Instead, the configure script can't find libgcc_s.so.1. When I define LD_LIBRARY_PATH=/usr/local/lib (where libgcc_s.so.1) lives, the original configure script works. The GCC documentation says that libgcc is just some internal routines, and also offers the "-shared-libgcc" and "-static-libgcc" switches. I tried using the "-static-libgcc" switch and found that it didn't work, even after I went into /usr/local/lib and created a libgcc.a symlink to /usr/local/lib/gcc-lib/sparc-sun-solaris2.10/3.3.2.sparcv9/libgcc.a, where it was buried. Maybe this is because of the way that the GCC package was built (if "-static-libgcc" was going to be supported the build would have put libgcc.a in /usr/local/lib), or maybe it's because I didn't use "-static-libgcc" when building the BerkeleyDB. I did find that I could force the use of static BerkeleyDB libraries by removing the shared ones, and then at least the test program executed without any LD_LIBRARY_PATH
definition. There probably are compiler and linker switches that are the
"right" way to make this happen, but I don't know what they are.

I don't like the idea of having to distribute libgcc_s.so.1 and a custom library search path definition, along with the cfengine software, to any system where I want to run cfengine. There are a number of experiments to try involving custom configurations and builds of cfengine, the BerkeleyDB, and GCC itself.

I was also somewhat upset to learn that Sun Microsystems no longer supports static executables, in that they don't supply static versions of the standard libraries in Solaris10! I guess if you want static builds you need to go to the GNU standard libraries, or something like that. That's the sort of thing I expect from Microsoft, not Sun.

Yours,

Kurt Reimer
Fox Chase Cancer Center


I'm not sure what to do about this. I have had trouble with this issue
in Linux distros, but the problem seems to be a mixture of the bizarre
naming that sleepycat uses and that bizarre locations that the distros
put them. I have not had so much trouble lately.

If you can turn your comment into an edit of configure.ac I'll look at
it again. The trouble with looking at automatically generated products
is that they are not maintainable.

M

On Tue, 2005-12-20 at 16:56 -0500, Kurt Reimer wrote:
Hello,
     Like previous posters I'm running into problems with the configure
script not recognizing the BerkeleyDB version number, and it doesn't seem
to have anything to do with LD_LIBRARY_PATH or LD_RUN_PATH:

*******************
bash-3.00# export \
LD_LIBRARY_PATH=/usr/local/BerkeleyDB.4.4/:/usr/local/BerkeleyDB.4.4/lib/
bash-3.00# export \
LD_RUN_PATH=/usr/local/BerkeleyDB.4.4/:/usr/local/BerkeleyDB.4.4/lib/
bash-3.00# export CFLAGS=-I/usr/local/BerkeleyDB.4.4/include
bash-3.00# ./configure --with-berkeleydb=/usr/local/BerkeleyDB.4.4/ \
--with-openssl=/usr/sfw
checking build system type... sparc-sun-solaris2.10
.   .   .   .   .   .   .   .   .   .   .   .   .   .
checking for BerkeleyDB location in /usr/local/BerkeleyDB.4.4/...
/usr/local/BerkeleyDB.4.4/
checking Berkeley DB Version... configure: error: This release of cfengine
requires BerkeleyDB 3.2 or later
bash-3.00#

       (I added the backslashes where my email client wrapped the
cut-and-pasted command lines.)
*******************

      I've gone so far as to comment out all but the "exit(0);" return in
the test program that is being run at this point in the configure script,
with the same result:


*******************
#include <db.h>
#include <stdio.h>
int main(void)
{
     /*
     printf("%d.%d.%d ",
            DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
     if (DB_VERSION_MAJOR < 3 ||
         (DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR < 2))
         exit(1);
     */
     exit(0);
}
*******************

      I can get cfengine to configure, make, and install if I edit the
configure script to dummy out the two places where it runs the test
program listed above. Note that the configure, make, and make install all
succeed without the help of LD_LIBRARY_PATH, LD_RUN_PATH, or any special
include directories defined in CFLAGS:

*******************
bash-3.00# diff configure.works configure
8618,8620c8618
< ##############################
< # ac_status=$? This test is broken
<   ac_status=0
---
  ac_status=$?
8687,8690c8685,8687
< ################################
< #cat >>confdefs.h <<\_ACEOF Same program, still broken
< ##define CF_OLD_DB 1
< #_ACEOF
---
cat >>confdefs.h <<\_ACEOF
#define CF_OLD_DB 1
_ACEOF
bash-3.00# cp configure.works configure
bash-3.00# unset LD_LIBRARY_PATH
bash-3.00# unset LD_RUN_PATH
bash-3.00# unset CFLAGS
bash-3.00# ./configure --with-berkeleydb=/usr/local/BerkeleyDB.4.4/
--with-openssl=/usr/sfw
checking build system type... sparc-sun-solaris2.10
.   .   .   .   .   .   .   .   .   .   .   .   .   .
checking for library containing socket... none required
checking for BerkeleyDB location in /usr/local/BerkeleyDB.4.4/...
/usr/local/BerkeleyDB.4.4/
checking Berkeley DB Version... OK
checking Berkeley DB API... checking for db_create in -ldb... yes
checking for OpenSSL location... /usr/sfw
.   .   .   .   .   .   .   .   .   .   .   .   .   .
DONE: Configuration done. Run make/gmake to build cfengine.

bash-3.00# make[1]: Entering directory
`/usr/local/src/cfengine-2.1.17/pub'
if gcc -DHAVE_CONFIG_H -I. -I. -I../src
-I/usr/local/BerkeleyDB.4.4//include -I/usr/sfw/include  -D_REENTRANT
-pthread  -D_REENTRANT -pthread -g -O2
-I/usr/local/BerkeleyDB.4.4//include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -g -O2 -Wreturn-type -Wmissing-prototypes
-Wuninitialized -D_REENTRANT -pthread -g -O2
-I/usr/local/BerkeleyDB.4.4//include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -MT getopt.o -MD -MP -MF ".deps/getopt.Tpo" -c -o
getopt.o getopt.c; \
then mv -f ".deps/getopt.Tpo" ".deps/getopt.Po"; else rm -f
".deps/getopt.Tpo"; exit 1; fi
gcc: unrecognized option `-pthread'
gcc: unrecognized option `-pthread'
gcc: unrecognized option `-pthread'
if gcc -DHAVE_CONFIG_H -I. -I. -I../src
-I/usr/local/BerkeleyDB.4.4//include -I/usr/sfw/include  -D_REENTRANT
-pthread  -D_REENTRANT -pthread -g -O2
-I/usr/local/BerkeleyDB.4.4//include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -g -O2 -Wreturn-type -Wmissing-prototypes
-Wuninitialized -D_REENTRANT -pthread -g -O2
-I/usr/local/BerkeleyDB.4.4//include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -MT getopt1.o -MD -MP -MF ".deps/getopt1.Tpo" -c -o
getopt1.o getopt1.c; \
then mv -f ".deps/getopt1.Tpo" ".deps/getopt1.Po"; else rm -f
".deps/getopt1.Tpo"; exit 1; fi
.   .   .   .   .   .   .   .   .   .

.....and so on....

*******************

      "make" and "make install" both succeed. I haven't yet begun to try to
use cfengine, but I suspect the executables will work properly.

      It would be nice if the configuration process would work
out-of-the-box. If I'm dong something wrong please let me know.

Yours,

Kurt Reimer


_______________________________________________
Help-cfengine mailing list
Help-cfengine@gnu.org
http://lists.gnu.org/mailman/listinfo/help-cfengine





reply via email to

[Prev in Thread] Current Thread [Next in Thread]