Does anyone have any experience with running C++ applications that use the boost libraries on uclibc-based systems? Is it even possible? Which C++ standard library would you use? Is uclibc++ usable with boost?
-
There are friendly manuals extant. Just, y'know, saying. I would also question using boost on an embedded system anyway...seems a lot of overhead for embedded work. – Paul Nathan Nov 21 '08 at 19:27
-
I'm evaluating boost for an enterprisey application for server-class systems, but there is some benefit to scaling down to embedded systems. This isn't purely embedded or I'd use something else, but boost brings a lot to the table if you can swing it. – bmdhacks Nov 21 '08 at 19:35
-
Boost has many libraries, I'm sure some will work and odds are some will not work. What parts of boost are we talking about? – Leon Timmermans Nov 21 '08 at 19:53
-
I'm not picky, if you've used any I'd like to know. – bmdhacks Nov 21 '08 at 20:28
5 Answers
We are using many of the Boost libraries (thread, filesystem, signals, function, bind, any, asio, smart_ptr, tuple) on an Arcom Vulcan which is admittedly pretty powerful for an embedded device (64M RAM, 533MHz XScale). Everything works beautifully.
GCC 3.4 but we're not using uclib++ (Arcom provides a toolchain which includes libstd++).
Many embedded devices will happily run many of the Boost libraries, assuming decent compiler support. Just take care with usage. The Boost libraries raise the level of abstraction and it can be easy to use more resources than you think.

- 6,531
- 2
- 20
- 17
-
Thanks for the info. Do you suspect that Arcom's libstdc++ is the GNU library? Does your system include glibc for libc? – bmdhacks Nov 21 '08 at 23:28
-
Yeah, Arcom's libstdc++ is the GNU version. And yes, we use glibc. uclib ought to also work but we haven't (yet) gone down that path. – MattyT Nov 24 '08 at 00:06
-
Thanks for the info, but I'm more interested in uclibc-based systems. Once you start using glibc and GNU libstdc++, you're pretty much the same as good ole RedHat on x86. It's possible that glibc and GNU libstdc++ are the only ways to use boost, but I'm hoping somebody knows if that's the case. – bmdhacks Nov 24 '08 at 16:38
-
oops - sorry, my mouse is playing up and I docked a point. I've tried to add it on again but it won't let me set it to zero - so you are now +1 (even though you didn't actually answer the question - about using uclibc). – Dipstick Feb 20 '09 at 19:20
We use Boost together with GCC 2.95.3, libstdc++ and STLport on an ARMv4 platform running uClinux. Some parts of Boost are not compatible with GCC 2.x but the ones that are works well in our particular case. The libraries that we use the most are date_time, bind, function, tuple and thread.
Some of the libraries we had issues with were lambda, shared_pointer and format. These issues were most likely caused by our version of GCC since it has problems when you have too many includes or deep levels of template structures.
If possible I would recommend you to run the boost test suite with your particular toolchain to ensure compatibility. At the very least you could compile a native toolchain in order to ensure that your library versions are compatible.
We have not used uClibc++ because that is not what our toolchain provider recommends so I cannot comment on that particular combination.

- 17,522
- 8
- 47
- 47
-
Can you clarify using both STLport and libstdc++ together? Which one does boost link to? – bmdhacks Feb 27 '09 at 01:47
I googled "uclibc stlport". It seems there are at least a few versions of uclibc for which stlport can be compiled (see this). Given that, i'd say Boost is just a few compilation steps away. I have read a message by David Abrahams (who is an active member of the boost community) that says that Boost does not depend directly on the used libc. But some libraries may still cause problems, Boost.Python for instance, since it depends on something else (Python in my example) that might be difficult to compile with uclibc.
Hope this helps

- 16,798
- 8
- 46
- 66
-
Thanks for the first reasonable answer. You got me half-way there, which is very helpful. I'm still holding out for somebody with practical experience or evidence of this actually being deployed, considering the large bounty I've offered. – bmdhacks Feb 25 '09 at 16:48
I have not tried but I don't know anything about uclibc that would prevent Boost from working.
Try it and see what happens, I would say.

- 53,022
- 10
- 79
- 131
-
Boost requires a standard C++ library, if I were to try it, which C++ library would I use? – bmdhacks Nov 21 '08 at 19:11
-
Furthermore, "trying it" is a bit of a pain for embedded systems. Are you saying I should fire up my cross-compiler and spend hours and hours trying to get boost and a c++ library working? If I hit any roadblocks, do I just spend more time with it, or do I conclude that it's doable? – bmdhacks Nov 21 '08 at 19:21
-
Based on the amount of information in the original question, "try it" is the only answer you should expect to get. "Is it possible to run KDE 4 on my computer, please answer without me providing any specs about my computer." – Max Lybbert Nov 21 '08 at 21:44
-
That's silly. Are you saying that nobody has ever used any boost libraries on a uclibc system? I don't need an answer to any specifics, I'm just wondering if anyone has even attempted any facet of this task before wasting my time in a fruitless persuit. Why is that unreasonable? – bmdhacks Nov 21 '08 at 22:26
Yes you can use boost with uclibc.
I tried this with boost 1.45 & uclibc on ARM9260
- Use fresh OpenEmbedded
- Configure it to use Angstrom
- Configure Angstrom to use uclibc
- make boost - bitbake boost

- 8,198
- 71
- 51
- 66

- 1