Does icc supports STLport on Linux??

Does icc supports STLport on Linux??

Hi,

I am trying to use STLport-4.0 with icc on Linux. I am not building STLport library, but i need to use STLport wrappers with the native icc libraries. Since the STLport doesnot recoginzes the icc on Linux, i have to manually configure the STLport(ie stl_mycomp.h). I am not able to figure out what are the changes to be done to stl_mycomp.h. If anyone has the experience of configuring the STLport for icc on Linux, pls share ur experience.

Thanks and Regards
Ananth

publicaciones de 19 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

Anantha - Welcome to the forum!

We have a kitchen-sink version of a header file and a corresponding configuration file with which we can build STLport. We are trying to clean it up a little bit before we post this to this forum.

Thanks for your patience in advance.

Regards!
Ganesh

Hi Ganesh,
Thanks for the information. If possible can you please provide me the "kitchen-sink version of a header file and a corresponding configuration file", so that even I can try it for my STLport. It would be a great help to me if you can provide me the same.

Thanks and Regards
Ananth

Hi Ganesh,

Thanks for the information. I followed all the steps given in the link. But still I am phasing errors while trying to compile my source file with STLport headers as wrappers. Most of the errors are of following type,
/usr/loca/stlport/stlport/cwchar(208): error: namespace "std" has no member "fwide"
using _STLP_VENDOR_CSTD::fwide;

Does anyone has already come across these type of errors?
Is there any configuration parameter that i need to change in stl_icc.h?

Thanks and Regards
Ananth

Is there a chance you could attach a small reproducer? Please send it to premier.intel.com if possible.

Cheers,
Ganesh

Hi Ganesh,

I am attaching STLporterror.zip whichcontains the following files,
1) Makefile ---> Compilation steps
2) Hello.cpp ---> Simple Hello world program
3) errstl.txt ---> errors obtained

To show the error that i was getting, i wrote a "Hello World" program and tried to compile it with the STLport headers(I am using STLport headers as wrappers). STLport is installed in /usr/local/ directory( Unzipped the tar file into /usr/local directory and renamed the STLport-4.5.3 directory as stlport for my convienience). Then i created stl_icc.h file in config directory as suggested in the link that you sent earlier. Also done other changes that are mentioned in the link. After that while compiling I got errors which are present in errstl.txt file. Suggest me how can I get rid off these erros. Is there any configuration parameter that i need to add stl_icc.h file?

Thanks in advance
Ananth

Hi Ananth

I could not reproduce the same errors as given in "errstl.txt". I am getting different errors. I have compiled the test case by including "-D _STLP_NO_OWN_IOSTREAMS" symbol definition in command line without any error. The _STLP_NO_OWN_IOSTREAMS is required if user is using wrappers around compiler's iostream.

Here is complete command line :

icpc -g -D_STLP_NO_OWN_IOSTREAMS -I/home/osachan/stlport/STLport-4.5.3/stlport -I/usr/include -o hello hello.cpp.

I have installed STLport4.5.3 in /home/osachan/stlport/STLport-4.5.3

Please let me know if it worked for you.

osachan

Hi Ananth,
It works, I think there is some issue with your configuration.

>/usr/loca/stlport/stlport/cwchar(208): error: namespace >"std" has no member "fwide"
>using _STLP_VENDOR_CSTD::fwide;

With configuration present at Intel's site, and I am sure it is correct, Line# 208 of cwchar is not included. We will have to look at your preprocessed file - Please generate it using -E option and attach with this issue.

Here are the steps I followed - (linux 7.2 on Intel x86)

1. Untar STLport in /usr/local
2. Modified config files as mentioned at -
http://support.intel.com/support/performancetools/c/linux/stlport.htm
3. Added -D_STLP_NO_OWN_IOSTREAMS option to your Makefile

and it worked.

CP

Hi Osachan,

Thanks for the prompt response. You are correct, the test case hello.cpp compiled without any errors when i defined _STLP_NO_OWN_IOSTREAMS in stl_user_config.h. Thanks again for your suggestion.
I am facing certain errors with one more test case where i am using vectors etc. I have attached the errors as well as test case file and make file with this post. The vectortest.cpp is a simple program which uses vectors etc. Could you please suggest me about any other macro's that i need to define to get rid of these errors.

Thanks in advance
Ananth

Hi Ananth,

Even this test case works. I have not defined any additional macros.
I have looked at your errst1.txt file - one of the error is - std::accumulate undefined - it is defined in
/opt/intel/compiler70/ia32/include/numeric.

Please check if this header file is included in your preprocessed file.

Regards,
CP

Hello CP,

Same testcase vectortest is not working for me. First I will explain the configuration that i have in my system. I am using the STLport-4.5.3. I have created the stl_icc.h file in config directory as indicated in the link which was posted in this forum. Then i have done changes to the stl_comp.h file as indicated in the link. Also i have created the icc.mak file even though i dont require it, since i am using STLport as a wrapper. These are the changes which are indicated in the link.

