icpc error:could not find libstdc++ include files

icpc error:could not find libstdc++ include files

Hi friends,

I am getting this error when trying to compile using icpc, the error is

" icpc: error #10001: could not find directory in which the set of libstdc++ include files resides "

22 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

When i tried with other compiler it again gives some other completely different error

llvm-gcc -v -fopenmp -Wall -std=c++0x  -O3 demoImage.cpp -o demoImage/.....

ld: library not found for -lgomp

Would be great to have some lights over this problem

I'm also seeing the message "icpc: error #10001: could not find directory in which the set of libstdc++ include files resides", even with somethign as simple as "icpc --version".

imagem de Vladimir Polin (Intel)

what is the OS and gcc?

icpc uses the paths reported by your g++ to find the libstdc++ in the g++ installation.  You need a full g++ development installation, with g++ active in your shell.  As Vladimir hinted, a first step is to determine that you have a suitable working g++ active,  g++ -v result would begin to answer the question.

It should not matter whether you have an incomplete installation of llvm; I wouldn't expect icpc to use llvm to find the libraries, unless you played some trick such as making that compiler appear as g++.  icpc would not require libgomp as it brings its own "upwardly compatible" replacement.

I am using OS X Maveric. Accoding to one forum i checked that the icpc checks the path /usr/include/g++ in this path i tried to copy the libstdc++, it momentarily skips this but gets the error "algorithm not found". Is it possible to specify the path manually to make icpc check the included path? my gcc version is 4.2 which came with XCode i have also tried installing 4.8 according to one forum. But the same problem persists. Would be honored if you could show lights on this issue.

Thanks,

Venkatesh

Hi,

If i try using llvm-gcc. Now i get something completely different error

Undefined symbols for architecture x86_64:

"scils::io::HDF5Storage::HDF5Storage(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:

      _main in demoImage-Tc1zJ2.o

goes on like this pretty long. I am not able to figure out where the problem is

Normally, icpc would use something like 'g++ --print-searchs-dirs' to find paths fo search for libraries and presumably figure out where g++ has the include files.

You can certainly try adding -I<path_to_your_STL_includes> -L<path_to_your_libstdc++.so>

I think g++ 4.6 was the first to work with -std=c++11 which would be the current equivalent to -std=c++0x as was used with g++ 4.4 and 4.5.  I doubt gcc 4.2 would support c++0x.  Your icpc installation notes in the compiler /docs/ directory should indicate a suitable selection of Xcode versions, depending on your icpc version.

hi,

I tried as per your suggestion to add the path manually

-i/usr/include/c++/4.0.9 -L/usr/lib

But no fruitful result. I have included my gcc version for your kind perusal

Using built-in specs.

COLLECT_GCC=gcc

COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin13.0.0/4.9.0/lto-wrapper

Target: x86_64-apple-darwin13.0.0

Configured with: ../gcc-4.9-20130929/configure --enable-languages=c,c++,fortran

Thread model: posix

gcc version 4.9.0 20130929 (experimental) (GCC)

I think your main c++ include directory should be /usr/include/c++/4.9.0/ if you installed in /usr; if you installed in /usr/local/, as would appear from your configure line, it would be /usr/local/include/c++/4.9.0/.  However, icpc should have been able to find it if, for example,

g++ -v shows the expected 4.9.0 installation.

Your g++ libraries should be in /usr or /usr/local   /gcc-4.9/lib64/  (for a 64-bit compiler)

They wouldn't also appear in /usr/lib/ unless you deleted links or whatever was there and created new ones.

More recent versions of g++ 4.9.0 have introduced some differences from g++ 4.8 (as supported by icpc 14.0) which wouldn't affect the problem we are discussing now but could cause rejection of some c++ headers once they are found.

We should have pointed out that if you are trying to run the ia32 32-bit icpc, you need a full installation of g++ for -m32 in addition to the 64-bit one (which will work with the intel64 64-bit icpc).

Also ,you may add the '-dryrun' or '-V' to your command line's compilation options ,which would give you more details about the driver tool commands.

imagem de Vladimir Polin (Intel)

And you use the latest composer update 1, right? According to http://software.intel.com/en-us/forums/topic/486782 recently released update 1 only supports Maverics.

