Re: Mac OSX: libvpx 1.1.0 build error

1,086 views
Skip to first unread message

Johann Koenig

unread,
Jun 8, 2012, 6:53:19 PM6/8/12
to webm-d...@webmproject.org
On Fri, Jun 8, 2012 at 12:49 PM, <alexande...@googlemail.com> wrote:
> Hi,
>
> I recently tried to build libvpx 1.1.0 on Mac OS 10.8, but I keep getting
> the error "yasm: FATAL: unable to open include file `asm_enc_offsets.asm' ".
> The error appears while running make install.
> I made sure, that the mentioned file exits in the build directory:
> ls -l ./vp8/encoder/asm_enc_offsets.c
> -rw-r--r--  1 alex  wheel  4490 May  9 01:14 ./vp8/encoder/asm_enc_offsets.c
> See https://gist.github.com/2859662 for my complete build output.
>
> Does anyone have any idea what the issue could be?

It looks like Xcode 4.4 is defaulting to clang now. Can you test
something please. From the build directory, after running configure
and the build fails, please run:

clang -S -DINLINE_ASM vp8/encoder/asm_enc_offsets.c -I. -o offsets.S
(adjust the file and include paths as necessary)

and then attach or inline offsets.S here
--
- johann koenig
  google

Johann Koenig

unread,
Jun 8, 2012, 7:08:52 PM6/8/12
to webm-d...@webmproject.org
We only check for gcc and icc but might need to check for clang as
well. This is speculation as I can't repro here when forcing CC=clang
LD=clang ../configure <...> with or without
--force-target=x86_64-darwin11-clang

But I only have 10.7, not 10.8

diff --git a/libs.mk b/libs.mk
index e2ba737..91b3b9c 100644
--- a/libs.mk
+++ b/libs.mk
@@ -282,7 +282,7 @@ $(filter %$(ASM).o,$(OBJS-yes)): $(BUILD_PFX)vpx_config.asm

OFFSET_PATTERN:='^[a-zA-Z0-9_]* EQU'

-ifeq ($(filter icc gcc,$(TGT_CC)), $(TGT_CC))
+ifeq ($(filter icc gcc clang,$(TGT_CC)), $(TGT_CC))
$(BUILD_PFX)asm_com_offsets.asm: $(BUILD_PFX)$(VP8_PREFIX)common/asm_com_of
LC_ALL=C grep $(OFFSET_PATTERN) $< | tr -d '$$\#' $(ADS2GAS) > $@
$(BUILD_PFX)$(VP8_PREFIX)common/asm_com_offsets.c.S: $(VP8_PREFIX)common/as
(END)

Johann Koenig

unread,
Jun 11, 2012, 12:44:07 PM6/11/12
to webm-d...@webmproject.org
On Sat, Jun 9, 2012 at 4:43 PM, <alexande...@googlemail.com> wrote:
> clang -S -DINLINE_ASM vp8/encoder/asm_enc_offsets.c  -I. -o offsets.S
> results in the following error:
>
> vp8/encoder/asm_enc_offsets.c:13:10: fatal error: 'vpx_config.h' file not
> found
> #include "vpx_config.h"
>          ^
> 1 error generated.

Was vpx_config.h generated when you ran configure? Add an include (-I)
for whatevery directory that is in.

Johann Koenig

unread,
Jun 14, 2012, 1:38:14 PM6/14/12
to webm-d...@webmproject.org
On Thu, Jun 14, 2012 at 10:02 AM, <alexande...@googlemail.com> wrote:
> vpx_config.h is being generated.
> See https://gist.github.com/2931442 for all files, which are generated.
>
> bash-3.2$ clang -S -DINLINE_ASM vp8/encoder/asm_enc_offsets.c -I
> vpx_config.h -o offsets.S
> vp8/encoder/asm_enc_offsets.c:12:10: fatal error: 'vpx_ports/asm_offsets.h'
> file not found
> #include "vpx_ports/asm_offsets.h"
>          ^
> 1 error generated.
>
> It seems like asm_offsets.h is not being generated, as it can not be found
> in the macbuild directory.

asm_offsets.h is not generated. You need to and an -I for the libvpx
directory (-I.. in this case, I believe)

Johann Koenig

unread,
Jun 14, 2012, 2:24:08 PM6/14/12
to webm-d...@webmproject.org
On Thu, Jun 14, 2012 at 11:20 AM, <alexande...@googlemail.com> wrote:
> I'm sorry, but i don't get it working.
> -I.. and -I /pathToLibvpx/libvpx-v1.1.0/ are resulting in in the same error.

From the macbuild directory run
clang -S -DINLINE_ASM ../vp8/encoder/asm_enc_offsets.c -I. -I.. -o offsets.S

Or from libvpx-v1.1.0 directory run
clang -S -DINLINE_ASM vp8/encoder/asm_enc_offsets.c -I. -Imacbuild -o offsets.S

Johann Koenig

unread,
Jun 14, 2012, 5:35:43 PM6/14/12
to webm-d...@webmproject.org
On Thu, Jun 14, 2012 at 11:34 AM, <alexande...@googlemail.com> wrote:
> Thanks for helping me out with the command.
> Attached is the offsets.S file.

It looks correct to me. To hack around this issue and continue the
build (until I can get a more complete repro environment) you can
manually generate the files:

From macbuild run (if this gets line broken, it's supposed to be all
one command):
clang -S -DINLINE_ASM ../vp8/encoder/asm_enc_offsets.c -I. -I.. -o -
| grep -w EQU | tr -d '$$\#' > asm_enc_offsets.asm

If you need asm_dec_offsets.asm or asm_com_offsets.asm then run:
clang -S -DINLINE_ASM ../vp8/decoder/asm_dec_offsets.c -I. -I.. -o -
| grep -w EQU | tr -d '$$\#' > asm_dec_offsets.asm

clang -S -DINLINE_ASM ../vp8/common/asm_com_offsets.c -I. -I.. -o - |
grep -w EQU | tr -d '$$\#' > asm_com_offsets.asm

John Koleszar

unread,
Jun 25, 2012, 1:14:06 PM6/25/12
to webm-d...@webmproject.org
Thanks. Fixed slightly differently in https://gerrit.chromium.org/gerrit/26027

It's not clear to me if this fixes the same issue Alex reported or
not. Alex, can you confim?

John

On Sat, Jun 23, 2012 at 1:43 AM, <alexande...@googlemail.com> wrote:
> Someone else recently figured out, that a regexp in
> build/make/gen_asm_deps.sh is broken.
> If you change line 45 to includes=$(LC_ALL=C egrep -i "include
> +\"[a-z0-9_/]+\.${sfx}" $srcfile |
> it compiles successfully.
> See https://github.com/mxcl/homebrew/issues/12567#issuecomment-6434000 for
> more details.
> --
> You received this message because you are subscribed to the Google Groups
> "WebM Discussion" group.
> To view this discussion on the web visit
> https://groups.google.com/a/webmproject.org/d/msg/webm-discuss/-/_GMux8jTOnoJ.
>
> To post to this group, send email to webm-d...@webmproject.org.
> To unsubscribe from this group, send email to
> webm-discuss...@webmproject.org.
> For more options, visit this group at
> http://groups.google.com/a/webmproject.org/group/webm-discuss/?hl=en.
Reply all
Reply to author
Forward
0 new messages