Full_Name: Jan Synacek Version: 2.4.40 OS: GNU/Linux URL: https://jsynacek.fedorapeople.org/openldap/jsynacek-20150211-fix-libdb-detection-with-gcc-5.patch Submission from: (NULL) (94.112.188.81) The old cpp version generated: __db_version 5 Configure then correctly picked up the version, since it greps for "__db_version". The new output: __db_version 5 Grepping no longer works and configure fails. Running cpp with -P (inhibit linemarkers generation) fixes this when using gcc 5. Behavior with older versions of gcc is not changed.
jsynacek@redhat.com wrote: > Full_Name: Jan Synacek > Version: 2.4.40 > OS: GNU/Linux > URL: https://jsynacek.fedorapeople.org/openldap/jsynacek-20150211-fix-libdb-detection-with-gcc-5.patch > Submission from: (NULL) (94.112.188.81) > > > The old cpp version generated: > __db_version 5 > > Configure then correctly picked up the version, since it greps for > "__db_version". > > The new output: > __db_version > 5 > > Grepping no longer works and configure fails. > > Running cpp with -P (inhibit linemarkers generation) fixes this when using gcc > 5. > Behavior with older versions of gcc is not changed. Your patch is simple enough but frankly this sounds like a bug in gcc 5's cpp. It shouldn't be inserting gratuitous whitespace in the middle of lines, or inserting line breaks arbitrarily. -- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/
Howard Chu <hyc@symas.com> writes: > jsynacek@redhat.com wrote: >> Full_Name: Jan Synacek >> Version: 2.4.40 >> OS: GNU/Linux >> URL: https://jsynacek.fedorapeople.org/openldap/jsynacek-20150211-fix-libdb-detection-with-gcc-5.patch >> Submission from: (NULL) (94.112.188.81) >> >> >> The old cpp version generated: >> __db_version 5 >> >> Configure then correctly picked up the version, since it greps for >> "__db_version". >> >> The new output: >> __db_version >> 5 >> >> Grepping no longer works and configure fails. >> >> Running cpp with -P (inhibit linemarkers generation) fixes this when using gcc >> 5. >> Behavior with older versions of gcc is not changed. > > Your patch is simple enough but frankly this sounds like a bug in gcc > 5's cpp. It shouldn't be inserting gratuitous whitespace in the middle > of lines, or inserting line breaks arbitrarily. Yes, probably. But in the meantime, I needed the package to build, so I wrote this patch. Cheers, -- Jan Synacek Software Engineer, Red Hat
Jan Synacek wrote: > Howard Chu <hyc@symas.com> writes: >> jsynacek@redhat.com wrote: >>> Full_Name: Jan Synacek >>> Version: 2.4.40 >>> OS: GNU/Linux >>> URL: https://jsynacek.fedorapeople.org/openldap/jsynacek-20150211-fix-libdb-detection-with-gcc-5.patch >>> Submission from: (NULL) (94.112.188.81) >>> >>> >>> The old cpp version generated: >>> __db_version 5 >>> >>> Configure then correctly picked up the version, since it greps for >>> "__db_version". >>> >>> The new output: >>> __db_version >>> 5 >>> >>> Grepping no longer works and configure fails. >>> >>> Running cpp with -P (inhibit linemarkers generation) fixes this when using gcc >>> 5. >>> Behavior with older versions of gcc is not changed. >> >> Your patch is simple enough but frankly this sounds like a bug in gcc >> 5's cpp. It shouldn't be inserting gratuitous whitespace in the middle >> of lines, or inserting line breaks arbitrarily. > > Yes, probably. But in the meantime, I needed the package to build, so I > wrote this patch. Please file a bug with the gcc project and followup here with a link to that bug, for future reference. Thanks. Adding this patch to git master. -- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/
changed notes changed state Open to Test moved from Incoming to Build
changed notes changed state Test to Release
On 11/02/15 14:25, hyc@symas.com wrote: > Your patch is simple enough but frankly this sounds like a bug in gcc > 5's cpp. It shouldn't be inserting gratuitous whitespace in the middle > of lines, or inserting line breaks arbitrarily. Not a gcc bug, the ITS report proved incomplete. gcc-5 inserts "# <file information>" lines (indicating where the macro expansion comes from, I think), so it needs the line breaks. This slightly different test program: #include <db.h> __db_version DB_VERSION_MAJOR+0000; ...produces this: # 2 "test.c" __db_version # 2 "test.c" 3 4 4 # 2 "test.c" +0000; -- Hallvard
Howard Chu <hyc@symas.com> writes: > Jan Synacek wrote: >> Howard Chu <hyc@symas.com> writes: >>> jsynacek@redhat.com wrote: >>>> Full_Name: Jan Synacek >>>> Version: 2.4.40 >>>> OS: GNU/Linux >>>> URL: https://jsynacek.fedorapeople.org/openldap/jsynacek-20150211-fix-libdb-detection-with-gcc-5.patch >>>> Submission from: (NULL) (94.112.188.81) >>>> >>>> >>>> The old cpp version generated: >>>> __db_version 5 >>>> >>>> Configure then correctly picked up the version, since it greps for >>>> "__db_version". >>>> >>>> The new output: >>>> __db_version >>>> 5 >>>> >>>> Grepping no longer works and configure fails. >>>> >>>> Running cpp with -P (inhibit linemarkers generation) fixes this when using gcc >>>> 5. >>>> Behavior with older versions of gcc is not changed. >>> >>> Your patch is simple enough but frankly this sounds like a bug in gcc >>> 5's cpp. It shouldn't be inserting gratuitous whitespace in the middle >>> of lines, or inserting line breaks arbitrarily. >> >> Yes, probably. But in the meantime, I needed the package to build, so I >> wrote this patch. > > Please file a bug with the gcc project and followup here with a link to > that bug, for future reference. Thanks. Filed as https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65037. > Adding this patch to git master. Thank you, -- Jan Synacek Software Engineer, Red Hat
changed notes changed state Release to Closed
changed notes changed state Closed to Release
fixed in master fixed in RE25 fixed in RE24 (2.4.42)