LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 07-27-2008, 10:40 AM   #1
serconsult
LQ Newbie
 
Registered: Jul 2008
Posts: 12

Rep: Reputation: 0
Issues porting c program from SUSE to Redhat v9.2


I have a c program that the original author is no longer available, which we need to port to Redhat v9.2 from SUSE. I was hoping it would just recompile, but I am getting a number of errors. Before I start down the path of rewriting each variable assignment, I want to explore whether there is an option switch that will accept the current code.

Here is the errors ---
./source/payplus.c:305: warning: built-in function ‚fmin‚ declared as non-function
./source/payplus.c:541: warning: conflicting types for built-in function ‚tolower‚
./source/payplus.c: In function ‚main‚:
./source/payplus.c:594: warning: assignment makes pointer from integer without a cast
./source/payplus.c:684: warning: assignment makes pointer from integer without a cast
./source/payplus.c: In function ‚getsiteconfig‚:
./source/payplus.c:861: warning: assignment makes integer from pointer without a cast
./source/payplus.c:862: warning: comparison between pointer and integer
./source/payplus.c:868: warning: assignment makes integer from pointer without a cast
./source/payplus.c:873: warning: assignment makes pointer from integer without a cast
./source/payplus.c:875: warning: assignment makes pointer from integer without a cast
./source/payplus.c:877: warning: assignment makes pointer from integer without a cast
./source/payplus.c:879: warning: assignment makes pointer from integer without a cast
./source/payplus.c:881: warning: assignment makes pointer from integer without a cast
./source/payplus.c:883: warning: assignment makes pointer from integer without a cast
./source/payplus.c:885: warning: assignment makes pointer from integer without a cast
./source/payplus.c:887: warning: assignment makes pointer from integer without a cast
./source/payplus.c:889: warning: assignment makes pointer from integer without a cast
./source/payplus.c:891: warning: assignment makes pointer from integer without a cast
./source/payplus.c:893: warning: assignment makes pointer from integer without a cast
./source/payplus.c:895: warning: assignment makes pointer from integer without a cast
./source/payplus.c:897: warning: assignment makes pointer from integer without a cast
./source/payplus.c:899: warning: assignment makes pointer from integer without a cast
./source/payplus.c:901: warning: assignment makes pointer from integer without a cast
./source/payplus.c:903: warning: assignment makes pointer from integer without a cast
./source/payplus.c:905: warning: assignment makes pointer from integer without a cast
./source/payplus.c:907: warning: assignment makes pointer from integer without a cast
./source/payplus.c:909: warning: assignment makes pointer from integer without a cast
./source/payplus.c:911: warning: assignment makes pointer from integer without a cast
./source/payplus.c:913: warning: assignment makes pointer from integer without a cast
./source/payplus.c:915: warning: assignment makes pointer from integer without a cast
./source/payplus.c:917: warning: assignment makes pointer from integer without a cast
./source/payplus.c:933: warning: assignment makes pointer from integer without a cast
./source/payplus.c:938: warning: assignment makes pointer from integer without a cast
./source/payplus.c:943: warning: assignment makes pointer from integer without a cast
./source/payplus.c:948: warning: assignment makes pointer from integer without a cast
./source/payplus.c:953: warning: assignment makes pointer from integer without a cast
./source/payplus.c:954: warning: assignment makes pointer from integer without a cast
./source/payplus.c:955: warning: assignment makes pointer from integer without a cast
./source/payplus.c:956: warning: assignment makes pointer from integer without a cast
./source/payplus.c:976: warning: assignment makes pointer from integer without a cast
./source/payplus.c:977: warning: assignment makes pointer from integer without a cast
./source/payplus.c:978: warning: assignment makes pointer from integer without a cast
./source/payplus.c:979: warning: assignment makes pointer from integer without a cast
./source/payplus.c:994: warning: assignment makes pointer from integer without a cast
./source/payplus.c:995: warning: assignment makes pointer from integer without a cast
./source/payplus.c:996: warning: assignment makes pointer from integer without a cast
./source/payplus.c:997: warning: assignment makes pointer from integer without a cast
./source/payplus.c:1020: warning: assignment makes pointer from integer without a cast
./source/payplus.c:1021: warning: assignment makes pointer from integer without a cast
./source/payplus.c:1030: warning: assignment makes pointer from integer without a cast
./source/payplus.c:1031: warning: assignment makes pointer from integer without a cast
./source/payplus.c:1038: warning: assignment makes integer from pointer without a cast
./source/payplus.c: In function ‚dtdescript‚:
./source/payplus.c:1074: warning: passing argument 2 of ‚gstrcmp‚ makes pointer from integer without a cast
./source/payplus.c:1076: warning: passing argument 2 of ‚strcpy‚ makes pointer from integer without a cast
./source/payplus.c: In function ‚getstation‚:
./source/payplus.c:1096: warning: assignment makes integer from pointer without a cast
./source/payplus.c:1099: warning: comparison between pointer and integer
./source/payplus.c:1111: warning: assignment makes integer from pointer without a cast
./source/payplus.c:1131: warning: assignment makes pointer from integer without a cast
./source/payplus.c:1136: warning: assignment makes pointer from integer without a cast
./source/payplus.c:1140: warning: assignment makes pointer from integer without a cast
./source/payplus.c: In function ‚isloggedin‚:
./source/payplus.c:1322: warning: assignment makes pointer from integer without a cast
./source/payplus.c:1456: warning: assignment makes pointer from integer without a cast
./source/payplus.c:1482: warning: assignment makes pointer from integer without a cast
./source/payplus.c:1483: warning: assignment makes pointer from integer without a cast
./source/payplus.c:1486: warning: assignment makes pointer from integer without a cast
./source/payplus.c:1487: warning: assignment makes pointer from integer without a cast
./source/payplus.c:1554: warning: assignment makes pointer from integer without a cast
./source/payplus.c: In function ‚checkidle‚:
./source/payplus.c:1653: warning: assignment makes pointer from integer without a cast
./source/payplus.c:1654: warning: assignment makes pointer from integer without a cast
./source/payplus.c:1655: warning: assignment makes pointer from integer without a cast
./source/payplus.c: In function ‚convtime‚:
./source/payplus.c:1847: warning: assignment makes pointer from integer without a cast
./source/payplus.c:1848: warning: assignment makes pointer from integer without a cast
./source/payplus.c:1860: warning: assignment makes pointer from integer without a cast
./source/payplus.c: In function ‚qtrhr‚:
./source/payplus.c:1902: warning: assignment makes pointer from integer without a cast
./source/payplus.c:1903: warning: assignment makes pointer from integer without a cast
./source/payplus.c:1904: warning: assignment makes pointer from integer without a cast
./source/payplus.c:1924: warning: assignment makes pointer from integer without a cast
./source/payplus.c:1925: warning: assignment makes pointer from integer without a cast
./source/payplus.c:1926: warning: assignment makes pointer from integer without a cast
./source/payplus.c: In function ‚loghrs‚:
./source/payplus.c:1970: warning: assignment makes pointer from integer without a cast
./source/payplus.c:1971: warning: assignment makes pointer from integer without a cast
./source/payplus.c:1972: warning: assignment makes pointer from integer without a cast
./source/payplus.c:1980: warning: assignment makes pointer from integer without a cast
./source/payplus.c:1981: warning: assignment makes pointer from integer without a cast
./source/payplus.c:1982: warning: assignment makes pointer from integer without a cast
./source/payplus.c: In function ‚loghrs2‚:
./source/payplus.c:2015: warning: assignment makes pointer from integer without a cast
./source/payplus.c:2016: warning: assignment makes pointer from integer without a cast
./source/payplus.c:2022: warning: assignment makes pointer from integer without a cast
./source/payplus.c:2023: warning: assignment makes pointer from integer without a cast
./source/payplus.c: In function ‚closeact‚:
./source/payplus.c:2089: warning: assignment makes pointer from integer without a cast
./source/payplus.c:2116: warning: assignment makes pointer from integer without a cast
./source/payplus.c:2145: warning: assignment makes pointer from integer without a cast
./source/payplus.c: In function ‚logout‚:
./source/payplus.c:2469: warning: assignment makes pointer from integer without a cast
./source/payplus.c:2487: warning: passing argument 2 of ‚d4tag‚ from incompatible pointer type
./source/payplus.c:2495: warning: assignment makes pointer from integer without a cast
./source/payplus.c:2500: warning: passing argument 1 of ‚gstrcmp‚ from incompatible pointer type
./source/payplus.c: In function ‚openfiles‚:
./source/payplus.c:2825: warning: comparison of distinct pointer types lacks a cast
./source/payplus.c: In function ‚move_third‚:
./source/payplus.c:2961: warning: passing argument 2 of ‚strcpy‚ makes pointer from integer without a cast
./source/payplus.c:2966: warning: passing argument 2 of ‚strcat‚ makes pointer from integer without a cast
./source/payplus.c:2968: warning: passing argument 2 of ‚strcat‚ makes pointer from integer without a cast
./source/payplus.c:2969: warning: passing argument 2 of ‚strcat‚ makes pointer from integer without a cast
./source/payplus.c:2974: warning: passing argument 2 of ‚strcat‚ makes pointer from integer without a cast
./source/payplus.c:2975: warning: passing argument 2 of ‚strcat‚ makes pointer from integer without a cast
./source/payplus.c:2979: warning: passing argument 2 of ‚strcpy‚ makes pointer from integer without a cast
./source/payplus.c:2980: warning: passing argument 2 of ‚strcat‚ makes pointer from integer without a cast
./source/payplus.c:2981: warning: passing argument 2 of ‚strcat‚ makes pointer from integer without a cast
./source/payplus.c:3001: warning: passing argument 1 of ‚strlen‚ makes pointer from integer without a cast
./source/payplus.c:3081: warning: passing argument 1 of ‚strlen‚ makes pointer from integer without a cast
./source/payplus.c:3113: warning: assignment makes pointer from integer without a cast
./source/payplus.c:3186: warning: assignment makes pointer from integer without a cast
./source/payplus.c: In function ‚gologin‚:
./source/payplus.c:3282: warning: assignment makes integer from pointer without a cast
./source/payplus.c:3283: warning: assignment makes pointer from integer without a cast
./source/payplus.c:3287: warning: comparison between pointer and integer
./source/payplus.c:3293: warning: assignment makes pointer from integer without a cast
./source/payplus.c:3294: warning: assignment makes pointer from integer without a cast
./source/payplus.c:3308: warning: assignment makes integer from pointer without a cast
./source/payplus.c:3309: warning: assignment makes pointer from integer without a cast
./source/payplus.c:3314: warning: assignment makes integer from pointer without a cast
./source/payplus.c:3324: warning: assignment makes pointer from integer without a cast
./source/payplus.c:3329: warning: assignment makes pointer from integer without a cast
./source/payplus.c:3355: warning: assignment makes pointer from integer without a cast
./source/payplus.c:3357: warning: passing argument 1 of ‚strlen‚ from incompatible pointer type
./source/payplus.c:3369: warning: passing argument 2 of ‚gstrcmp‚ from incompatible pointer type
./source/payplus.c:3417: warning: assignment makes pointer from integer without a cast
./source/payplus.c: In function ‚getsupname‚:
./source/payplus.c:3486: warning: assignment makes integer from pointer without a cast
./source/payplus.c:3488: warning: comparison between pointer and integer
./source/payplus.c:3494: warning: assignment makes pointer from integer without a cast
./source/payplus.c:3495: warning: assignment makes pointer from integer without a cast
./source/payplus.c:3505: warning: assignment makes integer from pointer without a cast
./source/payplus.c:3507: warning: assignment makes integer from pointer without a cast
./source/payplus.c:3512: warning: assignment makes pointer from integer without a cast
./source/payplus.c:3523: warning: assignment makes pointer from integer without a cast
./source/payplus.c: In function ‚getsupid‚:
./source/payplus.c:3587: warning: assignment makes integer from pointer without a cast
./source/payplus.c:3589: warning: assignment makes pointer from integer without a cast
./source/payplus.c:3592: warning: comparison between pointer and integer
./source/payplus.c:3598: warning: assignment makes pointer from integer without a cast
./source/payplus.c:3599: warning: assignment makes pointer from integer without a cast
./source/payplus.c:3612: warning: assignment makes integer from pointer without a cast
./source/payplus.c:3613: warning: assignment makes pointer from integer without a cast
./source/payplus.c:3617: warning: assignment makes integer from pointer without a cast
./source/payplus.c:3622: warning: assignment makes pointer from integer without a cast
./source/payplus.c:3637: warning: assignment makes pointer from integer without a cast
./source/payplus.c: In function ‚authorize‚:
./source/payplus.c:3821: warning: assignment makes pointer from integer without a cast
./source/payplus.c: In function ‚goagent‚:
./source/payplus.c:3887: warning: passing argument 1 of ‚tolower‚ from incompatible pointer type
./source/payplus.c:3892: warning: assignment makes integer from pointer without a cast
./source/payplus.c:3893: warning: comparison between pointer and integer
./source/payplus.c:3909: warning: assignment makes integer from pointer without a cast
./source/payplus.c: In function ‚gosalary‚:
./source/payplus.c:4177: warning: passing argument 1 of ‚tolower‚ from incompatible pointer type
./source/payplus.c:4182: warning: assignment makes integer from pointer without a cast
./source/payplus.c:4183: warning: comparison between pointer and integer
./source/payplus.c:4198: warning: assignment makes integer from pointer without a cast
./source/payplus.c: In function ‚gohourly‚:
./source/payplus.c:4336: warning: passing argument 1 of ‚tolower‚ from incompatible pointer type
./source/payplus.c:4341: warning: assignment makes integer from pointer without a cast
./source/payplus.c:4342: warning: comparison between pointer and integer
./source/payplus.c:4357: warning: assignment makes integer from pointer without a cast
./source/payplus.c: In function ‚hourlymenu‚:
./source/payplus.c:4432: warning: passing argument 2 of ‚f4assign‚ makes pointer from integer without a cast
./source/payplus.c: In function ‚salarymenu‚:
./source/payplus.c:4484: warning: passing argument 2 of ‚f4assign‚ makes pointer from integer without a cast
./source/payplus.c: In function ‚blocksigs‚:
./source/payplus.c:4534: warning: assignment from incompatible pointer type
./source/payplus.c: In function ‚get_ser_node‚:
./source/payplus.c:4743: error: storage size of ‚sys_stuff‚ isn‚t known
./source/payplus.c:4781: warning: assignment makes pointer from integer without a cast
./source/payplus.c:4817: warning: comparison between pointer and integer
./source/payplus.c:4842: warning: assignment makes pointer from integer without a cast
./source/payplus.c:4844: warning: assignment makes pointer from integer without a cast
./source/payplus.c:4846: warning: assignment makes pointer from integer without a cast
./source/payplus.c:4847: warning: assignment makes pointer from integer without a cast
./source/payplus.c:4850: warning: assignment makes pointer from integer without a cast
./source/payplus.c:4851: warning: assignment makes pointer from integer without a cast
./source/payplus.c: In function ‚gstrcmp‚:
./source/payplus.c:4901: warning: comparison between pointer and integer
./source/payplus.c:4903: warning: comparison between pointer and integer
./source/payplus.c: In function ‚showhours‚:
./source/payplus.c:4963: warning: assignment makes integer from pointer without a cast
./source/payplus.c:4964: warning: assignment makes pointer from integer without a cast
./source/payplus.c:4967: warning: comparison between pointer and integer
./source/payplus.c:4973: warning: assignment makes pointer from integer without a cast
./source/payplus.c:4974: warning: assignment makes pointer from integer without a cast
./source/payplus.c:4983: warning: assignment makes integer from pointer without a cast
./source/payplus.c:4984: warning: assignment makes pointer from integer without a cast
./source/payplus.c:4988: warning: assignment makes integer from pointer without a cast
./source/payplus.c:5001: warning: assignment makes pointer from integer without a cast
./source/payplus.c:5021: warning: assignment makes pointer from integer without a cast
./source/payplus.c:5022: warning: passing argument 1 of ‚strlen‚ from incompatible pointer type
./source/payplus.c:5034: warning: passing argument 2 of ‚strcmp‚ from incompatible pointer type
./source/payplus.c:5122: warning: assignment makes pointer from integer without a cast
 
Old 07-27-2008, 11:13 AM   #2
serconsult
LQ Newbie
 
Registered: Jul 2008
Posts: 12

Original Poster
Rep: Reputation: 0
Code Examples

lines 874 - 918 - may help to illustrate why it is complaining.


varname = substr(var, 1, eqsign-1);
if (gstrcmp(varname,"progpath") == 0)
progpath = substr(var, eqsign+1, strlen(var)-eqsign);
if (gstrcmp(varname,"datapath") == 0)
datapath = substr(var, eqsign+1, strlen(var)-eqsign);
if (gstrcmp(varname,"fcode") == 0)
mfcode = substr(var, eqsign+1, strlen(var)-eqsign);
if (gstrcmp(varname,"menutimeout") == 0)
menutimeout = substr(var, eqsign+1, strlen(var)-eqsign);
if (gstrcmp(varname,"movetimeout") == 0)
movetimeout = substr(var, eqsign+1, strlen(var)-eqsign);
if (gstrcmp(varname,"movemsg1") == 0)
movemsg1 = substr(var, eqsign+1, strlen(var)-eqsign);
if (gstrcmp(varname,"movemsg2") == 0)
movemsg2 = substr(var, eqsign+1, strlen(var)-eqsign);
if (gstrcmp(varname,"movemsg3") == 0)
movemsg3 = substr(var, eqsign+1, strlen(var)-eqsign);
if (gstrcmp(varname,"movemsg4") == 0)
movemsg4 = substr(var, eqsign+1, strlen(var)-eqsign);
if (gstrcmp(varname,"breaktimeout") == 0)
breaktimeout = substr(var, eqsign+1, strlen(var)-eqsign);
if (gstrcmp(varname,"breakmsg1") == 0)
breakmsg1 = substr(var, eqsign+1, strlen(var)-eqsign);
if (gstrcmp(varname,"breakmsg2") == 0)
breakmsg2 = substr(var, eqsign+1, strlen(var)-eqsign);
if (gstrcmp(varname,"breakmsg3") == 0)
breakmsg3 = substr(var, eqsign+1, strlen(var)-eqsign);
if (gstrcmp(varname,"breakmsg4") == 0)
breakmsg4 = substr(var, eqsign+1, strlen(var)-eqsign);
if (gstrcmp(varname,"fiscalday") == 0)
fiscalday = substr(var, eqsign+1, strlen(var)-eqsign);
if (gstrcmp(varname,"fiscalhour") == 0)
fhour = substr(var, eqsign+1, strlen(var)-eqsign);
if (gstrcmp(varname,"fiscalmin") == 0)
fmin = substr(var, eqsign+1, strlen(var)-eqsign);
if (gstrcmp(varname,"tsrdept") == 0)
tsrdept = substr(var, eqsign+1, strlen(var)-eqsign);
if (gstrcmp(varname,"hrsprecision") == 0)
hrsprecision = substr(var, eqsign+1, strlen(var)-eqsign);
if (gstrcmp(varname,"trainword") == 0)
trainword = substr(var, eqsign+1, strlen(var)-eqsign);
if (gstrcmp(varname,"paidlunch") == 0)
plunch = substr(var, eqsign+1, strlen(var)-eqsign);
if (gstrcmp(varname,"showlunch") == 0)
sholunch = substr(var, eqsign+1, strlen(var)-eqsign);
 
