Question

Pro*C compilation uder IBM AIX OS

Asked by: folvo

Hi,

I am trying to find reasonable solution for problem with compilation of program using pro*C.
When I am trying to compile program I am receiving following error:
gcc -lstdc++ -L/geneva_prog/DV1/dev/archive -L/oracle/product/home0/rdbms/lib -L/usr/lib -L./ -L/oracle/product/home0/sqlplus/lib -L/oracle/product/home0/ctx/lib -L/oracle/product/home0/network/lib -L/oracle/product/home0/lib -lclntsh -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE gnvprgrun.o  /geneva_prog/DV1/dev/archive/gnvlogin.a /geneva_prog/DV1/dev/archive/logs.a -o gnvprgrun
ld: 0711-317 ERROR: Undefined symbol: .sqlcxt
ld: 0711-317 ERROR: Undefined symbol: .sqlglm
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status
make: The error code from the last command is 1.


Stop.


Compilation is performed under IBM AIX OS.
Environment variabled are set as follow:
SHLIB_PATH=/oracle/product/home0/lib:/oracle/product/home0/lib32:/lib:/usr/lib:/usr/local/lib
LIBPATH=/oracle/product/home0/lib:/oracle/product/home0/lib32:/lib:/usr/lib:/usr/local/lib
LD_LIBRARY_PATH=/oracle/product/home0/lib:/lib:/usr/lib:/usr/local/lib

For compilation I have used following makefile:
PROC = proc
PROCFLAGS = include=$(GENEVA_HOME)/dev/include select_error=yes ltype=none def_sqlcode=yes mode=ansi code=ansi_c parse=partial
 lines=no sqlcheck=semantics select_error=no userid=geneva_admin/geneva_admin code=ansi_c

CC = gcc
CCFLAGS = -I$(GENEVA_HOME)/dev/include -I/usr/include -I$(ORACLE_HOME)/rdbms/demo -I$(ORACLE_HOME)/rdbms/public -I$(ORACLE_HOM
E)/precomp/public/ -I$(ORACLE_HOME)/network/public -g -DUSE_HEAP_STATS

CXX = gcc
CXXFLAGS = -lstdc++ -L${GENEVA_HOME}/dev/archive -L$(ORACLE_HOME)/rdbms/lib -L/usr/lib -L./ -L$(ORACLE_HOME)/sqlplus/lib -L$(ORACLE_HOME)/ctx/lib -L$(ORACLE_HOME)/network/lib -L$(ORACLE_HOME)/lib -lclntsh -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE

PCSRC = gnvprgrun.pc
SRC = $(PCSRC:.pc=.c)
OBJ = $(SRC:%.c=%.o)
LIB = $(GENEVA_HOME)/dev/archive/gnvlogin.a $(GENEVA_HOME)/dev/archive/logs.a
EXE = gnvprgrun

all: $(EXE)

clean:
        rm -f $(SRC) $(OBJ) $(EXE)

$(SRC) : $(PCSRC)
        $(PROC) $(PROCFLAGS) iname=$(PCSRC)
$(OBJ) : $(SRC)
        $(CC) $(CCFLAGS) $(SRC) -c

$(EXE) : $(OBJ)
        $(CXX) $(CXXFLAGS) $(OBJ) $(LIB) -o $(EXE)

Could be someone so kind and help me with this problem as I am not skilled in C/C++ compilation under unix IMB AIX environment.

Thank you

FOLVO

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-11-06 at 15:48:08ID24879670
Tags

C/C++

,

Pro*C

,

Oracle

,

AIX

Topics

C Programming Language

,

IBM AIX Unix

,

Oracle Database

,

Unix Operating Systems

Participating Experts
1
Points
500
Comments
17

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. FTP connect to IBM AIX server
    Hello Expert! I have problem with connection to IBM AIX server. I can not FTP connect to AIX from a remote computer and also telnet connection is not possible. When I try to connect locally as a root (su) with correct password, AIX do not allow to connect. Any idea what coul...
  2. AIX - oracle halt
    Hi gurus, I have a problem with oracle database 10g running on AIX 5.3. the Oracle halted and i can not log on to shut it down and restart through sqlplus. So i have to restart the AIX system to bring the oracle up. For window server i dont' have to restart the server but...
  3. Oracle 9iAS for AIX
    Hi, Can someone provide me a link to download Oracle 9i Application Server software for AIX 5.3 or 5.2. I am having hard time finding it on OTN. thanks!
  4. IBM AIX - auditing
    on your /etc/security/audit/config ... you have general=USER_Create,USER_SU users: root = general --- q1. Will IBM AIX log every user created? q2. Where I can see this log file and output? Also Will it log the user creation date? q3: How about other system specifically HP-U...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: woolmilkporcPosted on 2009-11-06 at 16:23:31ID: 25764291

Hi,

could it be that youre missing libclntsh ?

If yes you need to create it using $ORACLE_HOME/bin/genclntsh  (using the oracle installation account).

Check for existence of libclntsh.so and linclntsh.a in $ORACLE_HOME/lib !

Btw. SHLIB_PATH is only used on HPUX systems, LD_LIBRARY_PATH is for Solaris!

LIBPATH is for AIX, but is generally not needed (and sometimes even harmful) for compiling/linking.

wmp



 

by: folvoPosted on 2009-11-06 at 16:40:52ID: 25764370

Hi woolmilkporc,

I can find libclntsh.a file in lib and lib32 folder in the $ORACLE_HOME.

Previously makefile was designed for HP UX and   CXXFLAGS was following:
CXXFLAGS = -L$(ORACLE_HOME)/lib32 -L$(ORACLE_HOME)/lib -L$(ORACLE_HOME)/rdbms/lib/ -L/usr/lib/ -L./ -L$(ORACLE_HOME)/sqlplus/lib/ -L$(ORACLE_HOME)/ctx/lib -L$(ORACLE_HOME)/network/lib -lclntsh

with this settings there is possible to compile program, but when I try to execute it I have received message:
Could not load program gnvprgrun:
        Dependent module /oracle/product/home0/lib/libclntsh.a(shr.o) could not be loaded.
        The module has an invalid magic number.

LIBPATH=/oracle/product/home0/lib:/oracle/product/home0/lib32:/lib:/usr/lib:/usr/local/lib
settings is required by another application provided by vendor.

As I understand invalid magic number is connected with usage 64bit library placed in bin.

so I have changed
CXXFLAGS  from -L$(ORACLE_HOME)/lib32 to -L$(ORACLE_HOME)/lib and
ld: 0711-317 ERROR: Undefined symbol: .sqlcxt
ld: 0711-317 ERROR: Undefined symbol: .sqlglm
has occured during compilation


 

by: woolmilkporcPosted on 2009-11-06 at 17:08:38ID: 25764467

Well,

you need to be consistent!

If you have to link your Pro*C application against the 32bit libs, which obviously is the case, you also need the 32bit libs in LIBPATH when running it later.

That's to say, use -L$(ORACLE_HOME)/lib32 at the first place in the -L paths, and use /oracle/product/home0/lib32 at the first place in LIBPATH.

I fear you will have to use different LIBPATH settings for this application and for the other (vendor's) application.

To avoid those LIBPATH troubles you could try to link your Pro*C application statically against libclntsh.a (32bit).  Basically, you would have to set LDFLAGS=-static, but I really don't know if this would work.

Another possibility, of course, would be making the Pro*C app 64bit compatible.

I have to leave now, will be back tomorrow!

wmp


 

by: woolmilkporcPosted on 2009-11-06 at 17:15:47ID: 25764496

Note to 64 bit mode -

maybe you can try setting CFLAGS, FFLAGS, and CXXFLAGS to -q64 and/or OBJECT_MODE=64!

 

by: folvoPosted on 2009-11-06 at 23:25:05ID: 25765301

Hi,

I have tryied -static parameter in CXXFLAGS  
CXXFLAGS = -L${GENEVA_HOME}/dev/archive -L$(ORACLE_HOME)/rdbms/lib -L/usr/lib -L./ -L$(ORACLE_HOME)/sqlplus/lib -L$(ORACLE_HOME)/ctx/lib -L$(ORACLE_HOME)/network/lib -static -L$(ORACLE_HOME)/lib32 -lclntsh -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE

but without success.
        gcc -L/geneva_prog/DV1/dev/archive -L/oracle/product/home0/rdbms/lib -L/usr/lib -L./ -L/oracle/product/home0/sqlplus/lib -L/oracle/product/home0/ctx/lib -L/oracle/product/home0/network/lib -static -L/oracle/product/home0/lib32 -lclntsh -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE gnvprgrun.o  /geneva_prog/DV1/dev/archive/gnvlogin.a /geneva_prog/DV1/dev/archive/logs.a -o gnvprgrun
ld: 0711-317 ERROR: Undefined symbol: encrypted_pw_passlen
ld: 0711-317 ERROR: Undefined symbol: max_history_size
ld: 0711-317 ERROR: Undefined symbol: crypt_r
ld: 0711-317 ERROR: Undefined symbol: getpass_auto
ld: 0711-317 ERROR: Undefined symbol: max_pw_passlen
ld: 0711-317 ERROR: Undefined symbol: pthread_mutex_lock
ld: 0711-317 ERROR: Undefined symbol: pthread_mutex_destroy
...
any many others.

Using -q64
CC = gcc
CCFLAGS = -q64 -I$(GENEVA_HOME)/dev/include -I/usr/include -I$(ORACLE_HOME)/rdbms/demo -I$(ORACLE_HOME)/rdbms/public -I$(ORACLE_HOME)/precomp/public/ -I$(ORACLE_HOME)/network/public -g -DUSE_HEAP_STATS

CXX = gcc
CXXFLAGS = -q64 -L${GENEVA_HOME}/dev/archive -L$(ORACLE_HOME)/rdbms/lib -L/usr/lib -L./ -L$(ORACLE_HOME)/sqlplus/lib -L$(ORACLE_HOME)/ctx/lib -L$(ORACLE_HOME)/network/lib -L$(ORACLE_HOME)/lib -lclntsh -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
following error occured:
        gcc  -q64 -L/geneva_prog/DV1/dev/archive -L/oracle/product/home0/rdbms/lib -L/usr/lib -L./ -L/oracle/product/home0/sqlplus/lib -L/oracle/product/home0/ctx/lib -L/oracle/product/home0/network/lib -L/oracle/product/home0/lib -lclntsh -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE gnvprgrun.o  /geneva_prog/DV1/dev/archive/gnvlogin.a /geneva_prog/DV1/dev/archive/logs.a -o gnvprgrun
gcc: unrecognized option '-q64'
ld: 0711-317 ERROR: Undefined symbol: .sqlcxt
ld: 0711-317 ERROR: Undefined symbol: .sqlglm
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status
make: The error code from the last command is 1.

Could you give me example how to use 64bit mode for compilation?

  • makefile
    • 1 KB

    Make file for compilation

 

by: woolmilkporcPosted on 2009-11-07 at 09:10:25ID: 25767102

OK, right,

it's gcc, not xlC, gcc doesn't understand "-q64". This doesn't make things easier.

In CCFLAGS, CXXFLAGS try

-maix64

I always get "type mismatch" warnings when using gcc + aix64bit. Compilation usually succeeds nonetheless.


Good luck!

wmp







 

by: folvoPosted on 2009-11-07 at 10:45:23ID: 25767500

Hi

it seems that -maix64 parameter in CCFLAGS, CXXFLAGS helped.
But another problem I have discovered
        gcc  -maix64 -L/geneva_prog/DV1/dev/archive -L/oracle/product/home0/rdbms/lib -L/usr/lib -L./ -L/oracle/product/home0/sqlplus/lib -L/oracle/product/home0/ctx/lib -L/oracle/product/home0/network/lib -L/oracle/product/home0/lib -lclntsh -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE gnvprgrun.o  /geneva_prog/DV1/dev/archive/gnvlogin.a /geneva_prog/DV1/dev/archive/logs.a -o gnvprgrun
ld: 0711-317 ERROR: Undefined symbol: .Log
ld: 0711-317 ERROR: Undefined symbol: .gnvConnect
ld: 0711-317 ERROR: Undefined symbol: .gnvDisconnect
ld: 0711-317 ERROR: Undefined symbol: .getConnData
ld: 0711-317 ERROR: Undefined symbol: .LogClose
ld: 0711-317 ERROR: Undefined symbol: .LogOpen
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status
make: The error code from the last command is 1.


Stop.

In my opinion errors are connected with
LIB = $(GENEVA_HOME)/dev/archive/gnvlogin.a $(GENEVA_HOME)/dev/archive/logs.a

Libraries gnvlogin.a, and logs.a are compiled in 32bit mode.

I have tried to recompile them using following make file:
CXX=gcc
CXXFLAGS= -maix64 -Wall -c
LD=gcc
LDFLAGS=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE

ARX = logs.a
OBJ = logs.o
SRC = logs.c
HDR = logs.h

all: ${ARX}

${ARX}: ${OBJ}
      ar rvs -X64 ${ARX} ${OBJ}

${OBJ}: ${SRC} ${HDR}
      ${CXX} ${CXXFLAGS} ${SRC}

clean:
      rm -f ${OBJ} ${ARX}

release:
      cp ${HDR} ${GENEVA_HOME}/dev/include
      cp ${ARX} ${GENEVA_HOME}/dev/archive

but following error occured:
bash-3.00$ make
        gcc -maix64 -Wall -c logs.c
        ar rvs -X64 logs.a logs.o
ar: creating an archive file -X64
a - logs.a
ar: No such file or directory
ar: 0707-117 The fopen system call failed on file logs.a.
a - logs.o
ar: 0707-126 logs.o is not valid with the current object file mode.
        Use the -X option to specify the desired object mode.
make: The error code from the last command is 2.


Stop.

Could you be so kind and help me with this?

 

by: woolmilkporcPosted on 2009-11-07 at 12:41:15ID: 25767946

First, the sequence of the "ar" flags is wrong.

Specify

ar -X64 -rvs ${ARX} ${OBJ}

But I think this will not change much.

Msg 0707-126 clearly states that logs.o hasn't been created in 64bit mode.

Didn't the "gcc" above throw any errors?

wmp


 

by: folvoPosted on 2009-11-07 at 14:28:36ID: 25768358

Hi,

log.a library was successfully compiled. Great. Could you be so kind and help me with compilation
another one library, which is using Pro*C?
It's second library gnvlogin.a.

Source for compilation are two files:
gnvlogin.pc and gnvlogin.h

using following makefile:
PROC = proc
PROCFLAGS = select_error=yes ltype=none def_sqlcode=yes mode=ansi code=ansi_c parse=partial lines=no sqlcheck=semantics select_error=no userid=geneva_admin/geneva_admin code=ansi_c

CC = gcc
CCFLAGS = -maix64 -I$(GENEVA_HOME)/dev/include -I/usr/include/ -I$(ORACLE_HOME)/rdbms/demo -I$(ORACLE_HOME)/rdbms/public -I$(ORACLE_HOME)/precomp/public/ -I$(ORACLE_HOME)/network/public -g -DUSE_HEAP_STATS

ARCHIVE = ar -X64 -rvs
ARFLAGS = /usr/ccs/lib/crt0.o

LIBPCSRC = gnvlogin.pc
LIBSRC = $(LIBPCSRC:.pc=.c)
LIBOBJ = $(LIBSRC:%.c=%.o)
LIB = $(LIBOBJ:%.o=%.a)
LIBS = $(GENEVA_HOME)/dev/archive/logs.a

SRC = $(PCSRC:.pc=.c)
OBJ = $(SRC:%.c=%.o)

all: $(LIB)

clean:
      rm -f $(SRC) $(OBJ) $(EXE) $(LIBSRC) $(LIBOBJ) $(LIB)

$(LIBSRC) : $(LIBPCSRC)
      $(PROC) $(PROCFLAGS) iname=$(LIBPCSRC)

$(LIBOBJ) : $(LIBSRC)
      $(CC) $(CCFLAGS) $(LIBSRC) -c

$(LIB) : $(LIBOBJ)
      $(ARCHIVE) $(LIB) $(LIBOBJ) $(ARFLAGS)
      
I am receiving following:      
bash-3.00$ make
        proc select_error=yes ltype=none def_sqlcode=yes mode=ansi code=ansi_c parse=partial lines=no sqlcheck=semantics select_error=no userid=geneva_admin/geneva_admin code=ansi_c iname=gnvlogin.pc

Pro*C/C++: Release 9.2.0.1.0 - Production on Sun Nov 8 00:15:35 2009

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
System default option values taken from: /oracle/product/home0/precomp/admin/pcscfg.cfg

Syntax error at line 135, column 2, file /usr/include/standards.h:
Error at line 135, column 2 in file /usr/include/standards.h
#warning  The -qdfp option is required to process DFP code in headers.
.1
PCC-S-02014, Encountered the symbol "warning" when expecting one of the followin
g:

   a numeric constant, newline, define, elif, else, endif,
   error, if, ifdef, ifndef, include, line, pragma, undef,
   an immediate preprocessor command, a C token,
The symbol "newline," was substituted for "warning" to continue.

        gcc -maix64 -I/geneva_prog/DV1/dev/include -I/usr/include/ -I/oracle/product/home0/rdbms/demo -I/oracle/product/home0/rdbms/public -I/oracle/product/home0/precomp/public/ -I/oracle/product/home0/network/public -g -DUSE_HEAP_STATS gnvlogin.c -c
gnvlogin.c: In function 'getConnData':
gnvlogin.c:196: warning: assignment makes pointer from integer without a cast
gnvlogin.c:198: warning: assignment makes pointer from integer without a cast
gnvlogin.c:200: warning: incompatible implicit declaration of built-in function 'strcpy'
gnvlogin.c:201: warning: assignment makes pointer from integer without a cast
gnvlogin.c:204: warning: assignment makes pointer from integer without a cast
        ar -X64 -rvs gnvlogin.a  gnvlogin.o  /usr/ccs/lib/crt0.o
ar: creating an archive file gnvlogin.a
a - gnvlogin.o
a - /usr/ccs/lib/crt0.o
ar: 0707-126 /usr/ccs/lib/crt0.o is not valid with the current object file mode.
        Use the -X option to specify the desired object mode.
make: The error code from the last command is 1.


Stop.

Could you help me with this?

 

by: woolmilkporcPosted on 2009-11-07 at 15:12:02ID: 25768527

Yes,

this is a well known problem with standards.h under AIX at a level higher than 5300-05, including AIX 6.1.

standards.h uses "#warning ..." which isn't wrong at all, but is considered an error by gcc nonetheless.

There is a workaround, but it involves modifying the header file.

Change IBM's /usr/include/standards.h

from:

#if defined(__IBM_PP_WARNING)
#warning  The -qdfp option is required to process DFP code in headers.
#else
#error  The -qdfp option is required to process DFP code in headers.
#endif

to:

#if !defined(__IBM_PP_WARNING)
#error  The -qdfp option is required to process DFP code in headers.
#endif


Either change standards.h in place or save it as a local version and put it into a "CCFLAGS -I ..." path (before /usr/include!)

wmp

 

by: folvoPosted on 2009-11-07 at 15:42:47ID: 25768652

Great,

there one error remains:
Pro*C/C++: Release 9.2.0.1.0 - Production on Sun Nov 8 01:35:33 2009

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

System default option values taken from: /oracle/product/home0/precomp/admin/pcscfg.cfg

        gcc -maix64 -I/geneva_prog/DV1/dev/include -I/usr/include/ -I/oracle/product/home0/rdbms/demo -I/oracle/product/home0/rdbms/public -I/oracle/product/home0/precomp/public/ -I/oracle/product/home0/network/public -g -DUSE_HEAP_STATS gnvlogin.c -c
gnvlogin.c: In function 'getConnData':
gnvlogin.c:196: warning: assignment makes pointer from integer without a cast
gnvlogin.c:198: warning: assignment makes pointer from integer without a cast
gnvlogin.c:200: warning: incompatible implicit declaration of built-in function 'strcpy'
gnvlogin.c:201: warning: assignment makes pointer from integer without a cast
gnvlogin.c:204: warning: assignment makes pointer from integer without a cast
        ar -X64 -rvs gnvlogin.a  gnvlogin.o  /usr/ccs/lib/crt0.o
ar: creating an archive file gnvlogin.a
a - gnvlogin.o
a - /usr/ccs/lib/crt0.o
ar: 0707-126 /usr/ccs/lib/crt0.o is not valid with the current object file mode.
        Use the -X option to specify the desired object mode.
make: The error code from the last command is 1.


Stop.

Error regarding using standards.h was solved. Many thanks.
Could you please help me with error regarding use library /usr/ccs/lib/crt0.o?

 

by: folvoPosted on 2009-11-07 at 16:04:31ID: 25768735

Many thanks

 

by: woolmilkporcPosted on 2009-11-07 at 16:37:22ID: 25768834

I don't know what you and modus_operandi are trying to tell me.
I will continue commenting on this problem, but please let me know if this is not OK.

The 64bit version of crt0.o is called crt0_64.o, it's in /usr/ccs/lib, too.
Change ARFLAGS accordingly.

wmp




 

by: folvoPosted on 2009-11-07 at 17:03:35ID: 25768895

Great,

successfully compiled program and all libraries.
Many many thanks woolmilkporc.

Regarding my communication with modus_operandi, I have requested attention on this question.
He has revised this question and inform me that he add this question to Unix Operating Systems area.

May I point next question in the future to you?

 

by: folvoPosted on 2009-11-07 at 17:05:35ID: 31651283

As the solution needs to be considered whole communication as final solution was reached step by step.

 

by: woolmilkporcPosted on 2009-11-08 at 03:49:10ID: 25770182


Thx for the points, folvo!

You can't point questions to individual experts here, but please be sure that I will see any question in areas like Unix, AIX, Linux, TSM and so on, and will try to help, if I can.

Cheers

wmp

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...