Bug 88959 - beignet doesn't build with the clang compiler
Summary: beignet doesn't build with the clang compiler
Status: RESOLVED FIXED
Alias: None
Product: Beignet
Classification: Unclassified
Component: Beignet (show other bugs)
Version: unspecified
Hardware: All FreeBSD
: medium normal
Assignee: Zhigang Gong
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-03 23:07 UTC by Koop Mast
Modified: 2016-12-01 03:11 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Use static inline instead of just inline. (1.99 KB, patch)
2015-02-03 23:07 UTC, Koop Mast
Details | Splinter Review

Description Koop Mast 2015-02-03 23:07:19 UTC
Created attachment 113140 [details] [review]
Use static inline instead of just inline.

Beignet uses the inline keyword. When building on FreeBSD 10.0-R or newer it will be compiled with the clang compiler. When building with clang the build fails unresolved symbols.

../src/libcl.so: undefined reference to `handle_events'
../src/libcl.so: undefined reference to `isBitcodeWrapper'
../src/libcl.so: undefined reference to `isRawBitcode'
../src/libcl.so: undefined reference to `cl_event_is_gpu_command_type'

Switch to static inline instead of inline fixes the build. If I remember the facts correctly, clang defaults to gnu99 standard instead of gcc which default to gnu89 standard. And the inline keywords means something different in gnu89 vs gnu99 standard.
Comment 1 Zhigang Gong 2015-02-06 08:35:02 UTC
The patch LGTM, could you send it to the mail list with your signed-off-by
signature? Thanks.
Comment 2 Zhigang Gong 2015-02-27 09:13:45 UTC
ping for response, thanks.
Comment 3 Rebecca Palmer 2016-10-09 21:34:02 UTC
This now appears to be fixed: 1.2.0 builds with clang 3.8 and works.  (I tested with GNU libstdc++, but comments in bug 94636 suggest LLVM libc++ now also works.)

(It's also gained another Linux-only system call, but an easy one to avoid: https://anonscm.debian.org/cgit/pkg-opencl/beignet.git/tree/debian/patches/support-kfreebsd.patch )


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.