gpre error when trying to build

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

gpre error when trying to build

U-BLASTER-6000\mtdew

Hi-

I am trying to build from source firebird 2.5. I am intersted in using
gpre with cobol.

I use ./configure -with-gpre-cobol -with-system-icu

I get past configure but then run into these errors when trying to use
the command make.

Please let me know if there is anything I can do to get past these
errors. Hopefully it is something silly I am doing.

thx. very much- jim

../src/common/classes/alloc.cpp:2127:7: error: declaration of ‘void* operator new(size_t) throw (std::bad_alloc)’ has a different exception specifier
 void* operator new(size_t s) THROW_BAD_ALLOC
       ^~~~~~~~
In file included from ../src/common/classes/alloc.cpp:32:0:
../src/include/../common/classes/alloc.h:502:7: note: from previous declaration ‘void* operator new(std::size_t)’
 void* operator new(size_t s) THROW_BAD_ALLOC;
       ^~~~~~~~
../src/common/classes/alloc.cpp:2131:7: error: declaration of ‘void* operator new [](size_t) throw (std::bad_alloc)’ has a different exception specifier
 void* operator new[](size_t s) THROW_BAD_ALLOC
       ^~~~~~~~
In file included from ../src/common/classes/alloc.cpp:32:0:
../src/include/../common/classes/alloc.h:503:7: note: from previous declaration ‘void* operator new [](std::size_t)’
 void* operator new[](size_t s) THROW_BAD_ALLOC;
       ^~~~~~~~
../gen/make.rules:112: recipe for target '../temp/boot/common/classes/alloc.o' failed
make[3]: *** [../temp/boot/common/classes/alloc.o] Error 1
make[3]: Leaving directory '/home/smasher/firebird/Firebird-2.5.7.27050-0/gen'
Makefile:233: recipe for target 'gpre_boot' failed
make[2]: *** [gpre_boot] Error 2
make[2]: Leaving directory '/home/smasher/firebird/Firebird-2.5.7.27050-0/gen'
Makefile:227: recipe for target '../gen/firebird/bin/gpre_static' failed
make[1]: *** [../gen/firebird/bin/gpre_static] Error 2
make[1]: Leaving directory '/home/smasher/firebird/Firebird-2.5.7.27050-0/gen'
Makefile:6: recipe for target 'firebird' failed
make: *** [firebird] Error 2

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Reply | Threaded
Open this post in threaded view
|

Re: gpre error when trying to build

Michal Kubecek
On Sat, Jun 17, 2017 at 02:35:46PM -0400, U-BLASTER-6000\mtdew wrote:

>
> I am trying to build from source firebird 2.5. I am intersted in using
> gpre with cobol.
>
> I use ./configure -with-gpre-cobol -with-system-icu
>
> I get past configure but then run into these errors when trying to use
> the command make.
>
> Please let me know if there is anything I can do to get past these
> errors. Hopefully it is something silly I am doing.
>
> thx. very much- jim
>
> ../src/common/classes/alloc.cpp:2127:7: error: declaration of ‘void* operator new(size_t) throw (std::bad_alloc)’ has a different exception specifier
>  void* operator new(size_t s) THROW_BAD_ALLOC
>        ^~~~~~~~

There are some issues when building Firebird with compiler in C++14 mode
which is default for gcc >= 6. For details see e.g.

  https://tracker.firebirdsql.org/browse/CORE-5099

For Firebird 2.5, the problem can be worked around by adding
"-std=gnu++98 -fno-lifetime-dse" to CXXFLAGS which enforces C++98 mode
even on newer gcc and disables certain optimizations.

However, if your ICU is version 59.1 (or newer), you may be in trouble
as that requires C++11:

  https://sourceforge.net/p/firebird/mailman/message/35878832/

Michal Kubecek


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel