Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Raymond
Employee
339 Views

myriad_compile - dyld: Library not loaded: @rpath/libtbb.dylib? on Mac OSX 10.15.7 + 2021.2

Is there a way to work around this issue in Mac? It seems the libtbb was not loaded properly? 

 

dyld: Library not loaded: @rpath/libtbb.dylib

  Referenced from: /opt/intel//openvino_2021.2.185/deployment_tools/inference_engine/lib/intel64/myriad_compile

  Reason: image not found

 

I check and the setupvars.sh is executed properly, and all these variables are set. 

source /opt/intel/openvino_2021/bin/setupvars.sh

 

 if [[ "$OSTYPE" == "darwin"* ]]; then
        export DYLD_LIBRARY_PATH=$INSTALLDIR/deployment_tools/inference_engine/external/mkltiny_mac/lib:$INSTALLDIR/deployment_tools/inference_engine/external/tbb/lib:${IE_PLUGINS_PATH}${DYLD_LIBRARY_PATH:+:DYLD_LIBRARY_PATH}
        export LD_LIBRARY_PATH=$INSTALLDIR/deployment_tools/inference_engine/external/mkltiny_mac/lib:$INSTALLDIR/deployment_tools/inference_engine/external/tbb/lib:${IE_PLUGINS_PATH}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
    else
        export LD_LIBRARY_PATH=$HDDL_INSTALL_DIR/lib:$INSTALLDIR/deployment_tools/inference_engine/external/gna/lib:$INSTALLDIR/deployment_tools/inference_engine/external/mkltiny_lnx/lib:$INSTALLDIR/deployment_tools/inference_engine/external/tbb/lib:${IE_PLUGINS_PATH}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
    fi

 

 

0 Kudos
7 Replies
Raymond
Employee
335 Views

This maybe useful too? 

rlo@rlo-mac01 demos % otool -l /opt/intel/openvino_2021.2.185/deployment_tools/inference_engine/lib/intel64/myriad_compile           
/opt/intel/openvino_2021.2.185/deployment_tools/inference_engine/lib/intel64/myriad_compile:
Mach header
      magic cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
 0xfeedfacf 16777223          3  0x00           2    23       2264 0x00218085
Load command 0
      cmd LC_SEGMENT_64
  cmdsize 72
  segname __PAGEZERO
   vmaddr 0x0000000000000000
   vmsize 0x0000000100000000
  fileoff 0
 filesize 0
  maxprot 0x00000000
 initprot 0x00000000
   nsects 0
    flags 0x0
Load command 1
      cmd LC_SEGMENT_64
  cmdsize 632
  segname __TEXT
   vmaddr 0x0000000100000000
   vmsize 0x0000000000023000
  fileoff 0
 filesize 143360
  maxprot 0x00000005
 initprot 0x00000005
   nsects 7
    flags 0x0
Section
  sectname __text
   segname __TEXT
      addr 0x00000001000036a0
      size 0x000000000001bf5f
    offset 13984
     align 2^4 (16)
    reloff 0
    nreloc 0
     flags 0x80000400
 reserved1 0
 reserved2 0
Section
  sectname __stubs
   segname __TEXT
      addr 0x000000010001f600
      size 0x00000000000002a0
    offset 128512
     align 2^1 (2)
    reloff 0
    nreloc 0
     flags 0x80000408
 reserved1 0 (index into indirect symbol table)
 reserved2 6 (size of stubs)
Section
  sectname __stub_helper
   segname __TEXT
      addr 0x000000010001f8a0
      size 0x0000000000000448
    offset 129184
     align 2^2 (4)
    reloff 0
    nreloc 0
     flags 0x80000400
 reserved1 0
 reserved2 0
Section
  sectname __const
   segname __TEXT
      addr 0x000000010001fcf0
      size 0x0000000000000a70
    offset 130288
     align 2^4 (16)
    reloff 0
    nreloc 0
     flags 0x00000000
 reserved1 0
 reserved2 0
Section
  sectname __gcc_except_tab
   segname __TEXT
      addr 0x0000000100020760
      size 0x0000000000000ff4
    offset 132960
     align 2^2 (4)
    reloff 0
    nreloc 0
     flags 0x00000000
 reserved1 0
 reserved2 0
Section
  sectname __cstring
   segname __TEXT
      addr 0x0000000100021754
      size 0x00000000000013b7
    offset 137044
     align 2^0 (1)
    reloff 0
    nreloc 0
     flags 0x00000002
 reserved1 0
 reserved2 0
Section
  sectname __unwind_info
   segname __TEXT
      addr 0x0000000100022b0c
      size 0x00000000000004f0
    offset 142092
     align 2^2 (4)
    reloff 0
    nreloc 0
     flags 0x00000000
 reserved1 0
 reserved2 0
Load command 2
      cmd LC_SEGMENT_64
  cmdsize 712
  segname __DATA
   vmaddr 0x0000000100023000
   vmsize 0x0000000000002000
  fileoff 143360
 filesize 4096
  maxprot 0x00000003
 initprot 0x00000003
   nsects 8
    flags 0x0
