Forum Discussion
How to resolve Path to SOPC Builder directory is not found
I am just starting with Altera OpenCL. I have been able to compile and run some of the example designs. Yesterday I tried using the emulator. After some missing environment variables I got it working. Today I tried some more emulations but whenever I want to compile, either for emulator or for chip I get the message:
aoc: Unable to determine the execution envoronment of the Altera SDK for OpenCL
aoc: Detailed error: Internal error: Path to SOPC Builder directory us not found! I assume I have an enviroment variable wrong, but which one, and how do I find out which it is. I could run checks on all variables but that takes a lot of time. Could you point me to the right variable? Or, if it has another couse, correct me and point me to the correct problem.12 Replies
- Altera_Forum
Honored Contributor
Found it. I switched the QUARTUS_ROOTDIR and QUARTUS_ROOTDIR_OVERRIDE. Now I still have the LINKER.EXE not found.
- Altera_Forum
Honored Contributor
Using the solution cangerer provided on this (http://www.alteraforum.com/forum/showthread.php?t=46646) thread I got it working (run init_opencl.bat and vcvars64.bat), but those environment variables are lost when the system reboots. So I ran the set command in the windows command prompt (admin) and noted all variables. Than I did all the previously mentioned steps again and then rechecked the environment variables and compared the values. Now I have a list of variables that I need to add or modify.
Having done that I assumed the linker problem would be over, but it wasn't. Rerunning the init_opencl.bat and vcvars64.bat did not solve it. [edit]A typo in one of the variables was the culprit. I haven't set the variables from rhe previously mentioned list. So they are still lost after reboot.[/edit] I'll keep trying to get it to work and will post a solution/update if I have one. - Altera_Forum
Honored Contributor
I have a similar error (I believe). I am trying to run some sample OpenCL programs on my DE1-SOC board. When I enter the "aoc version" command as instructed in the Altera C5Soc Getting Started Guide, I get the following error:
C:\altera\15.1\hld\bin>aoc version aoc: Unable to determine the execution environment of the Altera SDK for OpenCL. aoc: Detailed error: Internal error: Path to SOPC Builder directory is not f ound! - Altera_Forum
Honored Contributor
--- Quote Start --- I have a similar error (I believe). I am trying to run some sample OpenCL programs on my DE1-SOC board. When I enter the "aoc version" command as instructed in the Altera C5Soc Getting Started Guide, I get the following error: C:\altera\15.1\hld\bin>aoc version aoc: Unable to determine the execution environment of the Altera SDK for OpenCL. aoc: Detailed error: Internal error: Path to SOPC Builder directory is not f ound! --- Quote End --- I also have this error, and I believe this error is caused by environment. But I have no found which environment is not correct. It is strange that all "aoc " command is OK before I invoke "aocl uninstall". Any guys can help? - Altera_Forum
Honored Contributor
The LINKER.EXE is from Microsoft Visual Studio. I read from the AOCL docs that it's used for emulation. If you only intend on running your kernels in the actual FPGA instead of emulating it on your PC, you don't need it.
I have a DE1-SoC too and I can compile the .cl files in the example projects using `aoc` even if I don't have visual studio. You can set environment variables permanently in Windows using these steps (see DE1-SOC_OpenCL_v02.pdf from the DE1-SOC resources page):- Open start menu, right click computer, select properties
- Select Advanced system settings -> Advanced tab -> Environment variables -> New user variable
- Type the name of the variable and its value, press ok/apply
- Altera_Forum
Honored Contributor
That's what I thougt, but that doesn't work. I just run the two batch files, which takes 5 seconds. Next week I will change from windows to Linux and I am hoping that will solve the problems.
Oh,and I run simulations to check the algorithm before spending thebetter half of an hour on compilation. - Altera_Forum
Honored Contributor
--- Quote Start --- I have a similar error (I believe). I am trying to run some sample OpenCL programs on my DE1-SOC board. When I enter the "aoc version" command as instructed in the Altera C5Soc Getting Started Guide, I get the following error: C:\altera\15.1\hld\bin>aoc version aoc: Unable to determine the execution environment of the Altera SDK for OpenCL. aoc: Detailed error: Internal error: Path to SOPC Builder directory is not f ound! --- Quote End --- Hi I am getting same error. Did you got any solution for it? - Altera_Forum
Honored Contributor
It didn't work, I created a batch file calling the previously mentioned batch files before starting the first simulation in a command prompt.
- Altera_Forum
Honored Contributor
--- Quote Start --- It didn't work, I created a batch file calling the previously mentioned batch files before starting the first simulation in a command prompt. --- Quote End --- Could you please let me know how to create batch file? and How ill I call that batch file? - Altera_Forum
Honored Contributor
I assume you're on windows:
and then save this as a .bat file. Then you can run this bat file in your command prompt before running the emulator.call <path to init_opencl file>/init_opencl.bat call <path to vcvars64 file>vcvars64.bat