Visit Our UNIX and Linux User Community

Error when running the make command

Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Error when running the make command
# 1  
Old 03-12-2003
Data Error when running the make command

Not really sure whether this question should go to this forum but am giving it a shot.

I have compiled a simple C program test.c.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static int a;
int test()
return a;

When I run a make command, I get this:

--- This is the command -----
$ /usr/ccs/bin/make -f extproc_nocallback OBJS=test.o

-----Output ---------------------

/usr/ccs/bin/ld -G -z text -L/u01/app/oracle/product/9.0.1/lib -R/u01/app/oracle
/product/9.0.1/lib -o test.o
Text relocation remains referenced
against symbol offset in file
a 0x4 test.o
a 0x8 test.o
a 0xc test.o
a 0x10 test.o
a 0x20 test.o
a 0x24 test.o
ld: fatal: relocations remain against allocatable but non-writable sections
*** Error code 1
make: Fatal error: Command failed for target `extproc_nocallback'


I am using Sun Solaris 2.8.

Can anyone pl suggest what might be wrong.
# 2  
Old 03-12-2003
you need to compile it with the 'cc' command.
so youd type
cc test.c

however iwould suggest naming the program something other than test, because there already exists a command 'test'. you can keep the name as test if youd like, but you will need to make sure you have the ./ infront of the command ./test. but if you just use the command cc test.c it is ok, the binary will be there as a.out and not test, unless you specify it.
# 3  
Old 03-25-2003
test() is not an entry point for the executable.

you must call it main() if you intend to run it as an executable. otherwise, include the header file for test (test.h) in your main program and call the function from there.

Previous Thread | Next Thread
Test Your Knowledge in Computers #634
Difficulty: Easy
The first iPhone featured an internal rechargeable nickel cadmium battery.
True or False?

10 More Discussions You Might Find Interesting

1. AIX

I'm facing problem with rpm command, when running the command and appears this error:

exec(): 0509-036 Cannot load program /usr/opt/freeware/bin/rpm because of the following errors: 0509-022 Cannot load module /opt/freeware/lib/libintl.a( 0509-150 Dependent module /opt/freeware/lib/libiconv.a(shr4.o) could not be loaded. 0509-152 Member... (4 Replies)
Discussion started by: Ohmkar
4 Replies

2. Programming

'Make' command error in olsr

Hi guys..i'm a newbie here and i really need your help urgently..currently i want to run a 'make' command in Ubuntu..But this error occurs: gcc -Wall -Wextra -Wold-style-definition -Wdeclaration-after-statement -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Waggregate-return... (5 Replies)
Discussion started by: naz1406
5 Replies

3. Shell Programming and Scripting

Getting syntax error while running awk command

Hello Gurus, I am firing the below command : df -g | grep -v var| awk '{ (if $4 > 90% ) print "Filesystem", $NF,"over sized";}' But I am getting the below error:- ====== syntax error The source line is 1. The error context is {if ($4 > >>> 90%) <<< awk: The... (9 Replies)
Discussion started by: pokhraj_d
9 Replies

4. Shell Programming and Scripting

Running rename command on large files and make it faster

Hi All, I have some 80,000 files in a directory which I need to rename. Below is the command which I am currently running and it seems, it is taking fore ever to run this command. This command seems too slow. Is there any way to speed up the command. I have have GNU Parallel installed on my... (6 Replies)
Discussion started by: shoaibjameel123
6 Replies

5. UNIX for Dummies Questions & Answers

error while running nm command

I am running nm for a file. the command is nm -f libC.a but it gives below error nm: libC.a: 0654-203 Specify an XCOFF object module. any solution ? Please use and tags when posting code, data or logs etc. to preserve formatting and enhance readability, thanks. (2 Replies)
Discussion started by: yatrik007
2 Replies

6. AIX

Error running the history command

When I try to run the history command from the prompt i get the following error: $ history ksh: cd: 0403-011 The specified substitution is not valid for this command. ON running history with a parameter I get the following $ history -10 ksh: cd: 0403-008 The number of parameters... (6 Replies)
Discussion started by: meetzap
6 Replies

7. Shell Programming and Scripting

make Fatal error: Command failed for target 'exp_inter.o'

I am trying to install Expect 5.43 on my Solaris 10 x86 PC. When I run the make file I get - Command failed for target 'exp_inter.o'. I tried to find the file (find / -name exp_inter.o -print 2>/dev/null) but could not. Where can I get this file from? (2 Replies)
Discussion started by: pazzy
2 Replies

8. Programming

Error while running C++ make file

The problem is that the original program was compiled using v5.0 MQ client but now we are using MQ client v5.3. Had modified the "make file" options as follows but still i could see the errors. #CLIENT_V5_LIBS = -limqb23ss -limqc23ss -lmqic -lmqmcs -lnsl -ldl CLIENT_V5.3_LIBS =... (1 Reply)
Discussion started by: hram
1 Replies

9. Programming

Error when running make

Hi , I get the following error when i run the make command. cc -Aa -DUNIX -osrcmpmn srcmpmn.c crt0: ERROR couldn't open /usr/lib/ errno:000000014 *** Error exit code 14 here the file is C program which has been modified. Please help. (1 Reply)
Discussion started by: shashidhara_01
1 Replies

10. UNIX for Dummies Questions & Answers

Solaris 9: make: Fatal error:Command failed for target

Hi everyone first of all you should know that I've been working with solaris for a few days only. :) I need to install some programs and I have had the following troubles: 1. When I used /.configure it showed the following message: "no acceptable C compiler found in $PATH" I included... (2 Replies)
Discussion started by: eldiego
2 Replies

Featured Tech Videos