Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8252346 | 8u281 | Alexander Matveev | P3 | Resolved | Fixed | b01 |
JDK-8256959 | jfx11.0.10 | Alexander Matveev | P3 | Resolved | Fixed |
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").
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").
- backported by
-
JDK-8252346 gstreamer fails to build with gcc 10
- Resolved
-
JDK-8256959 gstreamer fails to build with gcc 10
- Resolved
- blocks
-
JDK-8252191 Update to gcc 10.2 on Linux
- Resolved