Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#33621 closed defect (duplicate)

libvpx build fails with Xcode 4.3.1

Reported by: david.hislop.1@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.0.4
Keywords: Cc: neverpanic (Clemens Lang)
Port: libpvx

Description

Build of libvpx fails as part of a complete rebuild of all installed ports after upgrade to OS X 10.7.3 (Lion) and Xcode 4.3.1. Prior to it failing the upgrade had successfully built other ports for about 7.5 hours. Also fails as part of a specific build just of libvpx.

It's possible that the problem is missing include paths on the clang command.

I'm using:
OS X 10.7.3
MacPorts 2.0.4
Xcode 4.3.1

Here's what I did:

sudo port selfupdate
xcodebuild -license
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
sudo port upgrade outdated

The build failed with:

<snip>
--->  Configuring libvpx
Error: Target org.macports.configure returned: configure failure: shell command failed (see log for details)
Log for libvpx is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_multimedia_libvpx/libvpx/main.log
Error: Unable to upgrade port: 1

Checking main.log (attached) I found:

<snip>
:info:configure Unable to invoke compiler: /usr/bin/clang -O2 -arch x86_64 -isysroot  -m
macosx-version-min=10.7 -m64 -fomit-frame-pointer -arch x86_64 -O3 -fPIC -Wall -Wdeclara
tion-after-statement -Wdisabled-optimization -Wpointer-arith -Wtype-limits -Wcast-qual -Wno-unused-function
:info:configure 
:info:configure Configuration failed. This could reflect a misconfiguration of your
:info:configure toolchains, improper options selected, or another problem. If you
:info:configure don't see any useful error messages above, the next step is to look
:info:configure at the configure error log file (config.err) to determine what
:info:configure configure was trying to do when it died.
:info:configure shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_multimedia_libvpx/libvpx/work/libvpx-v1.0.0" && ./configure --prefix=/opt/local --enable-vp8 --enable-internal-stats --enable-pic --enable-postproc --enable-multithread --enable-runtime-cpu-detect --disable-install-docs --disable-debug-libs --disable-examples --target=x86_64-darwin11-gcc " returned error 1
:error:configure Target org.macports.configure returned: configure failure: shell command failed (see log for details)
<snip>

and in config.err (also attached):

<snip>
check_header pthread.h
check_cpp
BEGIN /tmp/vpx-conf-23788-21675.c
    1   #include "pthread.h"
    2   int x;
END /tmp/vpx-conf-23788-21675.c
/usr/bin/clang -O2 -arch x86_64 -isysroot -mmacosx-version-min=10.7 -m64 -fomit-frame-po
inter -arch x86_64 -O3 -fPIC -E -o /tmp/vpx-conf-23788-17370.o /tmp/vpx-conf-23788-21675
.c
/tmp/vpx-conf-23788-21675.c:1:10: fatal error: 'pthread.h' file not found
#include "pthread.h"
         ^
1 error generated.
check_header unistd.h
check_cpp
BEGIN /tmp/vpx-conf-23788-21675.c
    1   #include "unistd.h"
    2   int x;
END /tmp/vpx-conf-23788-21675.c
/usr/bin/clang -O2 -arch x86_64 -isysroot -mmacosx-version-min=10.7 -m64 -fomit-frame-pointer -arch x86_64 -O3 -fPIC -E -o /tmp/vpx-conf-23788-17370.o /tmp/vpx-conf-23788-21675.c
/tmp/vpx-conf-23788-21675.c:1:10: fatal error: 'unistd.h' file not found
#include "unistd.h"
         ^
1 error generated.

<snip>

check_header stdio.h
check_cpp
BEGIN /tmp/vpx-conf-23788-21675.c
    1   #include "stdio.h"
    2   int x;
END /tmp/vpx-conf-23788-21675.c
/usr/bin/clang -O2 -arch x86_64 -isysroot -mmacosx-version-min=10.7 -m64 -fomit-frame-po
inter -arch x86_64 -O3 -fPIC -Wall -Wdeclaration-after-statement -Wdisabled-optimization
 -Wpointer-arith -Wtype-limits -Wcast-qual -Wno-unused-function -E -o /tmp/vpx-conf-2378
8-17370.o /tmp/vpx-conf-23788-21675.c
/tmp/vpx-conf-23788-21675.c:1:10: fatal error: 'stdio.h' file not found
#include "stdio.h"
         ^
1 error generated.

I added /usr/include to the include path and the compile was successful:

$ cat >/tmp/my_test.c#include "stdio.h"int x;
$ /usr/bin/clang -I /usr/include -O2 -arch x86_64 -isysroot -mmacosx-version-min=10.7 -m64 -fomit-frame-pointer -arch x86_64 -O3 -fPIC -E -o /tmp/my_test.o /tmp/my_test.c 
$

So, how do I fix this and get the build to proceed?

[Note, port list libvpx showed the Maintainers as nomaintainer@…, so I've cc'd this there; sorry if that's the wrong thing to do]

Attachments (2)

main.log (8.7 KB) - added by david.hislop.1@… 13 years ago.
config.err (5.7 KB) - added by david.hislop.1@… 13 years ago.

Download all attachments as: .zip

Change History (7)

Changed 13 years ago by david.hislop.1@…

Attachment: main.log added

Changed 13 years ago by david.hislop.1@…

Attachment: config.err added

comment:1 Changed 13 years ago by neverpanic (Clemens Lang)

Resolution: duplicate
Status: newclosed

Duplicate of #33283, #33351, #33454.

Please:

  • verify your libvpx Portfile (port file libvpx will tell you where it is) matches the one on source:/trunk/dports/multimedia/libvpx/Portfile@90164:33-38, especially the highlighted lines.
  • verify xcode-select -print-path returns /Applications/Xcode.app/Contents/Developer or the respective path inside the Xcode.app bundle, in case you moved that.
  • verify /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs exists and contains at least one SDK.
  • verify you don't have developer_dir set in $prefix/etc/macports/macports.conf.

Then, please run port selfupdate, port clean libvpx and try again.

comment:2 Changed 13 years ago by neverpanic (Clemens Lang)

Cc: cal@… added; nomaintainer@… removed
Keywords: libvpx xcode lion removed

comment:3 Changed 13 years ago by david.hislop.1@…

Thanks, developer_dir was set in $prefix/etc/macports/macports.conf to /Developer, the location where Xcode 3.x was formerly installed. I uninstalled it after installing Xcode 4.3.1.

I don't recall ever setting it myself, although perhaps I ran something when I installed MacPorts a couple of years ago.

How does it get set (apart from editing macports.conf?)

comment:4 in reply to:  3 Changed 13 years ago by neverpanic (Clemens Lang)

Replying to david.hislop.1@…:

How does it get set (apart from editing macports.conf?)

It doesn't, but apparently we shipped a macports.conf containing devleoper_dir /Developer with or before MacPorts 1.8.

comment:5 Changed 13 years ago by david.hislop.1@…

Is there a way to refresh macports.conf?

Mine is

# $Id: macports.conf.in 59588 2009-10-17 15:59:11Z jmr@macports.org $
Note: See TracTickets for help on using tickets.