Can't build x264 anymore? Get yasm.

Archive of historical development discussions
Discussions / Development has moved to GitHub
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.

*******************************
Post Reply
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Can't build x264 anymore? Get yasm.

Post by jbrjake » Mon Apr 14, 2008 12:24 am

Sorry, everyone.

I freshened up our copy of libx264 earlier today in prep for that long-forthcoming snapshot build.

It seems that x264 no longer builds right with nasm in x86 -- it fails on the CABAC assembly code.

You need to install yasm to build it. Which I think means using fink, darwinports, or compiling it from source: http://www.tortall.net/projects/yasm/re ... 6.2.tar.gz

Again, sorry. It wasn't an obvious problem. I'm still on PowerPC Macs, where it builds fine, and I didn't realize there would be collateral damage on the Intel side of things.

As eddyg has pointed out, it should probably be made part of the configure check for x86 boxes. Maybe even bundle a Mac binary of it like we do with jam, since the yasm project doesn't even offer an official Mac build :(

If this is a pain in the ass for another people, I'll just revert the commit and we'll go back to our old out of date x264 with its old out of date VAQ.

Berylium
Posts: 23
Joined: Wed Apr 04, 2007 11:44 pm

Re: Can't build x264 anymore? Get yasm.

Post by Berylium » Tue Apr 15, 2008 10:12 pm

Running a Mac Pro I was having just such a build problem. I downloaded the yasm source you linked and built it successfully. Unsure what to do next I just put the yasm binary in the same folder as the nasm binary (/developer/usr/bin). However, I'm
still failing to build HandBrake. I'm sure there's a step I'm missing (maybe telling the system about yasl or something). Any suggestions?

thank you,

Berylium

mac_man_ad
Posts: 75
Joined: Wed Aug 22, 2007 5:21 am

Re: Can't build x264 anymore? Get yasm.

Post by mac_man_ad » Tue Apr 15, 2008 11:14 pm

where the yasm instructions say 'make install' (step 4 in the INSTALL file) try 'sudo make install' you will then be prompted for admin password. in mac os x permissions admins dont have write access to the install locations.

the yasm install worked for me (imac c2d 2GHz osx.5.2)

andrew

Berylium
Posts: 23
Joined: Wed Apr 04, 2007 11:44 pm

Re: Can't build x264 anymore? Get yasm.

Post by Berylium » Wed Apr 16, 2008 12:07 am

Thank you, mac_man_ad, that worked like a charm!

To anyone else who may have difficulty with this on an Intel based Mac let me supplement jbrjake's instructions (some of this may be overkill but it worked for me).

