Unix Technical Forum

5.3 Make - Compile problem

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. ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-05-2008, 08:42 AM
jkipp@ingdirect.com
 
Posts: n/a
Default 5.3 Make - Compile problem

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-05-2008, 08:42 AM
Gary R. Hook
 
Posts: n/a
Default Re: 5.3 Make - Compile problem

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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-05-2008, 08:42 AM
Patrick Begou
 
Posts: n/a
Default Re: 5.3 Make - Compile problem

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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-05-2008, 08:43 AM
jkipp@ingdirect.com
 
Posts: n/a
Default Re: 5.3 Make - Compile problem

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-05-2008, 08:43 AM
Dave
 
Posts: n/a
Default Re: 5.3 Make - Compile problem

Is the Math library installed?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-05-2008, 08:43 AM
Gary R. Hook
 
Posts: n/a
Default Re: 5.3 Make - Compile problem

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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-05-2008, 08:43 AM
jkipp@ingdirect.com
 
Posts: n/a
Default Re: 5.3 Make - Compile problem

Thanks
bos.adt.libm is not installed. I will try to get it installed, but I
am new to AIX.
I think this is the correct var and flag ?:
LDFLAGS="-lm"

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 01-05-2008, 08:44 AM
jkipp@ingdirect.com
 
Posts: n/a
Default Re: 5.3 Make - Compile problem

Thanks Dave, Gary, and Patrick

Got bos.adt.ibm installed and configured with
LDFLAGS=-lm ./configure --with-openssl=/opt/freeware
make

worked fine
thanks again

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:09 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com