Build Issues
Python3 not found:
Error:
Could NOT find Python3 (missing: Python3_INCLUDE_DIRS Python3_LIBRARIES)Cause: Python3 or python3-devel package not installed, or older CMake (3.22-3.24) unable to find python3 library.
Solution:
# Ubuntu/Debian $ sudo apt-get install python3 python3-dev # Fedora/RHEL/CentOS $ sudo dnf install python3 python3-devel
Or for older CMake:
$ cmake -B build \ -DPYTHON_LIBRARIES=/path/to/libpython.so \ -DPYTHON_INCLUDE_PATH=/path/to/include/python3.x \ -DPYTHON_EXECUTABLE=/usr/bin/python3
Python-related build failures:
Error: Build fails with missing symbols (-ldl, -lutil)
Cause: Older Python versions can’t find standard libraries
Solution:
$ cmake -B build -DCMAKE_CXX_STANDARD_LIBRARIES="-ldl -lutil"
Missing type_traits errors:
Error: Errors related to types and type_traits
Cause: Can’t link to libstdc++ automatically on older systems
Solution:
$ cmake -B build -DCMAKE_CXX_STANDARD_LIBRARIES="-lstdc++"
Missing pthread symbols:
Error: Undefined reference to pthread functions
Cause: glibc < 2.34 has libpthread as separate library
Solution:
$ cmake -B build -DCMAKE_CXX_STANDARD_LIBRARIES="-lpthread"
Note: Applies to GCC 10 and earlier, or systems with glibc < 2.34
Linking Issues
Missing symbols from aoclutils:
Error: Undefined reference to
au_*orAu::*symbolsCause: Library not in library search path
Solution:
# Linux $ export LD_LIBRARY_PATH=/path/to/lib:$LD_LIBRARY_PATH # Windows > set PATH=C:\path\to\bin;%PATH%
Static library linking issues:
Cause: Forgot to link libstdc++ with static library
Solution:
$ gcc myapp.c -L/path/to/lib -l:libaoclutils.a -lstdc++
Runtime Issues
CPU not detected / returns false:
Cause: Library only supports AMD Zen CPUs
Solution: This is expected behavior on non-AMD or pre-Zen CPUs. Check
isAMD()first, then check Zen family.Thread pinning fails:
Cause: Insufficient permissions
Solution: May need CAP_SYS_NICE capability on Linux, or run with appropriate permissions
Library not found at runtime:
Cause: Dynamic library not in search path
Solution:
# Temporary (Linux) $ export LD_LIBRARY_PATH=/path/to/lib:$LD_LIBRARY_PATH # Permanent (Linux) $ echo "/path/to/lib" | sudo tee /etc/ld.so.conf.d/aocl-utils.conf $ sudo ldconfig
Testing Issues
Tests fail to run:
Cause: QEMU not installed (Linux)
Solution:
# Ubuntu $ sudo apt-get install qemu-user # Fedora/RHEL/CentOS $ sudo dnf install qemu-user
Note: Do a clean build after installing QEMU
Cpuid test failures:
Cause: Python not installed
Solution: Install Python 3.9-3.13
Integration Issues
Compiler mismatch warnings/errors:
Cause: Different compilers used for library and application
Solution: Use same compiler for both (check with
gcc --version)Header not found:
Cause: Include path not set correctly
Solution: Verify
-Iflag points to correct include directoryVersion compatibility:
Issue: Old ALCI APIs deprecated
Solution: Migrate to new APIs or enable with
AU_ENABLE_OLD_API=ON. Check version.txt in repository.