Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.

 View Only
  • 1.  undefined reference to __cxa_get_exception_ptr (CPLEX g++ error)

    Posted Mon April 12, 2010 04:09 PM

    Originally posted by: MichaelD.Moffitt


    Hello all,

    I am trying to compile one of the CPLEX examples C++ (ilomipex1.cpp). I have tried using two different versions of g++.

    gcc version 4.1.0 20060515 (Red Hat 4.1.0-18)
    gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)
    Unfortunately, I receive the following cryptic error. Searching the internet suggests something about libraries generated from incompatible versions of g++ ... but alas, I'm just using what came with my CPLEX distribution.

    Can anyone help?

    Command:

    g++4 -O -fPIC -fexceptions -DNDEBUG -DIL_STD -I/afs/eda.fishkill.ibm.com/project/minipart/mmoffitt/cplex/cplex121/include -I/afs/eda.fishkill.ibm.com/project/minipart/mmoffitt/cplex/concert29/include ilomipex1.cpp -L/afs/eda.fishkill.ibm.com/project/minipart/mmoffitt/cplex/cplex121/lib/x86-64_debian4.0_4.1/static_pic/ -lilocplex -lcplex -L/afs/eda.fishkill.ibm.com/project/minipart/mmoffitt/cplex/concert29/lib/x86-64_debian4.0_4.1/static_pic/ -lconcert -lm -lpthread -o executable

    Output:

    http://.../cplex121/lib/x86-64_debian4.0_4.1/static_pic//libilocplex.a(ilocplex.o)(.text+0x21816): In function `IloCplexI::IloCplexI(IloEnvI*)':
    : undefined reference to `__cxa_get_exception_ptr'
    http://.../cplex121/lib/x86-64_debian4.0_4.1/static_pic//libilocplex.a(ilocplex.o)(.text+0x24ed6): In function `IloCplexI::IloCplexI(IloEnvI*)':
    : undefined reference to `__cxa_get_exception_ptr'
    http://.../cplex121/lib/x86-64_debian4.0_4.1/static_pic//libilocplex.a(iloexpr.o)(.text+0x2efb): In function `IloExprParser::extract(IloNumExprI const*)':
    : undefined reference to `__cxa_get_exception_ptr'
    http://.../concert29/lib/x86-64_debian4.0_4.1/static_pic//libconcert.a(iloalg.o)(.text+0x5661): In function `IloAlgorithmI::apply(IloChange const&, IloExtractableI const*)':
    : undefined reference to `__cxa_get_exception_ptr'
    http://.../concert29/lib/x86-64_debian4.0_4.1/static_pic//libconcert.a(iloalg.o)(.text+0x577b): In function `IloAlgorithmI::apply(IloChange const&, IloExtractableI const*)':
    : undefined reference to `__cxa_get_exception_ptr'
    http://.../concert29/lib/x86-64_debian4.0_4.1/static_pic//libconcert.a(iloalg.o)(.text+0x59cb): more undefined references to `__cxa_get_exception_ptr' follow
    collect2: ld returned 1 exit status
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: undefined reference to __cxa_get_exception_ptr (CPLEX g++ error)

    Posted Mon April 12, 2010 04:27 PM

    Originally posted by: SystemAdmin


    Searching for "__cxa_get_exception_ptr" in your favorite search engine seems to indicate that you are using a stdlibc++ that is incompatible with CPLEX 12.1. The CPLEX manual should tell you which compiler, libc, and stdlibc++ versions should be used for the various ports.
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: undefined reference to __cxa_get_exception_ptr (CPLEX g++ error)

    Posted Mon April 12, 2010 05:22 PM

    Originally posted by: MichaelD.Moffitt


    > Tobias Achterberg wrote:
    > The CPLEX manual should tell you which compiler, libc, and stdlibc++ versions should be used for the various ports.

    I agree that it should, but I'm afraid that it doesn't. There are two manuals that I frequently consult: the CPLEX User's Manual and the Concert C++ API Manual. Neither makes any mention of compilers supported, but the User's Manual does allude to mptable.html, a file included in the distribution. That file elaborates slightly that g++ 4.1 (64-bit) is supported.

    But, there is no mention of libstdc++ version, and I continue to get the error using even when I use g++ 4.1.0.

    I should note that I also get the error when I run "make execute_cpp" in the appropriate machine directory.
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: undefined reference to __cxa_get_exception_ptr (CPLEX g++ error)

    Posted Mon April 12, 2010 05:52 PM

    Originally posted by: MichaelD.Moffitt


    I believe I have found the root of the problem ... while the version of g++ I'm using is indeed 4.1.0, it had been butchered to use many of the libraries from version 3.4.3. I did not realize that was possible.

    Seems to be working now, many thanks for the help.
    #CPLEXOptimizers
    #DecisionOptimization