Hi, 

Yeah i am using update 1. And how to add the path to the gcc 4.7 in the shell file i am compiling manually. As it always checks the path given by the icpc which is the path my gcc is not present. I want to over ride it and give my path to the icpc... 

Hi,

You can override the gcc,g++ default path with below options.

icpc -gcc-name=<path to gcc>

icpc -gxx-name=<path to g++>

Reddy

 

 

Hi,

I still couldnt find a solution for this problem. I freshly installed my OS again. I found that the gcc is found in this location

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1

Its integrated with xcodes. Should i install a gcc version again seperately to execute?

Hi,

I am still facing the same problem. The libstd is still not be able to found by the Compiler. The icpc -gcc-name doesn't work as the compiler couldnt recognize the code. I am thinking do anyone have a solution for this. As i also installed gcc 4.7 seperately which is available in usr/gcc4.7.2 yet the Compiler doesnt work. I did set the environmental variable according to the forums guidance by using the .sh file in the Compiler directory. It would be great if anyone could guide me to solve this problem.

Thanks and regards.

Venkatesh Padmanabhan

Did you install the XCode Command Line Tools for OSX Mavericks from the Apple Developer site?

regards,

Rene

Hi,

yes i have installed yet it give some error like

 

In file included from ./includes/boost/type_traits/common_type.hpp(54),

                 from ./includes/boost/type_traits.hpp(22),

                 from ./includes/boost/numeric/ublas/traits.hpp(24),

                 from ./includes/boost/numeric/ublas/storage.hpp(26),

                 from ./includes/boost/numeric/ublas/vector.hpp(19),

                 from ./includes/boost/numeric/ublas/matrix.hpp(16),

                 from ./includes/scils/io/hdf5/HDF5Storage.h(4),

                 from demoImage.cpp(1):

./includes/boost/utility/declval.hpp(42): error: expected a ";"

      typename add_rvalue_reference<T>::type declval() BOOST_NOEXCEPT; // as unevaluated operand

                                                       ^

 

In file included from ./includes/boost/type_traits.hpp(22),

                 from ./includes/boost/numeric/ublas/traits.hpp(24),

                 from ./includes/boost/numeric/ublas/storage.hpp(26),

                 from ./includes/boost/numeric/ublas/vector.hpp(19),

                 from ./includes/boost/numeric/ublas/matrix.hpp(16),

                 from ./includes/scils/io/hdf5/HDF5Storage.h(4),

                 from demoImage.cpp(1):

./includes/boost/utility/declval.hpp(42): error: template instantiation resulted in an invalid function declaration

      typename add_rvalue_reference<T>::type declval() BOOST_NOEXCEPT; // as unevaluated operand

 

The error goes on and on ....I am using compiler 13.0.1 and gcc 4.2

If you had the "icpc: error #10001: could not find directory in which the set of libstdc++ include files resides" issue with 13.0.1 compiler on Mavericks with Xcode 5 then it was the expected one. Full support of Xcode 5 was introduced in compiler 14.0.1 (Composer XE 2013 SP1 Update 1). You could try to overcome the issue in 13.0.1 by setting GXX_INCLUDE=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1.

Hi,

Thanks for your valuable response.I installed the Command line Tools.After that the stdlib problem was solved. But again i have some other errors. As i have attached in the above message. The error goes on like this. I am trying to compile a API. The lib were compiled using Intel Compiler 13.1 . i am using 13.0.1 as there is no version 13.1 available as far as i have checked. I dont know how the API was compiled with that version. Will this be the reason for the error i am getting??

imagem de Sergey Melnikov (Intel)

Hi,

You are using pomerol framework, isn't it? Last pomerol's HDF5Storage.h header revision doesn't contains any direct include from boost.

I tried to compile 'boost/numeric/ublas/matrix.hpp' (last boost version). Compilation sucessfully finished.

I may recommend you to update boost/pomerol to up-to-date versions. If updating doesn't resolve compilation issue than could you provide me some instructions for issue reproducing.

--Sergey

>>... typename add_rvalue_reference::type declval() BOOST_NOEXCEPT; // as unevaluated operand

Is it your comment or someone else?

Faça login para deixar um comentário.