-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
basic_idl_DIR=$(realpath ..) pip install . - MacOS (Error) #28
Comments
I think I told you the wrong thing in #27. I meant to say "replace |
I have just tried it and unfortunately I'm still getting an error:
|
Hi Fred, Do you have any updates? Thank you in advance! |
I don't see anything wrong with the command, so does |
Yes, the
What could be the issue? |
Running This is a guess, but maybe can't see it
message("HEY! basic_idl_DIR environment variables is $ENV{basic_idl_DIR}")
message("HEY! basic_idl_DIR cmake variables is ${basic_idl_DIR}")
from setuptools import setup, find_packages
from pathlib import Path
import os
from pyopendds.dev.cmake import \
CMakeWrapperExtension, CMakeWrapperBuild, get_include_path
extra_vars={
'PYOPENDDS_INCLUDE': get_include_path(),
}
def file_status(what, method, path):
print('HEY! {} (from {}) is {}: it does {}exist'.format(
what, method, repr(str(path)), '' if path.exists() else 'NOT '))
return path if path.exists() else None
def method_status(method, basic_idl_dir):
if basic_idl_dir is None:
print('HEY! basic_idl_dir from', method, 'is None')
return
basic_idl_dir = Path(basic_idl_dir)
d = file_status('basic_idl_dir', method, basic_idl_dir)
if d is not None:
basic_idl_config = basic_idl_dir / 'basic_idlConfig.cmake'
if file_status('basic_idl_config', method, basic_idl_config) is not None:
return d
return None
method_status("environment", os.environ.get('basic_idl_DIR', None))
cmake_var = method_status("__file__", Path(__file__).resolve().parent.parent)
if cmake_var is not None:
extra_vars['basic_idl_DIR'] = str(cmake_var)
setup(
name='pybasic',
packages=find_packages(),
ext_modules=[CMakeWrapperExtension(
name='_pybasic',
cmakelists_dir='.',
extra_vars=extra_vars,
)],
cmdclass={'build_ext': CMakeWrapperBuild},
install_requires=[
'pyopendds',
],
)
|
The errors encountered after making the changes mentioned in step 1 and step 2 and after executing step 3 are shown below:
After executing
What I noticed is that after executing |
Sorry, I made a mistake with telling you what command to run again. It should have been So I haven't compiled PyOpenDDS with clang before today. I was able to reproduce them locally and I have pushed a fix for them. Also in this comit I made changes to If you get the latest changes in the repo, reinstall |
I tested it again with the new version and I had no errors until I run the last command:
|
Alright, this is progress. The actual problem is this because the rest of the errors in the log would be caused by it:
So this means the OpenDDS core library couldn't find or load the rtps_udp library for some reason. This could happen because the If you didn't pass |
I have tried to configure again OpenDDS with and without the What could be wrong? |
In
|
Yes, it seems that there are no issues listed when running This is the output:
|
Hi Fred, Do you have some updates? |
I finally tried this out on macOS myself and it did it had the same problem. Setting
There are other variables for debugging the dynamic linker ( So it's trying to open the rtps_udp library because it wasn't linked at compile time, but it's not finding it for some reason. When I get the publisher, which currently links at compile time to do a similar thing, it still works, so it might be something specific trying to do it within Python on macOS. There is this Python bug that would explain it because the system has to use So I still don't know why it's doing it and I don't think I can look into anymore because the machine I'm remotely connecting to using ssh keeps freezing the connection. I think there is a workaround for this though. Try adding this to the target_link_libraries(_pybasic PUBLIC OpenDDS::OpenDDS) Then run It was a bit tricky for me to try this out with my ssh session that kept freezing, but it fixed the issue and I was able to successfully run the test after I did it. This might make it tricky if you want move the libraries though because the paths would be fixed at compile time. You might have to look into using |
Thank you for your response! I have tried adding the After that, I have navigated to the OpenDDS directory and enabled the environment with the What are the steps that you followed in order to successfully run the test? Thank you in advance for your help! |
You should add it to the end of the file or at least somewhere after
Don't rerun |
These are the exact steps assuming cd basic_output
echo 'target_link_libraries(_pybasic PUBLIC OpenDDS::OpenDDS)' >> CMakeLists.txt
pip install .
# Run Basic Test
cd ../..
bash run_test.sh |
Thank you for your response! I have followed the steps and I checked if the command you mentioned was added in the
What could be wrong? |
In LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$dir" python3 subscriber.py & to DYLD_PRINT_LIBRARIES=1 DYLD_PRINT_LIBRARIES_POST_LAUNCH=1 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$dir" python3 subscriber.py & and run it again and post what it prints? |
Thank you for your response! After running it again, the following was printed in the terminal:
|
Rtps_Udp should be in the list along with If you need this for a commercial project, I would suggest reaching out to our commercial support services and we could continue this with better priority and resources. If that's not possible, then I'd have to find the time to research and think about this more. |
Thank you for your response and for your time! Please let me know when you think of a solution. |
For reference when I come back to this, can you post your macOS version, exact Python version and where you got the python version from, like if you downloaded it from python.org or if you used brew? |
The macOS version is 11.6 (Big Sur). I installed Python using brew, and the version that I have is 3.10.0. Thank you for your help! |
I tried to test it again in the past days and I noticed that I'm getting an error after executing The error that I'm getting is the following:
Maybe this is the reason why the test doesn't work. |
This is different from the issue before because you were able to use the result of this CMake command before. There's a syntax error in the |
You are right, my mistake. It is solved now. Now I'm only getting the error that I had before, after executing
|
Hi,
I have tried given the real path to the "basic_output" directory, as you indicated, but it still doesn't work. After I typed the following command:
basic_idl_DIR=/Users/dannyguest/Downloads/pyopendds/tests/basic_test/build/basic_output pip install .
The error that I'm getting is the following:
Is there any fix for this issue?
Thank you very much!
The text was updated successfully, but these errors were encountered: