[Boost.Test] Compiling on Mac OS X

Hi,
We have run into problems trying to compile Boost.Test on a Mac OS X 10.3 system using GCC version 3.3 (details below). We are using the "included" implementation of Boost.Test in a shared library that we build using our own build system. This works fine on various different platforms and compilers, however part of Boost.Test fails to compile on Mac OS X. We are including Boost.Test in our shared library in the following way:
// Define this to declare all Boost.Test symbols as __declspec(dllexport)
// rather than __declspec(dllimport).
#define BOOST_TEST_SOURCE
#define BOOST_TEST_DYN_LINK
#include

Florian Winter
Hi,
We have run into problems trying to compile Boost.Test on a Mac OS X 10.3
(details below). We are using the "included" implementation of Boost.Test in a shared library that we build using our own build system. This works fine on various different
system using GCC version 3.3 platforms and compilers, however
part of Boost.Test fails to compile on Mac OS X. We are including Boost.Test in our shared library in the following way:
// Define this to declare all Boost.Test symbols as __declspec(dllexport) // rather than __declspec(dllimport). #define BOOST_TEST_SOURCE
#define BOOST_TEST_DYN_LINK #include
Though this particular setup was never tested (I recommend linking to shared library instead) and quite possibly will fail since library is not intended ot be used this way, I believe the particular error you see now is fixed in svn recently. Gennadiy

Gennadiy Rozental wrote:
Though this particular setup was never tested (I recommend linking to shared library instead) and quite possibly will fail since library is not intended ot be used this way, I believe the particular error you see now is fixed in svn recently.
Thank you for pointing this out. So far, our setup works fine on Windows and Linux using completely different toolchains. The compilation problem that we get doesn't seem to be related to the way we build Boost.Test at first glance, but feel free to tell me I am wrong. Apparently, the compilation problem that we had is already known, even though our particular setup was never tested. Is the problem a general problem on Mac OS X 10.3, i.e. will we also run into this problem when compiling the latest release of Boost.Test the standard way? Or is the problem related to our setup in particular? This would be important for us to know because it determines the next step we take to solve the problem, which would be either upgrade to a newer SVN version or try to build Boost.Test the standard way. Thanks in advance. Best regards, Florian

Florian Winter
Thank you for pointing this out. So far, our setup works fine on Windows and Linux using completely different toolchains. The compilation problem that we get doesn't seem to be related to the way we build Boost.Test at first glance, but feel free to tell me I am wrong.
You may find it breaking once you do a step away from situation where it works. Why don't you like using shared library?
Is the problem a general problem on Mac OS X 10.3, i.e. will we also run into this problem when compiling the latest release of Boost.Test the standard way? Or is the problem related to our setup in particular?
No. The problem was in general on Mac.
This would be important for us to know because it determines the next step we take to solve the problem, which would be either upgrade to a newer SVN version or try to build Boost.Test the standard way.
Try svn. You can see the status of platform build on corresponding regression test page. Gennadiy

Hi, The reason we are not using the shared library version of Boost.Test is simply that we find it more convenient to build a shared Boost.Test library on all platforms using our own build system. There is no other reason for it, and so far our way of using the library did not cause any problems. Our method of linking Boost.Test is also transparent to applications, because if we ever run into problems, we can still build a shared Boost.Test library in the standard way and link our shared library against it (instead of including the Boost.Test implementation). We were able to fix the compilation problem on Mac OS X by removing the #define of BOOST_HAVE_SIGACTION in macos.hpp . I hope this is a valid fix or workaround that will not cause any problems other than making error reporting in case of a signal less verbose on Mac OS X ... Thank you for your help so far. best regards, Florian Gennadiy Rozental wrote:
Florian Winter
writes: Thank you for pointing this out. So far, our setup works fine on Windows and Linux using completely different toolchains. The compilation problem that we get doesn't seem to be related to the way we build Boost.Test at first glance, but feel free to tell me I am wrong.
You may find it breaking once you do a step away from situation where it works. Why don't you like using shared library?
Is the problem a general problem on Mac OS X 10.3, i.e. will we also run into this problem when compiling the latest release of Boost.Test the standard way? Or is the problem related to our setup in particular?
No. The problem was in general on Mac.
This would be important for us to know because it determines the next step we take to solve the problem, which would be either upgrade to a newer SVN version or try to build Boost.Test the standard way.
Try svn. You can see the status of platform build on corresponding regression test page.
Gennadiy
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Florian Winter Software-Entwickler

Florian Winter
We were able to fix the compilation problem on Mac OS X by removing the #define of BOOST_HAVE_SIGACTION in macos.hpp . I hope this is a valid fix or workaround that will not cause any problems other than making error reporting in case of a signal less verbose on Mac OS X ...
You can try to re-enable signal catching once I fix the compilation issues Gennadiy
participants (2)
-
Florian Winter
-
Gennadiy Rozental