- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am having trouble building Cilk plus (cilkplus-rtl-001857.tgz) on Ubuntu 12.04. The version of gcc and the error are below:
$ gcc --version
gcc (Ubuntu/Linaro 4.7.0-7ubuntu3) 4.7.0
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Error:
runtime/symbol_test.c: In function 'main':
runtime/symbol_test.c:50:5: error: unknown type name '_Cilk_spawn'
runtime/symbol_test.c:50:17: error: conflicting types for 'foo'
runtime/symbol_test.c:44:6: note: previous definition of 'foo' was here
runtime/symbol_test.c:51:5: warning: implicit declaration of function '_Cilk_for' [-Wimplicit-function-declaration]
runtime/symbol_test.c:51:21: error: expected ')' before ';' token
runtime/symbol_test.c:52:9: error: expected ';' before 'foo'
runtime/symbol_test.c:53:21: error: expected ')' before ';' token
runtime/symbol_test.c:54:9: error: expected ';' before 'foo'
make: *** [symbol_test.lo] Error 1
I followed the steps given in README.txt. Is there anything else I have to do to get this installed?
Thanks,
Pranith
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you check out the CilkPlus gcc source from GNU? That is the only way to build the runtime. Here is a tutorial I wrote up a while back. When you check out the compiler and built it, it will also build the runtime for you. You do not need to do that as a seperate step. Please let me know if you need additional details:
How to Download, Build and Install Cilkplus GCC on Linux.
Prerequisites
You will need the following packages to build GCC:
- Source packages. Note that the links below are for the versions needed to build the initial release of the cilkplus GCC branch. Newer versions may need to be used with future versions of the compiler.
- GNU Multiprecision Arithmetic Library (GMP) for arbitrary precision arithmetic: (ftp://ftp.gmplib.org/pub/) Download the latest version and unpack the compressed tar file and move the directory to $HOME/gmp .
- GNU MPFR Library multiple-precision floating-point computations with correct rounding: (http://www.mpfr.org/mpfr-current) Unpack the compressed tar file and move the directory to $HOME/mpfr .
- GNU MPC Library for arithmetic using complex numbers: (http://www.multiprecision.org/mpc/) Download the latest version and unpack the compressed tar file. Move the unpacked directory to $HOME/mpc
- In addition to the sources above, you will also need the following tools installed in your machine
- flex or lex - Lexical analyzer
- bison or Yacc - Parser generator
- Make utility (example gmake) to automatically create executables
- GCC/G++ Compiler (version 4.4 or above) with the appropriate binary utilities
- GNU AutoGen utility - Automatic program generator
- SVN or GIT source control packages
- Diskspace: You will need approximately 2 GB of diskspace to hold the sources, executables and libraries. Along with this, you will also require ~3 GB of diskspace to hold the temporary files.
- Time: This process is a bit time-consuming and so please have ~4-5 hours in-hand to complete the process. The most time consuming of all is step 6. This step is not interactive and so you can let this step run overnight if you wish.
Building the GCC C and C++ compilers
- Cilkplus GCC is available as a development branch in the GCC source-tree. The development branch is called "cilkplus." They can be downloaded using GIT or SVN source-control systems. If you are a beginner to source-control, I would recommend you use SVN. I am making an assumption that you are currently in your $HOME directory.
- To use SVN, please type the following in your command in your command prompt:
svn co http://gcc.gnu.org/svn/gcc/branches/cilkplus cilkplus-gcc
- If you are choosing to use GIT, please type the following commands in your command prompt. Please note that this step can take anywhere from 10-30 minutes.
git clone http://gcc.gnu.org/git/gcc.git cilkplus-gcc
cd cilkplus-gcc
git checkout -b my_cilkplus_branch origin/cilkplus
cd ..
- To use SVN, please type the following in your command in your command prompt:
- After step 1, the sources should be saved in a directory called $HOME/cilkplus-gcc. The final compiler executables and the appropriate libraries will be stored in $HOME/cilkplus-install .
- Move the gmp, mpc and mpfr directories from $HOME/ to the $HOME/cilkplus-gcc/ directory.
- Create a new directory called "b-gcc" under $HOME/ . This directory will hold all the object files. You may delete this directory after the successful completion of all the steps in this tutorial.
Go to the b-gcc directory and type the following command:
$HOME/cilkplus-gcc/configure --prefix=$HOME/cilkplus-install --enable-languages="c,c++"
The above command will configure the compiler makefiles to set the install directory to be $HOME/cilkplus-install and build just the C and C++ compilers.
- Type
make
in the same directory. This command will build the compiler sources. This will probably take quite a while. - Type
make install
. This command will copy the compiler executables and the required libraries to the install directory.
The compilers (g++ and gcc) should now be in the $HOME/cilkplus-install/bin directory.
Using the GCC compilers with the Intel® Cilk™ Plus extensions
To use the GCC Cilk Plus compiler, it needs to be in your PATH and the libraries need to be in your LIBRARY_PATH and LD_LIBRARY_PATH. The following commands can be used (in a BASH Shell) to accomplish this:
export PATH=$HOME/cilkplus-install/bin:$PATH
export LD_LIBRARY_PATH=$HOME/cilkplus-install/lib
export LIBRARY_PATH=$HOME/cilkplus-install/lib
Building a Cilk Plus application with the GCC compilers requires explicitly linking with libcilkrts, libdl and libpthread. For example:
$HOME/cilkplus-install/bin/gcc -ldl -lcilkrts
$HOME/cilkplus-install/bin/g++ -ldl -lcilkrts
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you check out the CilkPlus gcc source from GNU? That is the only way to build the runtime. Here is a tutorial I wrote up a while back. When you check out the compiler and built it, it will also build the runtime for you. You do not need to do that as a seperate step. Please let me know if you need additional details:
How to Download, Build and Install Cilkplus GCC on Linux.
Prerequisites
You will need the following packages to build GCC:
- Source packages. Note that the links below are for the versions needed to build the initial release of the cilkplus GCC branch. Newer versions may need to be used with future versions of the compiler.
- GNU Multiprecision Arithmetic Library (GMP) for arbitrary precision arithmetic: (ftp://ftp.gmplib.org/pub/) Download the latest version and unpack the compressed tar file and move the directory to $HOME/gmp .
- GNU MPFR Library multiple-precision floating-point computations with correct rounding: (http://www.mpfr.org/mpfr-current) Unpack the compressed tar file and move the directory to $HOME/mpfr .
- GNU MPC Library for arithmetic using complex numbers: (http://www.multiprecision.org/mpc/) Download the latest version and unpack the compressed tar file. Move the unpacked directory to $HOME/mpc
- In addition to the sources above, you will also need the following tools installed in your machine
- flex or lex - Lexical analyzer
- bison or Yacc - Parser generator
- Make utility (example gmake) to automatically create executables
- GCC/G++ Compiler (version 4.4 or above) with the appropriate binary utilities
- GNU AutoGen utility - Automatic program generator
- SVN or GIT source control packages
- Diskspace: You will need approximately 2 GB of diskspace to hold the sources, executables and libraries. Along with this, you will also require ~3 GB of diskspace to hold the temporary files.
- Time: This process is a bit time-consuming and so please have ~4-5 hours in-hand to complete the process. The most time consuming of all is step 6. This step is not interactive and so you can let this step run overnight if you wish.
Building the GCC C and C++ compilers
- Cilkplus GCC is available as a development branch in the GCC source-tree. The development branch is called "cilkplus." They can be downloaded using GIT or SVN source-control systems. If you are a beginner to source-control, I would recommend you use SVN. I am making an assumption that you are currently in your $HOME directory.
- To use SVN, please type the following in your command in your command prompt:
svn co http://gcc.gnu.org/svn/gcc/branches/cilkplus cilkplus-gcc
- If you are choosing to use GIT, please type the following commands in your command prompt. Please note that this step can take anywhere from 10-30 minutes.
git clone http://gcc.gnu.org/git/gcc.git cilkplus-gcc
cd cilkplus-gcc
git checkout -b my_cilkplus_branch origin/cilkplus
cd ..
- To use SVN, please type the following in your command in your command prompt:
- After step 1, the sources should be saved in a directory called $HOME/cilkplus-gcc. The final compiler executables and the appropriate libraries will be stored in $HOME/cilkplus-install .
- Move the gmp, mpc and mpfr directories from $HOME/ to the $HOME/cilkplus-gcc/ directory.
- Create a new directory called "b-gcc" under $HOME/ . This directory will hold all the object files. You may delete this directory after the successful completion of all the steps in this tutorial.
Go to the b-gcc directory and type the following command:
$HOME/cilkplus-gcc/configure --prefix=$HOME/cilkplus-install --enable-languages="c,c++"
The above command will configure the compiler makefiles to set the install directory to be $HOME/cilkplus-install and build just the C and C++ compilers.
- Type
make
in the same directory. This command will build the compiler sources. This will probably take quite a while. - Type
make install
. This command will copy the compiler executables and the required libraries to the install directory.
The compilers (g++ and gcc) should now be in the $HOME/cilkplus-install/bin directory.
Using the GCC compilers with the Intel® Cilk™ Plus extensions
To use the GCC Cilk Plus compiler, it needs to be in your PATH and the libraries need to be in your LIBRARY_PATH and LD_LIBRARY_PATH. The following commands can be used (in a BASH Shell) to accomplish this:
export PATH=$HOME/cilkplus-install/bin:$PATH
export LD_LIBRARY_PATH=$HOME/cilkplus-install/lib
export LIBRARY_PATH=$HOME/cilkplus-install/lib
Building a Cilk Plus application with the GCC compilers requires explicitly linking with libcilkrts, libdl and libpthread. For example:
$HOME/cilkplus-install/bin/gcc -ldl -lcilkrts
$HOME/cilkplus-install/bin/g++ -ldl -lcilkrts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
$ sudo ln -s /usr/lib/x86_64-linux-gnu /usr/lib64
for the compile to complete succesfully. Thanks a ton!- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
-Balaji V. Iyer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page