After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 492306 - compilation errors with MinGW
compilation errors with MinGW
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Windows
: Normal blocker
: 0.10.15
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-11-01 10:03 UTC by Vincent Torri
Modified: 2007-11-01 13:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for gst-plugins-base (4.59 KB, patch)
2007-11-01 10:04 UTC, Vincent Torri
committed Details | Review

Description Vincent Torri 2007-11-01 10:03:07 UTC
I have the following errors with MinGW when compiling gst-plugins-base (ogg, vorbis, theora and pango plugins are built. I couldn't test libvisual plugin as the home site is down, but last time i tried, there was no problem):

1) fft plugin:

with MinGW, int16_t and int32_t are defined in stdint.h. I included it in a _WIN32 guard (it seems that glib is not used (no g* types used), so I don't use G_OS_WIN32)

I don't know if it will compile with ms vc.

2) rtsp plugin:

pipe is not declared on Windows, while _pipe is. I use the diff:

http://webcvs.freedesktop.org/gstreamer/gstreamer/libs/gst/net/gstnetclientclock.c?r1=1.22&r2=1.23

to do the modification. It compiles, but I don't know if it works.

3) sdp plugin:

getaddrinfo and al are defined in libws2_32.a, so we must link angainst that lib.

also, getaddrinfo is declared in ws2tcpip.h. I added G_OS_WIN32 but I had to change the location of the inclusion of glib.h

4) addstream test:

sleep is not a Windows function. We can use Sleep, which takes the number of milliseconds as parameter.

I defined WIN32_LEAN_AND_MEAN because it forbids the inclusion of specific (and useless in that case) header files. Hence the compilation is a bit faster.

the patch is below
Comment 1 Vincent Torri 2007-11-01 10:04:23 UTC
Created attachment 98300 [details] [review]
patch for gst-plugins-base
Comment 2 Tim-Philipp Müller 2007-11-01 13:30:34 UTC
Thanks for the patch.

The fft lib should just include our own _stdint.h from the top-level directory, which should take care of everything.

Instead of sleep(), we should just use GLib's g_usleep().

Should all be fixed in CVS now, please double-check:

 2007-11-01  Tim-Philipp Müller  <tim at centricular dot net>

        Patch by: Vincent Torri <vtorri at univ-evry dot fr>

        * gst-libs/gst/fft/kiss_fft_s16.h: (KISS_FFT_S16_MALLOC):
        * gst-libs/gst/fft/kiss_fft_s32.h: (KISS_FFT_S32_MALLOC):
          Include our own _stdint.h instead of sys/types.h, makes MingW happy
          (#492306).

        * gst-libs/gst/rtsp/gstrtspconnection.c: (gst_rtsp_connection_create):
          Use _pipe directly, GLib doesn't have a pipe() macro any longer
          (it disappeared in GLib 2.14.0) (#492306).

        * gst-libs/gst/sdp/Makefile.am:
        * gst-libs/gst/sdp/gstsdpmessage.c:
          Fix includes and LIBS for win32/Mingw (#492306).

        * tests/examples/dynamic/addstream.c (pause_play_stream):
          Use more portable g_usleep() instead of sleep() (#492306).