1. download and unzip the source code jbrjake links to
2. open terminal and navigate to the new yasm-0.6.2 folder you just unzipped
3. run "./configure"
4. run "make"
5. run "sudo make install" (you'll obviously need an admin password for this one)
6. navigate to your HandBrake source folder
7. run "./configure"
8. run "./jam"

That should do it for you.

-Berylium

OwlBoy
Posts: 3
Joined: Wed Apr 16, 2008 11:38 pm

Re: Can't build x264 anymore? Get yasm.

Post by OwlBoy » Wed Apr 16, 2008 11:41 pm

At the time of this post I can't get that link to load (for yasm) I found a mirror here though:

http://gentoo.osuosl.org/distfiles/?C=N;O=D

And thanks for the steps Berylium!

-Owl

saintdev
Regular User
Posts: 146
Joined: Wed Dec 20, 2006 4:17 am

Re: Can't build x264 anymore? Get yasm.

Post by saintdev » Sun Apr 20, 2008 11:45 pm

Loren Merritt <lorenm <at> u.washington.edu> wrote: Subject: drop support for nasm-0.98
To: x264-devel <at> videolan.org
Date: 2008-04-20 23:21:02 GMT

I plan to drop support for nasm < 2.0 soon, in order to eliminate a bunch
of SSE3 related ifdefs. You all should be using yasm anyway, but if
someone strenuously objects maybe I can come up with a way to isolate the
kludge in one place. Not that I expect it; nasm build seems to have been
broken for a while already, and I haven't heard many complaints.

--Loren Merritt
Last edited by saintdev on Thu May 01, 2008 5:48 am, edited 1 time in total.

saintdev
Regular User
Posts: 146
Joined: Wed Dec 20, 2006 4:17 am

Re: Can't build x264 anymore? Get yasm.

Post by saintdev » Thu May 01, 2008 5:48 am

git version control <git (at) videolan.org> wrote: Subject: commit: drop support for pre-SSE3 assemblers (Loren Merritt )
To: x264-devel (at) videolan.org
Date: 2008-04-27 03:16
x264 | branch: master | Loren Merritt <pengvado (at) akuvian.org> | Tue Apr 22 17:16:25 2008 -0600| [27c3071979593d059a0929ca7b0ad82a762626f6]

drop support for pre-SSE3 assemblers

> http://git.videolan.org/gitweb.cgi/x264 ... 2a762626f6
---

common/cpu.c | 2 --
common/dct.c | 2 +-
common/pixel.c | 4 ----
common/quant.c | 4 +---
common/x86/dct-a.asm | 2 --
common/x86/mc-a.asm | 4 ----
common/x86/mc-a2.asm | 2 --
common/x86/mc-c.c | 14 --------------
common/x86/pixel-a.asm | 4 ----
common/x86/predict-c.c | 2 --
common/x86/quant-a.asm | 2 --
common/x86/sad-a.asm | 8 +-------
configure | 6 +-----
13 files changed, 4 insertions(+), 52 deletions(-)

Diff: http://git.videolan.org/gitweb.cgi/x264 ... 2a762626f6

sdm
Bright Spark User
Posts: 194
Joined: Mon Feb 19, 2007 4:53 pm

Re: Can't build x264 anymore? Get yasm.

Post by sdm » Sun Jun 08, 2008 4:17 pm

Berylium wrote:Thank you, mac_man_ad, that worked like a charm!

To anyone else who may have difficulty with this on an Intel based Mac let me supplement jbrjake's instructions (some of this may be overkill but it worked for me).

1. download and unzip the source code jbrjake links to
2. open terminal and navigate to the new yasm-0.6.2 folder you just unzipped
3. run "./configure"
4. run "make"
5. run "sudo make install" (you'll obviously need an admin password for this one)
6. navigate to your HandBrake source folder
7. run "./configure"
8. run "./jam"

That should do it for you.


-Berylium
these instructions worked for me a month or two ago.

Now, on a fresh install of OSX 10.5.3, following these instructions results in:

Code: Select all

Last login: Sun Jun  8 10:05:49 on ttys000
sheldon-mcleans-mac-pro:~ sheldon$ cd yasm-0.6.2
sheldon-mcleans-mac-pro:yasm-0.6.2 sheldon$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... no
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... none
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
sheldon-mcleans-mac-pro:yasm-0.6.2 sheldon$ make
-bash: make: command not found
sheldon-mcleans-mac-pro:yasm-0.6.2 sheldon$ 

from the terminal.

Can anyone help?

Thanks,
--sdm.

jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Re: Can't build x264 anymore? Get yasm.

Post by jbrjake » Sun Jun 08, 2008 5:42 pm

...you remembered to install the dev tools, right?

sdm
Bright Spark User
Posts: 194
Joined: Mon Feb 19, 2007 4:53 pm

Re: Can't build x264 anymore? Get yasm.

Post by sdm » Mon Jun 09, 2008 2:25 am

...you remembered to install the dev tools, right?
um - I forgot that. Now all is well.
thanks!
-sdm.

daman123x
Posts: 51
Joined: Mon Dec 10, 2007 2:56 pm

Re: Can't build x264 anymore? Get yasm.

Post by daman123x » Wed Oct 01, 2008 12:19 am

this is F"ing magic. the problem is yasm has a mac GUI installer that does nothing. this should really be posted in the wiki with the build instructions; you simply (and obviously) cannot compile hb in a mac environment without installing yasm in this method

jbellanca
Posts: 31
Joined: Tue Feb 12, 2008 11:16 pm

Re: Can't build x264 anymore? Get yasm.

Post by jbellanca » Mon Oct 06, 2008 11:43 pm

Will yasm 0.7.1 work, or does it have to be 0.6.2?

EDIT: Couldn't build with 0.7.1, replaced with 0.6.2 and it worked perfectly... so in case anyone's wondering - 0.6.2.

Thanks!

realityking
Veteran User
Posts: 680
Joined: Tue Apr 24, 2007 12:36 pm

Re: Can't build x264 anymore? Get yasm.

Post by realityking » Tue Oct 07, 2008 4:27 pm

On os x ist works fine with 0.7.1.2093, and sr55 also uses 0.7.1 in his windows guide.

Post Reply