Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#1345 closed defect (fixed)

Unable to Build on FreeBSD7-stable/amd64

Reported by: alex@… Owned by: reimar
Priority: normal Component: core
Version: 1.0rc1 Severity: blocker
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

Hi Team,

I am unable to build mplayer on my FreeBSD system.

I have tested against:

  • The source tarball from your website
  • svn sources (today)
  • Tried building from the freebsd ports tree

All 3 produce the same issue.

The error I encounter during the build is:

=======================

cabac.h: Assembler messages:
cabac.h:532: Error: `ff_h264_lps_range(%eax,%esi,2)' is not a valid 64 bit base/index expression
cabac.h:545: Error: `ff_h264_norm_shift(%esi)' is not a valid 64 bit base/index expression
cabac.h:547: Error: `ff_h264_mlps_state+128(%eax)' is not a valid 64 bit base/index expression
cabac.h:559: Error: `-1(%ebx)' is not a valid 64 bit base/index expression
cabac.h:562: Error: `ff_h264_norm_shift(%ecx)' is not a valid 64 bit base/index expression
cabac.h:532: Error: `ff_h264_lps_range(%eax,%esi,2)' is not a valid 64 bit base/index expression
cabac.h:545: Error: `ff_h264_norm_shift(%esi)' is not a valid 64 bit base/index expression
cabac.h:547: Error: `ff_h264_mlps_state+128(%eax)' is not a valid 64 bit base/index expression
cabac.h:559: Error: `-1(%ebx)' is not a valid 64 bit base/index expression
cabac.h:562: Error: `ff_h264_norm_shift(%ecx)' is not a valid 64 bit base/index expression
cabac.h:532: Error: `ff_h264_lps_range(%eax,%esi,2)' is not a valid 64 bit base/index expression
cabac.h:545: Error: `ff_h264_norm_shift(%esi)' is not a valid 64 bit base/index expression
cabac.h:547: Error: `ff_h264_mlps_state+128(%eax)' is not a valid 64 bit base/index expression
cabac.h:559: Error: `-1(%ebx)' is not a valid 64 bit base/index expression
cabac.h:562: Error: `ff_h264_norm_shift(%ecx)' is not a valid 64 bit base/index expression
i386/h264_i386.h:52: Error: `ff_h264_lps_range(%edx,%esi,2)' is not a valid 64 bit base/index expression
i386/h264_i386.h:65: Error: `ff_h264_norm_shift(%esi)' is not a valid 64 bit base/index expression
i386/h264_i386.h:67: Error: `ff_h264_mlps_state+128(%edx)' is not a valid 64 bit base/index expression
i386/h264_i386.h:79: Error: `-1(%ebx)' is not a valid 64 bit base/index expression
i386/h264_i386.h:82: Error: `ff_h264_norm_shift(%ecx)' is not a valid 64 bit base/index expression
i386/h264_i386.h:93: Error: `ff_h264_lps_range(%edx,%esi,2)' is not a valid 64 bit base/index expression
i386/h264_i386.h:106: Error: `ff_h264_norm_shift(%esi)' is not a valid 64 bit base/index expression
i386/h264_i386.h:108: Error: `ff_h264_mlps_state+128(%edx)' is not a valid 64 bit base/index expression
i386/h264_i386.h:120: Error: `-1(%ebx)' is not a valid 64 bit base/index expression
i386/h264_i386.h:123: Error: `ff_h264_norm_shift(%ecx)' is not a valid 64 bit base/index expression
cabac.h:532: Error: `ff_h264_lps_range(%eax,%esi,2)' is not a valid 64 bit base/index expression
cabac.h:545: Error: `ff_h264_norm_shift(%esi)' is not a valid 64 bit base/index expression
cabac.h:547: Error: `ff_h264_mlps_state+128(%eax)' is not a valid 64 bit base/index expression
cabac.h:559: Error: `-1(%ebx)' is not a valid 64 bit base/index expression
=====================================

And it goes on and on with the same errors.

Some system information:

[alex@newdesktop /usr/home/alex/mplayer]$ uname -a
FreeBSD newdesktop.xor.net 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #0: Mon Dec 8 14:32:32 EST 2008 root@…:/usr/obj/usr/src/sys/custom amd64

[alex@newdesktop /usr/home/alex/mplayer]$ $CC -v
Using built-in specs.
Target: x86_64-portbld-freebsd7.1
Configured with: ./..gcc-4.3-20080821/configure --disable-nls --with-system-zlib --with-libiconv-prefix=/usr/local --with-gmp=/usr/local --program-suffix=43 --libdir=/usr/local/lib/gcc-4.3.2 --with-gxx-include-dir=/usr/local/lib/gcc-4.3.2/include/c++/ --disable-libgcj--prefix=/usr/local --mandir=/usr/local/man --infodir=/usr/local/info/gcc43 --build=x86_64-portbld-freebsd7.1
Thread model: posix
gcc version 4.3.2 20080821 (prerelease) (GCC)

I thought this may have been a compiler issue, so I forced 4.3.2 rather than the default (4.2.1), made no difference.

Seeing as the compilation errors seemed to mention h.264, I tried the --disable-x264 --disable-x264-lavc options, but this did not help.

I cant see any option to attach files in bugzilla, so have uploaded config.h and config.mak to my webspace:

http://ahhyes.net/mplayer/config.h
http://ahhyes.net/mplayer/config.mak

The above files are from the svn source build (today)

Change History (5)

comment:1 by reimar, 15 years ago

Hm, currently I have the problem that I can't explain why it works for me.
Which binutils version do you have? I have:
as --version
GNU assembler (GNU Binutils) 2.18

comment:2 by alex@…, 15 years ago

Hi There,

[alex@newdesktop /usr/home/alex]$ as --version
GNU assembler 2.15 [FreeBSD] 2004-05-23
Copyright 2002 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
This assembler was configured for a target of `x86_64-obrien-freebsd'.

comment:3 by reimar, 15 years ago

While I'd prefer to fix it properly, I don't want to install such an ancient binutils version, especially since I know they were buggy for x86_64.
If you need MPlayer/FFmpeg update to binutils 2.18 or 2.19, they work just fine for me (admittedly on Linux).

comment:4 by alex@…, 15 years ago

Resolution: fixed
Status: newclosed

Well I upgraded binutils.

[alex@newdesktop /usr/home/alex]$ as --version
GNU assembler (GNU Binutils) 2.19
Copyright 2007 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `x86_64-unknown-freebsd7.1'.

The assembler errors are now gone. So it looks like you were correct. Thank you so much for pointing me in the right direction. Now I am going to grill the freebsd guys for having such an ancient version of binutils with their OS. I hope they have a good explanation.

xvidix wouldnt compile (link errors to do with some pci library), disabling xvidix allowed mplayer to build.

Thanks again.

comment:5 by reimar, 15 years ago

Just for your info, I tried myself on FreeBSD and fixed some issues, but all things considered I think only updating as (or disabling the corresponding asm, e.g. by removing the HAVE_7REGS in config.h) is a sane way to fix it, unfortunately.
But I hope that upgrading the assembler once in 5 years is not really asking too much (btw. OpenBSD has the same issues, but a few more since even their gcc is still version 3.3).

Note: See TracTickets for help on using tickets.