Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#30279 closed defect (fixed)

MPlayer @1.0rc4, Revision 1 fails with clang, llvm-gcc-4.2, Lion

Reported by: machsna (J. ‘mach’ Wust) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: lion Cc: alex@…, sepp@…, ultr4sp4m@…, macports.org@…, dizzy@…, ryandesign (Ryan Carsten Schmidt), alphafighter1@…, brandono@…, andy.dwelly@…, AlonzoQuixote@…
Port: MPlayer

Description

Mac OS X 10.7, Xcode 4.1, with a new macports installation, MPlayer fails:

Error: Target org.macports.build returned: shell command failed (see log for details)
Log for MPlayer is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_MPlayer/MPlayer/main.log
Error: Status 1 encountered during processing.

I have tried installing MPlayer both on 1.9.2 installed from source and with MacPorts-2.0.0-rc1-10.7-Lion.dmg -- in both cases, the same error occurs.

Attachments (1)

main.log (461.3 KB) - added by machsna (J. ‘mach’ Wust) 13 years ago.
The log mentioned in the error.

Download all attachments as: .zip

Change History (29)

Changed 13 years ago by machsna (J. ‘mach’ Wust)

Attachment: main.log added

The log mentioned in the error.

comment:1 Changed 13 years ago by machsna (J. ‘mach’ Wust)

Cc: j_mach_wust@… added

Cc Me!

comment:2 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: j_mach_wust@… removed
Port: MPlayer added

As reporter, you do not need to be Cc'd. You should however fill in the Port field.

comment:3 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: lion added

Try mplayer-devel instead.

Or try compiling with clang instead of llvm-gcc-4.2.

sudo port clean MPlayer
sudo port install MPlayer configure.compiler=clang

comment:4 Changed 13 years ago by machsna (J. ‘mach’ Wust)

Nice, mplayer-devel works fine, thanks for the tip.

With configure.compiler=clang, however, I got the same error again. I'm not sure whether I did it right. I just copied the whole line as you wrote it to the shell, even though I could not really find out what it does on the port man page.

comment:5 Changed 13 years ago by alex@…

Cc: alex@… added

Cc Me!

comment:6 Changed 13 years ago by sepp@…

Cc: sepp@… added

Cc Me!

comment:7 in reply to:  4 ; Changed 13 years ago by sepp@…

Replying to j_mach_wust@…:

With configure.compiler=clang, however, I got the same error again.

I've had the same problem, so I tried to compile it with gcc-4.2 instead and now it works just fine:

sudo port install mplayer configure.compiler=gcc-4.2

comment:8 in reply to:  7 Changed 13 years ago by alasdair.dougall@…

Hi all,

Just reinstalled MacPorts on a clean install of Mac OS X Lion. Tried to install MPlayer without success. Also, tried to compile with Clang and gcc-4.2 without success.

Alasdair_d

Replying to sepp@…:

Replying to j_mach_wust@…:

With configure.compiler=clang, however, I got the same error again.

I've had the same problem, so I tried to compile it with gcc-4.2 instead and now it works just fine:

sudo port install mplayer configure.compiler=gcc-4.2

comment:9 Changed 13 years ago by mf2k (Frank Schima)

Cc: ultr4sp4m@… added

Cc reporter of duplicate #31089.

comment:10 Changed 13 years ago by macports.org@…

Same problem here. This is the part of the logfile where the error occurs:

