Hi all,

I finally managed to compile pocl and pass all the test.

I think other people might have the same problem, so I wrote down what I
did:

1. I had to patch "lib/Target/HSAIL/BRIGAsmPrinter/BRIGAsmPrinter.cpp" at
LLVM HSAIL Stable 3.7. The patch file provided by POCL is incomplete;

2. I added -fPIC as an extract flag to compile libhsail.a and libncurses.a
3. I configured POCL as

../configure --with-hsa-runtime-dir=[PATH_TO_LLVM_HSAIL]/bin/llvm-config
HSAILASM=[PATH_TO_HSAILasm]/HSAILasm  --disable-icd

4. I had to add libhsail.a and libncurses.a into libpocl_la_LIBADD at
build/lib/CL/Makefile (I don't know why the pocl configuration tool does
not add them to the makefile).



On 22 January 2016 at 20:56, Zheng Wang <[email protected]> wrote:

> Hi,
>
> This is what I get after running configure
>
> =======================================================================
>
> Using LLVM version 3.7.0svn from
> /home/zwang3/workspace/dividend/build/llvmhsail
>
> ICD extension: enabled
> Using ocl-icd to run checks inside build tree.
>
> Enabling direct linking with libpocl.
>
> Using vecmathlib math builtins.
> Enabled device drivers: basic pthreads
> Enabled testsuites:
> NOTE: Initialize the examples used by the testsuites by running
> "make prepare-examples" once.
>
> Basic and pthreads devices optimized for:
> architecture: x86_64
> cpu variant: bdver3
>
>
> So I assume it uses the right LLVM?
>
> However, when I run ldd libpocl.so, it shows that libpocl.so doesn't link
> to any LLVM library.
>
>  linux-vdso.so.1 =>  (0x00007ffd5e7ca000)
>         libhwloc.so.5 => /usr/lib/x86_64-linux-gnu/libhwloc.so.5
> (0x00007fdbe6808000)
>         libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7
> (0x00007fdbe65f8000)
>         librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fdbe63f0000)
>         libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
> (0x00007fdbe61d0000)
>         libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
> (0x00007fdbe5ec8000)
>         libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1
> (0x00007fdbe5cb0000)
>         libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fdbe58e8000)
>         /lib64/ld-linux-x86-64.so.2 (0x00007fdbec810000)
>         libnuma.so.1 => /usr/lib/x86_64-linux-gnu/libnuma.so.1
> (0x00007fdbe56d8000)
>         libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fdbe54d0000)
>         libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fdbe51c8000)
>
>
> This is rather strange....
>
> On 22 January 2016 at 13:51, Kalle Raiskila <[email protected]>
> wrote:
>
>>
>>
>> On 22.01.2016 14:59, EXT Zheng Wang wrote:
>> > Hi Michal,
>> >
>> > For pocl:
>> >
>> > ../configure --with-hsa-runtime-dir=/opt/hsa
>> >
>> LLVM_CONFIG=/home/zwang3/workspace/dividend2/build/llvmhsail/bin/llvm-config
>> > HSAILASM=/usr/local/bin/HSAILasm --disable-icd
>> >
>> >
>> > for LLVM:
>> >
>> > cmake .. -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=HSAIL
>> -DBUILD_SHARED_LIBS=off
>> > -DCMAKE_INSTALL_PREFIX=/home/zwang3/workspace/dividend2/build/llvmhsail
>> > -DLLVM_ENABLE_RTTI=on -DLLVM_BUILD_LLVM_DYLIB=on -DLLVM_ENABLE_EH=ON
>> > -DWITH_TARGET="AMDGPU;X86_64;HSAIL"
>>
>>
>> Are you sure you run pocl against this exact libLLVM?
>> 'ldd libpocl.so' should point to it and not to a LLVM that comes with
>> your system?
>>
>> If you have no particular reason to use a shared libLLVM, try building
>> pocl with LLVM statically linked in: ./confitgure --enable-static-llvm
>>
>>
>> kalle
>>
>>
>> ------------------------------------------------------------------------------
>> Site24x7 APM Insight: Get Deep Visibility into Application Performance
>> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
>> Monitor end-to-end web transactions and take corrective actions now
>> Troubleshoot faster and improve end-user experience. Signup Now!
>> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
>> _______________________________________________
>> pocl-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/pocl-devel
>>
>
>
>
> --
> Cheers,
> Zheng
>



-- 
Cheers,
Zheng
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
pocl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pocl-devel

Reply via email to