Hi all,

Have successfully compiled on Ubuntu using the following settings
(haven't tested yet as I'm waiting for an XP license key).

VIX_HOME, VIX_INCLUDE and JAVA_HOME as follows:

[EMAIL PROTECTED]:~/capture-server-2.0.0-5601-src$ export | grep VIX
declare -x VIX_INCLUDE="/usr/include/vmware-vix/"
declare -x VIX_LIB="/usr/lib/vmware-vix"
[EMAIL PROTECTED]:~/capture-server-2.0.0-5601-src$ export | grep JAVA
declare -x JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.03"

compile_jni_linux.sh needs to become executable, and the library name
seems to be libvix.so on my copy of Ubuntu(?)

#!/bin/sh
echo $VIX_INCLUDE
gcc -I $JAVA_HOME/include -I $JAVA_HOME/include/linux -I $VIX_INCLUDE
VMwareServerExt.c -c -g
#gcc -shared $VIX_LIB/libvmware-vix.so VMwareServerExt.o -o
libVMwareServerExt.so -ldl
gcc -shared /usr/lib/vmware-vix/lib/libvix.so VMwareServerExt.o -o
libVMwareServerExt.so -ldl

ant didn't seem to like the if clauses in ant's build.xml, so I simply
deleted the if,else and the Windows branches to leave the Linux branch
- this is attached. I don't know ant very well - I'm sure there is a
better fix here.

This may have been a packaged Ubuntu version of vmware-server, which
might account for the library having a different name.

I think I also added the following symlink while I was trying to get
this running last time:

[EMAIL PROTECTED]:~/capture-server-2.0.0-5601-src/rel$ ls -l
lrwxrwxrwx 1 root root 24 2007-09-19 19:10
/usr/lib/vmware-vix/lib/libvmware-vix.so.0 -> server-1/32bit/libvix.so

Hope this helps,
 Jamie

On 09/02/2008, Critical Bill <[EMAIL PROTECTED]> wrote:
> Damn, getting close. Thanks again for the assistance, Christian.
>
> 1. Java version was corrected.
>
> root:/etc/capture-server-2.0.0-5601-src# java -version
> java version "1.6.0_04"
>
> Java(TM) SE Runtime Environment (build 1.6.0_04-b12)
> Java HotSpot(TM) Server VM (build 10.0-b19, mixed mode)
>
> 2. I believe I have all the variables set correctly,
>
> root:/etc/capture-server-2.0.0-5601-src# echo $JAVA_HOME
>
> /usr/lib/j2sdk1.6-sun
>
> root:/etc/capture-server-2.0.0-5601-src# echo $VIX_LIB
> /usr/lib
>
> root:/etc/capture-server-2.0.0-5601-src# echo $VIX_INCLUDE
> /usr/include/vmware-vix/
>
> Didn't know where to set VIX_HOME
>
>
> root:/etc/capture-server-2.0.0-5601-src# echo $ANT_HOME
> /usr/share/ant
>
>
> 3. Here's the error I'm getting now
>
> ========================================
> [EMAIL PROTECTED]:/etc/capture-server-2.0.0-5601-src# ant
>
> Buildfile: build.xml
>  [taskdef] Could not load definitions from resource
> net/sf/antcontrib/antcontrib.properties. It could not be
> found.
>
> clean:
>  [delete] Deleting directory /etc/capture-server-2.0.0-5601-src/build
>
>  [delete] Deleting directory /etc/capture-server-2.0.0-5601-src/release
>
> init:
>  [mkdir] Created dir: /etc/capture-server-2.0.0-5601-src/build
>  [mkdir] Created dir: /etc/capture-server-2.0.0-5601-src/release
>
>
> compile:
>  [javac] Compiling 27 source files to
> /etc/capture-server-2.0.0-5601-src/build
>  [javac]
> /etc/capture-server-2.0.0-5601-src/capture/ClientFileReceiver.java:9:
> warning: sun.misc.BASE64Decoder is Sun proprietary API and may be removed in
> a future release
>
>  [javac] import sun.misc.BASE64Decoder;
>  [javac] ^
>  [javac]
> /etc/capture-server-2.0.0-5601-src/capture/ClientFileReceiver.java:42:
> warning: sun.misc.BASE64Decoder is Sun proprietary API and may be removed in
> a future release
>
>  [javac] BASE64Decoder base64 = new BASE64Decoder();
>  [javac] ^
>  [javac]
> /etc/capture-server-2.0.0-5601-src/capture/ClientFileReceiver.java:42:
> warning: sun.misc.BASE64Decoder is Sun proprietary API and may be removed in
> a future release
>
>  [javac] BASE64Decoder base64 = new BASE64Decoder();
>  [javac] ^
>  [javac] 3 warnings
>
> BUILD FAILED
> /etc/capture-server-2.0.0-5601-src/build.xml:28: Problem: failed to create
> task or type if
>
> Cause: The name is undefined.
> Action: Check the spelling.
> Action: Check that any custom tasks/types have been declared.
> Action: Check that any <presetdef>/<macrodef> declarations have taken place.
>
>
>
> Total time: 2 seconds
> ========================================
>
> Here's the snippet of build.xml where it's erroring out
>
>  <!-- Compile the jni code -->
>  <if> <---- line 28
>  <equals arg1="${os}" arg2="windows" />
>
>  <then>
>  <exec executable="compile_jni_win32.bat"/>
>  </then>
>  <else>
>  <exec command="sh" executable="./compile_jni_linux.sh"/>
>
>  </else>
>  </if>
>
>
>
>
>
>
>
>
> _______________________________________________
> Capture-HPC mailing list
> [email protected]
> https://public.honeynet.org/mailman/listinfo/capture-hpc
>
>


-- 
Jamie Riden / [EMAIL PROTECTED] / [EMAIL PROTECTED]
UK Honeynet Project: http://www.ukhoneynet.org/
<?xml version="1.0"?>
<project name="CaptureServer" default="release" basedir=".">
	<!-- all stuff to get the jni wrapper compiled -->
	<taskdef resource="net/sf/antcontrib/antcontrib.properties"/>

	<condition property="os" value="unix">
        <os family="unix"/>
    </condition>
    <condition property="os" value="windows">
        <os family="windows"/>
    </condition>

	 <property environment="env"/>
     <property name="src" value="."/>
     <property name="build" value="build"/>
     <property name="release" value="release"/>
	 
     <target name="init">
          <mkdir dir="${build}"/>
		  <mkdir dir="${release}"/>
	 </target>

     <target name="compile" depends="init">
          <!-- Compile the java code -->         
          <javac srcdir="${src}" destdir="${build}" debug="true" debuglevel="lines,vars,source"/>
		  
		  <!-- Compile the jni code -->

		  <exec command="sh" executable="./compile_jni_linux.sh"/>

		  
     </target>
	 
	 <target name="jar" depends="compile">
        <mkdir dir="${build}/jar"/>
        <jar destfile="${build}/jar/CaptureServer.jar" basedir="${build}">
            <manifest>
                <attribute name="Main-Class" value="capture.Server"/>
            </manifest>
        </jar>
    </target>
	
	<target name="release" depends="clean,compile,jar">
		<copy file="${build}/jar/CaptureServer.jar" todir="${release}"/>
		<copy file="./COPYING" todir="${release}"/>
		<copy file="./Readme.txt" todir="${release}"/>
		<copy file="./input_urls_example.txt" todir="${release}"/>
		<copy file="./config.xsd" todir="${release}"/>
		<copy file="./config.xml" todir="${release}"/>
		
				    <copy file="./libVMwareServerExt.so" todir="${release}"/>
		
		<zip destfile="./CaptureServer-Release.zip" basedir="release"/>
	</target>

	<target name="clean">
        <delete dir="${build}"/>
		<delete dir="${release}"/>
		<delete>
			<fileset dir="." includes="VMwareServerExt.???"/>
			<fileset dir="." includes="CaptureServer-Release.zip"/>
		</delete>
    </target>
</project>
_______________________________________________
Capture-HPC mailing list
[email protected]
https://public.honeynet.org/mailman/listinfo/capture-hpc

Reply via email to