Now to run my first testcase i have enabled the macro _STLP_NO_OWN_IOSTREAMS in stl_user_config.h After enabling this my testcase hello compiled without any errors. These are the only configuration changes that i have done to the raw STLport-4.5.3.

Now i am trying to compile my second testcase vector for which i am getting errors which i have already posted. As suggested by you i took the preprocessor output for this testcase. I dont see inclusion of "/opt/intel/compiler70/ia32/include/numeric" file in preprocessor output. I am not able to attach the preprocessor output file with this post since its size goes well beyond 100K even after compressing it using winzip.

Waiting for your comments and suggestions.

Warm Regards
Ananth

Hello Anantha,

Some clarifications - I was including incorrect files, files from Intel's include path, sorry about this.

(In your first Makefile you were using /usr/local/stlport as your include path, so I renamed my STLport-4.5.3 dir to stlport. In this version of makefile you used /usr/local/STLport-4.5.3 as include path. Hence When I simply executed make it worked.)

When I used correct include path, I got following errors -

error: namespace "_STL" has no member "reverse_bidirectional_iterator" using std::reverse_bidirectional_iterator;

error: more than one instance of function template "_STL::copy" matches the argument list:

My comments -

1. Define _STLP_USE_OLD_HP_ITERATOR_QUERIES to include definition for "reverse_bidirectional_iterator" - it is defined in stl/_iterator_old.h

2. Add "using _STL::copy;" statement in function main -
...
...
int main {
using _STL::copy;
...
... }

I hope these two changes will work for you.
If not then
- please generate "include file order" (-H option) file and "dependency info" (-M option) file for vectortest.cpp
- compare them with attached files.
- attach the differences to this topic.

Regards,
CP

Hello KP,

Thanks for the information. Second test case compiled successfully after implementing the suggestions that you have suggested in your mail.

I am getting,

error: more than one instance of function template "_STL::_Destroy" matches the argument list:

these type of errors for many functions like _STL::_COnstruct etc in one of my program.

I can get rid off those errors by declaring those functions within my main as told by you in your previous mail. But this is going to be a time consuming and very tedious process. Is there any other way to overcome this error?? Basically I am interested in a macro by defining this in my stl_icc.h or any other header file, i should be able to get rid of these redifinition errors.

Pls suggest me about this issue.

Thanks in advance
Regards
Ananth

Hello Anantha,
I found, on stlport site, that you can not use STLport in "wrapper mode" for most of the modern compilers.

>>For the most modern compilers which implements Koenig
>>lookup properly, this option may not be available due to
>>ambiguities during namespace lookup. Example: gcc-3.0

Please refer to
http://www.stlport.org/doc/select_io.html
for details.
This is the reason you are getting these "ambiguity" kind of errors.

Regards,
CP

Hello CP,

I have certain questions, please provide ur suggestions.

1) Is Koenig lookup is default behaviour of ICC?
2) Is there any method by which Koenig lookup can be disabled in ICC?
3) I am able to use STLport in wrapper mode with HP's aCC, which also implements Koenig lookup. Hence is there any way by which we can configure STLport in wrapper mode for ICC?

Thanks in advance
Regards
Ananth

Hello Anantha,

>>1) Is Koenig lookup is default behavior of ICC?

Yes, and I think this is correct as this is a Standard C++
feature.

>> 3) I am able to use STLport in wrapper mode with HP's aCC, which also implements Koenig lookup.

By default, current versions of HP aC++ will not perform ADL (koenig lookup), but will stick to the old behavior of name space lookup. However, if you add the option -Wc,-koenig_lookup,on, ADL gets enabled.

>>2) Is there any method by which Koenig lookup can be disabled in ICC?

As far as I know, there is no way to disable this in Intel compiler.

I have found many sites on koenig lookup and found that its good to have "koenig namespace lookup" enabled.

Regards,
CP

Hello CP,

I was able to use STLport in wrapper mode with HP's aCC(with Koenig lookup enabled ie with -Wc,-koenig_lookup,on, option). When the above is working fine why are we facing problems with the ICC? Is this problem specific to ICC only?

Regards
Ananth

Hello Anantha,

Please go through the STLPort documentation - I have sent you the link for the same in one of the replies.

It is mentioned on that page that -
* For the most modern compilers which implements Koenig lookup properly, this option (wrapper mode) may not be available due to ambiguities during namespace lookup. Example: gcc-3.0

here is the link -
http://www.stlport.org/doc/select_io.html

So this is not the issue with Intel compiler.

Could you please compile the attached test case with HP's aCC (with and w/o -Wc,-koenig_lookup options) and let me know the results.
(Please mention the compiler version.)

Waiting for your reply.

Thanks,
CP

Deje un comentario

Por favor inicie sesión para agregar un comentario. ¿No es socio? Únase ya