SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
C++AMP is for accelerated massive parallelism. It lets you write C++ code with special extensions to the C++ language to run code on GPUs or other hardware to get acceleration. The link above points to the download archive.
I have been trying to build it according to the instructions it provides. It uses a CMake build system. The steps I take are
1) make a directory to hold some source code
2) cd into the directory
3) unzip the archive downloaded from the link above
4) mv/rename the the unzipped directory to "src"
5) mkdir build
6) cd build
7) cmake-gui ../src
Then in the cmake-gui, I just press Configure and then Generate, and exit cmake-gui. Then I do:
8) make -j8 world
# this step 8 works okay to 100% and finishes
9) make -j8
# This make gets to about 98% and then I get the error:
Code:
[ 93%] Built target clangStaticAnalyzerFrontend
[ 94%] Built target clangFormat
[ 95%] Built target diagtool
[ 95%] Built target clang
[ 95%] Built target clang-format
[ 95%] Built target libclang_exports
[ 97%] Built target libclang
[ 98%] Built target c-index-test
[ 98%] Built target arcmt-test
[ 98%] Built target c-arcmt-test
[ 98%] Built target clang-check
[ 98%] Building CXX object lib/CMakeFiles/mcwamp.dir/mcwamp.cpp.o
/home/sysop/src/cppamp/src/lib/mcwamp.cpp:8:10: fatal error: 'iostream' file not found
#include <iostream>
^
1 error generated.
make[2]: *** [lib/CMakeFiles/mcwamp.dir/mcwamp.cpp.o] Error 1
make[1]: *** [lib/CMakeFiles/mcwamp.dir/all] Error 2
make: *** [all] Error 2
It cannot find a basic header file. I know this header file works because I can make a simple C++ program that uses it. Some blogs say that this error indicates that your C/C++ system compiler is installed wrong, but I do not know. I am running slackware64 14.1 with multilib packages from alienBOB. Everything works fine, usually, so I don't understand why this compile fails this way.
Can anyone try this on their system and see if this error is duplicated, or is it just my system? Or, what could be the problem?
You need OpenCL and HSA (whatever they are) to compile this.
I have OpenCL. It detects OpenCL okay, as far as I can tell. HSA is some AMD thing, and I do not have HSA installed. I use an nvidia GPU and intel CPU. I think the problem is something else, not about detecting OpenCL or HSA.
If you do 'make -j8 VERBOSE=1' you will be able to see details of the failing compiler command line, including hopefully details of where it thinks the includes should be.
If you do 'make -j8 VERBOSE=1' you will be able to see details of the failing compiler command line, including hopefully details of where it thinks the includes should be.
is unfortunately not included in Slackware 14.1 and neither in SBo
you can try to remove this flag, and clang will use libstdc++, and this might work since they are pretty standard, but could be that the author did something special, you need to try
Thanks to all for the quick help. Installing a libc++ is not something I want to attempt myself. For now, I may call it quits on trying this C++AMP. I'd rather wait until there is a slackware package or SBo for the libc++. I'm afraid I'd make a mistake trying to install a libc++ and damage my system! I'd really like to try this C++AMP though.
``libc++' is just another c++ library, like the one that comes with g++.
Files : /usr/local/include/c++/v1/<headers>,
( will not be found by g++, searches in /usr/include/c++/4.8.2/)
/usr/local/lib/{ libc++.so.1.0, libc++.so.1, libc++.so }
Unique library names. Harmless, cannot disturb anything in your OS.
I tried to follow knudfl's instructions to build libc++ but I ran into some trouble where the cmake configure did not find everything it wanted exactly, so I did not attempt to go further with the build.
I tried looking in the slackware64-current changelog and packages directories and could not find any package for the LLVM libc++. Maybe I just don't see it, or it will not be included. Why would it not be included when LLVM is?
SBo would probably be the right place for this lib
Quote:
Originally Posted by twy
I tried to follow knudfl's instructions to build libc++ but I ran into some trouble where the cmake configure did not find everything it wanted exactly, so I did not attempt to go further with the build.
more verbose error messages are always welcome
Quote:
Originally Posted by twy
I tried looking in the slackware64-current changelog and packages directories and could not find any package for the LLVM libc++. Maybe I just don't see it, or it will not be included. Why would it not be included when LLVM is?
well, this lib is a C++ standard library implementation, and Slackware has one.
libc++ is used by BSD and Mac, for political reasons (GPL 3).
Developers that refer to this lib on Linux system have either not ported some parts (Make CMake..files) and taken them from Mac, or fully understood what they are actually doing.
a good question would be why the project needs clang and libc++ also on Linux, what are the feature that are no available in g++ and libstdc++
Developers that refer to this lib on Linux system have either not ported some parts (Make CMake..files) and taken them from Mac, or fully understood what they are actually doing.
a good question would be why the project needs clang and libc++ also on Linux, what are the feature that are no available in g++ and libstdc++
A very good question. This project actually downloads and builds from source an obsolete clang of its own -- from inside the initial cmake. It then builds (well, fails to build) using this clang of its own. The derp is strong with this one. I would consider finding some other project to spend my quality time with.
I suspect the empty -I options in the OP's original error show that the cmake configuration needs some options setting instead of just "I just press Configure and then Generate".
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.