Section
  sectname __nl_symbol_ptr
   segname __DATA
      addr 0x0000000100023000
      size 0x0000000000000008
    offset 143360
     align 2^3 (8)
    reloff 0
    nreloc 0
     flags 0x00000006
 reserved1 112 (index into indirect symbol table)
 reserved2 0
Section
  sectname __got
   segname __DATA
      addr 0x0000000100023008
      size 0x0000000000000128
    offset 143368
     align 2^3 (8)
    reloff 0
    nreloc 0
     flags 0x00000006
 reserved1 113 (index into indirect symbol table)
 reserved2 0
Section
  sectname __la_symbol_ptr
   segname __DATA
      addr 0x0000000100023130
      size 0x0000000000000380
    offset 143664
     align 2^3 (8)
    reloff 0
    nreloc 0
     flags 0x00000007
 reserved1 150 (index into indirect symbol table)
 reserved2 0
Section
  sectname __mod_init_func
   segname __DATA
      addr 0x00000001000234b0
      size 0x0000000000000020
    offset 144560
     align 2^3 (8)
    reloff 0
    nreloc 0
     flags 0x00000009
 reserved1 0
 reserved2 0
Section
  sectname __const
   segname __DATA
      addr 0x00000001000234d0
      size 0x0000000000000848
    offset 144592
     align 2^3 (8)
    reloff 0
    nreloc 0
     flags 0x00000000
 reserved1 0
 reserved2 0
Section
  sectname __data
   segname __DATA
      addr 0x0000000100023d18
      size 0x0000000000000010
    offset 146712
     align 2^3 (8)
    reloff 0
    nreloc 0
     flags 0x00000000
 reserved1 0
 reserved2 0
Section
  sectname __common
   segname __DATA
      addr 0x0000000100023d28
      size 0x00000000000000a0
    offset 0
     align 2^3 (8)
    reloff 0
    nreloc 0
     flags 0x00000001
 reserved1 0
 reserved2 0
Section
  sectname __bss
   segname __DATA
      addr 0x0000000100023dd0
      size 0x0000000000000758
    offset 0
     align 2^4 (16)
    reloff 0
    nreloc 0
     flags 0x00000001
 reserved1 0
 reserved2 0
Load command 3
      cmd LC_SEGMENT_64
  cmdsize 72
  segname __LINKEDIT
   vmaddr 0x0000000100025000
   vmsize 0x0000000000011000
  fileoff 147456
 filesize 65808
  maxprot 0x00000001
 initprot 0x00000001
   nsects 0
    flags 0x0
Load command 4
            cmd LC_DYLD_INFO_ONLY
        cmdsize 48
     rebase_off 147456
    rebase_size 88
       bind_off 147544
      bind_size 2888
  weak_bind_off 150432
 weak_bind_size 1112
  lazy_bind_off 151544
 lazy_bind_size 5000
     export_off 156544
    export_size 848
Load command 5
     cmd LC_SYMTAB
 cmdsize 24
  symoff 157832
   nsyms 631
  stroff 168976
 strsize 32904
Load command 6
            cmd LC_DYSYMTAB
        cmdsize 80
      ilocalsym 0
      nlocalsym 452
     iextdefsym 452
     nextdefsym 14
      iundefsym 466
      nundefsym 165
         tocoff 0
           ntoc 0
      modtaboff 0
        nmodtab 0
   extrefsymoff 0
    nextrefsyms 0
 indirectsymoff 167928
  nindirectsyms 262
      extreloff 0
        nextrel 0
      locreloff 0
        nlocrel 0
Load command 7
          cmd LC_LOAD_DYLINKER
      cmdsize 32
         name /usr/lib/dyld (offset 12)
Load command 8
     cmd LC_UUID
 cmdsize 24
    uuid 96DF88C1-BB8A-3197-A0B4-F5D7D9F4CE21
Load command 9
      cmd LC_VERSION_MIN_MACOSX
  cmdsize 16
  version 10.12
      sdk 10.15.4
Load command 10
      cmd LC_SOURCE_VERSION
  cmdsize 16
  version 0.0
Load command 11
       cmd LC_MAIN
   cmdsize 24
  entryoff 33152
 stacksize 0
Load command 12
          cmd LC_LOAD_DYLIB
      cmdsize 48
         name @rpath/libtbb.dylib (offset 24)
   time stamp 2 Wed Dec 31 16:00:02 1969
      current version 0.0.0
compatibility version 0.0.0
Load command 13
          cmd LC_LOAD_DYLIB
      cmdsize 56
         name @rpath/libtbbmalloc.dylib (offset 24)
   time stamp 2 Wed Dec 31 16:00:02 1969
      current version 0.0.0
compatibility version 0.0.0
Load command 14
          cmd LC_LOAD_DYLIB
      cmdsize 64
         name @rpath/libinference_engine_legacy.dylib (offset 24)
   time stamp 2 Wed Dec 31 16:00:02 1969
      current version 0.0.0
compatibility version 0.0.0
Load command 15
          cmd LC_LOAD_DYLIB
      cmdsize 64
         name @rpath/libinference_engine.dylib (offset 24)
   time stamp 2 Wed Dec 31 16:00:02 1969
      current version 0.0.0
compatibility version 0.0.0
Load command 16
          cmd LC_LOAD_DYLIB
      cmdsize 80
         name @rpath/libinference_engine_transformations.dylib (offset 24)
   time stamp 2 Wed Dec 31 16:00:02 1969
      current version 0.0.0
compatibility version 0.0.0
Load command 17
          cmd LC_LOAD_DYLIB
      cmdsize 48
         name @rpath/libngraph.dylib (offset 24)
   time stamp 2 Wed Dec 31 16:00:02 1969
      current version 0.0.0
compatibility version 0.0.0
Load command 18
          cmd LC_LOAD_DYLIB
      cmdsize 48
         name /usr/lib/libc++.1.dylib (offset 24)
   time stamp 2 Wed Dec 31 16:00:02 1969
      current version 902.1.0
compatibility version 1.0.0
Load command 19
          cmd LC_LOAD_DYLIB
      cmdsize 56
         name /usr/lib/libSystem.B.dylib (offset 24)
   time stamp 2 Wed Dec 31 16:00:02 1969
      current version 1281.100.1
compatibility version 1.0.0
Load command 20
      cmd LC_FUNCTION_STARTS
  cmdsize 16
  dataoff 157392
 datasize 344
Load command 21
      cmd LC_DATA_IN_CODE
  cmdsize 16
  dataoff 157736
 datasize 96
Load command 22
      cmd LC_CODE_SIGNATURE
  cmdsize 16
  dataoff 201888
 datasize 11376

dodo5522
Beginner
318 Views

Hi,

I faced the same issue and I could avoid the error with the below commands to add rpath to myriad_compile , and to remove code signature.

MYRIAD_COMPILE=/opt/intel/openvino_2021.2.185/deployment_tools/inference_engine/lib/intel64/myriad_compile
sudo install_name_tool -add_rpath $(dirname $(find /opt/intel/openvino_2021.2.185 -name libtbb.dylib)) $MYRIAD_COMPILE
sudo codesign --remove-signature $MYRIAD_COMPILE

 

 

After that I can compile some model as below.

$MYRIAD_COMPILE -m intel/face-detection-retail-0004/FP16/face-detection-retail-0004.xml -ip U8 -VPU_NUMBER_OF_SHAVES 4 -VPU_NUMBER_OF_CMX_SLICES 4
Inference Engine: 
        API version ............ 2.1
        Build .................. 2021.2.0-1877-176bdf51370-releases/2021/2
        Description ....... API
[Warning][VPU][Config] Deprecated option was used : VPU_MYRIAD_PLATFORM
Done

tree intel/face-detection-retail-0004/FP16
intel/face-detection-retail-0004/FP16
|-- face-detection-retail-0004.bin
|-- face-detection-retail-0004.blob
`-- face-detection-retail-0004.xml

0 directories, 3 files

I referred to :

dodo5522
Beginner
316 Views

But I want to know the root cause. What should I do to solve this issue?

IntelSupport
Community Manager
244 Views

Hi Raymond Lo,

Thanks for reaching out. I have validated the solution provided by dodo5522 on our part and it is working.

 

Hi Dodo, Thank you for sharing your solution. I found out the same issue reported on the Apple Community and this kind of error is due to the different project configurations that amend a framework build for the app.

 

Refer to the Apple Community for the troubleshooting workaround.


Regards,

Aznie



Raymond
Employee
229 Views

Ok, I compiled directly from the openvino github repository and it seems to work. And it seems it works ok on Linux as well. 

But now I'm welcomed by this:

"[Warning][VPU][Config] Deprecated option was used : VPU_MYRIAD_PLATFORM"

/opt/intel/openvino_2021/deployment_tools/inference_engine/lib/intel64/myriad_compile -m /content/flower/IR_models/FP32/flower.xml -ip U8 -VPU_NUMBER_OF_SHAVES 4 -VPU_NUMBER_OF_CMX_SLICES 4
 
How do we select the VPU_MYRIAD_2480? or it does not matter anymore? 
 

 

IntelSupport
Community Manager
186 Views

Hi Raymond Lo,

From the OpenVINO Toolkit documentation of Supported Configuration Parameters, it is mentioned that the default parameter for the MYRIAD_PLATFORM is set to the empty string. We were getting the same warning as you, I believe it is no longer needed to specify any parameter.

 

Regards,

Aznie


IntelSupport
Community Manager
133 Views

Hi Raymond Lo,

This thread will no longer be monitored since this issue has been resolved. If you need any additional information from Intel, please submit a new question.


Regards,

Aznie