Bug 98111 - Building Beignet from source failing
Summary: Building Beignet from source failing
Status: RESOLVED FIXED
Alias: None
Product: Beignet
Classification: Unclassified
Component: Beignet (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: Xiuli Pan
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-06 15:19 UTC by charles
Modified: 2016-10-17 14:19 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
error log file (7.20 KB, text/x-log)
2016-10-06 15:19 UTC, charles
Details

Description charles 2016-10-06 15:19:02 UTC
Created attachment 127073 [details]
error log file

I am trying to build the most recent Beignet source (acquired here [https://01.org/beignet/downloads]) on my Ubuntu 14.04 system.

I thought I had all the dependencies but after I create the build directory and call cmake ../ if fails complaining about `drm_intel_get_pooled_eu' not being found.  I have libdrm-intel1 and libdrm-dev installed so I don't know what the problem is here.  I have attached the cmake error log file.
Comment 1 charles 2016-10-06 20:28:05 UTC
I have since learned that my versions of llvm and clang were not correct.  After updating those the cmake passes but now I am stuck with the make call where the output errors out like so:

Built target beignet_bitcode
[ 53%] Built target gbe
[ 53%] Built target gbe_bin_generater
[ 56%] [ 56%] [ 56%] Generating ../../src/kernels/cl_internal_copy_buf_align4_str.c
[ 56%] Generating ../../src/kernels/cl_internal_built_in_kernel_str.c
Generating ../../src/kernels/cl_internal_copy_buf_align16_str.c
Generating ../../src/kernels/cl_internal_copy_buf_unalign_same_offset_str.c
fatal error: malformed block record in PCH file: '/home/charles/Downloads/Beignet-1.2.0-Source/build/backend/src/libocl//usr/local/lib/x86_64-linux-gnu/beignet//beignet.local.pch'
fatal error: malformed block record in PCH file: '/home/charles/Downloads/Beignet-1.2.0-Source/build/backend/src/libocl//usr/local/lib/x86_64-linux-gnu/beignet//beignet.local.pch'
build the file /home/charles/Downloads/Beignet-1.2.0-Source/src/kernels//cl_internal_copy_buf_align4.cl failed
build the file /home/charles/Downloads/Beignet-1.2.0-Source/src/kernels//cl_internal_built_in_kernel.cl failed
make[2]: *** [../src/kernels/cl_internal_copy_buf_align4_str.c] Error 255
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [../src/kernels/cl_internal_built_in_kernel_str.c] Error 255
fatal error: malformed block record in PCH file: '/home/charles/Downloads/Beignet-1.2.0-Source/build/backend/src/libocl//usr/local/lib/x86_64-linux-gnu/beignet//beignet.local.pch'
build the file /home/charles/Downloads/Beignet-1.2.0-Source/src/kernels//cl_internal_copy_buf_align16.cl failed
make[2]: *** [../src/kernels/cl_internal_copy_buf_align16_str.c] Error 255
fatal error: malformed block record in PCH file: '/home/charles/Downloads/Beignet-1.2.0-Source/build/backend/src/libocl//usr/local/lib/x86_64-linux-gnu/beignet//beignet.local.pch'
build the file /home/charles/Downloads/Beignet-1.2.0-Source/src/kernels//cl_internal_copy_buf_unalign_same_offset.cl failed
make[2]: *** [../src/kernels/cl_internal_copy_buf_unalign_same_offset_str.c] Error 255
make[1]: *** [src/CMakeFiles/cl.dir/all] Error 2
make: *** [all] Error 2
Comment 2 Xiuli Pan 2016-10-11 03:09:47 UTC
Hi Charles,
Could you provide the LLVM and clang version you are using?
And could you try to rebuild the beignet with a git clone https://cgit.freedesktop.org/beignet/ , this may help you to find which files are generated and easy to reset to initial state.

Thanks
Xiuli
Comment 3 charles 2016-10-17 14:18:50 UTC
Xiuli,

As per your request I checked the LLVM and clang versions.  Somehow it was using the 3.4 clang version.  I swore I had set this correctly but I guess it didn't change.  After switching to 3.6 (LLVM = 3.6 as well), resetting the git repo and rebuilding it completed without a problem.

Thanks for your time,
Charles


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.