Re: [PATCH] Make graphics/ffmpeg compile on loongson

2012-10-27 Thread John Long
On Fri, Oct 19, 2012 at 11:10:31PM +0200, Donovan Watteau wrote:
 On Sat, Sep 29, 2012 at 01:45:43PM +0200, Donovan Watteau wrote:
  Hello,
 
  The following diff makes it possible for ffmpeg to be linked
  on loongson (it used to give ld: final link failed: Bad value,
  see [1]), and probably sgi too (though I couldn't test this one).
 
  This is done by removing the call to -Wl,-Bsymbolic on mips
  targets.  I'm not really sure to understand the effects of
  removing -Bsymbolic, but the resulting binary works fine for me
  on loongson.
 
  No REVISION bump since it only affects the archs on which it
  didn't build.
  [...]
 
 Could this go in, please?

ffmpeg builds ok with this patch, thank you Donovan.

 Having ffmpeg on loongson is quite useful, IMHO, and it does unbreak
 mplayer, too (and possibly some other ports).

I tried building vlc and mplayer from ports and neither build on my
Fuloong. I need to test ffmpeg standalone since I can't get the above 2
working but I didn't want to hold this up since I can confirm ffmpeg builds
cleanly after applying Donovan's patch and doesn't without it.

My vlc build died after more than 30 hours(!) of attempting to build qt4
and deps. Don't try this at home, boys and girls.

/jl

-- 
ASCII ribbon campaign ( ) Powered by Lemote Fuloong
 against HTML e-mail   X  Loongson MIPS and OpenBSD
   and proprietary/ \http://www.mutt.org
 attachmentsCode Blue or Go Home!



Re: [PATCH] Make graphics/ffmpeg compile on loongson

2012-10-27 Thread Brian Callahan

On 10/27/2012 3:11 PM, John Long wrote:


I tried building vlc and mplayer from ports and neither build on my
Fuloong. I need to test ffmpeg standalone since I can't get the above 2
working but I didn't want to hold this up since I can confirm ffmpeg builds
cleanly after applying Donovan's patch and doesn't without it.

My vlc build died after more than 30 hours(!) of attempting to build qt4
and deps. Don't try this at home, boys and girls.

/jl



You will not get vlc working. QT4 doesn't work, even if you did get it 
to build. It actually will build successfully if you strip webkit-qt4 
out but it doesn't work. I believe it's a binutils problem but I 
couldn't get anything useful to diagnose.


~Brian



Re: [PATCH] Make graphics/ffmpeg compile on loongson

2012-10-27 Thread Brian Callahan

On 10/27/2012 3:11 PM, John Long wrote:


I tried building vlc and mplayer from ports and neither build on my
Fuloong. I need to test ffmpeg standalone since I can't get the above 2
working but I didn't want to hold this up since I can confirm ffmpeg builds
cleanly after applying Donovan's patch and doesn't without it.

My vlc build died after more than 30 hours(!) of attempting to build qt4
and deps. Don't try this at home, boys and girls.

/jl



As an addendum, mplayer works just fine on my yeeloongs after building 
ffmpeg with Donovan's patch.


~Brian



Re: [PATCH] Make graphics/ffmpeg compile on loongson

2012-10-19 Thread Donovan Watteau
On Sat, Sep 29, 2012 at 01:45:43PM +0200, Donovan Watteau wrote:
 Hello,

 The following diff makes it possible for ffmpeg to be linked
 on loongson (it used to give ld: final link failed: Bad value,
 see [1]), and probably sgi too (though I couldn't test this one).

 This is done by removing the call to -Wl,-Bsymbolic on mips
 targets.  I'm not really sure to understand the effects of
 removing -Bsymbolic, but the resulting binary works fine for me
 on loongson.

 No REVISION bump since it only affects the archs on which it
 didn't build.
 [...]

Could this go in, please?

Having ffmpeg on loongson is quite useful, IMHO, and it does unbreak
mplayer, too (and possibly some other ports).

As for the proposed patch for GCC, it didn't work for me, see my
previous message in this thread for more details.

Thanks.



Re: [PATCH] Make graphics/ffmpeg compile on loongson

2012-09-30 Thread Donovan Watteau
On Sat, 29 Sep 2012, Brad Smith wrote:
 This is a bug in the compiler. Looking around I believe the fix
 in this PR would resolve the issue. Try working with miod@ to
 have a bug fix applied for the compiler.
 
 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33755

I recompiled GCC with the patch for GCC 4.2, and then I compiled
ffmpeg again (without my patch for -Bsymbolic) but I still have
the /usr/bin/ld: final link failed: Bad value error.  I wonder
whether I need to recompile ffmpeg's dependencies, though.

I had tried a binutils-2.15 mipsel patch from Debian, some time
ago while searching for this particular error, to no avail.
But again, I was only recompiling ffmpeg after that.



Re: [PATCH] Make graphics/ffmpeg compile on loongson

2012-09-29 Thread Brian Callahan

On 9/29/2012 7:45 AM, Donovan Watteau wrote:

Hello,

The following diff makes it possible for ffmpeg to be linked
on loongson (it used to give ld: final link failed: Bad value,
see [1]), and probably sgi too (though I couldn't test this one).

This is done by removing the call to -Wl,-Bsymbolic on mips
targets.  I'm not really sure to understand the effects of
removing -Bsymbolic, but the resulting binary works fine for me
on loongson.

No REVISION bump since it only affects the archs on which it
didn't build.

[1] http://marc.info/?l=openbsd-portsm=132691957332463w=2

Index: patches/patch-configure
===
RCS file: /cvs/ports/graphics/ffmpeg/patches/patch-configure,v
retrieving revision 1.31
diff -u -p -r1.31 patch-configure
--- patches/patch-configure 12 Sep 2012 08:15:57 -  1.31
+++ patches/patch-configure 29 Sep 2012 10:27:32 -
@@ -1,6 +1,6 @@
  $OpenBSD: patch-configure,v 1.31 2012/09/12 08:15:57 ajacoutot Exp $
 configure.orig Sun Jun 10 00:59:57 2012
-+++ configure  Tue Sep 11 22:47:01 2012
+--- configure.orig Sun Jun 10 06:59:57 2012
 configure  Sat Sep 29 12:25:43 2012
  @@ -1092,7 +1092,6 @@ HAVE_LIST=
   lzo1x_999_compress
   machine_ioctl_bt848_h
@@ -35,7 +35,17 @@ $OpenBSD: patch-configure,v 1.31 2012/09
   enabled libmp3lame  require  libmp3lame = 3.98.3 lame/lame.h 
lame_set_VBR_quality -lmp3lame
   enabled libnut  require  libnut libnut.h nut_demuxer_init -lnut
   enabled libopencore_amrnb   require libopencore_amrnb 
opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb
-@@ -3075,10 +3075,6 @@ fi
+@@ -3058,7 +3058,8 @@ enabled extra_warnings  check_cflags -Winline
+ # add some linker flags
+ check_ldflags -Wl,--warn-common
+ check_ldflags -Wl,-rpath-link,libpostproc -Wl,-rpath-link,libswscale 
-Wl,-rpath-link,libavfilter -Wl,-rpath-link,libavdevice 
-Wl,-rpath-link,libavformat -Wl,-rpath-link,libavcodec -Wl,-rpath-link,libavutil
+-test_ldflags -Wl,-Bsymbolic  append SHFLAGS -Wl,-Bsymbolic
++# Avoid /usr/bin/ld: final link failed: Bad value with old binutils on mips
++! enabled mips  test_ldflags -Wl,-Bsymbolic  append SHFLAGS -Wl,-Bsymbolic
+
+ echo X{};  $TMPV
+ if test_ldflags -Wl,--version-script,$TMPV; then
+@@ -3075,10 +3076,6 @@ fi

   if enabled small; then
   add_cflags $size_cflags
@@ -46,7 +56,7 @@ $OpenBSD: patch-configure,v 1.31 2012/09
   fi
   check_cflags -fno-math-errno
   check_cflags -fno-signed-zeros
-@@ -3506,6 +3502,7 @@ comment=$2
+@@ -3506,6 +3503,7 @@ comment=$2
   version=$3
   libs=$4
   requires=$5
@@ -54,7 +64,7 @@ $OpenBSD: patch-configure,v 1.31 2012/09
   enabled ${name#lib} || return 0
   cat EOF  $name/$name.pc
   prefix=$prefix
-@@ -3519,7 +3516,7 @@ Version: $version
+@@ -3519,7 +3517,7 @@ Version: $version
   Requires: $(enabled shared || echo $requires)
   Requires.private: $(enabled shared  echo $requires)
   Conflicts:
@@ -63,7 +73,7 @@ $OpenBSD: patch-configure,v 1.31 2012/09
   Libs.private: $(enabled shared  echo $libs)
   Cflags: -I\${includedir}
   EOF
-@@ -3539,10 +3536,10 @@ Cflags: -I\${includedir}
+@@ -3539,10 +3537,10 @@ Cflags: -I\${includedir}
   EOF
   }




It's nice to have mplayer again without relying on the version packaged 
with 5.0


~Brian



Re: [PATCH] Make graphics/ffmpeg compile on loongson

2012-09-29 Thread Brad Smith
On Sat, Sep 29, 2012 at 01:45:43PM +0200, Donovan Watteau wrote:
 Hello,
 
 The following diff makes it possible for ffmpeg to be linked
 on loongson (it used to give ld: final link failed: Bad value,
 see [1]), and probably sgi too (though I couldn't test this one).
 
 This is done by removing the call to -Wl,-Bsymbolic on mips
 targets.  I'm not really sure to understand the effects of
 removing -Bsymbolic, but the resulting binary works fine for me
 on loongson.
 
 No REVISION bump since it only affects the archs on which it
 didn't build.
 
 [1] http://marc.info/?l=openbsd-portsm=132691957332463w=2

This is a bug in the compiler. Looking around I believe the fix
in this PR would resolve the issue. Try working with miod@ to
have a bug fix applied for the compiler.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33755

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.