Old 07-27-2008, 11:36 AM   #3
jcookeman
Member
 
Registered: Jul 2003
Location: London, UK
Distribution: FreeBSD, OpenSuse, Ubuntu, RHEL
Posts: 417

Rep: Reputation: 33
First off -- Red Hat 9.2?

The code snippet you have posted -- while not very attractive -- is not in itself fatal. I only see one error in the code that should stop the compiler.

You can try -Wno-int-to-pointer-cast option suppress the warnings for the time being and try to fix the one error.

Btw, what is this application doing?
 
Old 07-29-2008, 06:49 PM   #4
serconsult
LQ Newbie
 
Registered: Jul 2008
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks for your assistance

Thanks for your help, the program compiles payroll events for a call center. It was originally deployed on a SCO UNIX system, and has subsequently followed the migration of the host product through SuSE and now RedHat.
 
Old 07-29-2008, 07:11 PM   #5
serconsult
LQ Newbie
 
Registered: Jul 2008
Posts: 12

Original Poster
Rep: Reputation: 0
Question Undefined Reference errors

So the next issue was missing libraries, which I have identified and located in /usr/lib. So, now I am getting these unresolved definition errors, like this:

undefined reference to `d4close'

I am using the following options to gcc to compile this.

gcc -w -v -L/usr/lib -DSuSE -ggdb -lpplus -lm -lc -lnsl -lcb $1.c -o $1 2> out
 
Old 07-29-2008, 08:24 PM   #6
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,310

Rep: Reputation: 2039Reputation: 2039Reputation: 2039Reputation: 2039Reputation: 2039Reputation: 2039Reputation: 2039Reputation: 2039Reputation: 2039Reputation: 2039Reputation: 2039
It would help a bit if we knew what the new system is running. As stated above, there's no such thing as RH 9.2.
They had the old RH9 (shrike) which has been discontinued/unsupported/no-updates for years.
Now we have RH Enterprise Linux (5.x ?) or RH Fedora 9.
Also, Centos do a free ver of RHEL.

Try
cat /etc/issue
uname -a

and post the results here.
 
Old 07-29-2008, 09:35 PM   #7
serconsult
LQ Newbie
 
Registered: Jul 2008
Posts: 12

Original Poster
Rep: Reputation: 0
Sorry - I was mistakenly referred to the op system by the version of the primary application running on the machine.
uname -a
Linux cps9.ct.ser.com 2.6.18-53.1.4.el5 #1 SMP Wed Nov 14 10:37:33 EST 2007 i686 i686 i386 GNU/Linux
 
Old 07-30-2008, 04:04 AM   #8
jcookeman
Member
 
Registered: Jul 2003
Location: London, UK
Distribution: FreeBSD, OpenSuse, Ubuntu, RHEL
Posts: 417

Rep: Reputation: 33
Google only shows codebase as having anything to do with that function call.
 
Old 07-30-2008, 01:10 PM   #9
serconsult
LQ Newbie
 
Registered: Jul 2008
Posts: 12

Original Poster
Rep: Reputation: 0
I am porting this code from SuSE where it ran fine and I seem to be having difficulty with my compile session seeing the libcb.a file. I have tried to put it in /usr/lib & my own directory of /u/ccsp/lib and I get the same results. I use the following command to compile my application.

gcc -w -I/u/ccsp/cb/source -L/u/ccsp/lib -DSuSE -ggdb -lpplus -lm -lc -lnsl -lcb $1.c -o $1 2> out

I created the CodeBase libraries using their script which creates object files then assembles them into a library file.

I am performing these as user 'server', though I have tried it as root as well. The source code #includes "/u/ccsp/cb/source/d4all.h" - which is the CodeBase header file. Yet the error messages would suggest it does not see one or both of these CodeBase files needed to define these functions.

Suggestions ... anyone?
 
Old 07-30-2008, 01:15 PM   #10
serconsult
LQ Newbie
 
Registered: Jul 2008
Posts: 12

Original Poster
Rep: Reputation: 0
Additional Information:

Initially I was missing the libcb.a file and it has now been created, as mentioned above. The error messages I am getting now are as follows.

Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux
Thread model: posix
gcc version 4.1.2 20070626 (Red Hat 4.1.2-14)
/usr/libexec/gcc/i386-redhat-linux/4.1.2/cc1 -quiet -v -I/u/ccsp/cb/source -DSuSE payplus.c -quiet -dumpbase payplus.c -mtune=generic -auxbase payplus -ggdb -w -version -o /tmp/cccn0cKt.s
ignoring nonexistent directory "/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../i386-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
/u/ccsp/cb/source
/usr/local/include
/usr/lib/gcc/i386-redhat-linux/4.1.2/include
/usr/include
End of search list.
GNU C version 4.1.2 20070626 (Red Hat 4.1.2-14) (i386-redhat-linux)
compiled by GNU C version 4.1.2 20070626 (Red Hat 4.1.2-14).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 6f8a93af44427a05901e7b3a98a7b357
as -V -Qy -o /tmp/ccaId5l9.o /tmp/cccn0cKt.s
GNU assembler version 2.17.50.0.6-5.el5 (i386-redhat-linux) using BFD version 2.17.50.0.6-5.el5 20061020
/usr/libexec/gcc/i386-redhat-linux/4.1.2/collect2 --eh-frame-hdr -m elf_i386 --hash-style=gnu -dynamic-linker /lib/ld-linux.so.2 -o payplus /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crt1.o /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crti.o /usr/lib/gcc/i386-redhat-linux/4.1.2/crtbegin.o -L/u/ccsp/lib -L/usr/lib/gcc/i386-redhat-linux/4.1.2 -L/usr/lib/gcc/i386-redhat-linux/4.1.2 -L/usr/lib/gcc/i386-redhat-linux/4.1.2/../../.. -lpplus -lm -lc -lnsl -lcb /tmp/ccaId5l9.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/i386-redhat-linux/4.1.2/crtend.o /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crtn.o
/tmp/ccaId5l9.o: In function `main':
/u/ccsp/timet/source/payplus.c:596: undefined reference to `alltrim'
/u/ccsp/timet/source/payplus.c:609: undefined reference to `code4initLow'
/u/ccsp/timet/source/payplus.c:671: undefined reference to `code4initUndo'
/u/ccsp/timet/source/payplus.c:686: undefined reference to `substr'
/u/ccsp/timet/source/payplus.c:784: undefined reference to `code4initUndo'
/tmp/ccaId5l9.o: In function `getlastcamp':
/u/ccsp/timet/source/payplus.c:825: undefined reference to `d4tag'
/u/ccsp/timet/source/payplus.c:826: undefined reference to `d4tagSelect'
/u/ccsp/timet/source/payplus.c:828: undefined reference to `d4seek'
/u/ccsp/timet/source/payplus.c:831: undefined reference to `d4field'
/u/ccsp/timet/source/payplus.c:832: undefined reference to `d4field'
/u/ccsp/timet/source/payplus.c:833: undefined reference to `d4field'
/u/ccsp/timet/source/payplus.c:834: undefined reference to `d4field'
/u/ccsp/timet/source/payplus.c:835: undefined reference to `f4str'
/u/ccsp/timet/source/payplus.c:835: undefined reference to `u4ncpy'
/u/ccsp/timet/source/payplus.c:838: undefined reference to `f4str'
/u/ccsp/timet/source/payplus.c:838: undefined reference to `u4ncpy'
...(1000 more references all codebase - ending with)
/u/ccsp/timet/source/payplus.c:5202: undefined reference to `d4close'
collect2: ld returned 1 exit status
 
Old 07-30-2008, 01:41 PM   #11
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,420

Rep: Reputation: 1157Reputation: 1157Reputation: 1157Reputation: 1157Reputation: 1157Reputation: 1157Reputation: 1157Reputation: 1157Reputation: 1157
Here's a general strategy:
  1. Most applications are built by means of Makefiles, which are often constructed by a script called configure. Do you find a "configure" script? If so, you should run it: the voodoo is ./configure. Then: make.
  2. If you see files like configure.in, aclocal.m4 or something equally-strange, write back here. (And see: man automake)
  3. Many programs, especially older ones, compile in spite of hundreds of warning messages. This just means that they were carelessly-written.
  4. If you're getting "undefined reference" errors late in a build, see if there was a "missing file" error earlier. For instance:
    Code:
    ignoring nonexistent directory:
     "/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../i386-redhat-linux/include"
    (Where did that directory-path come from? Did it come from a "configure" script that you didn't run?
  5. If you are still getting them, look in the source-code, on-line and so forth to figure out what and where the missing routines actually are, where they should come from, and what they do.
  6. Let the knowledge that "this program compiled and ran before" be your guide. This problem is basically going to be environmental.
 
Old 07-31-2008, 04:28 AM   #12
jcookeman
Member
 
Registered: Jul 2003
Location: London, UK
Distribution: FreeBSD, OpenSuse, Ubuntu, RHEL
Posts: 417

Rep: Reputation: 33
The line
Code:
#include "/u/ccsp/cb/source/d4all.h"
most likely should read
Code:
#include <d4all.h>
The use of "" versus <> in an include only differs in the fact it checks the directory of the current source file for that file to be included. If it cannot find it, then it checks the normal/specified directories of libraries.

I assume the Codebase configure and installation that created the shared libraries and/or archive files has already updated ld. Since this is a RHEL5 box, check /etc/ld.so.conf.d/ for an entry from Codebase and look at the ld cache by '/sbin/ldconfig -p'.

If those entries are not there, then you will need to add them as well.

Cheers
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Porting DOS program to Linux. I have the C source code ... Micro420 Programming 8 04-19-2008 08:36 AM
Fedora & redhat How similar? [porting Fedora install script to Redhat] Four Linux - General 1 02-21-2008 06:56 PM
Suse 10.1 - Different Program Compiling issues crazibri Suse/Novell 1 06-17-2006 12:59 AM
porting issues from solaris to linux vinod_indus Programming 2 09-12-2005 12:05 PM
porting applications from suse to redhat mehtabhi Linux - Distributions 1 01-22-2003 12:52 AM


All times are GMT -5. The time now is 06:42 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration