ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org

Talker example on macOS failed.(ROS2)

ros2

#1

I just followed through the installation tutorials and installed ROS2 on my mac. (Version 10.12.4).
After type in the following command in terminal:

. ~/ros2_install/ros2-osx/setup.bash
talker

It just gives back an error like this:

dyld: Library not loaded: /usr/local/opt/pcre/lib/libpcre.1.dylib
Referenced from: /Users/lander14/ros2_install/ros2-osx/lib/libPocoFoundation.46.dylib
Reason: image not found
Abort trap: 6

Can someone help me please?


#2

Would you mind giving me a few more details about your installation? Did you install from source or binary?

Then further, can you verify that you installed poco and pcre correctly from homebrew?
On my machine this looks similar to:

 ➭ brew info poco pcre
poco: stable 1.7.8 (bottled), HEAD
C++ class libraries for building network and internet-based applications
https://pocoproject.org/
/usr/local/Cellar/poco/1.7.8 (784 files, 11.2MB)
  Poured from bottle on 2017-03-08 at 14:15:26
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/poco.rb
==> Dependencies
Build: cmake ✔
Required: openssl ✔
==> Options
--with-static
	Build static libraries (instead of shared)
--HEAD
	Install HEAD version

pcre: stable 8.40 (bottled), HEAD
Perl compatible regular expressions library
http://www.pcre.org/
/usr/local/Cellar/pcre/8.39 (203 files, 5.4MB) *
  Poured from bottle on 2017-02-17 at 09:07:36
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/pcre.rb

#3

Hi,
I installed the Binary packages. And because I’m very new to ROS2, I followed strictly as the website told me to( https://github.com/ros2/ros2/wiki/OSX-Install-Binary ).
During the process, I didn’t encounter anything as poco or pcre.


#4

@Kloping can you try running brew install poco to see if that resolves your issue. If so I’ll update the install instructions for OS X that you linked to above.

Thanks.


#5

Actually, my previous comment doesn’t make anysense. Please ignore it.

Actually it looks like you’d need to do brew install pcre. If that command resolves your issue we’ll put that in the instructions. You should not, however, need to have poco installed from Homebrew for the binary to work.

Sorry for the confusion.


#6

Yes, it worked after installed pcre
Thank you very much!


#7

Cool, I updated the wiki pages.

For anyone interested, this seems to be an optional dependency of poco which it will pick up if installed from Homebrew. I was getting installed as a dependency of cppchecker which we have in our “development” or “from source” instruction, but not in our binary install instruction.

@Kloping thanks for pointing it out for us.