Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1364943 - Flex 2.6.0 generates C90-incompatible code
Summary: Flex 2.6.0 generates C90-incompatible code
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: flex
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Patsy Griffin
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1318074
Blocks: 1405384
TreeView+ depends on / blocked
 
Reported: 2016-08-08 09:21 UTC by Daniel Vrátil
Modified: 2016-12-19 01:25 UTC (History)
4 users (show)

Fixed In Version: rawhide and flex-2.6.0-3.f25, flex-2.6.0-3.f24 flex-2.6.0-3.fc25 flex-2.6.0-3.fc24 flex-2.6.0-3.fc23
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-19 01:25:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Daniel Vrátil 2016-08-08 09:21:25 UTC
Description of problem:

flex 2.6.0 generates a code that contains C++-styled comments, causing build in C90 mode to fail:

/builddir/build/BUILD/solid-5.25.0/x86_64-redhat-linux-gnu/src/solid/predicate_lexer.c:1587:21: error: C++ style comments are not allowed in ISO C90
   num_to_alloc = 1; // After all that talk, this was set to 1 anyways...


This issue was addressed in flex 2.6.1: https://github.com/westes/flex/commit/07d89829cce4527c7614a34642d4b2c2ef5d6005

Version-Release number of selected component (if applicable):
2.6.0-2.fc26


How reproducible:
Always



Additional info:
Failed build: http://koji.fedoraproject.org/koji/taskinfo?taskID=15171444

Comment 1 Rex Dieter 2016-09-13 13:16:55 UTC
ping, any objection to updating to flex-2.6.1 that includes the fix?

If not, I'll be happy to help do it (in a few days time).

Comment 2 Patsy Griffin 2016-09-13 14:51:21 UTC
Hi Rex,

I was hoping to include the changes to add the .so files with the 2.6.1 update.
I'm hoping to get reviewer approval on those changes before the end of this week.  If not, I will be happy to do the 2.6.1 rebase this weekend and add the support for the .so files as an update.

Is that acceptable?

Thanks,
Patsy

Comment 3 Rex Dieter 2016-09-13 18:12:09 UTC
that's great news, very acceptable, thank you.

Comment 4 Rex Dieter 2016-10-19 19:41:54 UTC
ping, this (still) affects f24's flex-2.6.0-2.fc24.x86_64, possible for an update or fix there too?

Comment 5 Fredy Neeser 2016-10-20 07:48:50 UTC
Hi,

I'm affected by this bug, which causes Plasma build failures for KF5 packages such as kf5-kservice, kf5-solid ...

The reason I am trying to build Plasma from sources is that I want to debug a new Plasma bug, which makes multiscreen hardly usable for me since I upgraded to Fedora 24 with Plasma 5.8.0 ... 5.8.2.

It would be great to get the flex 2.6.1 update for f24 -- otherwise, I'd have to patch the KDE sources myself to work around the flex issue.

Thanks!

Comment 6 Patsy Griffin 2016-10-20 15:40:20 UTC
Hi,

I'll try to get the fix pushed to Fedora 25 and 24 today.

-Patsy

Comment 7 Patsy Griffin 2016-10-21 02:48:58 UTC
Fredy,

Pushed to Fedora 25 and 24.

Fedora updates issued.  

Please let me know if this resolves your build problems or if you need additional fixes in 2.6.1.

Thanks,
Patsy

Comment 8 Patsy Griffin 2016-10-21 04:17:12 UTC
I pushed the patch that replaces the C++ style comment with a C style comment. I did not rebase to 2.6.1 as we usually rebase in rawhide and patch in older releases.  That being said, if you need additional patches, I am happy to provide them to fix your builds.

I provided the patch on both f25 and f24 for consistency.

Comment 9 Fredy Neeser 2016-10-21 08:53:55 UTC
Patsy,

Thanks for the update! Building kf5_kservice and kf5_solid is now working straight from KDE upstream sources -- I no longer have to patch the CMakeLists.txt files with

  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")

to force C99 compilation.

B.t.w., I found the RPM through
  https://bodhi.fedoraproject.org/updates/FEDORA-2016-92370b4435
and downloaded it from
  http://koji.fedoraproject.org/koji/buildinfo?buildID=811566

  $ rpm -q flex
  flex-2.6.0-3.fc24.x86_64

so I guess it still needs to be pushed to updates-testing.

Regards,
Fredy


PS: For anyone who previously had to patch CMakeLists.txt -- I had to wipe the
  kde/build/kservice
  kde/build/solid
directories to force kdesrc-build to regenerate the code using flex.

Then the build succeeded:

$ kdesrc-build --include-dependencies kservice
Updating kde-build-metadata (to branch master)
 * Downloading projects.kde.org project database...
...
Building kservice from frameworks (10/10)
        Updating kservice (to branch master)
        No source update, but the build directory doesn't exist
        Source update complete for kservice: no files affected
        Preparing build system for kservice.
        Running cmake...
        Compiling... succeeded (after 11 seconds)
        Installing.. succeeded (after 0 seconds)

<<<  PACKAGES SUCCESSFULLY BUILT  >>>
...
kservice

:-)

Comment 10 Patsy Griffin 2016-10-21 13:47:38 UTC
Fredy,  Thank you very much for the feedback!  


Rex, Daniel,

Please let me know if this update does not fix the build failures you were seeing.

Thanks!
Patsy

Comment 11 Fedora Update System 2016-10-22 03:54:00 UTC
flex-2.6.0-3.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-edd72cee3d

Comment 12 Fedora Update System 2016-10-22 11:53:57 UTC
flex-2.6.0-3.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-92370b4435

Comment 13 Fedora Update System 2016-10-23 22:52:48 UTC
flex-2.6.0-3.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2016-11-03 23:53:39 UTC
flex-2.6.0-3.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 Rex Dieter 2016-12-09 17:47:31 UTC
fyi, latest f23 flex build is affected by this too, I'll take the liberty of cherry-picking the fix, since it's blocking other builds, see also bug #1400242

Comment 16 Fedora Update System 2016-12-09 18:51:14 UTC
flex-2.6.0-3.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-173dec4c67

Comment 17 Fedora Update System 2016-12-11 03:59:17 UTC
flex-2.6.0-3.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-173dec4c67

Comment 18 Fedora Update System 2016-12-19 01:25:29 UTC
flex-2.6.0-3.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.