Search Unity

AlembicForUnity plugin installation

Discussion in 'External Tools' started by singhaidotnish, Aug 28, 2019.

  1. singhaidotnish

    singhaidotnish

    Joined:
    Aug 28, 2019
    Posts:
    5
    Using , https://github.com/unity3d-jp/AlembicForUnity/tree/master/Source
    which has 4 requirements.

    hdf5,
    ilmbase,
    ispc and
    alembicforunity

    When installing alembic for unity, as in the document , running sh "${plugindir}"/build.sh command
    from the directory where CMakelists.txt file is.

    get following error

    -- Single Alembic library not found; looking for legacy libs
    CMake Error at /opt/cmake/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake:137 (message):

    Count NOT find Alembic (missing: ALEMBIC_LIBRARIES ALEMBIC_LIBRARY_DIR ALEMBIC_INCLUDE_DIR

    Call Stack (most recent call first):
    /opt/cmake/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
    cmake/FindAlembic.cmake:130 (find_package_handle_standard_args)
    Source/CMakeLists.txt:8 (FIND_PACKAGE)

    -- Configuring incomplete, errors occurred!

    How to move forward from here to achieve the goal of creating the plugin file ?
     
  2. vladala

    vladala

    Unity Technologies

    Joined:
    Mar 3, 2017
    Posts:
    52
    Hey,

    The plugin git is using submodules for dependencies.
    Have you done a "git submodule update --init --recursive" after you cloned?
    Keep me posted if this works.
     
    singhaidotnish likes this.
  3. singhaidotnish

    singhaidotnish

    Joined:
    Aug 28, 2019
    Posts:
    5
    Almost there. After a series of Installing statements it comes to
    ** **
    ......
    -- Found Alembic: /use/local/src/AlembicForUnity/External/install/lib/libAlembic.a
    -- Found ISPC: /usr/local/ispc/ispc-v1.12.0-linux/bin/ispc
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /usr/local/src/AlembicForUnity
    Error: could not load cache
    /usr/local/src/AlembicForUnity

    Also, as suggested in the https://github.com/unity3d-jp/AlembicForUnity/tree/master/Source

    ....
    3. Make a new directory to hold the build, outside the git repository:
    plugindir = `pwd`
    mkdir -p ~ / projects / alembic-importer-build
    cd ~ / projects / alembic-importer-build

    4. Run:
    sh "$ {plugindir}" / build.sh

    I tried it but that gives error then i tried
    cd /usr/local/src/AlembicForUnity
    sh "$ {plugindir}" / build.sh

    and this leads to **


    Thank you.
     
  4. singhaidotnish

    singhaidotnish

    Joined:
    Aug 28, 2019
    Posts:
    5
    Please find attached output from command

    sh "${plugindir}"/build.sh

    Edit : having CMakeCache.txt removed the build comes until

    [100%] Linking CXX shared module abci.so

    followed by


    /usr/bin/ld: ../../../External/install/lib/libhdf5.a(H5Dint.c.o): unrecognized relocation (0x2a) in section `.text'
    /usr/bin/ld: final link failed: Bad value
    collect2: error: ld returned 1 exit status
    gmake[2]: *** [Source/abci/abci.so] Error 1
    gmake[2]: Leaving directory `/usr/local/src/AlembicForUnity/build'
    gmake[1]: *** [Source/abci/CMakeFiles/abci.dir/all] Error 2'
    gmake[1]: Leaving directory `/usr/local/src/AlembicForUnity/build'
    gmake: *** [all] Error 2
    /usr/local/src/AlembicForUnity


     

    Attached Files:

    Last edited: Sep 3, 2019
  5. singhaidotnish

    singhaidotnish

    Joined:
    Aug 28, 2019
    Posts:
    5
    It is working. I had to update the binutils after updating gcc. So the bigger question is,
    Is their a minimum environment version of utils required that will create .so file.

    Thank you for your support.

    EDIT : After placing abci.so file in its place, it gives "DllNotFoundException" in Packages/com.unity.formats.alembic/Runtime/Plugins/x86_64/abci.so

    Question is how make Unity point to .so file as a .dll file ?
     
    Last edited: Sep 4, 2019
  6. vladala

    vladala

    Unity Technologies

    Joined:
    Mar 3, 2017
    Posts:
    52
    Ohh boy. I think the instructions are massively out of date.
    Just run build.cmd on Windows and build.sh on OSX. The end result is a package inside com.unity.formats.alembic that you add to your project manifest file.