Problem With exceutable file creation


 
Thread Tools Search this Thread
Operating Systems HP-UX Problem With exceutable file creation
# 1  
Old 03-06-2009
Problem With exceutable file creation

Hello ,

I came up with a new problem during creation of an exceutable file.

My application all the c files and links them to create a new executable file. Till last month everything was fine and yester day i tried to change one file and tried to create an exe file but unsuccesfull. I am facing an error during linking.

*** ERROR exit code 1 : This is the error i am getting now.

I tried to compile with my original version of code and same problem .

Just to crossverify, i have created a small file called HelloWorld.c and tried to cretae exe and evrything going fine till linking but i dont see any exe cretaed .
It is creating only .o file.



i verified disk space and i dont see nay problem .


Any idea , What could be the problem.

I am using CC to compile.
# 2  
Old 03-06-2009
Code:
cc -v HelloWorld.c

Will give you a lot more information about what is causing the error.
# 3  
Old 03-06-2009
Hello Jim,


Here is the output :


bosdf9d1:root /opt/ansic/bin/cc -v myfile1.c -o ./hello
cc: CCOPTS is not set.
/opt/langtools/lbin/cpp myfile1.c /var/tmp/ctmAAAa13889 -$ -D__hp9000s800 -D__hppa -D__hpux -D__unix -D_PA_RISC1_1 -D__CLASSIC_C__ -j
cc: Entering Preprocessor.
/opt/ansic/lbin/ccom /var/tmp/ctmAAAa13889 myfile1.o -Oq00,al,ag,cn,Lm,sz,Ic,vo,lc,mf,Po,es,rs,sp,in,vc,pi,fa,pe,Rr,Fl,pv,pa,nf,cp,lx,st,ap,Pg,ug,lu,dp,fs ,bp,wp! -Ac
cc: LPATH is /usr/lib/pa1.1:/usr/lib:/opt/langtools/lib:
/usr/ccs/bin/ld /opt/langtools/lib/crt0.o -u main myfile1.o -o ./hello -lc
cc: Entering Link editor.


I dont see any error here
fyi:

myfile1.c:


#include<stdlib.h>

int main()
{

/*printHello();*/
printf("Hello World\n");

return 0;
}
# 4  
Old 03-06-2009
OK...
Code:
$ cc -v ./myfile1.c -o ./hello
cc: informational note 404: NLSPATH is /opt/ansic/lib/nls/msg/%L/%N.cat:/opt/ansic/lib/nls/msg/C/%N.cat:
cc: informational note 404: INCLUDIR is INCLUDIR=/usr/include
cc: informational note 404: CCOPTS is not set.
/opt/langtools/lbin/cpp.ansi ./myfile1.c /var/tmp/ctmAAAa06677 -$ -D__hp9000s800 -D__hppa -D__hpux -D__unix -D_ILP32 -e -D_PA_RISC2_0 -D_HPUX_SOURCE -D__STDC_EXT__ -D__HP_cc=111104  
cc: informational note 411: Entering Preprocessor.
/opt/ansic/lbin/ccom /var/tmp/ctmAAAa06677 myfile1.o -F./myfile1.c -Oq00,al,ag,cn,Lm,sz,Ic,vo,lc,mf,Po,es,rs,sp,in,vc,pi,fa,pe,Rr,Fl,pv,pa,nf,cp,lx,st,ap,Pg,ug,lu,lb,uj,dp,fs,bp,wp,Ex,mp,rp,ap,dn,Sg,pt,kt,Em,pc,np! -ESconstlit -Ae  
cc: informational note 404: LPATH is /usr/lib:/opt/langtools/lib:
/usr/ccs/bin/ld /opt/langtools/lib/crt0.o myfile1.o -o ./hello -u main -lc  
cc: informational note 413: Entering Link editor.
$ ll
total 4508692
drwxr-xr-x   3 root       sys           6144 May 20  2008 080520
-rw-rw-r--   1 vbe        bin        2296334520 Jun 26  2008 VBMAX.G0006V00
-rwxrwxrwx   1 vbe        bin        12066955 Nov 13 19:47 c3201231_tsmadminref4aix.pdf
-rwxrwxrwx   1 vbe        bin          20480 Mar  6 18:21 hello
drwxr-xr-x   2 root       root            96 Dec  5  2007 lost+found
drwxrwxrwx   2 vbe        bin             96 Feb  6 17:02 more_storage
-rw-rw-rw-   1 vbe        bin             89 Mar  6 18:21 myfile1.c
.
.
$ hello
Hello World

compiling myfile1.c to generate a executabe file called hello works fine...
What is your issue then? With what you gave I see no
# 5  
Old 03-06-2009
o/p from my hp_ux box:


bosdf9d1:root cc -v ./myfile1.c -o ./hello
cc: CCOPTS is not set.
/opt/langtools/lbin/cpp ./myfile1.c /var/tmp/ctmAAAa14941 -$ -D__hp9000s800 -D__hppa -D__hpux -D__unix -D_PA_RISC1_1 -D__CLASSIC_C__ -j
cc: Entering Preprocessor.
/opt/ansic/lbin/ccom /var/tmp/ctmAAAa14941 myfile1.o -Oq00,al,ag,cn,Lm,sz,Ic,vo,lc,mf,Po,es,rs,sp,in,vc,pi,fa,pe,Rr,Fl,pv,pa,nf,cp,lx,st,ap,Pg,ug,lu,dp,fs ,bp,wp! -Ac
cc: LPATH is /usr/lib/pa1.1:/usr/lib:/opt/langtools/lib:
/usr/ccs/bin/ld /opt/langtools/lib/crt0.o -u main myfile1.o -o ./hello -lc
cc: Entering Link editor.

bosdf9d1:root hello
sh: hello: not found.

Only exe file was not created
# 6  
Old 03-06-2009
with ls :


bosdf9d1:root cc -v ./myfile1.c -o ./hello
cc: CCOPTS is not set.
/opt/langtools/lbin/cpp ./myfile1.c /var/tmp/ctmAAAa14969 -$ -D__hp9000s800 -D__hppa -D__hpux -D__unix -D_PA_RISC1_1 -D__CLASSIC_C__ -j
cc: Entering Preprocessor.
/opt/ansic/lbin/ccom /var/tmp/ctmAAAa14969 myfile1.o -Oq00,al,ag,cn,Lm,sz,Ic,vo,lc,mf,Po,es,rs,sp,in,vc,pi,fa,pe,Rr,Fl,pv,pa,nf,cp,lx,st,ap,Pg,ug,lu,dp,fs ,bp,wp! -Ac
cc: LPATH is /usr/lib/pa1.1:/usr/lib:/opt/langtools/lib:
/usr/ccs/bin/ld /opt/langtools/lib/crt0.o -u main myfile1.o -o ./hello -lc
cc: Entering Link editor.

bosdf9d1:root ls -ltr
total 4
-rw-r----- 1 root sys 102 Mar 6 11:36 myfile1.c
-rw-r----- 1 root sys 744 Mar 6 11:36 myfile1.o

bosdf9d1:root hello
sh: hello: not found.

bosdf9d1:root
# 7  
Old 03-06-2009
I didnt do more than just (as vbe, not root) in my wks directory (I kill whoever I find messing up what is in /opt...( the standard is "should be seen as read only FS" remember...) copy paste your myfile1.c and compiled it there in one of my working directories...
Are you missing some (transition) links? As you are using ANSIC compiler that is optional (and $$) with many links such as :
Code:
ant:/home/vbe $ ll /usr/bin/cc
lrwxr-xr-t   1 root       sys             17 Jun 23  2003 /usr/bin/cc -> /opt/ansic/bin/cc

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

File creation problem

I am creating a file to store data, but the file does not get created at all. #include <unistd.h> #define DEFAULT_ID 0 int main() { int d, n=0; int sz, data=0; char fn; char *bv; snprintf(fn, 256, "bv", DEFAULT_ID); bv=fn; printf("%s\n", bv); if ((d =... (4 Replies)
Discussion started by: powyama
4 Replies

2. Shell Programming and Scripting

Text file creation problem

Using KSH, I have one text file which just contains a list of distinct references on each line, e.g.; 123456789 987654321 15457544X 164450200 etc. The file will always be called "InputRefs.txt". The number of distinct refs will be different each time. For each line (distinct ref) I... (1 Reply)
Discussion started by: b.hamilton
1 Replies

3. Programming

problem with xsd file creation

Hi every one, I am new to xml data files,I have two xml files with same data but only small difference as shown below <List> <number>1101</number> <Area>inner walls in a room.</Area> <Detection>less pressure.</Detection> <reason> <normal> <Component Num="15"... (1 Reply)
Discussion started by: veerubiji
1 Replies

4. AIX

User creation problem

Hi, I am getting tired in creating several users in a day. Can anyone have a script to create several users in the same server, as well as, to create one user in several servers. where i have to put script and how to run the script. Waiting for your reply. Thanks in advance (5 Replies)
Discussion started by: udtyuvaraj
5 Replies

5. Shell Programming and Scripting

File Creation Problem

I recently got a problem with a program. It said that Create a file using shell script and insert details in it and take a String from the user and see whether it matches with any of the details of the String. I know how to create a file, insert details, but hw to check whether the String matches... (2 Replies)
Discussion started by: ramj
2 Replies

6. UNIX for Dummies Questions & Answers

Help NEEDED urgently on exceutable file

Hi , i amtrying to execute a file called bcs_maint which is the final executable for our project. Normally on some other servers ican execute it by just typing bcs_maint. yesterday i got a new worksattion for me and when i do the same it says /sbin/sh: bcs_maint : not found. What... (5 Replies)
Discussion started by: jagan_kalluri
5 Replies

7. Solaris

File creation problem

Hi to all, I am facing a strange problem on the Solaris-10 server. I am unable to create/write files on the server. After writing, when I go for the save, then it gives me and 'jag: I/O error'..where 'jag' is a file name. Please suggest me... Regards, Jagdish Machhi (2 Replies)
Discussion started by: jagdish.machhi@
2 Replies

8. Shell Programming and Scripting

Directory Creation problem

Hiiii, here is my script-- BackupLocation="$OPTARG" if ]; then echo "Either option l or L should be given to $Programname" echo "$Usage" echo "$Programname is terminated" ... (1 Reply)
Discussion started by: namishtiwari
1 Replies

9. Shell Programming and Scripting

problem with link creation!!!!

I have a home directory namely /pto/ppa/ridbmw/etl/ Now i have various directorys below the home directory. For eg from the home directory if i say cd /roddata it changes to that directory. I think its kind of link (I don't know if it's hard or soft). Now i need to create a new directory and... (4 Replies)
Discussion started by: dsravan
4 Replies

10. UNIX for Dummies Questions & Answers

user creation problem

hello, Actually I want to create a user for our brower based custom application for the mail access from our mailserver(linux). I create user dummy and I granted all the privileages to dummy user and made dummy equivelent to root and if I tried to create a another user logging as dummy ... (1 Reply)
Discussion started by: jarkvarma
1 Replies
Login or Register to Ask a Question