This is a discussion on 5.3 Make - Compile problem within the AIX Operating System forums, part of the Unix Operating Systems category; --> Hi I have been trying for several days to get a program called 'Cfengine' to compile on AIX 5.3. ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi I have been trying for several days to get a program called 'Cfengine' to compile on AIX 5.3. I have all the neccesary GNU packages installed and lib paths etc seem ok. The configure script checks fine. Make looks good most of the way and finally gives the below error: ---- if gcc -DHAVE_CONFIG_H -I. -I. -I. -I/opt/freeware/include -D_THREAD_SAFE -w -g -O2 -Wreturn-type -Wmissing-prototypes -Wuninitialized -D_THREAD_SAFE -g -O2 -D_THREAD_SAFE -g -O2 -MT package.o -MD -MP -MF ".deps/package.Tpo" -c -o package.o package.c; \ then mv -f ".deps/package.Tpo" ".deps/package.Po"; else rm -f ".deps/package.Tpo"; exit 1; fi gcc -g -O2 -Wreturn-type -Wmissing-prototypes -Wuninitialized -D_THREAD_SAFE -g -O2 -D_THREAD_SAFE -g -O2 -L/opt/freeware/lib -o cfagent cfagent.o init.o do.o modules.o alerts.o wrapper.o report.o client.o ip.o process.o ifconf.o image.o item.o item-ext.o item-file.o 2Dlist.o globals.o classes.o misc.o parse.o functions.o edittools.o patches.o install.o link.o tidy.o filedir.o eval.o modes.o sockaddr.o chflags.o locks.o mount.o macro.o filenames.o varstring.o wildcard.o cfparse.o comparray.o read.o checksums.o proto.o filters.o copy.o repository.o rotate.o errors.o cflex.o net.o df.o log.o crypto.o popen.o popen_def.o sensible.o acl.o dce_acl.o nameinfo.o strategies.o granules.o methods.o dtypes.o state.o package.o -lfl -lfl -ldb -lcrypto -L../pub -lpub -lpthreads -lpthread -lpthread ld: 0711-317 ERROR: Undefined symbol: .log ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. collect2: ld returned 8 exit status make[2]: *** [cfagent] Error 1 ----- I have tried many different options. At first the problem was pthreads which was fixed by installing libgcc and running configure like: LIBS=-lpthread ./configure Have the following GNU tools installed with the latest versions: glibc (libgcc), gcc, flex, libtool, bison, automake, make, autoconf, m4, pth, pth-devel any ideas?? Thanks, Jim |
| |||
| jkipp@ingdirect.com wrote: > <...snip...> > popen.o popen_def.o sensible.o acl.o dce_acl.o nameinfo.o strategies.o > granules.o methods.o dtypes.o state.o package.o -lfl -lfl -ldb -lcrypto > -L../pub -lpub -lpthreads -lpthread -lpthread > ld: 0711-317 ERROR: Undefined symbol: .log You'll need to specify -lm (the math library), after making sure that bos.adt.libm is installed. |
| |||
| jkipp@ingdirect.com wrote: > Hi > I have been trying for several days to get a program called 'Cfengine' > to compile on AIX 5.3. > I have all the neccesary GNU packages installed and lib paths etc seem > ok. The configure script checks fine. Make looks good most of the way > and finally gives the below error: > ---- > > if gcc -DHAVE_CONFIG_H -I. -I. -I. -I/opt/freeware/include > -D_THREAD_SAFE -w -g -O2 -Wreturn-type -Wmissing-prototypes > -Wuninitialized -D_THREAD_SAFE -g -O2 -D_THREAD_SAFE -g -O2 -MT > package.o -MD -MP -MF ".deps/package.Tpo" -c -o package.o package.c; \ > then mv -f ".deps/package.Tpo" ".deps/package.Po"; else rm -f > ".deps/package.Tpo"; exit 1; fi > gcc -g -O2 -Wreturn-type -Wmissing-prototypes -Wuninitialized > -D_THREAD_SAFE -g -O2 -D_THREAD_SAFE -g -O2 -L/opt/freeware/lib > -o cfagent cfagent.o init.o do.o modules.o alerts.o wrapper.o > report.o client.o ip.o process.o ifconf.o image.o item.o item-ext.o > item-file.o 2Dlist.o globals.o classes.o misc.o parse.o functions.o > edittools.o patches.o install.o link.o tidy.o filedir.o eval.o modes.o > sockaddr.o chflags.o locks.o mount.o macro.o filenames.o varstring.o > wildcard.o cfparse.o comparray.o read.o checksums.o proto.o filters.o > copy.o repository.o rotate.o errors.o cflex.o net.o df.o log.o crypto.o > popen.o popen_def.o sensible.o acl.o dce_acl.o nameinfo.o strategies.o > granules.o methods.o dtypes.o state.o package.o -lfl -lfl -ldb -lcrypto > -L../pub -lpub -lpthreads -lpthread -lpthread > ld: 0711-317 ERROR: Undefined symbol: .log > ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more > information. > collect2: ld returned 8 exit status > make[2]: *** [cfagent] Error 1 > > ----- > > I have tried many different options. At first the problem was pthreads > which was fixed by installing libgcc and running configure like: > LIBS=-lpthread ./configure > Have the following GNU tools installed with the latest versions: > glibc (libgcc), gcc, flex, libtool, bison, automake, make, autoconf, > m4, pth, pth-devel > > any ideas?? > > Thanks, > Jim > Add the -lm option when linking (math library) |
| |||
| Thanks Gary and Patrick I tried adding the -lm flag in the make file (see below) but I get the same error. am I not doing this correctly? Please let me know if there is anything else in the makefile that may be important for you too look at. thanks again -- CFLAGS = -D_THREAD_SAFE -g -O2 -lm CPP = gcc -E CPPFLAGS = -D_THREAD_SAFE -w -lm CYGPATH_W = echo DEFS = -DHAVE_CONFIG_H DEPDIR = .deps DVIPS = false ECHO_C = \c ECHO_N = ECHO_T = EGREP = grep -E EIGHTBIT = \200-\377 EXEEXT = GCC_CFLAG = -g -O2 -Wreturn-type -Wmissing-prototypes -Wuninitialized |
| |||
| jkipp@ingdirect.com wrote: > CFLAGS = -D_THREAD_SAFE -g -O2 -lm > CPP = gcc -E > CPPFLAGS = -D_THREAD_SAFE -w -lm No, I think those are compile flags, not final link flags. Look for another var. And ensure bos.adt.libm is installed. (lslpp -l bos.adt.libm) |