Skip to content

Commit 0161ec8

Browse files
committed
Update README to address issue where multiple runtime libraries get linked
1 parent 334bdb7 commit 0161ec8

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,10 @@ IntelⓇ FPGA RTE for OpenCL™ installed on your system:
188188
1. In the IntelⓇ FPGA SDK for OpenCL™ installation directory, source
189189
the initialization script (see [Running Unit Tests](#running-unit-tests)).
190190
191-
2. Update the `/etc/OpenCL/vendors/Altera.icd` file with the full path
192-
to the `libalteracl.so` library in the runtime installation directory.
191+
2. Update the `/etc/OpenCL/vendors/Altera.icd` file with either the partial
192+
name `libalteracl.so` if LD_LIBRARY_PATH contains the full path to the
193+
`libalteracl.so` library in the runtime installation directory, or the full
194+
path itself.
193195
194196
3. Compile your OpenCL host program with the OpenCL header files included from
195197
the runtime installation directory.
@@ -215,8 +217,10 @@ or IntelⓇ FPGA RTE for OpenCL™ installed on your system:
215217
1. Download, build, and install the
216218
[OpenCL ICD Loader](https://github.com/KhronosGroup/OpenCL-ICD-Loader).
217219
218-
2. Create the `/etc/OpenCL/vendors/Altera.icd` file with the full path
219-
to the `libalteracl.so` library in the runtime installation directory.
220+
2. Create the `/etc/OpenCL/vendors/Altera.icd` file with either the partial
221+
name `libalteracl.so` if LD_LIBRARY_PATH contains the full path to the
222+
`libalteracl.so` library in the runtime installation directory, or the full
223+
path itself.
220224
221225
3. Compile your OpenCL host program with the OpenCL header files included from
222226
the runtime installation directory.
@@ -233,3 +237,10 @@ or IntelⓇ FPGA RTE for OpenCL™ installed on your system:
233237
```
234238
235239
6. Run your OpenCL host program.
240+
241+
### Notes
242+
243+
- Check the environment variable OCL_ICD_FILENAMES to make sure it doesn't resolve
244+
to any `libalteracl.so` runtime other than the one specified in the
245+
`/etc/OpenCL/vendors/Altera.icd` file. Mismatch will lead to multiple runtime
246+
library instances being linked to the program, causing undefined behaviours.

0 commit comments

Comments
 (0)