Can I use boost on uclibc linux?
Asked Answered
A

5

8

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?

Anaesthesia answered 21/11, 2008 at 18:16 Comment(4)
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.Scyphus
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.Anaesthesia
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?Pelagia
I'm not picky, if you've used any I'd like to know.Anaesthesia
A
2

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.

Alee answered 25/2, 2009 at 17:18 Comment(1)
Can you clarify using both STLport and libstdc++ together? Which one does boost link to?Anaesthesia
B
2

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.

Bleak answered 21/11, 2008 at 23:21 Comment(4)
Thanks for the info. Do you suspect that Arcom's libstdc++ is the GNU library? Does your system include glibc for libc?Anaesthesia
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.Bleak
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.Anaesthesia
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).Windswept
A
2

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.

Alee answered 25/2, 2009 at 17:18 Comment(1)
Can you clarify using both STLport and libstdc++ together? Which one does boost link to?Anaesthesia
F
1

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

Freshman answered 20/2, 2009 at 19:28 Comment(1)
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.Anaesthesia
P
0

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.

Phytobiology answered 21/11, 2008 at 19:7 Comment(4)
Boost requires a standard C++ library, if I were to try it, which C++ library would I use?Anaesthesia
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?Anaesthesia
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."Panelist
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?Anaesthesia
T
0

Yes you can use boost with uclibc.
I tried this with boost 1.45 & uclibc on ARM9260

  1. Use fresh OpenEmbedded
  2. Configure it to use Angstrom
  3. Configure Angstrom to use uclibc
  4. make boost - bitbake boost
Tho answered 25/1, 2011 at 17:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.