Opened 11 years ago

Closed 10 years ago

#42761 closed defect (fixed)

libvpx @1.3.0_1: build fails due to implicitly-defined function

Reported by: posita (Matt Bogosian) Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc: alessanderbotti@…, rlhamil, ryandesign (Ryan Carsten Schmidt)
Port: libvpx

Description

main.log attached. Failure point:

:info:build /usr/bin/clang  -pipe -Os -arch x86_64 -m64 -arch x86_64 -O3 -fPIC -Wall -Wdeclaration-after-statement -Wdisabled-optimization -Wpointer-arith -Wtype-limits -Wcast-qual -Wvla -Wimplicit-function-declaration -Wuninitialized -Wunused-variable -fno-strict-aliasing -Wno-unused-function -I. -I"/[[PREFIX]]/var/macports/build/_[[PREFIX]]_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_libvpx/libvpx/work/libvpx-v1.3.0" -c -o vp9/encoder/vp9_onyx_if.c.o vp9/encoder/vp9_onyx_if.c
:info:build clang: warning: argument unused during compilation: '-mavx2'
:info:build vp9/common/x86/vp9_loopfilter_intrin_avx2.c:22:28: warning: implicit declaration of function '_mm_broadcastb_epi8' is invalid in C99 [-Wimplicit-function-declaration]
:info:build     const __m128i thresh = _mm_broadcastb_epi8(
:info:build                            ^
:info:build vp9/common/x86/vp9_loopfilter_intrin_avx2.c:22:19: error: initializing 'const __m128i' with an expression of incompatible type 'int'

clang version:

% /usr/bin/clang --version
Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM 3.0svn)
Target: x86_64-apple-darwin10.8.0
Thread model: posix

Attachments (1)

main.log (10.7 KB) - added by posita (Matt Bogosian) 11 years ago.

Download all attachments as: .zip

Change History (13)

Changed 11 years ago by posita (Matt Bogosian)

Attachment: main.log added

comment:1 Changed 11 years ago by larryv (Lawrence Velázquez)

Cc: devans@… removed
Owner: changed from macports-tickets@… to devans@…
Summary: libvpx failes to build on 10.6 (with default clang)libvpx: build fails due to implicitly-defined function

Which version of libvpx are you trying to install? I don’t see this problem on Mavericks with libvpx @1.3.0_1.

comment:2 Changed 11 years ago by posita (Matt Bogosian)

Oops! I meant to include that in the title. Yes, it's @1.3.0_1. It started showing up with that package version (as far as I know).

comment:3 Changed 11 years ago by larryv (Lawrence Velázquez)

Summary: libvpx: build fails due to implicitly-defined functionlibvpx @1.3.0_1: build fails due to implicitly-defined function

comment:4 Changed 11 years ago by dbevans (David B. Evans)

Status: newassigned

comment:5 Changed 11 years ago by alessanderbotti@…

Cc: alessanderbotti@… added

Cc Me!

comment:6 Changed 11 years ago by rlhamil

Cc: rlhamil@… added

Cc Me!

comment:7 Changed 11 years ago by neverlunch@…

I just solved similar problem. Some intrinsics functions like _mm256_set1_epi16 were missing until I install the latest Command Line Tools (for OS X Lion, in my case) from Apple Developer Downloads.

clang -v ::

Before:

Apple clang version 3.1 (tags/Apple/clang-318.0.61) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.4.2
Thread model: posix

After:

Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin11.4.2
Thread model: posix

I hope this will help…

Last edited 10 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:8 in reply to:  7 Changed 11 years ago by iillyyaa@…

Replying to neverlunch@…:

I was having the same issue with libvpx, and your suggestion helped. I am on OS X Lion 10.7.5 with Xcode 4.6.3, and installing Command Line Tools (OS X Lion) for Xcode - April 2013 resolved this issue for me.

FWIW, my before/after version info is identical to yours.

Thank you!

Last edited 11 years ago by iillyyaa@… (previous) (diff)

comment:9 in reply to:  7 ; Changed 11 years ago by alessanderbotti@…

Replying to neverlunch@…:

Thanks for your feedback. I am also on OS X Lion 10.7.5, with Xcode 4.6.3 and Apple clang version 3.1. Instead of updating Command Line Tools, the following commands did the trick for me. It didn't configured and compiled libvpx, but it seemed to download a binary.

sudo port clean --all libvpx
sudo port install clang-3.4
sudo port install libvpx configure.compiler=macports-clang-3.4

After doing this, in order to verify if it was overkilling, I removed clang and it's leaves (viz. llvm-3.4), and libvpx. Then, a normal installation worked without the "configure.compiler=macports-clang-3.4":

sudo port uninstall clang-3.4
sudo port uninstall llvm-3.4
sudo port -f uninstall libvpx
sudo port clean --all libvpx
sudo port install libvpx

So, maybe it was just a matter of doing a forced remove, cleaning and reinstalling... but it is strange that I think it was the first thing I tried when this bug showed up, and it didn't worked. Did anyone fix the port to work with the old Command Line Tools?

comment:10 in reply to:  9 ; Changed 11 years ago by neverlunch@…

IMHO, nobody won't be able to fix anything as failures are due to missing intrinsics functions (aka "functions inside compiler"). Nevermind and upgrade your CLT.

comment:11 in reply to:  10 Changed 11 years ago by alessanderbotti@…

The issue just reappeared on an update of ffmpeg and it was not just a matter of doing a forced remove, cleaning and reinstalling. In the last time, the command

sudo port install libvpx configure.compiler=macports-clang-3.4

just downloaded and installed a binary, and I didn't noticed that I needed the +universal variant, for which there is no binary. So, I really had to install clang and compile libvpx +universal with macports-clang-3.4:

sudo port clean --all libvpx
sudo port install clang-3.4
sudo port install libvpx +universal configure.compiler=macports-clang-3.4

I don't want to update CLT because the lab I study provided me a Mac but not a personal Apple ID, what is required to download CLT as an Apple Developer. If I can, I'll avoid asking my lab for an Apple ID...

Last edited 11 years ago by alessanderbotti@… (previous) (diff)

comment:12 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Resolution: fixed
Status: assignedclosed

Fixed in r122008 by blacklisting old clangs that have this problem. Guessing somewhat on the versions of Xcode clang to blacklist; that part may need further refinement.

Note: See TracTickets for help on using tickets.