We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1594

Summary: Cannot compile latest SDL_mixer
Product: SDL_mixer Reporter: mbresson
Component: miscAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: philipp.wiesemann
Version: unspecified   
Hardware: x86_64   
OS: Linux   
Attachments: The output of make command
patch for making SDL_mixer compile with SDL 2 and SMPEG

Description mbresson 2012-09-05 14:18:39 UTC
Created attachment 944 [details]
The output of make command

Hello,
I have compiled successfully SDL, SDL_ttf and SDL_image with 
hg clone http://hg.libsdl.org/SDL (then SDL_ttf, SDL_image, SDL_mixer)
configure --prefix=/usr
make
su -c 'make install'

But compilation failed with the latest SDL_mixer. All dependencies are satisfied.
make command stops with this output:

make: *** [build/mixer.lo] Error 1
make: *** Waiting for unfinished jobs....
In file included from /usr/include/smpeg/smpeg.h:29:0,
                 from dynamic_mp3.h:23,
                 from music.c:61:
/usr/include/smpeg/MPEGfilter.h:39:40: error: unknown type name ‘SDL_Overlay’
/usr/include/smpeg/MPEGfilter.h:39:60: error: unknown type name ‘SDL_Overlay’
In file included from /usr/include/smpeg/smpeg.h:29:0,
                 from dynamic_mp3.h:23,
                 from music.c:61:
/usr/include/smpeg/MPEGfilter.h:46:3: error: unknown type name ‘SMPEG_FilterCallback’
make: *** [build/music.lo] Error 1

I have attached the complete output of make.

My SMPEG version is 0.4.4. Here is the output lines of ./configure --prefix=/usr concerning smpeg:

checking for smpeg-config... /usr/bin/smpeg-config
checking for SMPEG - version >= 0.4.3... yes
-- dynamic libsmpeg -> libsmpeg-0.4.so.0

I cannot get SDL_mixer to compile because of this smpeg issue.
Comment 1 Philipp Wiesemann 2012-09-06 12:51:16 UTC
This may be similar to the problem in bug 1475. SMPEG seems written for an older SDL version which still had SDL_Overlay. Adding forward declarations for this may help because SDL_Overlay is not used in SDL_mixer itself. Maybe this could be done in some file of SDL_mixer so SMPEG does not need to be updated.
Comment 2 Philipp Wiesemann 2012-09-08 02:23:22 UTC
Created attachment 946 [details]
patch for making SDL_mixer compile with SDL 2 and SMPEG

I was able to compile SDL_mixer with SDL 2 and SMPEG [1] using the addition from the attached patch.

[1] http://www.libsdl.org/projects/SDL_mixer/libs/smpeg-0.4.5.zip
Comment 3 mbresson 2012-09-11 00:25:12 UTC
(In reply to comment #2)
> Created attachment 946 [details]
> patch for making SDL_mixer compile with SDL 2 and SMPEG
> 
> I was able to compile SDL_mixer with SDL 2 and SMPEG [1] using the addition
> from the attached patch.
> 
> [1] http://www.libsdl.org/projects/SDL_mixer/libs/smpeg-0.4.5.zip

Hello,
thank you, it worked for me.
Comment 4 Ryan C. Gordon 2017-05-29 15:19:09 UTC
Just going to roll in here 5 years later and apply this patch.  :)

https://hg.libsdl.org/SDL_mixer/rev/15571e1ac71f

--ryan.