Thread: C++ compile on hp-ux 10.20

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    4

    C++ compile on hp-ux 10.20

    Hi
    I am trying to compile my c++ programs on HP-UX 10.20 server.. I use PRO-C also in that.. When I tried to compile the program, I got the following error:

    proc code=cpp SQLCHECK=SEMANTICS userid=/ sys_include='(/opt/CC/include/CC,/usr/include,../head,)' iname=cust_acc.pc
    /usr/lib/dld.sl: Can't open shared library: /usr/lib/libc.2
    /usr/lib/dld.sl: No such file or directory
    sh: 22047 Abort(coredump)
    *** Error exit code 134

    When I tried to find /usr/lib/libc.2, I couldn't find.. Can you please help me with this??

    Thanks a lot
    Praveen Padala

  2. #2
    Registered User
    Join Date
    Aug 2002
    Posts
    170
    I think we would need to see your make file or command line that you are using to compile. It sounds like the error may be there.
    Best Regards,

    Bonkey

  3. #3
    Registered User
    Join Date
    Oct 2002
    Posts
    4
    Thanks for your reply.. Here is my make file. Please let me know what changes I have to make here..

    .SUFFIXES: .pc .c .o .cpp

    PRODS = car6000.exe car6100.exe car6200.exe car6300.exe uta6200.exe \
    uta6901.exe

    all: $(PRODS)

    ORAOBJECTS = cust_acc.o dbconn.o lsp.o ora_util.o carwfrej.o
    CXXOBJECTS = caw***.o inifile.o daemonctrl.o logfile.o w***.o \
    wfclientapp.o lciapp.o

    ################################################## ###########################
    # ICWF defines
    ################################################## ###########################
    #ICWFDIR = ..
    #ICWFHD = $(ICWFDIR)/head
    #ICWFLB = $(ICWFDIR)/src
    #ICWF_CCFLAGS = -I$(ICWFHD)
    #ICWF_LIB = $(ICWFDIR)/src/libicwf.a
    #ICWF_LIBS = -licwf
    #ICWF_LIBDIR = -L$(ICWFLB)
    #ICWF_LDFLAGS = $(ICWF_LIBDIR) $(ICWF_LIBS)
    IC_HOME = /deve/appl/inconcert/4.5.5/icdev1/
    ################################################## ###########################
    # ORACLE defines
    ################################################## ###########################
    #USERID = zhangt/zhangt@prod_d
    USERID = /
    #caredev/care_sys@prod_12
    #USERID = /@prod_s
    PROCPP = proc code=cpp
    ORA_LIBDIR = -L$(ORACLE_HOME)/lib
    ORA_LIBS = -lsql -lsqlnet -lncr -lsqlnet -lclient -lcommon -lgeneric \
    -lsqlnet -lncr -lsqlnet -lclient -lcommon -lgeneric -lepc \
    -lnlsrtl3 -lc3v6 -lcore3 -lnlsrtl3 -lcore3 -lnlsrtl3

    ORA_LDFLAGS = $(ORA_LIBDIR) $(ORA_LIBS)
    #Praveen
    ORA_LDFLAGS = $(ORA_LIBDIR) $(ORA_LIBS) \
    `cat $(ORACLE_HOME)/rdbms/lib/sysliblist` -lm -l:libcma.sl
    PC_SYSINC=sys_include='(/opt/CC/include/CC,/usr/include,../head,$(ICWFHD))'

    ################################################## ###########################
    # INCONCERT defines
    ################################################## ###########################
    IC_CCFLAGS = -I$(IC_HOME)/include/cxx
    #IC_LIBS = -Wl,-a,archive_shared -licC_cc -licclient_cc -lichp9000_cc -Wl,-a,shared_archive
    #IC_LIBDIR = -L$(IC_HOME)/lib/hpcc
    IC_LIBS = -licC -licclient -lnsl -lxti
    IC_LIBDIR = -L$(IC_HOME)/lib
    IC_LDFLAGS = $(IC_LIBDIR) $(IC_FIXUP) $(IC_LIBS)

    ################################################## ###########################
    OTHER_FLAGS = +DA1.1 $(DEBUG) -DHP9000
    CCFLAGS = $(EXCEPTION_HANDLING) $(OTHER_FLAGS) $(ORA_CCFLAGS) $(IC_CCFLAGS) \
    $(ICWF_CCFLAGS) -I../head
    LDFLAGS = $(IC_LDFLAGS) $(ORA_LDFLAGS) $(IC_LDFLAGS)
    CCFLAGS= $(OTHER_FLAGS) $(ORA_CCFLAGS) $(IC_CCFLAGS) -I../head


    CC = aCC
    COMP = $(CC) -c $(CCFLAGS)
    LINK = $(CC)

    #############
    # RULES
    ################################################## ###########################
    .cpp.o:
    $(COMP) $<
    .c.o:
    $(COMP) $<


    ################################################## ###########################
    # PROC++
    ################################################## ###########################
    ora_util.c: ora_util.pc
    $(PROCPP) $(PC_SYSINC) iname=ora_util.pc
    dbconn.c: dbconn.pc
    $(PROCPP) $(PC_SYSINC) iname=dbconn.pc
    lsp.c: lsp.pc
    $(PROCPP) $(PC_SYSINC) iname=lsp.pc
    carwfrej.c: carwfrej.pc
    $(PROCPP) $(PC_SYSINC) iname=carwfrej.pc
    cust_acc.c: cust_acc.pc
    $(PROCPP) SQLCHECK=SEMANTICS userid=$(USERID) $(PC_SYSINC) iname=cust_acc.pc


    ################################################## ###########################
    # car6000.exe
    ################################################## ###########################
    car6000.exe: car6000.o $(CXXOBJECTS) $(ORAOBJECTS)
    $(LINK) -o $@ car6000.o $(CXXOBJECTS) $(ORAOBJECTS) $(LDFLAGS)

    ################################################## ###########################
    # car6100.exe
    ################################################## ###########################
    car6100.exe: car6100.o $(CXXOBJECTS) $(ORAOBJECTS)
    $(LINK) -o $@ car6100.o $(CXXOBJECTS) $(ORAOBJECTS) $(LDFLAGS)

    ################################################## ###########################
    # car6200.exe
    ################################################## ###########################
    car6200.exe: car6200.o $(CXXOBJECTS) $(ORAOBJECTS)
    $(LINK) -o $@ car6200.o $(CXXOBJECTS) $(ORAOBJECTS) $(LDFLAGS)

    ################################################## ###########################
    # car6300.exe
    ################################################## ###########################
    car6300.exe: car6300.o $(CXXOBJECTS) $(ORAOBJECTS)
    $(LINK) -o $@ car6300.o $(CXXOBJECTS) $(ORAOBJECTS) $(LDFLAGS)

    ################################################## ###########################
    # uta6200.exe
    ################################################## ###########################
    uta6200.exe: uta6200.o $(CXXOBJECTS) $(ORAOBJECTS)
    $(LINK) -o $@ uta6200.o $(CXXOBJECTS) $(ORAOBJECTS) $(LDFLAGS)

    ################################################## ###########################
    # uta6901.exe
    ################################################## ###########################
    uta6901.exe: uta6901.o $(CXXOBJECTS) $(ORAOBJECTS)
    $(LINK) -o $@ uta6901.o $(CXXOBJECTS) $(ORAOBJECTS) $(LDFLAGS)


    ################################################## ###########################
    # clean:
    ################################################## ###########################
    clean:
    /bin/rm -f *.o *.a dbconn.c ora_util.c *.cud *.cod *.lis *.exe core
    /bin/rm -f cust_acc.c dbconn.c lsp.c ora_util.c carwfrej.c
    /bin/rm -f sqlnet.log

  4. #4
    Blank
    Join Date
    Aug 2001
    Posts
    1,034
    You could try manualy linking in the c libraries.
    What does /usr/lib/clib.so, /usr/lib/libc.so or something like that point to?

  5. #5
    Registered User
    Join Date
    Aug 2002
    Posts
    170
    What does this command return when you run it on the command line?

    cat $(ORACLE_HOME)/rdbms/lib/sysliblist

  6. #6
    Registered User
    Join Date
    Oct 2002
    Posts
    4
    Originally posted by bonkey
    What does this command return when you run it on the command line?

    cat $(ORACLE_HOME)/rdbms/lib/sysliblist

    I didn't get anything
    ksh: ORACLE_HOME: not found
    cat: Cannot open /rdbms/lib/sysliblist: No such file or directory

    but i got this when I tried to run it as
    cat $ORACLE_HOME/rdbms/lib/sysliblist
    -l:libcma.sl -lcl -lm -l:libcl.a

    My previous executables are not at all showing libc.2 as a shared library.. I am not sure why this makefile is looking for libc.2

    car6100.exe:
    shared executable
    shared library dynamic path search:
    SHLIB_PATH disabled second
    embedded path disabled first Not Defined
    internal name:
    car6100.exe
    shared library list:
    dynamic /usr/lib/libcma.1
    dynamic /usr/lib/pa1.1/libcl.1
    dynamic /usr/lib/libC.1
    dynamic /usr/lib/libc.1
    static /usr/lib/libdld.1
    Last edited by padalap; 10-16-2002 at 03:16 PM.

  7. #7
    Registered User
    Join Date
    Oct 2002
    Posts
    4
    Originally posted by Nick
    You could try manualy linking in the c libraries.
    What does /usr/lib/clib.so, /usr/lib/libc.so or something like that point to?
    I am not able to find these libraries in /usr/lib folder.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compile as you type
    By Rocketmagnet in forum A Brief History of Cprogramming.com
    Replies: 33
    Last Post: 12-07-2006, 01:36 PM
  2. How to compile mfc libs from platform sdk
    By tjcbs in forum Windows Programming
    Replies: 6
    Last Post: 11-19-2006, 08:20 AM
  3. Compile crashes certain windows
    By Loduwijk in forum C++ Programming
    Replies: 5
    Last Post: 03-26-2006, 09:05 PM
  4. Replies: 4
    Last Post: 11-14-2001, 10:28 AM
  5. how do i compile a program that deals w/classes?
    By Shy_girl_311 in forum C++ Programming
    Replies: 5
    Last Post: 11-11-2001, 02:32 AM