PiRSquared17 / aparapi

Automatically exported from code.google.com/p/aparapi
Other
0 stars 0 forks source link

build.xml does not build the the shared library (aparapi_x86.so or aparapi_x86_64.so) #43

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Follow the build instruction here: 
https://code.google.com/p/aparapi/wiki/DevelopersGuideLinux

What is the expected output? What do you see instead?
According to the wiki the expected output includes 4 things:
    aparapi.jar containing Aparapi classes for all platforms.
    the shared library for your platform (aparapi_x86.so or aparapi_x86_64.so).
    an /api subdirectory containing the 'public' javadoc for Aparapi.
    a samples directory containing the source and binaries for the mandel and squares sample projects. 

I get everything except the shared library.

What version of the product are you using? On what operating system?
aparapi r388, Ubuntu 11.10 64-bit, Java 7
g++ v4.6.1, ant v1.8.2

Original issue reported on code.google.com by alex.kar...@gmail.com on 2 Apr 2012 at 10:12

GoogleCodeExporter commented 9 years ago
Alex do you get any errors during the build?

In the com.amd.aparapi.jni/build.xml

You will see this target

<target name="gcc" if="use.gcc">
          <mkdir dir="${basedir}/dist"/>
      <echo message="linuxcc ${os.arch}" />
      <exec executable="g++">
         <arg value="-O3" />
         <arg value="-g" />
         <arg value="-fPIC" />
         <arg value="-I${java.home}/../include" />
         <arg value="-I${java.home}/../include/linux" />
         <arg value="-Iinclude" />
         <arg value="-I${amd.app.sdk.dir}/include" />
         <arg value="-shared" />
         <arg value="-o" />
         <arg value="${basedir}/dist/libaparapi_${x86_or_x86_64}.so" />
         <arg value="src/cpp/aparapi.cpp" />
         <arg value="-L${amd.app.sdk.dir}/lib/${x86_or_x86_64}" />
         <arg value="-lOpenCL" />
      </exec>
   </target> 

Can you add say 
   <echo message="COMPILING WITH GCC!!!!!!"/>

After the line
<target name="gcc" if="use.gcc">

I want to just check that ant is at leas attempting to do the right thing.

Gary

Original comment by frost.g...@gmail.com on 2 Apr 2012 at 2:51

GoogleCodeExporter commented 9 years ago
I added the line and then i ran:
ant clean build dist | grep GCC

This gives 2 hits when building:
     [echo] COMPILING WITH GCC!!!!!!
     [exec] Result: 1
     [echo] COMPILING WITH GCC!!!!!!
     [exec] Result: 1

As for errors, running:
ant clean build dist | grep error

Gives:
     [exec] src/cpp/aparapi.cpp:291:7: error: ‘boolean’ does not name a type
     [exec] src/cpp/aparapi.cpp:891:17: error: ‘class ProfileInfo’ has no member named ‘valid’
     [exec] src/cpp/aparapi.cpp:1032:33: error: ‘class ProfileInfo’ has no member named ‘valid’
     [exec] src/cpp/aparapi.cpp:1033:34: error: ‘class ProfileInfo’ has no member named ‘valid’
     [exec] src/cpp/aparapi.cpp:1883:69: error: ‘class ProfileInfo’ has no member named ‘valid’
     [exec] src/cpp/aparapi.cpp:1898:65: error: ‘class ProfileInfo’ has no member named ‘valid’
     [exec] Result: 1
     [exec] src/cpp/aparapi.cpp:291:7: error: ‘boolean’ does not name a type
     [exec] src/cpp/aparapi.cpp:891:17: error: ‘class ProfileInfo’ has no member named ‘valid’
     [exec] src/cpp/aparapi.cpp:1032:33: error: ‘class ProfileInfo’ has no member named ‘valid’
     [exec] src/cpp/aparapi.cpp:1033:34: error: ‘class ProfileInfo’ has no member named ‘valid’
     [exec] src/cpp/aparapi.cpp:1883:69: error: ‘class ProfileInfo’ has no member named ‘valid’
     [exec] src/cpp/aparapi.cpp:1898:65: error: ‘class ProfileInfo’ has no member named ‘valid’
     [exec] Result: 1

Original comment by alex.kar...@gmail.com on 2 Apr 2012 at 3:06

GoogleCodeExporter commented 9 years ago
Alex,

Thanks for reporting, our MacOS users noted this a few weeks ago, but I assumed 
it
was a MacOS fix only.  Apologies,  let me check in a fix.

The type should be 'bool' not 'boolean' at line 291 of  src/cpp/aparapi.cpp.

I will make the change in SVN.

Were you syncing with SVN? or using the zip download?

Thank you for reporting, this was my bad. Clearly I need to build on
linux more frequently.

Gary

Original comment by frost.g...@gmail.com on 2 Apr 2012 at 3:29

GoogleCodeExporter commented 9 years ago
I am syncing with SVN.
Thanks for the quick response :).
I will be building on linux frequently so I will also be reporting bugs on 
linux. 

Original comment by alex.kar...@gmail.com on 2 Apr 2012 at 3:44

GoogleCodeExporter commented 9 years ago
I just made the change.  Actually the type should have been jboolean.

If you sync with r390 (the latest) you should be good to go. 

Thanks for keeping me honest :)

Original comment by frost.g...@gmail.com on 2 Apr 2012 at 3:57

GoogleCodeExporter commented 9 years ago

Original comment by frost.g...@gmail.com on 2 Apr 2012 at 4:06

GoogleCodeExporter commented 9 years ago
Confirming fixed in r390.

Original comment by alex.kar...@gmail.com on 2 Apr 2012 at 4:10