Results 1 to 6 of 6

Thread: 13.04 appears to have a special way with include-paths

  1. #1
    Join Date
    Apr 2013
    Beans
    1

    13.04 appears to have a special way with include-paths

    make[1]: Entering directory `/home/r3/Documents/qt/xx/yy/zz'

    icpc -c -O2 -falign-functions=16 -ansi-alias -fstrict-aliasing -w1 -Wcheck -wd654,1572,411,873,1125,2259 -D_REENTRANT -DRLX -DQT_NO_DEBUG -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-icc-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtSql -I/usr/include/qt4 -I.. -I../../rxcommon -I../../rxserver -I../../src/preprocess -I../expressionedit -I../runcontroledit -I../textboxdelegate -I../../thirdparty/qtsnippets -I. -I. -o aa.o aa.cpp

    /usr/include/c++/4.7/utility(70): catastrophic error: cannot open source file "bits/c++config.h"
    #include <bits/c++config.h>


    This is the welcome message that 13.04 gives me. Has anyone else seen something similar?

  2. #2
    Join Date
    Jul 2011
    Beans
    1

    Re: 13.04 appears to have a special way with include-paths

    Yes, I'm suffering with this now
    I fix one thing and another comes up

    as for your question, after googling for hours I realized that icpc needs/uses g++ headers for some reason
    anyway the <bits/c++config.h> file is a g++ specific file that g++ automatically searches for, but not icpc

    so just add this to icpc compiler flags:

    -I/usr/include/x86_64-linux-gnu/c++/4.7/
    this is the 64-bit version,

    for 32 use:
    -I/usr/include/x86_64-linux-gnu/c++/4.7/32/

    BUT, this doesn't solve everything. if you try to include <algorithm>
    some other problems happen (That I still haven't figured out yet)
    and yet other problems if you try including <vector> occur

    if anyone knows what's going on here, please help
    Last edited by YesserLab; May 10th, 2013 at 07:04 PM.

  3. #3
    Join Date
    May 2013
    Beans
    1

    Re: 13.04 appears to have a special way with include-paths

    I am suffering from the same thing. I am trying to use the intel compiler for compiling other packages such as HDF5, MPICH2, etc.
    How can I set the compiler flag that "YasserLab" said to be used all the times when icpc is called?

    Most of these packages use the ./configure command. Is there anyway to add this flag for the compiler as well?

    Thanks

  4. #4
    Join Date
    Sep 2011
    Beans
    1

    Re: 13.04 appears to have a special way with include-paths

    You could add /usr/include/x86_64-linux-gnu/c++/4.7 to your CPLUS_INCLUDE_PATH. So:

    export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/include/x86_64-linux-gnu/c++/4.7

    That was what I did, when trying to compile a large project with the intel c++ compiler on Ubuntu 13.04. Seems to work....

  5. #5
    Join Date
    May 2010
    Beans
    15

    Re: 13.04 appears to have a special way with include-paths

    Hi,

    I have short program helloworld.cpp

    Code:
    #include <iostream>
    int main() {
    std::cout << "Hello, world!" << std::endl;
    return 0;
    }
    On my fresh Ubuntu 13.04 (3.8.0-26-generic #38-Ubuntu SMP Mon Jun 17 21:43:33 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux)

    I get upon compilation with Intel compilers (icpc (ICC) 12.1.3 20120212):


    Code:
    icpc helloworld.cpp   -I/usr/include/x86_64-linux-gnu/c++/4.7
    /usr/include/c++/4.7/ext/atomicity.h(48): error: identifier "__ATOMIC_ACQ_REL" is undefined
        { return __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }
                                                  ^
    
    
    /usr/include/c++/4.7/ext/atomicity.h(48): error: identifier "__atomic_fetch_add" is undefined
        { return __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }
                 ^
    
    
    /usr/include/c++/4.7/ext/atomicity.h(52): error: identifier "__ATOMIC_ACQ_REL" is undefined
        { __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }
                                           ^
    
    
    /usr/include/c++/4.7/ext/atomicity.h(52): error: identifier "__atomic_fetch_add" is undefined
        { __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }
          ^
    
    
    compilation aborted for helloworld.cpp (code 2)


    Any help, please ?

    Miro
    Last edited by miroi; July 5th, 2013 at 07:40 AM.

  6. #6
    Join Date
    Jul 2013
    Beans
    1

    Re: 13.04 appears to have a special way with include-paths

    Hi,

    On 32bit system I have found

    -I/usr/include/i386-linux-gnu/c++/4.7/

    to be the path to work.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •