LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-25-2015, 10:42 AM   #1
twy
Member
 
Registered: Jun 2004
Distribution: Slackware64
Posts: 99

Rep: Reputation: Disabled
C++AMP install


A project to bring C++AMP to linux is here:
https://bitbucket.org/multicoreware/...g-35/downloads

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?

Thanks a lot
 
Old 10-25-2015, 11:32 AM   #2
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
You need OpenCL and HSA (whatever they are) to compile this.
 
Old 10-25-2015, 11:39 AM   #3
twy
Member
 
Registered: Jun 2004
Distribution: Slackware64
Posts: 99

Original Poster
Rep: Reputation: Disabled
I got OpenCL, but not HSA

Quote:
Originally Posted by Richard Cranium View Post
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.
 
Old 10-25-2015, 12:53 PM   #4
55020
Senior Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,307
Blog Entries: 4

Rep: Reputation: Disabled
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.
 
1 members found this post helpful.
Old 10-25-2015, 01:03 PM   #5
twy
Member
 
Registered: Jun 2004
Distribution: Slackware64
Posts: 99

Original Poster
Rep: Reputation: Disabled
with VERBOSE=1, I get...

Quote:
Originally Posted by 55020 View Post
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.
With VERBOSE=1, I get...

Code:
[ 98%] Built target clang-check
make -f lib/CMakeFiles/mcwamp.dir/build.make lib/CMakeFiles/mcwamp.dir/depend
make[2]: Entering directory `/home/sysop/src/cppamp/build'
cd /home/sysop/src/cppamp/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/sysop/src/cppamp/src /home/sysop/src/cppamp/src/lib /home/sysop/src/cppamp/build /home/sysop/src/cppamp/build/lib /home/sysop/src/cppamp/build/lib/CMakeFiles/mcwamp.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/sysop/src/cppamp/build'
make -f lib/CMakeFiles/mcwamp.dir/build.make lib/CMakeFiles/mcwamp.dir/build
make[2]: Entering directory `/home/sysop/src/cppamp/build'
/usr/bin/cmake -E cmake_progress_report /home/sysop/src/cppamp/build/CMakeFiles 
[ 98%] Building CXX object lib/CMakeFiles/mcwamp.dir/mcwamp.cpp.o
cd /home/sysop/src/cppamp/build/lib && /home/sysop/src/cppamp/build/compiler/bin/clang++    -I/home/sysop/src/cppamp/src/utils -I -I/home/sysop/src/cppamp/src/include -stdlib=libc++ -std=c++amp -DGTEST_HAS_TR1_TUPLE=0 -fPIC -I/home/sysop/src/cppamp/src/utils -I -I/home/sysop/src/cppamp/src/include -stdlib=libc++ -std=c++amp -DGTEST_HAS_TR1_TUPLE=0 -fPIC -I/home/sysop/src/cppamp/src/utils -I -I/home/sysop/src/cppamp/src/include -stdlib=libc++ -std=c++amp -I/home/sysop/src/cppamp/src/utils -I -I/home/sysop/src/cppamp/src/include -stdlib=libc++ -std=c++amp -I/home/sysop/src/cppamp/src/utils -I -I/home/sysop/src/cppamp/src/include -stdlib=libc++ -std=c++amp -DGTEST_HAS_TR1_TUPLE=0 -fPIC -O3 -DNDEBUG -I/home/sysop/src/cppamp/src/include -I/home/sysop/src/cppamp/src/compiler/include -I/home/sysop/src/cppamp/build/compiler/include -I/home/sysop/src/cppamp/build/lib -I/usr/include/CL/..    -o CMakeFiles/mcwamp.dir/mcwamp.cpp.o -c /home/sysop/src/cppamp/src/lib/mcwamp.cpp
/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[2]: Leaving directory `/home/sysop/src/cppamp/build'
make[1]: *** [lib/CMakeFiles/mcwamp.dir/all] Error 2
make[1]: Leaving directory `/home/sysop/src/cppamp/build'
make: *** [all] Error 2
I don't know what is wrong still.
 
Old 10-25-2015, 01:15 PM   #6
a4z
Senior Member
 
Registered: Feb 2009
Posts: 1,727

Rep: Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742
-stdlib=libc++
you need the std from clang
stands under required library
Quote:
libc++1
libc++-dev
http://libcxx.llvm.org/

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
 
1 members found this post helpful.
Old 10-25-2015, 01:55 PM   #7
twy
Member
 
Registered: Jun 2004
Distribution: Slackware64
Posts: 99

Original Poster
Rep: Reputation: Disabled
libc++

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.
 
Old 10-25-2015, 02:42 PM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #7, libc++ http://llvm.org/svn/llvm-project/libcxx/trunk/

``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.

... And it takes only a few seconds to build :
$ svn co http://llvm.org/svn/llvm-project/libcxx/trunk/
$ cd trunk/ && mkdir build
$ cd build/
$ cmake .. && make
# make install

-

Last edited by knudfl; 10-25-2015 at 02:45 PM.
 
1 members found this post helpful.
Old 10-26-2015, 02:48 AM   #9
twy
Member
 
Registered: Jun 2004
Distribution: Slackware64
Posts: 99

Original Poster
Rep: Reputation: Disabled
Question Will LLVM libc++ be in the next slackware release?

Will the next slackware64 release (14.2?) have this llvm libc++

http://llvm.org/svn/llvm-project/libcxx/trunk/

?

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?
 
Old 10-26-2015, 03:28 AM   #10
a4z
Senior Member
 
Registered: Feb 2009
Posts: 1,727

Rep: Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742
Quote:
Originally Posted by twy View Post
Will the next slackware64 release (14.2?) have this llvm libc++

http://llvm.org/svn/llvm-project/libcxx/trunk/
SBo would probably be the right place for this lib

Quote:
Originally Posted by twy View Post
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 View Post
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++
 
1 members found this post helpful.
Old 10-26-2015, 03:52 AM   #11
55020
Senior Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,307
Blog Entries: 4

Rep: Reputation: Disabled
Quote:
Originally Posted by a4z View Post
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".
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
controlling linux by voice && unable to install sphinx2-continuous newbie0101 Linux - Software 1 12-19-2012 03:32 PM
Why PKGBUILD and not ./configure && make && make install? slkrover Arch 2 08-09-2010 03:04 AM
Ph&#7909;c h&#7891;i d&#7919; li&#7879;u b&#7883; m&#7845;t???, c&#7913; pollsite General 1 06-27-2005 12:39 PM
Install & Vid issues on Mandrake 10 & Newish Compaq laptop sorrydog Linux - Laptop and Netbook 2 06-01-2004 10:37 PM
fedora core 1 install -- white screen & mouse & freezes linuxcharlie Fedora - Installation 12 04-27-2004 11:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration