LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Compilation Issues x86_64 (rocksaw) (http://www.linuxquestions.org/questions/linux-software-2/compilation-issues-x86_64-rocksaw-552896/)

w3bd3vil 05-10-2007 11:00 AM

Compilation Issues x86_64 (rocksaw)
 
Hello,

I have been trying to compile a program named Rocksaw
http://www.savarese.org/software/rocksaw/index.html

the file is this
http://www.savarese.org/downloads/ro...5.0-src.tar.gz

Under the /src/jni folder
there is a make file.

when I run the make command I get the following error
Quote:

[root@localhost jni]# make
gcc -ansi -Wall -O2 -pipe -pthread -D_REENTRANT -fpic -I/include -I -c RawSocket.c -o RawSocket.o
/usr/lib/gcc/i386-redhat-linux/4.1.1/../../../crt1.o: In function `_start': undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [RawSocket.o] Error 1
[root@localhost jni]#
Could someone help me with the problem.

This program has a single c file.
I would be glad if someone could compile this prog. on a 64bit system and give me the compiled librocksaw.so file. Like its urgent...thanks!

osor 05-10-2007 11:35 AM

First off, that package looks like it was intended to be compiled with “ant” from the top-level directory (though it also looks as if you can compile the C portion of the library by manually descending to src/jni and running make as you did). Second, have you tried doing the linking manually? I.e., after the Makefile creates RawSocket.o, try doing
Code:

$ gcc -shared -o librocksaw.so RawSocket.o
If that doesn’t work, try
Code:

$ ld -shared -o librocksaw.so RawSocket.o

w3bd3vil 05-10-2007 02:53 PM

the ant part is used for the java compilation. you can compile the C portion alone.
anyhow, I dont think I am getting any RawSocket.o file after the make command. OR I guess I didnt understand what you mean.

osor 05-10-2007 06:28 PM

Oh, I see the problem now. You need to have JDK_HOME set and exported so that it can be used by the Makefile.

w3bd3vil 05-10-2007 08:55 PM

lol, sometimes reading the README file carefully sorts everything out. Thanks for the pointer :D


All times are GMT -5. The time now is 05:02 AM.