Forums - fail to build halide sdk examples when iostream included

2 posts / 0 new
Last post
fail to build halide sdk examples when iostream included
ugljesa.milic
Join Date: 22 Jan 18
Posts: 1
Posted: Wed, 2018-01-31 01:52

Hi everyone,

I have a problem trying to compile and build your Halide examples (located in $HOME_PATH/Qualcomm/Hexagon_SDK/3.3.2/tools/HEXAGON_Tools/8.1.05/Tools/Halide/Examples) when iostream is added.

Out-of-the-box they are fine. For example, gaussian5x5 can be compiled, run, passed to hexagon-sim, all good. But just by adding #include <iostream> (or fstream or anything that has to do with streams) to gaussian5x5_run.cpp file, hexagon-clang++ throws an error:

In file included from /home/ugljesa/work/Qualcomm/Hexagon_SDK/3.3.2/tools/HEXAGON_Tools/8.1.05/Tools/bin/../target/hexagon/include/c++/v1/fstream:169:
In file included from /home/ugljesa/work/Qualcomm/Hexagon_SDK/3.3.2/tools/HEXAGON_Tools/8.1.05/Tools/bin/../target/hexagon/include/c++/v1/ostream:138:
In file included from /home/ugljesa/work/Qualcomm/Hexagon_SDK/3.3.2/tools/HEXAGON_Tools/8.1.05/Tools/bin/../target/hexagon/include/c++/v1/ios:216:
In file included from /home/ugljesa/work/Qualcomm/Hexagon_SDK/3.3.2/tools/HEXAGON_Tools/8.1.05/Tools/bin/../target/hexagon/include/c++/v1/__locale:18:
In file included from /home/ugljesa/work/Qualcomm/Hexagon_SDK/3.3.2/tools/HEXAGON_Tools/8.1.05/Tools/bin/../target/hexagon/include/c++/v1/mutex:176:
In file included from /home/ugljesa/work/Qualcomm/Hexagon_SDK/3.3.2/tools/HEXAGON_Tools/8.1.05/Tools/bin/../target/hexagon/include/c++/v1/__mutex_base:17:
/home/ugljesa/work/Qualcomm/Hexagon_SDK/3.3.2/tools/HEXAGON_Tools/8.1.05/Tools/bin/../target/hexagon/include/c++/v1/__threading_support:23:10: fatal error:
      'pthread.h' file not found
#include <pthread.h>

Not sure why it can not find pthread.h... it is in /usr/include folder, works fine for some other native posix applications. Runnning and building file (test-gaussian5x5) is not changed. Any idea or suggestion how to solve this problem is more than welcomed.

All the best,

Ugi

 

  • Up0
  • Down0
yuanyaoshen
Join Date: 13 Jul 21
Posts: 5
Posted: Thu, 2021-08-05 12:25

Hi Ugi, did you solve it? I encounter the same problem.

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.