Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
7 years ago

aocl-clang exists but is not working!

I try run hello_world and get this error:

C:\Windows\system32>aocl version

aocl 16.0.0.211 (Altera SDK for OpenCL, Version 16.0.0 Build 211, Copyright (C)

2016 Altera Corporation)

C:\Windows\system32>%ALTERAOCLSDKROOT%\init_opencl.bat

AOCL_BOARD_PACKAGE_ROOT is set to C:\altera\16.0\hld\board\s5phq. Using that.

Adding C:\altera\16.0\hld\bin to PATH

Adding C:\altera\16.0\hld\host\windows64\bin to PATH

Adding C:\altera\16.0\hld\board\s5phq\windows64\bin to PATH

C:\Windows\system32>cd C:\Users\usuario\Documents\Master\hello_world

C:\Users\usuario\Documents\Master\hello_world>aoc -march=emulator device\hello_w

orld.cl -o bin\hello_world.aocx --board s5phq_a7

Error: aoc: Executable C:/altera/16.0/hld/windows64/bin/aocl-clang exists but is

not working!

The cause of failure cannot be determined. Run executable manually and watch for

error messages.

Can anybody help me?

11 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Since you seem to have installed Quartus in Drive C, assuming that you are using Windows 10 or you have UAC enabled, windows security settings could be interfering with the process. Starting a cmd session as admin and test with that to see if it bypasses the problem.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi HRZ,

    I'm using Windows 7 and UAC disabled.

    I starting a cmd session as admin and test but the error continued.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Did you try running the "aocl-clang" executable manually and see what happens as suggested by the original error message?

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi, i have the same issue but in Ubuntu environment. When i did execute "aocl-clang" manually the system reported:

    error while loading shared libraries: libmip_common.so: cannot open shared object file: No such file or directory

    Now, i'm trying to solve this missed library
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    That library is shipped with Quartus itself. Either your installation is incomplete or you have not added the path to the libraries required by the OpenCL compiler to LD_LIBRARY_PATH.

  • MDavi14's avatar
    MDavi14
    Icon for New Contributor rankNew Contributor

    Hi, I have the some problems with aocl-clang. do you have any documentation? I have problems with -board argument

    • SDesh12's avatar
      SDesh12
      Icon for New Contributor rankNew Contributor

      Hey

      I am facing a similar issue.

      C:\intelFPGA_pro\Examples\1.hotspot>aoc -v -board=s10gx device/hotspot.cl -o bin/hotspot.aocx

      aoc: Clang version:

      Error: aoc: Executable C:/intelFPGA_pro/19.1/hld/windows64/bin/../../llvm/bin/aocl-clang exists but is not working!

      The cause of failure cannot be determined. Run executable manually and watch for error messages.

      Where you able to solve this?

      • HRZ's avatar
        HRZ
        Icon for Frequent Contributor rankFrequent Contributor

        Did you try the existing suggestions? Specifically, running the aocl-clang binary directly to see what error message it will print?

  • lnlnln's avatar
    lnlnln
    Icon for New Contributor rankNew Contributor

    I also encountered this problem, but it has been solved. Everyone may have a different reason for this problem. Let me talk about my situation.

    I encountered this situation because the system environment variable PATH lacks the following path:

    C:\Windows\system32

    C:\Windows

    C:\Windows\System32\Wbem

    As for why the lack of these will lead to this problem, emmmm, maybe, I don't know, and if it causes this problem, you should also find that command shutdown will be invalid at the command prompt.