#302 Compile error on Mac Mavericks

v1.0 (example)
open
nobody
None
5
2014-02-20
2014-02-02
David Favor
No

David-Favor-iMac> sw_vers
ProductName: Mac OS X
ProductVersion: 10.9.1
BuildVersion: 13B42

Latest OSX with all patches. Including latest Xcode.

Attached is log file.

Seems like clang may have a problem. I'll try + figure
out how to select another compilers... as exporting the
normal suspects (CC + CXX + LD) fails to change the compiler + loader.

1 Attachments

Related

Bugs: #302

Discussion

  • David Favor
    David Favor
    2014-02-02

    The build commands I'm using are as follows. This build script
    has worked for many months. Last clean build was 0.5.1-DEV-5032,
    so something has changed from then till 0.5.1-DEV-5041 related
    to linking + arch selection.

    build_gpac
    cd /smartbuild/work && [ -e gpac.svn ] || svn --quiet co https://gpac.svn.sourceforge.net/svnroot/gpac/trunk/gpac gpac.svn
    cd /smartbuild/work/gpac.svn
    svn --quiet up

    source : 0.5.1-DEV-5041

    installed: 0.5.1-DEV-5032

    bugs : https://sourceforge.net/p/gpac/bugs

    rebuild : rebuilding, source out of date

    rm -f /smartbuild/work/gpac.svn/build.log
    make distclean >/dev/null 2>&1 || /usr/bin/true
    port select --set gcc mp-gcc48
    Selecting 'mp-gcc48' for 'gcc' succeeded. 'mp-gcc48' is now active.
    export PATH=/opt/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin
    gcc --version | head -1
    gcc (MacPorts gcc48 4.8.2_0) 4.8.2
    g++ --version | head -1
    g++ (MacPorts gcc48 4.8.2_0) 4.8.2
    export CC=gcc
    export CXX=g++
    export LD=ld
    ./configure --verbose --prefix=/david-favor-tools/osx-10.9 --enable-pic --enable-gpl --extra-cflags='-pipe -I/david-favor-tools/osx-10.9/include -I/opt/local/include -I/usr/local/include -I/usr/include' --extra-ldflags='-v -Wl,-rpath,/david-favor-tools/osx-10.9/lib -Wl,-rpath,/opt/local/lib -Wl,-rpath,/usr/local/lib -Wl,-rpath,/usr/lib -L /smartbuild/work/gpac.svn/bin/gcc -L/david-favor-tools/osx-10.9/lib -L/opt/local/lib -L/usr/local/lib -L/usr/lib' --use-ffmpeg=/david-favor-tools/osx-10.9 --use-png=/david-favor-tools/osx-10.9 >> /smartbuild/work/gpac.svn/build.log 2>&1

     
  • David Favor
    David Favor
    2014-02-02

    If someone can tell me how to change CC + CXX + LD
    via environment variables, I'll try various MacPorts
    gcc compiler versions.

    Thanks.

     
  • Hi David,

    The problem seems to have been introduced by rev 5039. I hadn't tested compilation on Mac (our buildbot is off for maintenance unfortunately). I'll check ASAP.

    Cyril

     
  • I have the exact same config as you David, but I am using the gcc from Apple and it works.
    When I do gcc --version, I get this:
    gcc --version | head -1
    Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)

    I have tried svn up + make, and a clean checkout, works in both cases.
    Do you have to use MacPorts gcc ?
    Best regards
    JC

     
  • In your log, I see "spidermonkey: no"
    Either you do not have spidermonkey on your system, or it is not found.
    That is the problem.

     
  • Actually, the problem indeed was due to the fact that I did not try compiling without JavaScript support. I pushed a fix in revision 5042 that compiles now without JS. You might try updating and recompiling or installing spidermonkey.