Bug 172416 - Building multimedia/mplayer on 9.1-PRERELEASE errors with host architecture "UNKNOWN"
Summary: Building multimedia/mplayer on 9.1-PRERELEASE errors with host architecture "...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-06 23:50 UTC by michael copeland
Modified: 2013-01-18 21:00 UTC (History)
0 users

See Also:


Attachments
m.diff.txt (2.78 KB, text/plain; charset=US-ASCII)
2012-10-08 18:23 UTC, Thomas Zander
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description michael copeland 2012-10-06 23:50:03 UTC
Configure script fails when detecting $host_arch.

guilty part is:

 # host's CPU/instruction set
  case "$(uname -m 2>&1)" in
      x86_64|amd64|i[3-9]86*|i86pc|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium*|athlon*|i586_i686|i586-i686) host_arch=i386 ;;
      ia64) host_arch=ia64 ;;
      macppc|ppc*|Power*) host_arch=ppc ;;


uname -m gives us powerpc, this isn't here, so add it.


 # host's CPU/instruction set
  case "$(uname -m 2>&1)" in
      x86_64|amd64|i[3-9]86*|i86pc|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium*|athlon*|i586_i686|i586-i686) host_arch=i386 ;;
      ia64) host_arch=ia64 ;;
      macppc|ppc*|Power*|powerpc) host_arch=ppc ;;


builds and installs now.

Fix: 

edit configure script in work/mplayer-export-2012-07-21


find section 
# host's CPU/instruction set

patch section  macppc|ppc*|Power*) host_arch=ppc ;;

with            macppc|ppc*|Power*|powerpc) host_arch=ppc ;;



changing system var UNAME_m to ppc would also work, but this may break other ports.
How-To-Repeat: cd to /usr/ports/multimedia/mplayer  make install
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-10-07 01:19:11 UTC
Class Changed
From-To: maintainer-update->change-request

Fix category (submitter is not maintainer) (via the GNATS Auto Assign 
Tool)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2012-10-07 01:19:19 UTC
Maintainer of multimedia/mplayer,

Please note that PR ports/172416 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/172416

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Edwin Groothuis freebsd_committer freebsd_triage 2012-10-07 01:19:23 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 4 Thomas Zander 2012-10-08 18:23:10 UTC
Would you find attached patch to the port acceptable?
If so, this can be committed.

A question or two, if I may.
What machine is this you are using mplayer on? There aren't that many
powerpc machines these days.
Would you test whether clang compiles mplayer on ppc? To test this,
just add powerpc to the if clause before MPLAYER_CLANG_SUPPORTED_ARCH
in Makefile.options.

Best regards
Riggs
Comment 5 michael copeland 2012-10-08 22:27:33 UTC
On Mon, Oct 8, 2012 at 1:23 PM, Thomas Zander <
thomas.e.zander@googlemail.com> wrote:

> Would you find attached patch to the port acceptable?
> If so, this can be committed.
>
> A question or two, if I may.
> What machine is this you are using mplayer on? There aren't that many
> powerpc machines these days.
> Would you test whether clang compiles mplayer on ppc? To test this,
> just add powerpc to the if clause before MPLAYER_CLANG_SUPPORTED_ARCH
> in Makefile.options.
>
> Best regards
> Riggs
>


Patch is fine. I'm using it several machines. mini g4 1.2GHz radeon 9200,
dual and quad g5 machines both with nvidia gpu, attempting to play with it
on a ps3 and I have some ibm machines that I've been screwing around with.

I'll gladly test the build with clang.

Michael
Comment 6 Mark Linimon freebsd_committer freebsd_triage 2012-10-10 01:14:35 UTC
State Changed
From-To: feedback->open

Maintainer approved.
Comment 7 dfilter service freebsd_committer freebsd_triage 2013-01-18 20:52:57 UTC
Author: glarkin
Date: Fri Jan 18 20:52:49 2013
New Revision: 310619
URL: http://svnweb.freebsd.org/changeset/ports/310619

Log:
  - Fixed OS detection on freebsd-ppc [1]
  - Fixed ppc assembly language build error in embedded ffmpeg (tested on
    committer's Mac G4)
  
  PR:		ports/172416
  Submitted by:	michael copeland <michael@kryptos-security.com>
  Approved by:	Thomas Zander <thomas.e.zander@googlemail.com> (maintainer)

Modified:
  head/multimedia/mplayer/Makefile
  head/multimedia/mplayer/files/patch-configure

Modified: head/multimedia/mplayer/Makefile
==============================================================================
--- head/multimedia/mplayer/Makefile	Fri Jan 18 18:56:04 2013	(r310618)
+++ head/multimedia/mplayer/Makefile	Fri Jan 18 20:52:49 2013	(r310619)
@@ -94,6 +94,11 @@ CONFIGURE_ARGS+=	--disable-directfb \
 			--disable-mpg123 \
 			--disable-musepack
 
+# Fix a problem with unknown assembly opcodes in embedded ffmpeg
+.if ${ARCH} == "ppc"
+CONFIGURE_ARGS+=        --disable-asm
+.endif
+
 .include "${.CURDIR}/Makefile.options"
 
 .if !defined(WITHOUT_GUI) && !defined(WITHOUT_X11)

Modified: head/multimedia/mplayer/files/patch-configure
==============================================================================
--- head/multimedia/mplayer/files/patch-configure	Fri Jan 18 18:56:04 2013	(r310618)
+++ head/multimedia/mplayer/files/patch-configure	Fri Jan 18 20:52:49 2013	(r310619)
@@ -1,6 +1,6 @@
---- configure.orig	2012-03-15 16:20:02.000000000 +0100
-+++ configure	2012-03-22 15:36:16.583006073 +0100
-@@ -637,7 +637,7 @@
+--- configure.orig	2012-07-20 15:11:42.000000000 +0200
++++ configure	2012-10-08 19:16:19.637797462 +0200
+@@ -645,7 +645,7 @@
  _iwmmxt=auto
  _mtrr=auto
  _altivec=auto
@@ -9,7 +9,7 @@
  _ranlib=ranlib
  _windres=windres
  _cc=cc
-@@ -1455,7 +1455,6 @@
+@@ -1467,7 +1467,6 @@
  
    *)
      echo "Unknown parameter: $ac_option"
@@ -17,7 +17,16 @@
      ;;
  
    esac
-@@ -1533,7 +1533,7 @@
+@@ -1515,7 +1514,7 @@
+   case "$(uname -m 2>&1)" in
+       x86_64|amd64|i[3-9]86*|i86pc|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium*|athlon*|i586_i686|i586-i686) host_arch=i386 ;;
+       ia64) host_arch=ia64 ;;
+-      macppc|ppc*|Power*) host_arch=ppc ;;
++      macppc|powerpc|ppc*|Power*) host_arch=ppc ;;
+       alpha) host_arch=alpha ;;
+       sun4*|sparc*) host_arch=sparc ;;
+       parisc*|hppa*|9000*) host_arch=hppa ;;
+@@ -1555,7 +1554,7 @@
  fi
  
  extra_cflags="-I. -Iffmpeg $extra_cflags"
@@ -26,7 +35,7 @@
  _timer=timer-linux.c
  _getch=getch2.c
  
-@@ -3576,7 +3575,7 @@
+@@ -3601,7 +3600,7 @@
  if linux ; then
    THREAD_CFLAGS=-D_REENTRANT
  elif freebsd || netbsd || openbsd || bsdos ; then
@@ -35,7 +44,7 @@
  fi
  if test "$_pthreads" = auto ; then
  cat > $TMPC << EOF
-@@ -3586,7 +3585,7 @@
+@@ -3611,7 +3610,7 @@
  EOF
  _pthreads=no
  if ! hpux ; then
@@ -44,7 +53,7 @@
      # for crosscompilation, we cannot execute the program, be happy if we can link statically
      cc_check $THREAD_CFLAGS $ld_tmp && (tmp_run || test "$ld_static") && ld_pthread="$ld_tmp" && _pthreads=yes && break
    done
-@@ -6245,7 +6244,7 @@
+@@ -6271,7 +6270,7 @@
  echocheck "libgsm"
  if test "$_libgsm" = auto ; then
    _libgsm=no
@@ -53,7 +62,7 @@
  fi
  if test "$_libgsm" = yes ; then
    def_libgsm='#define CONFIG_LIBGSM 1'
-@@ -6705,6 +6704,16 @@
+@@ -6733,6 +6732,16 @@
    nolibrtmp=no
    def_librtmp='#define CONFIG_LIBRTMP 1'
    inputmodules="librtmp $inputmodules"
@@ -70,7 +79,7 @@
  else
    nolibrtmp=yes
    _librtmp=no
-@@ -7097,7 +7106,7 @@
+@@ -7125,7 +7134,7 @@
  echocheck "mencoder"
  if test "$_mencoder" = no ; then
    # mpeg1video for vf_lavc, snow for vf_uspp / vf_mcdeint,
@@ -79,7 +88,7 @@
  fi
  echores "$_mencoder"
  
-@@ -7435,8 +7444,11 @@
+@@ -7463,8 +7472,11 @@
  if test "$_gui" = yes ; then
  
    # Required libraries
@@ -93,7 +102,7 @@
      die "The GUI requires libavcodec with PNG support (needs zlib)."
    fi
    test "$_freetype" = no && test "$_bitmap_font" = no &&
-@@ -8001,7 +8013,7 @@
+@@ -8029,7 +8041,7 @@
  EXESUF      = $_exesuf
  EXESUFS_ALL = .exe
  
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 8 Greg Larkin freebsd_committer freebsd_triage 2013-01-18 20:53:16 UTC
State Changed
From-To: open->closed

Committed with an additional modification to Makefile to disable asm 
in embedded ffmpeg (compiler errors in altivec .S file).  Thank you for 
your PR!