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

gstreamer fails to build with gcc 10

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • jfx16
    • 8u261, jfx16
    • javafx

    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

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

                Dates

                  Created:
                  Updated:
                  Resolved: