Skip to content

ROS2 windows#27

Merged
wjwwood merged 6 commits intoros2from
ros2_windows
Oct 26, 2015
Merged

ROS2 windows#27
wjwwood merged 6 commits intoros2from
ros2_windows

Conversation

@wjwwood
Copy link
Copy Markdown
Member

@wjwwood wjwwood commented Oct 22, 2015

These are some changes I had to make to get class loader and its tests working on Windows.

@esteve
Copy link
Copy Markdown
Member

esteve commented Oct 22, 2015

+1

@wjwwood
Copy link
Copy Markdown
Member Author

wjwwood commented Oct 22, 2015

I still need to test this on Linux.

@wjwwood
Copy link
Copy Markdown
Member Author

wjwwood commented Oct 23, 2015

So to make this work I think we need to make a version of loadLibrary which is intelligent and can try to load the requested file with different suffixes and prefixes. We can avoid this for now by duplicating this logic everywhere we use class loader, but I think it makes sense to embed this functionality in class loader as we write more plugin based software that needs to work on Linux, OS X, and Windows.

@esteve
Copy link
Copy Markdown
Member

esteve commented Oct 23, 2015

@wjwwood sounds good to me.

@dirk-thomas
Copy link
Copy Markdown
Member

Are you referring to the lib prefix and the platform specific extension? If yes, I guess it doesn't need to try different ones but only one which can be determined by ifdefs at compile time. Then I would suggest to implement this directly in this repo instead of copying the same code in multiple locations where this is being used.

@wjwwood
Copy link
Copy Markdown
Member Author

wjwwood commented Oct 24, 2015

@dirk-thomas it's a little more complicated than that because you can drop the lib on Linux and OS X if you want and you can pick the wrong extension (it is common for me to find people generate a .so file even on OS X where it should be .dylib). There's probably two functions that I could image. One just takes the "base" name and adds lib on Linux and OS X and the appropriate extension on all platforms (basically what I did in 8e9ed35). Another function might try a little harder, looking for .so on OS X if .dylib isn't found, trying without lib, etc.

@wjwwood wjwwood force-pushed the ros2_windows branch 2 times, most recently from d6c3b41 to f662667 Compare October 24, 2015 05:33
@wjwwood
Copy link
Copy Markdown
Member Author

wjwwood commented Oct 26, 2015

I'm going to add one or both of these functions in a separate pr, are there any objections to merging this?

@wjwwood
Copy link
Copy Markdown
Member Author

wjwwood commented Oct 26, 2015

One thing I didn't mention yet was that I had to link pthread against the gtests. I think this might should be fixed upstream, but I don't know which package it should go in.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fprintf

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed.

@dirk-thomas
Copy link
Copy Markdown
Member

Beside the small comments: lgtm

@dirk-thomas
Copy link
Copy Markdown
Member

We should probably also consider which changes on the ros2 branch could / should be back ported. (Not in this PR though)

wjwwood added a commit that referenced this pull request Oct 26, 2015
@wjwwood wjwwood merged commit 75842d2 into ros2 Oct 26, 2015
@wjwwood wjwwood deleted the ros2_windows branch October 26, 2015 20:05
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.

3 participants