adonmo / meos

Mobility Engine, Open Source
https://adonmo.github.io/meos/
MIT License
21 stars 3 forks source link

Build and publish wheels for Mac OS #15

Closed chaitan94 closed 4 years ago

chaitan94 commented 4 years ago

While the code compiles and wheel are being built on Mac OS right now, they are really linked properly. As a result, when using the wheel to import pymeos, we see the following:

     from pymeos.box import STBox
E   ImportError: dlopen(/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmp96l8_7pd/lib/python3.5/site-packages/pymeos.cpython-35m-darwin.so, 2): Symbol not found: __ZN10SerializerI8GeometryE5writeEPK11TInstantSetIS0_E
chaitan94 commented 4 years ago

Fixed in 3d73f335e2a4e615a7fff3c64b5a480b4f172bd5 and 0f95a150d890758f3c1f1ef386aad908b336d66b, GitHub action was added in 3a1704e740fc31e63f5e9b424efe8e7b7d4e4dab.

The issue was mostly the following two:

  1. Template instantiations need to happen in .cpp, not .hpp. More explanation here: https://stackoverflow.com/a/8752879/1932097
  2. Mac OS's clang needs explicit #includes in every place where classes like string, stringstream etc., are used so that they are instantiated properly