Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflicting definitions of NULL beween glib and cdio when AUDIOCD option is enabled #1610

Open
3 tasks done
BSDKaffee opened this issue Nov 25, 2024 · 0 comments · May be fixed by #1611
Open
3 tasks done

Conflicting definitions of NULL beween glib and cdio when AUDIOCD option is enabled #1610

BSDKaffee opened this issue Nov 25, 2024 · 0 comments · May be fixed by #1611

Comments

@BSDKaffee
Copy link

  • I have checked the FAQ for answers.
  • I have checked the Changelog that the issue is not already fixed.
  • I believe this issue is a bug, and not a general technical issue, question or feature requests that can be discussed on the forum.

Describe the bug
After 8da2b9c, strawberry fails to build when the AUDIOCD option is enabled. In the aforementioned commit, the cdio and gstreamer headers in src/device/cddadevice.h were moved above the Qt headers despite a previous comment that they should remain below the Qt headers.

At least with LLVM 19, this causes conflicting definitions of NULL between glib and cdio, resulting in the errors listed below. Moving these headers back to where they were prior to 8da2b9c resolves the issue.

To Reproduce
Build strawberry with CMake argument -DENABLE_AUDIOCD:BOOL=true

Expected behavior
Successful build.

System Information:

  • Operating system: FreeBSD 15-CURRENT amd64 (LLVM 19.1.2)
  • Strawberry Version: 1.2.2

Additional context

FAILED: CMakeFiles/strawberry_lib.dir/src/device/moc_cddadevice.cpp.o 
/usr/local/bin/ccache /usr/local/libexec/ccache/c++ -DBOOST_BIND_NO_PLACEHOLDERS -DKDSINGLEAPPLICATION_STATIC_BUILD -DNDEBUG -DQT_ASCII_CAST_WARNINGS -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_DEBUG_OUTPUT -DQT_NO_FOREACH -DQT_NO_KEYWORDS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_SIGNALS_SLOTS_KEYWORDS -DQT_NO_URL_CAST_FROM_STRING -DQT_SQL_LIB -DQT_STRICT_ITERATORS -DQT_USE_QSTRINGBUILDER -DQT_WIDGETS_LIB -I/usr/home/jhale/src/freebsd/ports/audio/strawberry/work/strawberry-1.2.2 -I/usr/home/jhale/src/freebsd/ports/audio/strawberry/work/.build -I/usr/home/jhale/src/freebsd/ports/audio/strawberry/work/strawberry-1.2.2/src -I/usr/home/jhale/src/freebsd/ports/audio/strawberry/work/.build/src -I/usr/home/jhale/src/freebsd/ports/audio/strawberry/work/strawberry-1.2.2/3rdparty/kdsingleapplication -isystem /usr/home/jhale/src/freebsd/ports/audio/strawberry/work/strawberry-1.2.2/3rdparty/kdsingleapplication/KDSingleApplication/src -isystem /usr/local/include/qt6/QtGui/6.7.3 -isystem /usr/local/include/qt6/QtGui/6.7.3/QtGui -isystem /usr/local/include/qt6/QtCore/6.7.3 -isystem /usr/local/include/qt6/QtCore/6.7.3/QtCore -isystem /usr/local/include/qt6/QtDBus/6.7.3 -isystem /usr/local/include/qt6/QtDBus/6.7.3/QtDBus -isystem /usr/local/include/glib-2.0 -isystem /usr/local/lib/glib-2.0/include -isystem /usr/local/include -isystem /usr/local/include/gstreamer-1.0 -isystem /usr/local/include/orc-0.4 -isystem /usr/local/include/taglib -isystem /usr/local/include/qt6/QtCore -isystem /usr/local/include/qt6 -isystem /usr/local/lib/qt6/mkspecs/freebsd-clang -isystem /usr/local/include/qt6/QtConcurrent -isystem /usr/local/include/qt6/QtGui -isystem /usr/local/include/qt6/QtWidgets -isystem /usr/local/include/qt6/QtNetwork -isystem /usr/local/include/qt6/QtSql -isystem /usr/local/include/qt6/QtDBus -isystem /usr/local/include/gio-unix-2.0 -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -fstack-protector-strong -fno-strict-aliasing   -DNDEBUG -std=gnu++17 -std=c++17 -Wall -Wextra -Wpedantic -Wunused -Wshadow -Wundef -Wuninitialized -Wredundant-decls -Wcast-align -Winit-self -Wmissing-include-dirs -Wmissing-declarations -Wstrict-overflow=2 -Wunused-parameter -Wformat=2 -Wdisabled-optimization -Woverloaded-virtual -Wold-style-cast -Wno-unused-command-line-argument -pthread -fPIC -D_REENTRANT -MD -MT CMakeFiles/strawberry_lib.dir/src/device/moc_cddadevice.cpp.o -MF CMakeFiles/strawberry_lib.dir/src/device/moc_cddadevice.cpp.o.d -o CMakeFiles/strawberry_lib.dir/src/device/moc_cddadevice.cpp.o -c /usr/home/jhale/src/freebsd/ports/audio/strawberry/work/.build/src/device/moc_cddadevice.cpp
In file included from /usr/home/jhale/src/freebsd/ports/audio/strawberry/work/.build/src/device/moc_cddadevice.cpp:9:
In file included from /usr/home/jhale/src/freebsd/ports/audio/strawberry/work/.build/src/device/../../../strawberry-1.2.2/src/device/cddadevice.h:28:
In file included from /usr/local/include/gstreamer-1.0/gst/audio/gstaudiocdsrc.h:21:
In file included from /usr/local/include/gstreamer-1.0/gst/audio/audio.h:25:
In file included from /usr/local/include/gstreamer-1.0/gst/gst.h:27:
In file included from /usr/local/include/glib-2.0/glib.h:56:
In file included from /usr/local/include/glib-2.0/glib/giochannel.h:36:
In file included from /usr/local/include/glib-2.0/glib/gstring.h:37:
/usr/local/include/glib-2.0/glib/gstrfuncs.h:312:12: error: cannot initialize return object of type 'char *' with an rvalue of type 'void *'
  312 |     return NULL;
      |            ^~~~
/usr/local/include/cdio/types.h:184:15: note: expanded from macro 'NULL'
  184 | # define NULL ((void*) 0)
      |               ^~~~~~~~~~~
In file included from /usr/home/jhale/src/freebsd/ports/audio/strawberry/work/.build/src/device/moc_cddadevice.cpp:9:
In file included from /usr/home/jhale/src/freebsd/ports/audio/strawberry/work/.build/src/device/../../../strawberry-1.2.2/src/device/cddadevice.h:28:
In file included from /usr/local/include/gstreamer-1.0/gst/audio/gstaudiocdsrc.h:21:
In file included from /usr/local/include/gstreamer-1.0/gst/audio/audio.h:25:
In file included from /usr/local/include/gstreamer-1.0/gst/gst.h:35:
In file included from /usr/local/include/gstreamer-1.0/gst/gstbin.h:27:
In file included from /usr/local/include/gstreamer-1.0/gst/gstelement.h:223:
In file included from /usr/local/include/gstreamer-1.0/gst/gstpad.h:70:
In file included from /usr/local/include/gstreamer-1.0/gst/gstbuffer.h:30:
/usr/local/include/gstreamer-1.0/gst/gstcaps.h:209:3: error: assigning to '_GstMiniObject *' from incompatible type 'void *'
  209 |   gst_clear_mini_object ((GstMiniObject **) caps_ptr);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/gstreamer-1.0/gst/gstminiobject.h:246:47: note: expanded from macro 'gst_clear_mini_object'
  246 | #define     gst_clear_mini_object(object_ptr) g_clear_pointer ((object_ptr), gst_mini_object_unref)
      |                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/glib-2.0/glib/gmem.h:141:12: note: expanded from macro 'g_clear_pointer'
  141 |     *_pp = NULL;                                         \
      |            ^~~~
/usr/local/include/cdio/types.h:184:15: note: expanded from macro 'NULL'
  184 | # define NULL ((void*) 0)
      |               ^~~~~~~~~~~

This is a truncated output with much of the same.

BSDKaffee added a commit to BSDKaffee/strawberry that referenced this issue Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant