AW: Remedy API and gcc on Redhat Linux

2009-08-22 Thread Conny Martin
Axton,
 
you're right, there is a mismatch. The CFLAGS settings tells gcc to
generate 32-Bit object files. But in  LDFLAGS -m32 wasn't set. The
linker is then trying to generate a 64-Bit binary. But libar.so is
definitely a 32-bit binary. The 64 bit version is named libar_lx64.so
 
 
 
Kind Regards Conny



Von: Action Request System discussion list(ARSList)
[mailto:arsl...@arslist.org] Im Auftrag von Axton
Gesendet: Freitag, 21. August 2009 21:36
An: arslist@ARSLIST.ORG
Betreff: Re: Remedy API and gcc on Redhat Linux


** The libraries are provided in both 32-bit and 64-bit on the
non-Windows releases of ARS 7.5.

Page 64 provides additional information.
   http://documents.bmc.com/supportu/documents/53/84/95384/95384.pdf

This looks like a mismatch between the 32/64 bit api and the CFLAGS you
are using.  See Lyle's message on how to straighten it out and set the
flags properly.

Axton Grams


On Fri, Aug 21, 2009 at 1:40 PM, Conny Martin 
conny.mar...@t-systems.com wrote:


** 
libar.so is 32 bit-binary. The Makefile provided by BMC won't
work unless you do a little customisation
 
this one works for me.



#
# Parameters.
 
PROGRAM   = driver
SOURCES   = api.c get.c main.c print.c util.c
OBJECTS   = api.o get.o main.o print.o util.o
 
# Compiler flags.
 

CC = cc
CFLAGS   = -m32 -g -DDEBUG -D_REENTRANT -malign-double
CPPFLAGS = -I../include -I../../include 

LDFLAGS  = -m32 -L../lib -L../../lib 
LDLIBS   = -lar -lnsl -lpthread -lncurses -ldl -licuucbmc
-licui18nbmc -licudatabmc
 
# Standard targets.
 
all: $(PROGRAM)
 
objects: $(OBJECTS)
 
$(PROGRAM): $(OBJECTS)
$(CC) -o $(PROGRAM) $(OBJECTS) $(LDFLAGS) $(LDLIBS)
 
clean:
$(RM) $(PROGRAM) $(OBJECTS) core


---
 
There are also some libs missing in ar_install_dir/api/lib. So
I copied them from ar_install_dir/bin
libicudatabmc.so

libicudatabmc.so.32 
libicui18nbmc.so 
libicui18nbmc.so.32
libicuucbmc.so
libicuucbmc.so.32

 
 
HTH
 
Kind Regards Conny



Von: Action Request System discussion list(ARSList) [mailto:
arsl...@arslist.org] Im Auftrag von Lyle Taylor
Gesendet: Freitag, 21. August 2009 18:56
An: arslist@ARSLIST.ORG
Betreff: Re: Remedy API and gcc on Redhat Linux


** 

In your build directory, run the following command and send us
the output:

 

file ../../lib/libar.so

 

Your build options seem to be telling it to build a 32-bit
executable, but 75 is 64-bit on Linux.  The command above will verify
whether libar.so is a 32 or 64-bit binary.  If it's 64-bit, then change
-m32 to -m64 in your Makefile, do a make clean and then try building it
again.

 

Lyle

 


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor:rmisoluti...@verizon.net ARSlist: Where the Answers Are
Outlook.jpg

AW: Remedy API and gcc on Redhat Linux

2009-08-21 Thread Conny Martin
libar.so is 32 bit-binary. The Makefile provided by BMC won't work
unless you do a little customisation
 
this one works for me.


#
# Parameters.
 
PROGRAM   = driver
SOURCES   = api.c get.c main.c print.c util.c
OBJECTS   = api.o get.o main.o print.o util.o
 
# Compiler flags.
 
CC = cc
CFLAGS   = -m32 -g -DDEBUG -D_REENTRANT -malign-double
CPPFLAGS = -I../include -I../../include 
LDFLAGS  = -m32 -L../lib -L../../lib 
LDLIBS   = -lar -lnsl -lpthread -lncurses -ldl -licuucbmc -licui18nbmc
-licudatabmc
 
# Standard targets.
 
all: $(PROGRAM)
 
objects: $(OBJECTS)
 
$(PROGRAM): $(OBJECTS)
$(CC) -o $(PROGRAM) $(OBJECTS) $(LDFLAGS) $(LDLIBS)
 
clean:
$(RM) $(PROGRAM) $(OBJECTS) core

---
 
There are also some libs missing in ar_install_dir/api/lib. So I
copied them from ar_install_dir/bin
libicudatabmc.so
libicudatabmc.so.32 
libicui18nbmc.so 
libicui18nbmc.so.32
libicuucbmc.so
libicuucbmc.so.32
 
 
HTH
 
Kind Regards Conny