:info:build <inline asm>:200:2: error: ambiguous instructions require an explicit suffix (could be 'cmpb', 'cmpw
', 'cmpl', or 'cmpq')
:info:build     cmp       $2, -40(%rsp) 
:info:build     ^
:info:build LLVM ERROR: Error parsing inline asm
:info:build 
:info:build collect2: ld returned 1 exit status
:info:build make: *** [mencoder] Error 1

comment:11 Changed 13 years ago by macports.org@…

Cc: macports.org@… added

Cc Me!

comment:12 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: dizzy@… ryandesign@… added
Summary: MPlayer @1.0rc4, Revision 1 fails on LionMPlayer @1.0rc4, Revision 1 fails with clang, llvm-gcc-4.2, Lion

So it seems we should set the port to build using gcc-4.2 instead of clang or llvm-gcc-4.2. That would at least fix the build on Snow Leopard with Xcode 4; see duplicate #31311.

comment:13 Changed 13 years ago by alphafighter1@…

Cc: alphafighter1@… added

Cc Me!

comment:14 Changed 13 years ago by alphafighter1@…

fyi, I was able to compile mplayer-devel w/ GCC

$ sudo port install MPlayer-devel +real +quicktime +sdl +freetype +lzo +vorbis +mencoder configure.compiler=gcc-4.2

comment:15 Changed 13 years ago by brandono@…

Cc: brandono@… added

Cc Me!

comment:16 in reply to:  15 ; Changed 13 years ago by andy.dwelly@…

Replying to brandono@…:

I now get:

sudo port install MPlayer-devel +real +quicktime +sdl +freetype +lzo +vorbis +mencoder configure.compiler=gcc-4.2
Warning: No port p5.12-error found in the index.
--->  Computing dependencies for git-core
Error: Dependency 'p5.12-error' not found.
Error: Unable to upgrade port: 1
Error: Unable to execute port: upgrade git-core failed

when compiling MPLayer-devel as above or simply with

sudo port install mplayer configure.compiler=gcc-4.2

comment:17 in reply to:  16 ; Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: andy.dwelly@… added

Replying to andy.dwelly@…:

Please remember to use WikiFormatting.

Warning: No port p5.12-error found in the index.

That means you need to sudo port selfupdate again.

comment:18 in reply to:  17 Changed 13 years ago by andy.dwelly@…

Replying to ryandesign@…:

Replying to andy.dwelly@…:

Please remember to use WikiFormatting.

Warning: No port p5.12-error found in the index.

That means you need to sudo port selfupdate again.

..yes. That's fixed it. Thanks.

comment:19 Changed 13 years ago by AlonzoQuixote@…

Cc: AlonzoQuixote@… added

Cc Me!

comment:20 Changed 13 years ago by dizzy@…

Based on what Andy said I tried the following and it worked (on OSX 10.6.8, XCode 4.0.2):

sudo port install mplayer configure.compiler=gcc-4.2

Thanks!

PS: Can't this be done automatically by MacPorts somehow? So people don't have to remember/locate this bug.

comment:21 Changed 13 years ago by ultr4sp4m@…

Even when I run:

sudo port install mplayer configure.compiler=gcc-4.2

It still fails, due to samba3 not being installed.

libavcodec/libavcodec.a libavutil/libavutil.a libpostproc/libpostproc.a libswscale/libswscale.a -L/opt/local/lib -L/opt/local/lib/samba3 -ffast-math -arch x86_64  -liconv -lncurses -lpng -lz -ljpeg -lopenjpeg -framework IOKit -framework Carbon -lz -lbz2 -llzo2 -lmad -ltheora -logg     -lm  -lmp3lame
:info:build ld: warning: directory not found for option '-L/opt/local/lib/samba3'
:info:build <inline asm>:200:2: error: ambiguous instructions require an explicit suffix (could be 'cmpb', 'cmpw', 'cmpl', or 'cmpq')
:info:build 	cmp       $2, -40(%rsp) 
:info:build 	^
:info:build LLVM ERROR: Error parsing inline asm
:info:build 
:info:build collect2: ld returned 1 exit status
:info:build make: *** [mencoder] Error 1
:info:build make: *** Waiting for unfinished jobs....
:info:build ld: warning: directory not found for option '-L/opt/local/lib/samba3'
:info:build <inline asm>:200:2: error: ambiguous instructions require an explicit suffix (could be 'cmpb', 'cmpw', 'cmpl', or 'cmpq')
:info:build 	cmp       $2, -40(%rsp) 
:info:build 	^
:info:build LLVM ERROR: Error parsing inline asm
:info:build 
:info:build collect2: ld returned 1 exit status
:info:build make: *** [mplayer] Error 1
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_MPlayer/mplayer/work/MPlayer-1.0rc4'
:info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_MPlayer/mplayer/work/MPlayer-1.0rc4" && /usr/bin/make -j4 -w all " returned error 2
:error:build Target org.macports.build returned: shell command failed (see log for details)
:debug:build Backtrace: shell command failed (see log for details)
    while executing
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"$procedure $targetname"
:info:build Warning: the following items did not execute (for mplayer): org.macports.activate org.macports.build org.macports.destroot org.macports.install

comment:22 in reply to:  20 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

Replying to dizzy@…:

PS: Can't this be done automatically by MacPorts somehow? So people don't have to remember/locate this bug.

Yes it can, and I've done that now, in r86464.

comment:23 in reply to:  21 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to ultr4sp4m@…:

Even when I run:

sudo port install mplayer configure.compiler=gcc-4.2

It still fails, due to samba3 not being installed.

No, that's not why it failed to install. That was only a warning, not an error.

:info:build LLVM ERROR: Error parsing inline asm

It shows an llvm error, which tells us you did not succeed in telling MacPorts to use gcc-4.2 instead of clang or llvm-gcc-4.2. Probably you did not clean first. Now that I've committed the fix, you should just be able to wait 30 minutes, clean, selfupdate to receive the fix I committed, then just try the install again without any modifiers.

sudo port clean MPlayer
sudo port selfupdate
sudo port install MPlayer

comment:24 Changed 13 years ago by ecronin (Eric Cronin)

But really you should be using mplayer-devel which is about five years more modern and builds fine with one or both of clang/llvm and is actively maintained. Before I nomaintainer'd it there was still hope that the mplayer devs might release a 1.0 and I didn't remove it in anticipation of that. I think it's pretty clear now that that is never happening (1.0rc1 was in 2003 I think?), so we should probably just remove MPlayer and replaced_by it with mplayer-devel to prevent all these tickets/confusion. The warning message I put in the port is evidently not enough.

comment:25 Changed 13 years ago by dizzy@…

Ryan, thanks for the fix.

As to what ecronin said, I don't have a strong opinion on this but I'll give my 2 cents (plus it's somewhat offtopic).

When I saw the warning after the successful install I gave it a thought. I went with not bothering to install mplayer-devel instead because:

  • it's not clear to me that is supposed to be at least as stable as "mplayer", what if it's a snapshot of their SVN trunk or something like that (usually "-devel" packages are); the last thing I needed after not being able to compile it for months was to run into other issues because I would be running alpha grade code; related to this, what is the update policy of the "mplayer-devel" code, do they get in only minor code changes (minimal impact, like a stable release would have) or as I said it's a snapshot of their TRUNK and thus every time I run "port upgrade outdated" I risk breaking my "mplayer"? That is, even if "mplayer" wasn't meant as a stable release, just the fact that no updates are happening to it (other than small fixes like those introduced by the MacPorts folks) makes it so.
  • "mplayer" so far has worked very well for me and I don't have any bugs or lack of features that would make me interested in an alternative (and after all, the golden principle is "if it works, don't fix it"); however I, had no idea that mplayer-devel would have solved the compile issue, that would have been a good occasion to make the switch

comment:26 Changed 13 years ago by ecronin (Eric Cronin)

The developers of mplayer have been pretty emphatic that they see no need to roll releases, it's just extra work for them. We're not the only package maintainers who have complained, but that policy doesn't seem to be changing. They won't even entertain bug reports unless you're running that moments latest TRUNK. So realistically there will never be a stable mplayer again. 1.0rc4 isn't even stable, it's just stable-ish five years ago before they gave up on even making versioned tarballs.

I don't maintain the -devel port, but my experience has been that it is updated to a known-unbroken-at-the-time svn/git tag at a fairly infrequent pace, and the upgrades themselves are never what breaks- it's os x or other libraries changing underneath that cause issues. When these happen the mplayer trunk is usually fixed quickly and the -devel port bumped to a newer tag.

Upstream isn't making any bugfixes to mplayer 1.0rcX (even critical security anymore it seems) and it's getting more challenging to keep it running as the rest of the world moves forward (hence this ticket taking 3 months to resolve). Were this a good solid 1.0+ version before they went off and rewrote everything maybe it would make sense to keep it alive. But it's just another point in an always unstable code base that's artificially alive because it was the last time they slapped a tag on a specific revision of the source code...

So yes, ideally, it would be bad to recommend running a -devel port as the best most stable version. But mplayer is not ideal software... Eventually what is now mplayer-devel should probably become the new mplayer (perhaps solving the annoying capitalized portname finally too) and we just admit that the 'stable' version is a specific revision of the development branch because upstream has no notion of a stable release.

comment:27 Changed 13 years ago by ecronin (Eric Cronin)

tl;dr: we're doing a disservice to macports users by making it appear as though MPlayer is at all a superior choice to mplayer-devel, they shouldn't have to know the long and sordid history of the mplayer release process (or lack thereof).

comment:28 Changed 13 years ago by machsna (J. ‘mach’ Wust)

I have switched back to Mplayer -- only to uninstall it again and go back to mplayer-devel at once. The first mkv file I opened produced a horrible shrieking sound and tons of errors. After using mplayer-devel for a while, I had completely forgotten that regular Mplayer cannot play mkv files with compressed audio tracks, something mkvtoolnix has been defaulting to since mid 2010.

There is no ticket for that on macports, but then again, this is not a macports issue.

Note: See TracTickets for help on using tickets.