Skip to content

clang fixes allow compilation of EDLines#2

Open
translunar wants to merge 6 commits intoanyongjin:masterfrom
translunar:juno-clang-fix
Open

clang fixes allow compilation of EDLines#2
translunar wants to merge 6 commits intoanyongjin:masterfrom
translunar:juno-clang-fix

Conversation

@translunar
Copy link

I've made some small changes to the code and CMakeLists.txt to permit this to compile on a Mac.

I still cannot get it to correctly setup the Python extension, however. The problem relates to the lib directory. For example,

$ /usr/local/bin/python3 setup.py install
running install
/usr/local/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/usr/local/lib/python3.9/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
running bdist_egg
running egg_info
writing pylsd2.egg-info/PKG-INFO
writing dependency_links to pylsd2.egg-info/dependency_links.txt
writing top-level names to pylsd2.egg-info/top_level.txt
error: package directory 'pylsd2/lib' does not exist

If I do cp -a build/lib pylsd2/lib, it gives a different error,

/usr/local/bin/python3 setup.py install
running install
/usr/local/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/usr/local/lib/python3.9/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
running bdist_egg
running egg_info
writing pylsd2.egg-info/PKG-INFO
writing dependency_links to pylsd2.egg-info/dependency_links.txt
writing top-level names to pylsd2.egg-info/top_level.txt
package init file 'pylsd2/lib/__init__.py' not found (or not a regular file)

though it continues the install. Then, if I try to load the library in Python, I get

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/juno/Projects/pylsd2/pylsd2/__init__.py", line 9, in <module>
    from pylsd2.wrapper import *
  File "/Users/juno/Projects/pylsd2/pylsd2/wrapper.py", line 8, in <module>
    from pylsd2.bindings.fn_types import *
  File "/Users/juno/Projects/pylsd2/pylsd2/bindings/__init__.py", line 9, in <module>
    from pylsd2.bindings.lsd_ctypes import *
  File "/Users/juno/Projects/pylsd2/pylsd2/bindings/lsd_ctypes.py", line 60, in <module>
    raise ImportError('Cannot load dynamic library. Did you compile LSD?')
ImportError: Cannot load dynamic library. Did you compile LSD?

I'm not sure how to resolve most of these, but thought you all might be able to.

@anyongjin
Copy link
Owner

libs for windows and linux has been built in pylsd2/lib directory, and you should compile cpp for Mac before you can install and import them.
Have you compiled the libs successfully? if yes, you can copy the compiled libs to pylsd2/lib directory , and then reinstall the module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants