[rtg] Compiling RTG

John Center john.center at villanova.edu
Fri Apr 17 11:05:56 EDT 2009


Hi Matt,

I ran autoreconf -ifv & got the following results:

autoreconf: Entering directory `.'
autoreconf: configure.in: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.in: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `config'.
libtoolize: copying file `config/ltmain.sh'
libtoolize: You should add the contents of the following files to 
`aclocal.m4':
libtoolize:   `/opt/gnu/share/aclocal/libtool.m4'
libtoolize:   `/opt/gnu/share/aclocal/ltoptions.m4'
libtoolize:   `/opt/gnu/share/aclocal/ltversion.m4'
libtoolize:   `/opt/gnu/share/aclocal/ltsugar.m4'
libtoolize:   `/opt/gnu/share/aclocal/lt~obsolete.m4'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.in and
libtoolize: rerunning libtoolize, to keep the correct libtool macros 
in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
autoreconf: running: /opt/gnu/bin/autoconf --force
autoreconf: running: /opt/gnu/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
src/Makefile.am:21: compiling `ratedsnmp.c' with per-target flags 
requires `AM_PROG_CC_C_O' in `configure.in'
configure.in: installing `config/ylwrap'
autoreconf: Leaving directory `.'

I added AM_PROG_CC_C_O after AC_PROG_CC_C_O in configure.in & ran again.

Configure runs w/o a problem, but I get the same errors when running make:

Making all in src
gmake[1]: Entering directory `/opt/ws/builds/rtg/rated/src'
/bin/bash ../config/ylwrap ratedtarg.y y.tab.c ratedtarg.c y.tab.h 
ratedtarg.h y.output ratedtarg.output -- bison -y  -d
updating ratedtarg.h
/usr/sfw/bin/gmake  all-am
gmake[2]: Entering directory `/opt/ws/builds/rtg/rated/src'
source='libratedmysql.c' object='libratedmysql_la-libratedmysql.lo' 
libtool=yes \
DEPDIR=.deps depmode=none /bin/bash ../config/depcomp \
/bin/bash ../libtool   --mode=compile cc -xc99 -DHAVE_CONFIG_H -I. 
-I../config  -I/opt/mysql/include -I/opt/db/include 
-I/opt/openssl/include -I/opt/postgres/include -I/opt/mysql/include 
-I/opt/gnu/include -I/opt/local/include -I/usr/sfw/include 
-I/usr/include  -D_POSIX_PTHREAD_SEMANTICS -g -xs -fast -fsimple=1 
-fns=no -xtarget=ultraT1 -xarch=sparcvis2 -m64 -mt -xipo -xcode=pic32 
-xpagesize=default -xregs=no%appl -xlic_lib=sunperf  -c -o 
libratedmysql_la-libratedmysql.lo `test -f 'libratedmysql.c' || echo 
'./'`libratedmysql.c
../libtool: line 401: CDPATH: command not found
../libtool: line 1079: func_opt_split: command not found
libtool: Version mismatch error.  This is libtool 2.2.6, but the
libtool: definition of this LT_INIT comes from an older release.
libtool: You should recreate aclocal.m4 with macros from libtool 2.2.6
libtool: and run autoconf again.
gmake[2]: *** [libratedmysql_la-libratedmysql.lo] Error 63
gmake[2]: Leaving directory `/opt/ws/builds/rtg/rated/src'
gmake[1]: *** [all] Error 2

I even tried with Adrian's bootstrap.sh script, but it didn't help.

HTH

	-John

On 4/16/2009 4:28 PM, Matt Provost wrote:
> On Thu, Apr 16, 2009 at 12:04:26PM -0400, John Center wrote:
>> Hi Adrian,
>>
>> Thanks! That generally works, but configure is putting in spurious -I's
>> that is making it fail:
>>
>> configure:11123: checking png.h presence
>> configure:11138: cc -xc99 -E -I/opt/db/include -I/opt/openssl/include
>> -I/opt/postgres/include -I/opt/mysql/include -I/opt/gnu/include
>> -I/opt/local/include -I/usr/sfw/include -I/usr/include -I conftest.c
>> usage: cc [ options] files.  Use 'cc -flags' for details
>> configure:11145: $? = 1
>>
>> This happens if I don't define --with-png or define it as "yes".  Once
>> the -I's are removed, then make fails with spurious -L's:
>>
>> LDFLAGS = -L/usr/local/ssl/lib -L -L/opt/mysql/lib -L/opt/local/lib
>> -L/usr/lib -L/usr/local/lib -L/opt/openssl/lib/sparcv9
>> -R/opt/openssl/lib/sparcv9 -L/opt/postgres/lib/sparcv9
>> -R/opt/postgres/lib/sparcv9 -L/opt/db/lib/sparcv9 -R/opt/db/lib/sparcv9
>> -L/opt/mysql/lib/sparcv9 -R/opt/mysql/lib/sparcv9
>> -L/opt/gnu/lib/sparcv9 -R/opt/gnu/lib/sparcv9 -L/opt/local/lib/sparcv9
>> -R/opt/local/lib/sparcv9 -L/usr/sfw/lib/sparcv9 -R/usr/sfw/lib/sparcv9
>> -L/usr/lib/sparcv9 -R/usr/lib/sparcv9
>>   -Wl,-ztext -Wl,-Bdirect -Wl,-zlazyload -Wl,-zcombreloc -Wl,-zignore
>>
>>
>> I'm trying to do a 64-bit build on Solaris 10 with Sun Studio 12, so
>> these types of things come out of the woodwork. :-)  What would really
>> be helpful would be --with-xxx-include&  --with-xxx-lib, so I can point
>> everything to the correct 64-bit libraries.  Also, since it checks for
>> openssl, a --with-ssl-include&  --with-ssl-lib would help, too.  Lastly,
>> configure adds -L flags to things it's found to the front of LDFLAGS,
>> even though I define the right locations later.  This means it finds the
>> 32-bit version, not the 64-bit version.
>>
>
> The autoconf stuff is a bit of a mess in RTG. That was probably my
> fault. It's really simple and it just chucks everything it finds onto
> CPPFLAGS and LDFLAGS. I noticed that the memory usage of rtgpoll was
> really high because it was linking to every library it could find.
> Unfortunately the autotools aren't very friendly to this sort of thing
> but I got it to work. Now it builds separate CPPFLAGS and LDFLAGS for
> every binary. So the mysql driver doesn't link to the postgres library
> and vice versa, and the poller doesn't link to either. I don't even know
> what is looking for openssl anymore.
>
> In any case all the new checks are in configure.in in rated which you
> can see here:
>
> http://github.com/mprovost/rated/blob/d41ac2079cd64ef749de7b4b0b4c18a360b70b95/configure.in
>
> You'll also need to redo the automake stuff so it builds each binary
> with the correct paths:
>
> http://github.com/mprovost/rated/blob/d41ac2079cd64ef749de7b4b0b4c18a360b70b95/src/Makefile.am
>
> It probably wouldn't be that hard to pull those changes back into RTG.
> I'd also be interested to see if rated builds correctly for you.
>
> Matt


More information about the RTG mailing list