Von: Action Request System discussion list(ARSList)
[mailto:arsl...@arslist.org] Im Auftrag von Lyle Taylor
Gesendet: Freitag, 21. August 2009 18:56
An: arslist@ARSLIST.ORG
Betreff: Re: Remedy API and gcc on Redhat Linux


** 

In your build directory, run the following command and send us the
output:

 

file ../../lib/libar.so

 

Your build options seem to be telling it to build a 32-bit executable,
but 75 is 64-bit on Linux.  The command above will verify whether
libar.so is a 32 or 64-bit binary.  If it's 64-bit, then change -m32 to
-m64 in your Makefile, do a make clean and then try building it again.

 

Lyle

 

From: Action Request System discussion list(ARSList)
[mailto:arsl...@arslist.org] On Behalf Of Marty.Thorin
Sent: Friday, August 21, 2009 10:28 AM
To: arslist@ARSLIST.ORG
Subject: Re: Remedy API and gcc on Redhat Linux

 

** 

Dear Axton:

Here is a listing of my Makefile (same as out-of-the-box), the run,
and a directory listing after the run.

 

Thorin

 

remedy75{xxremedy}57: more Makefile 
#
# Parameters.

 

PROGRAM   = driver
SOURCES   = api.c get.c main.c print.c util.c
OBJECTS   = api.o get.o main.o print.o util.o

 

# Compiler flags.

 

CC = cc
CFLAGS   = -m32 -g -DDEBUG -D_REENTRANT -malign-double
CPPFLAGS = -I../include -I../../include 
LDFLAGS  = -L../lib -L../../lib
LDLIBS   = -lar -lnsl -lpthread -lcurses -ldl

 

# Standard targets.

 

all: $(PROGRAM)

 

objects: $(OBJECTS)

 

$(PROGRAM): $(OBJECTS)
$(CC) -o $(PROGRAM) $(OBJECTS) $(LDFLAGS) $(LDLIBS)

 

clean:
$(RM) $(PROGRAM) $(OBJECTS) core
___

 

remedy75{xxremedy}58: make
cc -o driver api.o get.o main.o print.o util.o -L../lib -L../../lib -lar
-lnsl -lpthread -lcurses -ldl
/usr/bin/ld: skipping incompatible ../../lib/libar.so when searching for
-lar
/usr/bin/ld: skipping incompatible ../../lib/libar.a when searching for
-lar
/usr/bin/ld: cannot find -lar
collect2: ld returned 1 exit status
make: *** [driver] Error 1
___

 

remedy75{xxremedy}59: ls -l
total 1880
-rwxr-xr-x  1 xxremedy ftp 411821 Mar 10 04:03 api.c*
-rwxr-xr-x  1 xxremedy ftp   5906 Mar 10 04:03 api.h*
-rw-r--r--  1 xxremedy ftp 314412 Aug 21 11:22 api.o
-rwxr-xr-x  1 xxremedy ftp 210747 Mar 10 04:03 get.c*
-rwxr-xr-x  1 xxremedy ftp   6902 Aug  7 15:08 get.h*
-rw-r--r--  1 xxremedy ftp 153016 Aug 21 11:22 get.o
-rwxr-xr-x  1 xxremedy ftp   5727 Mar 10 04:03 globals.h*
-rwxr-xr-x  1 xxremedy ftp  65161 Aug 17 13:30 main.c*
-rwxr-xr-x  1 xxremedy ftp  19440 Mar 10 04:03 main.h*
-rw-r--r--  1 xxremedy ftp  47636 Aug 21 11:22 main.o
-rwxr-xr-x  1 xxremedy ftp509 Aug 21 11:22 Makefile*
-rwxr-xr-x  1 xxremedy ftp 282759 Mar 10 04:03 print.c*
-rwxr-xr-x  1 xxremedy ftp   7934 Mar 10 04:03 print.h*
-rw-r--r--  1 xxremedy ftp 200340 Aug 21 11:22 print.o
-rwxr-xr-x  1 xxremedy ftp  46470 Aug 14 19:24 util.c*
-rwxr-xr-x  1 xxremedy ftp   2054 Mar 10 04:03 util.h*
-rw-r--r--  1 xxremedy ftp  31184 Aug 21 11:22 util.o
-rw-r--r--  1 xxremedy ftp   1674 Aug 14 19:21 wfd_shared.h
rmdy-papr02.comp.wepco.com{xxremedy}60: 

 



From: Axton [mailto:axton.gr...@gmail.com] 
Sent: Thursday, August 20, 2009 7:27 PM
Subject: Re: Remedy API and gcc on Redhat Linux

** I'm not sure why you would need 4.4.1.  Why don't you post the
compiler/linker output and the build options.

Axton Grams

The opinions, statements, and/or suggested courses of action expressed
in this E-mail do not necessarily reflect those of BMC Software, Inc. My
voluntary participation in this forum is not intended to convey a role
as a spokesperson, liaison or public relations representative for BMC
Software, Inc.