configure log4cplus not able to detect gcc

2014-01-28
2014-01-28
  • rubenvb
    rubenvb
    2014-01-28

    The best way to use MSYS is described on the wiki: https://sourceforge.net/apps/trac/mingw-w64/wiki/MSYS

    Although the postinstall bit is outdated. All you need to do (and thats what the postinstall script does) is set your PATH correctly:

    export PATH=/mingw/bin:$PATH
    

    Assuming this is where your gcc.exe is located (no need for prefixes with native toolchains. If you do not have a native toolchain, find one here). Then you need to configure with the following argument (as described on the wiki):

    --host=x86_64-w64-mingw32
    

    If that does not work, that means log4cxx is using a crappy configure script, and you should add

    CXX=g++ CC=gcc
    

    to your configure command.

     
    • Václav Zeman
      Václav Zeman
      2014-01-28

      If that does not work, that means log4cxx is using a crappy configure script, and you should add

      This is about log4cplus, not log4cxx. They are actually two different projects.

       
  • Václav Zeman
    Václav Zeman
    2014-01-28

    Log4cplus has normal Autoconf/Automake build system that should definitely not be that broken that it would fail like that. It works on various systems, including Linux, AIX, HP-UX, etc.

     
  • rubenvb
    rubenvb
    2014-01-28

    Ok, misread, apologies to the author. Oh that's you ;-).

     
  • Thanks a lot chaps; i re-explored the options of changing the path and adding the extra options and i'm so sorry i was an idiot check the == after CC that was the root cause all along. Thanks so much for your time it's really appreciated as without i would still have never spotted that glaring error!

    ./configure --prefix=/mingw/usr CXXFLAGS=-std=gnu++0x CXX=x86_64-w64-mingw32
    -g++.exe CC=x86_64-w64-mingw32-gcc.exe --host=x86_64-w64-mingw32

    Now working perfectly

     
  • Thanks a lot chaps; i re-explored the options of changing the path and adding the extra options and i'm so sorry i was an idiot check the == after CC that was the root cause all along. Thanks so much for your time it's really appreciated as without i would still have never spotted that glaring error!

    ./configure --prefix=/mingw/usr CXXFLAGS=-std=gnu++0x CXX=x86_64-w64-mingw32
    -g++.exe CC=x86_64-w64-mingw32-gcc.exe --host=x86_64-w64-mingw32

    Now working perfectly