Re: PRO-C versus GCC (V2.0)

From: Jean Anderson <jean_at_seismo.CSS.GOV>
Date: 27 Feb 93 01:42:12 GMT
Message-ID: <52094_at_seismo.CSS.GOV>


In <stephane.730667616_at_tdsb-ipx>, stephane_at_mais.hydro.qc.ca (User Stephane):
>>The problem is when i try to use an ORACLE PRO-C program, inserting
>>a double or float value into a table, i get a core dumped. The problem
>>is occuring only when i use GCC compiler, no problem with /usr/5bin/CC.

And in <guy.730736733_at_tdsb-s>, guy_at_mais.hydro.qc.ca (Guy Harel): > I have the same problem using the SUN compiler '/usr/bin/cc'.

Compiles don't have to be done SysV--in fact, we gcc most things. But the final link must be SysV so /usr/5lib/libc.a correctly resolves symbols.

Inside a low level routine, an Oracle subroutine checks the return from sprintf, which returns an int under SysV and a char pointer under BSD, hence the segmentation fault.

Some of our Makefiles are set up like this:

     CC       = gcc
     LD       = /usr/5bin/cc
     LDFLAGS  = $O $(INCLUDES) -L/usr/5lib

If you set LD_LIBRARY_PATH, make sure /usr/5lib is before /usr/lib.

  • jean
+-----------------------------------------------------------------------+
| Jean Anderson, DBA                       email:  jean_at_esosun.css.gov  |
| SAIC Open Systems Division, MS A2-F                                   |
| 10210 Campus Point Drive                 phone:  (619)458-2727        |
| San Diego, CA  92121                       fax:  (619)458-4993        |
 +-----------------------------------------------------------------------+
Received on Sat Feb 27 1993 - 02:42:12 CET

Original text of this message