Building Source Code

Home Forums OpenEars Building Source Code

Viewing 13 posts - 1 through 13 (of 13 total)

  • Author
    Posts
  • #1018155
    jsteffey@hatci.com
    Participant

    Hi,

    So the distribution comes with the OpenEars Xcode project. I opened this project and tried building, but it failed with the following error:

    …Xcode/DerivedData/OpenEars-gsiuytklgdgbwwfddmbxhipxcbve/Build/Intermediates/OpenEars.build/Debug-iphoneos/OpenEars.build/Script-8C5DEE2914DABF3500EA965D.sh: line 166: /build_openears.sh: No such file or directory

    This is the relevant script source, after it already builds the frameworks:
    echo “Building documentation”
    /build_openears.sh “OpenEars” ${PROJECT_FILE_PATH} ${BUILT_PRODUCTS_DIR} “A shared-source framework for speech recognition and text to speech” “OpenEars”
    echo “Done building documentation”

    Any ideas why it can’t find the “build_openears.sh”? If I just delete that part of the source script so it doesn’t build the documentation, that won’t affect the rest of the product, right?

    #1018156
    Halle Winkler
    Politepix

    Hi,

    Correct, it’s building the framework fine but it can only build all the docs in all their formats on my build server. I can take a look at making the documentation build fail more gracefully than that on other machines, but if you want to avoid it altogether you can build the target “OpenEars No Documentation” instead.

    #1018158
    jsteffey@hatci.com
    Participant

    Okay, I see. Thanks.

    #1018173
    Halle Winkler
    Politepix

    OK, in today’s release of OpenEars 1.5.1 I put in a check for the documentation script so that it isn’t attempted to be run on other machines.

    #1031269
    dannychen
    Participant

    Hi,
    I just met another issue when I tried to build OpenEars.framework.

    When I try to build OpenEarsDistribution/OpenEars (2.503) in XCode Version 8.1 (8B62). There was an error: ‘stdio.h’ file not found makeheader.c

    And I also try to run
    $python framework_prep_script.py
    Got error:
    Traceback (most recent call last):
    File “framework_prep_script.py”, line 10, in <module>
    if “OpenEarsDistribution/OpenEars” in os.environ[‘PROJECT_DIR’]:
    File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/UserDict.py”, line 23, in __getitem__
    raise KeyError(key)
    KeyError: ‘PROJECT_DIR’

    $python framework_prep_script.py
    Got error:
    Traceback (most recent call last):
    File “framework_script.py”, line 859, in <module>
    log_handler.setFormatter(logging.Formatter(“%(name)s (” + os.environ[‘PLATFORM_NAME’] + “): %(levelname)s: %(message)s”))
    File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/UserDict.py”, line 23, in __getitem__
    raise KeyError(key)
    KeyError: ‘PLATFORM_NAME’

    Is it possible to build OpenEars.framework (2.503)?
    If so, is there any document? I’ve searched on both website and documents on DownloadOpenEarsDocs.webloc.

    Thank you.

    #1031270
    Halle Winkler
    Politepix

    I’ll check it out, thanks.

    #1031271
    Halle Winkler
    Politepix

    Just to double-check – you built via Archive rather than Build, is that correct?

    #1031273
    dannychen
    Participant

    Thanks for reply.

    Yes I built via Archive.

    OS: 10.11.5 El Capitan.

    #1031276
    dannychen
    Participant

    I’ve traced this issue and got some updates.

    In framework_prep_scipt.py:
    1. Add args ‘-I’, ‘/usr/include’, after clang: {subprocess.check_call([‘clang’, ‘-I’, ‘/usr/include’, …}.
    /usr/include is where the system placed stdio.h.

    2. change args from “OS X SDKs:” to “macOS SDKs:” in
    subprocess.Popen([‘xcodebuild -showsdks | awk \’/^$/{p=0};p; /macOS SDKs:/{p=1}\’ | tail -1 | cut -f3′], stdout=subprocess.PIPE, shell=True)
    I think it’s related to the new OS name…

    After the changes, XCode run framework_prep_scipt.py and compile the source code without error.

    But I got a new error:
    Command ‘[‘xcodebuild’, ‘-project’, …, ‘UFW_MASTER_PLATFORM=iphoneos’, ‘OTHER_CFLAGS=”-fembed-bitcode”‘, ‘install’]’ returned non-zero exit status 65
    Command /bin/sh failed with exit code 1`

    #1031278
    dannychen
    Participant

    Sorry, update the last part of previous post.

    ===
    But I got a new error during run framework_script.py:

    Traceback (most recent call last):
      File "framework_script.py", line 874, in <module>
        run_build
      File "framework_script.py", line 818, in run_build
        run_slave_build
      File "framework_script.py", line 753, in run_slave_build
        print_and_call_slave_build
      File "framework_script.py", line 550, in print_and_call_slave_build
        raise subprocess.CalledProcessError
    
    Command '['xcodebuild', '-project', ..., 'UFW_MASTER_PLATFORM=iphoneos', 'OTHER_CFLAGS="-fembed-bitcode"', 'install']' returned non-zero exit status 65
    Command /bin/sh failed with exit code 1
    #1031281
    Halle Winkler
    Politepix

    Hi Danny,

    Thanks very much for the great bug report. I’ve solved this by running your alternate version in the case that the first attempt fails, and also have a fix for the second issue so that the build completes, and just need a day or two to test my solution for edge cases and then I’ll push the new version.

    #1031290
    Halle Winkler
    Politepix

    OK, today’s version 2.504 should build fine in 8.1.

    #1031304
    dannychen
    Participant

    Hi,

    It works fine.
    Thanks for your great help!

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.