{"action":"created","issue":{"url":"https://api.github.com/repos/opensim-org/opensim-core/issues/2313","repository_url":"https://api.github.com/repos/opensim-org/opensim-core","labels_url":"https://api.github.com/repos/opensim-org/opensim-core/issues/2313/labels{/name}","comments_url":"https://api.github.com/repos/opensim-org/opensim-core/issues/2313/comments","events_url":"https://api.github.com/repos/opensim-org/opensim-core/issues/2313/events","html_url":"https://github.com/opensim-org/opensim-core/issues/2313","id":369993938,"node_id":"MDU6SXNzdWUzNjk5OTM5Mzg=","number":2313,"title":"Opensim python - Mac Anaconda Python 3","user":{"login":"gattia","id":10676083,"node_id":"MDQ6VXNlcjEwNjc2MDgz","avatar_url":"https://avatars3.githubusercontent.com/u/10676083?v=4","gravatar_id":"","url":"https://api.github.com/users/gattia","html_url":"https://github.com/gattia","followers_url":"https://api.github.com/users/gattia/followers","following_url":"https://api.github.com/users/gattia/following{/other_user}","gists_url":"https://api.github.com/users/gattia/gists{/gist_id}","starred_url":"https://api.github.com/users/gattia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gattia/subscriptions","organizations_url":"https://api.github.com/users/gattia/orgs","repos_url":"https://api.github.com/users/gattia/repos","events_url":"https://api.github.com/users/gattia/events{/privacy}","received_events_url":"https://api.github.com/users/gattia/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-10-15T04:24:11Z","updated_at":"2018-10-17T16:20:20Z","closed_at":"2018-10-17T15:31:07Z","author_association":"NONE","body":"Hi, \r\n\r\nIve been having issues getting the python wrappings for opensim 4.0 working on Mac. Im able to build opensim and it passes all tests on ctest, expect for python tests it gives an error:\r\n\r\n`***Exception: Child aborted`\r\n\r\nI also was getting an error on the matlab c3d:\r\n\r\n`Matlab_testOsimC3D ...............................***Failed`\r\n\r\nHowever, I assume this is unrelated.\r\n\r\nWhen I try to import opensim into python I get an error: \r\n```\r\nFatal Python error: PyThreadState_Get: no current thread\r\n\r\nAbort trap: 6\r\n```\r\nI have had this problem before when cmake built the dylib of a program against the system python instead of the anaconda python. This doesnt seem to be the case here... I dont think. \r\n\r\nI have opensim installed within a virtual environment using Anaconda on Mac OS Sierra. I am using Python 3.5, and have setup the cmake (ccmake) file to build using python 3, and ccmake appropriately detected the location of the python within my virtual environment. When I check the .so files that are built with opensim they seem alright, to me. \r\n\r\nI have checked just the general info with otool -L: \r\n```\r\n_actuators.so:\r\n\t@rpath/_actuators.so (compatibility version 0.0.0, current version 0.0.0)\r\n\t@rpath/libosimTools.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\t@rpath/libosimExampleComponents.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\t@rpath/libpython3.6m.dylib (compatibility version 3.6.0, current version 3.6.0)\r\n\t@rpath/libosimAnalyses.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\t@rpath/libosimActuators.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\t@rpath/libosimSimulation.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\t@rpath/libosimCommon.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\t@rpath/libosimLepton.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\t@rpath/libSimTKsimbody.3.6.dylib (compatibility version 3.6.0, current version 0.0.0)\r\n\t@rpath/libSimTKmath.3.6.dylib (compatibility version 3.6.0, current version 0.0.0)\r\n\t@rpath/libSimTKcommon.3.6.dylib (compatibility version 3.6.0, current version 0.0.0)\r\n\t/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate (compatibility version 1.0.0, current version 4.0.0)\r\n\t/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)\r\n\t/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 307.5.0)\r\n```\r\n\r\nMostly to look and see where @rpath are actually pointing and to make sure that the appropriate files are where they should be, I also printed out more detailed info about the .so using otool -l:\r\n\r\n```\r\n_actuators.so:\r\nMach header\r\n      magic cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags\r\n 0xfeedfacf 16777223          3  0x00           6    30       2864 0x00118085\r\nLoad command 0\r\n      cmd LC_SEGMENT_64\r\n  cmdsize 712\r\n  segname __TEXT\r\n   vmaddr 0x0000000000000000\r\n   vmsize 0x0000000000250000\r\n  fileoff 0\r\n filesize 2424832\r\n  maxprot 0x00000007\r\n initprot 0x00000005\r\n   nsects 8\r\n    flags 0x0\r\nSection\r\n  sectname __text\r\n   segname __TEXT\r\n      addr 0x00000000000049d0\r\n      size 0x00000000001b6926\r\n    offset 18896\r\n     align 2^4 (16)\r\n    reloff 0\r\n    nreloc 0\r\n     flags 0x80000400\r\n reserved1 0\r\n reserved2 0\r\nSection\r\n  sectname __stubs\r\n   segname __TEXT\r\n      addr 0x00000000001bb2f6\r\n      size 0x000000000000308a\r\n    offset 1815286\r\n     align 2^1 (2)\r\n    reloff 0\r\n    nreloc 0\r\n     flags 0x80000408\r\n reserved1 0 (index into indirect symbol table)\r\n reserved2 6 (size of stubs)\r\nSection\r\n  sectname __stub_helper\r\n   segname __TEXT\r\n      addr 0x00000000001be380\r\n      size 0x000000000000089e\r\n    offset 1827712\r\n     align 2^2 (4)\r\n    reloff 0\r\n    nreloc 0\r\n     flags 0x80000400\r\n reserved1 0\r\n reserved2 0\r\nSection\r\n  sectname __gcc_except_tab\r\n   segname __TEXT\r\n      addr 0x00000000001bec20\r\n      size 0x0000000000021f54\r\n    offset 1829920\r\n     align 2^2 (4)\r\n    reloff 0\r\n    nreloc 0\r\n     flags 0x00000000\r\n reserved1 0\r\n reserved2 0\r\nSection\r\n  sectname __const\r\n   segname __TEXT\r\n      addr 0x00000000001e0b80\r\n      size 0x0000000000000891\r\n    offset 1969024\r\n     align 2^4 (16)\r\n    reloff 0\r\n    nreloc 0\r\n     flags 0x00000000\r\n reserved1 0\r\n reserved2 0\r\nSection\r\n  sectname __cstring\r\n   segname __TEXT\r\n      addr 0x00000000001e1411\r\n      size 0x000000000006b139\r\n    offset 1971217\r\n     align 2^0 (1)\r\n    reloff 0\r\n    nreloc 0\r\n     flags 0x00000002\r\n reserved1 0\r\n reserved2 0\r\nSection\r\n  sectname __unwind_info\r\n   segname __TEXT\r\n      addr 0x000000000024c54c\r\n      size 0x0000000000003a5c\r\n    offset 2409804\r\n     align 2^2 (4)\r\n    reloff 0\r\n    nreloc 0\r\n     flags 0x00000000\r\n reserved1 0\r\n reserved2 0\r\nSection\r\n  sectname __eh_frame\r\n   segname __TEXT\r\n      addr 0x000000000024ffa8\r\n      size 0x0000000000000058\r\n    offset 2424744\r\n     align 2^3 (8)\r\n    reloff 0\r\n    nreloc 0\r\n     flags 0x00000000\r\n reserved1 0\r\n reserved2 0\r\nLoad command 1\r\n      cmd LC_SEGMENT_64\r\n  cmdsize 632\r\n  segname __DATA\r\n   vmaddr 0x0000000000250000\r\n   vmsize 0x0000000000020000\r\n  fileoff 2424832\r\n filesize 126976\r\n  maxprot 0x00000007\r\n initprot 0x00000003\r\n   nsects 7\r\n    flags 0x0\r\nSection\r\n  sectname __got\r\n   segname __DATA\r\n      addr 0x0000000000250000\r\n      size 0x00000000000004a0\r\n    offset 2424832\r\n     align 2^3 (8)\r\n    reloff 0\r\n    nreloc 0\r\n     flags 0x00000006\r\n reserved1 2071 (index into indirect symbol table)\r\n reserved2 0\r\nSection\r\n  sectname __nl_symbol_ptr\r\n   segname __DATA\r\n      addr 0x00000000002504a0\r\n      size 0x0000000000000010\r\n    offset 2426016\r\n     align 2^3 (8)\r\n    reloff 0\r\n    nreloc 0\r\n     flags 0x00000006\r\n reserved1 2219 (index into indirect symbol table)\r\n reserved2 0\r\nSection\r\n  sectname __la_symbol_ptr\r\n   segname __DATA\r\n      addr 0x00000000002504b0\r\n      size 0x00000000000040b8\r\n    offset 2426032\r\n     align 2^3 (8)\r\n    reloff 0\r\n    nreloc 0\r\n     flags 0x00000007\r\n reserved1 2221 (index into indirect symbol table)\r\n reserved2 0\r\nSection\r\n  sectname __mod_init_func\r\n   segname __DATA\r\n      addr 0x0000000000254568\r\n      size 0x0000000000000008\r\n    offset 2442600\r\n     align 2^3 (8)\r\n    reloff 0\r\n    nreloc 0\r\n     flags 0x00000009\r\n reserved1 0\r\n reserved2 0\r\nSection\r\n  sectname __const\r\n   segname __DATA\r\n      addr 0x0000000000254570\r\n      size 0x0000000000000320\r\n    offset 2442608\r\n     align 2^3 (8)\r\n    reloff 0\r\n    nreloc 0\r\n     flags 0x00000000\r\n reserved1 0\r\n reserved2 0\r\nSection\r\n  sectname __data\r\n   segname __DATA\r\n      addr 0x0000000000254890\r\n      size 0x0000000000019f4d\r\n    offset 2443408\r\n     align 2^4 (16)\r\n    reloff 0\r\n    nreloc 0\r\n     flags 0x00000000\r\n reserved1 0\r\n reserved2 0\r\nSection\r\n  sectname __bss\r\n   segname __DATA\r\n      addr 0x000000000026e7e0\r\n      size 0x000000000000139c\r\n    offset 0\r\n     align 2^4 (16)\r\n    reloff 0\r\n    nreloc 0\r\n     flags 0x00000001\r\n reserved1 0\r\n reserved2 0\r\nLoad command 2\r\n      cmd LC_SEGMENT_64\r\n  cmdsize 72\r\n  segname __LINKEDIT\r\n   vmaddr 0x0000000000270000\r\n   vmsize 0x0000000000163000\r\n  fileoff 2551808\r\n filesize 1453784\r\n  maxprot 0x00000007\r\n initprot 0x00000001\r\n   nsects 0\r\n    flags 0x0\r\nLoad command 3\r\n          cmd LC_ID_DYLIB\r\n      cmdsize 48\r\n         name @rpath/_actuators.so (offset 24)\r\n   time stamp 1 Wed Dec 31 19:00:01 1969\r\n      current version 0.0.0\r\ncompatibility version 0.0.0\r\nLoad command 4\r\n            cmd LC_DYLD_INFO_ONLY\r\n        cmdsize 48\r\n     rebase_off 2551808\r\n    rebase_size 3344\r\n       bind_off 2555152\r\n      bind_size 4208\r\n  weak_bind_off 2559360\r\n weak_bind_size 154424\r\n  lazy_bind_off 2713784\r\n lazy_bind_size 12320\r\n     export_off 2726104\r\n    export_size 77840\r\nLoad command 5\r\n     cmd LC_SYMTAB\r\n cmdsize 24\r\n  symoff 2809496\r\n   nsyms 25351\r\n  stroff 3232280\r\n strsize 773312\r\nLoad command 6\r\n            cmd LC_DYSYMTAB\r\n        cmdsize 80\r\n      ilocalsym 0\r\n      nlocalsym 23086\r\n     iextdefsym 23086\r\n     nextdefsym 1959\r\n      iundefsym 25045\r\n      nundefsym 306\r\n         tocoff 0\r\n           ntoc 0\r\n      modtaboff 0\r\n        nmodtab 0\r\n   extrefsymoff 0\r\n    nextrefsyms 0\r\n indirectsymoff 3215112\r\n  nindirectsyms 4292\r\n      extreloff 0\r\n        nextrel 0\r\n      locreloff 0\r\n        nlocrel 0\r\nLoad command 7\r\n     cmd LC_UUID\r\n cmdsize 24\r\n    uuid 0605D87A-0FC5-306B-ADCA-A1035BF5A1AC\r\nLoad command 8\r\n      cmd LC_VERSION_MIN_MACOSX\r\n  cmdsize 16\r\n  version 10.12\r\n      sdk 10.12\r\nLoad command 9\r\n      cmd LC_SOURCE_VERSION\r\n  cmdsize 16\r\n  version 0.0\r\nLoad command 10\r\n          cmd LC_LOAD_DYLIB\r\n      cmdsize 56\r\n         name @rpath/libosimTools.dylib (offset 24)\r\n   time stamp 2 Wed Dec 31 19:00:02 1969\r\n      current version 0.0.0\r\ncompatibility version 0.0.0\r\nLoad command 11\r\n          cmd LC_LOAD_DYLIB\r\n      cmdsize 64\r\n         name @rpath/libosimExampleComponents.dylib (offset 24)\r\n   time stamp 2 Wed Dec 31 19:00:02 1969\r\n      current version 0.0.0\r\ncompatibility version 0.0.0\r\nLoad command 12\r\n          cmd LC_LOAD_DYLIB\r\n      cmdsize 56\r\n         name @rpath/libpython3.6m.dylib (offset 24)\r\n   time stamp 2 Wed Dec 31 19:00:02 1969\r\n      current version 3.6.0\r\ncompatibility version 3.6.0\r\nLoad command 13\r\n          cmd LC_LOAD_DYLIB\r\n      cmdsize 56\r\n         name @rpath/libosimAnalyses.dylib (offset 24)\r\n   time stamp 2 Wed Dec 31 19:00:02 1969\r\n      current version 0.0.0\r\ncompatibility version 0.0.0\r\nLoad command 14\r\n          cmd LC_LOAD_DYLIB\r\n      cmdsize 56\r\n         name @rpath/libosimActuators.dylib (offset 24)\r\n   time stamp 2 Wed Dec 31 19:00:02 1969\r\n      current version 0.0.0\r\ncompatibility version 0.0.0\r\nLoad command 15\r\n          cmd LC_LOAD_DYLIB\r\n      cmdsize 56\r\n         name @rpath/libosimSimulation.dylib (offset 24)\r\n   time stamp 2 Wed Dec 31 19:00:02 1969\r\n      current version 0.0.0\r\ncompatibility version 0.0.0\r\nLoad command 16\r\n          cmd LC_LOAD_DYLIB\r\n      cmdsize 56\r\n         name @rpath/libosimCommon.dylib (offset 24)\r\n   time stamp 2 Wed Dec 31 19:00:02 1969\r\n      current version 0.0.0\r\ncompatibility version 0.0.0\r\nLoad command 17\r\n          cmd LC_LOAD_DYLIB\r\n      cmdsize 56\r\n         name @rpath/libosimLepton.dylib (offset 24)\r\n   time stamp 2 Wed Dec 31 19:00:02 1969\r\n      current version 0.0.0\r\ncompatibility version 0.0.0\r\nLoad command 18\r\n          cmd LC_LOAD_DYLIB\r\n      cmdsize 64\r\n         name @rpath/libSimTKsimbody.3.6.dylib (offset 24)\r\n   time stamp 2 Wed Dec 31 19:00:02 1969\r\n      current version 0.0.0\r\ncompatibility version 3.6.0\r\nLoad command 19\r\n          cmd LC_LOAD_DYLIB\r\n      cmdsize 56\r\n         name @rpath/libSimTKmath.3.6.dylib (offset 24)\r\n   time stamp 2 Wed Dec 31 19:00:02 1969\r\n      current version 0.0.0\r\ncompatibility version 3.6.0\r\nLoad command 20\r\n          cmd LC_LOAD_DYLIB\r\n      cmdsize 56\r\n         name @rpath/libSimTKcommon.3.6.dylib (offset 24)\r\n   time stamp 2 Wed Dec 31 19:00:02 1969\r\n      current version 0.0.0\r\ncompatibility version 3.6.0\r\nLoad command 21\r\n          cmd LC_LOAD_DYLIB\r\n      cmdsize 96\r\n         name /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate (offset 24)\r\n   time stamp 2 Wed Dec 31 19:00:02 1969\r\n      current version 4.0.0\r\ncompatibility version 1.0.0\r\nLoad command 22\r\n          cmd LC_LOAD_DYLIB\r\n      cmdsize 56\r\n         name /usr/lib/libSystem.B.dylib (offset 24)\r\n   time stamp 2 Wed Dec 31 19:00:02 1969\r\n      current version 1238.60.2\r\ncompatibility version 1.0.0\r\nLoad command 23\r\n          cmd LC_LOAD_DYLIB\r\n      cmdsize 48\r\n         name /usr/lib/libc++.1.dylib (offset 24)\r\n   time stamp 2 Wed Dec 31 19:00:02 1969\r\n      current version 307.5.0\r\ncompatibility version 1.0.0\r\nLoad command 24\r\n          cmd LC_RPATH\r\n      cmdsize 72\r\n         path /Users/gattia/Programming/opensim_build/opensim_build (offset 12)\r\nLoad command 25\r\n          cmd LC_RPATH\r\n      cmdsize 104\r\n         path /Users/gattia/Programming/opensim_build/opensim_dependencies_install/BTK/lib/btk-0.4dev (offset 12)\r\nLoad command 26\r\n          cmd LC_RPATH\r\n      cmdsize 56\r\n         path /Users/gattia/anaconda2/envs/opensim/lib (offset 12)\r\nLoad command 27\r\n          cmd LC_RPATH\r\n      cmdsize 96\r\n         path /Users/gattia/Programming/opensim_build/opensim_dependencies_install/simbody/lib (offset 12)\r\nLoad command 28\r\n      cmd LC_FUNCTION_STARTS\r\n  cmdsize 16\r\n  dataoff 2803944\r\n datasize 5544\r\nLoad command 29\r\n      cmd LC_DATA_IN_CODE\r\n  cmdsize 16\r\n  dataoff 2809488\r\n datasize 8\r\n\r\n```\r\nThose paths all look appropriate to me, and to the right locations for the dylibs that opensim is built against. \r\n\r\nThe only other comment or info I have is that at one point I wondered if it was a python 3 thing and I tried just building outside of a venv using the Anaconda 2 python that I've installed on my computer. This initially gave me some other error that I traced back to figure out that it was erroring because somehow it was trying to import something from the Opensim GUI that I have installed in my \r\nApplications folder. I was able to import opensim and use it by deleting the GUI version, but clearly this is not a long term solution. \r\n\r\nThis made me wonder if somehow there was a path issue, but that doesnt seem to be it. My current path is: \r\n\r\n`/Users/gattia/google-cloud-sdk/bin:/Users/gattia/Programming/opensim_build/opensim_install/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/TeX/texbin`\r\n\r\nI did at one point have in by .bash_profile a DYLD_LIBRARY_PATH addition pointing to the GUI version of opensim, but this has been commented out for all of this current testing. \r\n\r\nIf there are any thoughts at all on what the issue could be I would love to hear them, I've been stuck on this for quite some time. \r\n\r\nThanks,\r\n\r\nAnthony. \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/opensim-org/opensim-core/issues/comments/430694429","html_url":"https://github.com/opensim-org/opensim-core/issues/2313#issuecomment-430694429","issue_url":"https://api.github.com/repos/opensim-org/opensim-core/issues/2313","id":430694429,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDY5NDQyOQ==","user":{"login":"chrisdembia","id":846001,"node_id":"MDQ6VXNlcjg0NjAwMQ==","avatar_url":"https://avatars0.githubusercontent.com/u/846001?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisdembia","html_url":"https://github.com/chrisdembia","followers_url":"https://api.github.com/users/chrisdembia/followers","following_url":"https://api.github.com/users/chrisdembia/following{/other_user}","gists_url":"https://api.github.com/users/chrisdembia/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisdembia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisdembia/subscriptions","organizations_url":"https://api.github.com/users/chrisdembia/orgs","repos_url":"https://api.github.com/users/chrisdembia/repos","events_url":"https://api.github.com/users/chrisdembia/events{/privacy}","received_events_url":"https://api.github.com/users/chrisdembia/received_events","type":"User","site_admin":false},"created_at":"2018-10-17T16:20:20Z","updated_at":"2018-10-17T16:20:20Z","author_association":"MEMBER","body":"Thanks for the valuable input, @gattia, and for your willingness to contribute. This isn't high on our priority list right now, but after we release 4.0 it will be good to refine the python package."}}
{"actor":{"display_login":"chrisdembia"}}