Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8252060

gstreamer fails to build with gcc 10

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8u261, openjfx16
    • Fix Version/s: openjfx16
    • Component/s: javafx
    • Labels:

      Backports

        Description

        Building JavaFX with gcc 10 fails with the following error at link time:

        ld: error: rt/modules/javafx.media/build/native/linux/Release/obj/gstreamer-lite/gstreamer/gst/gstallocator.o: multiple definition of 'GST_CAT_CONTEXT'
        ld: rt/modules/javafx.media/build/native/linux/Release/obj/gstreamer-lite/gstreamer/gst/gst.o: previous definition here
        ld: error: rt/modules/javafx.media/build/native/linux/Release/obj/gstreamer-lite/gstreamer/gst/gstallocator.o: multiple definition of 'GST_CAT_LOCKING'
        ld: rt/modules/javafx.media/build/native/linux/Release/obj/gstreamer-lite/gstreamer/gst/gst.o: previous definition here
        ...

        There are, in fact, duplicate definitions of this symbol, and gcc 10 seems to care. I traced it down to the following:

        modules/javafx.media/src/main/native/gstreamer/gstreamer-lite/gstreamer/gst/gstconfig.h
           162 #ifdef GSTREAMER_LITE
           163 // We using def file to limit export, so not need to export all APIs
           164 #ifndef GST_API
        ---> 165 #define GST_API
           166 #endif
           167 #else // GSTREAMER_LITE
           168 #ifndef GST_API
           169 #define GST_API GST_EXPORT
           170 #endif
           171 #endif // GSTREAMER_LITE

        I did a local build with GST_API defined to GST_EXPORT and it caused was able to compile and link successfully, but I don't know whether that is the right fix (presumably there is some reason we aren't using "extern").

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  almatvee Alexander Matveev
                  Reporter:
                  kcr Kevin Rushforth
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: