Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 639614 - dev-db/firebird-2.5.7.27050.0 won't emerge with GCC 6
Summary: dev-db/firebird-2.5.7.27050.0 won't emerge with GCC 6
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Office Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gcc-6
  Show dependency tree
 
Reported: 2017-12-03 11:46 UTC by Matthias Hanft
Modified: 2018-01-09 11:26 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (file_639614.txt,924.74 KB, text/plain)
2017-12-04 08:59 UTC, Matthias Hanft
Details
emerge --info '=dev-db/firebird-2.5.7.27050.0::gentoo' (file_639614.txt,5.47 KB, text/plain)
2017-12-04 09:00 UTC, Matthias Hanft
Details
emerge -pqv '=dev-db/firebird-2.5.7.27050.0::gentoo' (file_639614.txt,96 bytes, text/plain)
2017-12-04 09:01 UTC, Matthias Hanft
Details
environment (file_639614.txt,129.20 KB, text/plain)
2017-12-04 09:02 UTC, Matthias Hanft
Details
possible fix (fb.patch,2.08 KB, patch)
2017-12-04 15:26 UTC, Maciej S. Szmigiero
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Hanft 2017-12-03 11:46:18 UTC
Since using gcc version 6, firebird 2.5.7 won't emerge any more. Beside many, many warnings when compiling (which may possibly be ignored), emerge fails with:

make[3]: Leaving directory '/var/tmp/portage/dev-db/firebird-2.5.7.27050.0/work/Firebird-2.5.7.27050-0/gen'
rm -f empty.fdb
../gen/firebird/bin/create_db empty.fdb
invalid request BLR at offset 38
-Too many Contexts of Relation/Procedure/Views. Maximum allowed is 255
make[2]: *** [../gen/Makefile.refDatabases:68: empty.fdb] Error 254
make[2]: Leaving directory '/var/tmp/portage/dev-db/firebird-2.5.7.27050.0/work/Firebird-2.5.7.27050-0/gen'
make[1]: *** [Makefile:275: empty_db] Error 2
make[1]: Leaving directory '/var/tmp/portage/dev-db/firebird-2.5.7.27050.0/work/Firebird-2.5.7.27050-0/gen'
make: *** [Makefile:6: firebird] Error 2
 * ERROR: dev-db/firebird-2.5.7.27050.0::gentoo failed (compile phase):
 *   emake failed

This issue is also described in http://tracker.firebirdsql.org/browse/CORE-5099 where "--enable-debug" is mentioned as a possible solution. Setting the "debug" USE flag (which, to my knowledge, is the Gentoo translation of this), leads just to another error message:

make[3]: Leaving directory '/var/tmp/portage/dev-db/firebird-2.5.7.27050.0/work/Firebird-2.5.7.27050-0/gen'
rm -f empty.fdb
../gen/firebird/bin/create_db empty.fdb
make[2]: *** [../gen/Makefile.refDatabases:68: empty.fdb] Aborted
make[2]: *** Deleting file 'empty.fdb'
make[2]: Leaving directory '/var/tmp/portage/dev-db/firebird-2.5.7.27050.0/work/Firebird-2.5.7.27050-0/gen'
make[1]: *** [Makefile:275: empty_db] Error 2
make[1]: Leaving directory '/var/tmp/portage/dev-db/firebird-2.5.7.27050.0/work/Firebird-2.5.7.27050-0/gen'
make: *** [Makefile:6: firebird] Error 2
 * ERROR: dev-db/firebird-2.5.7.27050.0::gentoo failed (compile phase):
 *   emake failed

So it seems that just the compiled "firebird/bin/create_db" cannot create (an obviously empty database?) "empty.fdb" (for whatever this may be needful). Since emerge aborts, I cannot check if the server itself would run (probably it would, I guess).

With GCC < 6, there were no problems at all.
Comment 1 Jonas Stein gentoo-dev 2017-12-03 20:09:24 UTC
Thank you for the report. Please *attach* the logfiles,
https://wiki.gentoo.org/wiki/Bugzilla/Bug_report_guide#Report_a_build-time_bug_.28emerge_failed.29
and reopen this ticket (Status:unconfirmed).
Comment 2 Matthias Hanft 2017-12-04 08:59:29 UTC
Created attachment 507984 [details]
build.log
Comment 3 Matthias Hanft 2017-12-04 09:00:45 UTC
Created attachment 507986 [details]
emerge --info '=dev-db/firebird-2.5.7.27050.0::gentoo'
Comment 4 Matthias Hanft 2017-12-04 09:01:43 UTC
Created attachment 507988 [details]
emerge -pqv '=dev-db/firebird-2.5.7.27050.0::gentoo'
Comment 5 Matthias Hanft 2017-12-04 09:02:49 UTC
Created attachment 507990 [details]
environment
Comment 6 Maciej S. Szmigiero 2017-12-04 15:24:40 UTC
I've hit the same problem on gcc version 6.4.0 (Gentoo Hardened 6.4.0 p1.0).

It is well known that Firebird has problems building with GCC 6 
( http://tracker.firebirdsql.org/browse/CORE-5099 ).

I was able to make it build again by appending
"-flifetime-dse=1 -fno-sized-deallocation -fno-delete-null-pointer-checks"
to CXXFLAGS, taken from the above upstream bug, and also adding exception
specifiers to "new" operators that return NULL.

Some of these CXXFLAGS might technically not be needed for this Firebird version
but I think it is better to play safe here than audit the entire code.

Patch against the current Portage tree is attached (will probably need to be
made conditional on the compiler version).

BTW. Existing "firebird-2.5.7.27050.0-gcc6.patch" patch was missing a trailing newline.
Comment 7 Maciej S. Szmigiero 2017-12-04 15:26:03 UTC
Created attachment 508030 [details, diff]
possible fix
Comment 8 Andreas Sturmlechner gentoo-dev 2017-12-06 11:46:23 UTC
Imo the real fix is to get rid of firebird-2*.
Comment 9 Maciej S. Szmigiero 2017-12-06 11:55:31 UTC
(In reply to Andreas Sturmlechner from comment #8)
> Imo the real fix is to get rid of firebird-2*.

Firebird 3 have incompatible changes so it can't be used as a drop-in replacement
for 2.5.
That's why the upstream keeps 2.5 maintained, too.
Comment 10 Andreas Sturmlechner gentoo-dev 2017-12-06 12:08:29 UTC
(In reply to Maciej S. Szmigiero from comment #9)
> That's why the upstream keeps 2.5 maintained, too.

That's fine; but we don't have to, if they aren't able to fix it with GCC-6.
Comment 11 Maciej S. Szmigiero 2017-12-06 12:22:13 UTC
(In reply to Andreas Sturmlechner from comment #10)
> (In reply to Maciej S. Szmigiero from comment #9)
> > That's why the upstream keeps 2.5 maintained, too.
> 
> That's fine; but we don't have to, if they aren't able to fix it with GCC-6.

The package builds with GCC-6 with CXXFLAGS suggested in the upstream bug report.

Note that their trunk (3.x) also seems to have the same problem
(it might build fine but looking at what these flags do and why they are needed it might not work correctly without them).

Due to impossibility to replace 2.5 with 3.0 without reworking things like
stored procedures in databases NAK for the removal of 2.5 from the tree.
Comment 12 Matthias Hanft 2017-12-06 12:28:15 UTC
BTW, emerge firebird 3.0.2 *does* work with GCC 6, but there are other issues which would justify a separate bug report: missing firebird.msg and employee.fdb after install; the (fbsql/libfbclient.so) client needs absurd write (!) access to /etc/firebird/databases.conf and /var/log/firebird/firebird.log even if the server is on another machine; the logrotate conf misses su parameter; some file/dir permissions are wrong; and so on. Finally I got it to work, though.

But that's only the "emerge" side. As posted in the previous comment, this won't fix the database internal issues.
Comment 13 Andreas Sturmlechner gentoo-dev 2017-12-06 13:25:14 UTC
CCing dev-ada/gps-bin maintainer, which is the only reverse-dependency of firebird-2 in tree.
Comment 14 RazrFalcon 2017-12-06 15:21:00 UTC
Same bug, but my error looks like:

make[2]: Leaving directory '/var/tmp/portage/dev-db/firebird-2.5.7.27050.0/work/Firebird-2.5.7.27050-0/gen'
make -f ../gen/Makefile.refDatabases empty_db
make[2]: Entering directory '/var/tmp/portage/dev-db/firebird-2.5.7.27050.0/work/Firebird-2.5.7.27050-0/gen'
make -f ../gen/Makefile.static.createdb
make[3]: Entering directory '/var/tmp/portage/dev-db/firebird-2.5.7.27050.0/work/Firebird-2.5.7.27050-0/gen'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/var/tmp/portage/dev-db/firebird-2.5.7.27050.0/work/Firebird-2.5.7.27050-0/gen'
rm -f empty.fdb
../gen/firebird/bin/create_db empty.fdb
make[2]: *** [../gen/Makefile.refDatabases:68: empty.fdb] Segmentation fault
make[2]: *** Deleting file 'empty.fdb'
make[2]: Leaving directory '/var/tmp/portage/dev-db/firebird-2.5.7.27050.0/work/Firebird-2.5.7.27050-0/gen'
make[1]: *** [Makefile:275: empty_db] Error 2
make[1]: Leaving directory '/var/tmp/portage/dev-db/firebird-2.5.7.27050.0/work/Firebird-2.5.7.27050-0/gen'
make: *** [Makefile:6: firebird] Error 2
Comment 15 Maciej S. Szmigiero 2017-12-06 15:26:55 UTC
(In reply to RazrFalcon from comment #14)
> Same bug, but my error looks like:

Did you try my patch from comment 7?
Comment 16 Andreas Sturmlechner gentoo-dev 2017-12-06 19:25:34 UTC
(In reply to Maciej S. Szmigiero from comment #11)
> Due to impossibility to replace 2.5 with 3.0 without reworking things like
> stored procedures in databases NAK for the removal of 2.5 from the tree.

From office POV firebird-2 is *done*, since LibreOffice has moved on to 3. Anyone else should too.

What it really needs, to serve as more than a sorry libreoffice revdep, is a designated maintainer (who is prepared to fix a lot of stuff upstream).
Comment 17 Larry the Git Cow gentoo-dev 2017-12-06 20:15:19 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7b0cb0b12132fdc710a9ef12fbb53c1bbe21eec

commit e7b0cb0b12132fdc710a9ef12fbb53c1bbe21eec
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2017-12-06 19:58:45 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2017-12-06 20:14:57 +0000

    dev-db/firebird: Fix build with GCC-6
    
    Thanks-to: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
    Bug: https://bugs.gentoo.org/639614
    Package-Manager: Portage-2.3.16, Repoman-2.3.6

 dev-db/firebird/Manifest                                | 4 ++--
 dev-db/firebird/files/firebird-2.5.7.27050.0-gcc6.patch | 2 +-
 dev-db/firebird/firebird-2.5.7.27050.0.ebuild           | 2 ++
 3 files changed, 5 insertions(+), 3 deletions(-)}
Comment 18 Larry the Git Cow gentoo-dev 2018-01-09 11:26:52 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a5fb1a9f010c2eba9380baa55b9269add19a61b0

commit a5fb1a9f010c2eba9380baa55b9269add19a61b0
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2017-12-06 11:50:00 +0000
Commit:     Patrice Clement <monsieurp@gentoo.org>
CommitDate: 2018-01-09 11:26:33 +0000

    dev-db/firebird: drop awfully broken firebird-2*.
    
    Closes: https://bugs.gentoo.org/639614
    Closes: https://github.com/gentoo/gentoo/pull/6467
    Package-Manager: Portage-2.3.13, Repoman-2.3.4

 dev-db/firebird/Manifest                           |   1 -
 .../firebird-2.5.1.26351.0-superclassic.patch      |  12 -
 .../files/firebird-2.5.3.26780.0-deps-flags.patch  |  59 -----
 .../files/firebird-2.5.7.27050.0-gcc6.patch        |  35 ---
 dev-db/firebird/files/firebird.conf.d.2.5          |   7 -
 dev-db/firebird/files/firebird.init.d.2.5          |  30 ---
 dev-db/firebird/files/firebird.xinetd              |  11 -
 dev-db/firebird/firebird-2.5.7.27050.0.ebuild      | 282 ---------------------
 dev-db/firebird/metadata.xml                       |   1 -
 9 files changed, 438 deletions(-)