Compilation problem with has_binary_operator.hpp on Mac OSX
Hi, I'm building a framework project using Xcode 4.6 configured to use the Apple GCC 4.2 compiler (my project also uses wxWidgets, so this compiler is required). Using Boost 1.55.0 I get: cd /Users/tim/Developer/RBSpeech setenv LANG en_US.US-ASCII /Applications/Xcode.app/Contents/Developer/usr/bin/llvm-gcc-4.2 -x objective-c++ -arch x86_64 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wunused-variable -Wuninitialized -Wshorten-64-to-32 -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Develop er/SDKs/MacOSX10.8.sdk -fasm-blocks -mmacosx-version-min=10.6 -gdwarf-2 -fvisibility-inlines-hidden -iquote /Users/tim/Library/Developer/Xcode/DerivedData/RBSpeech-gglcnsigefizlfbidkwh bsxvlwng/Build/Intermediates/RBSpeech.build/Debug/RBSpeech.build/RBSpeech-ge nerated-files.hmap -I/Users/tim/Library/Developer/Xcode/DerivedData/RBSpeech-gglcnsigefizlfbidk whbsxvlwng/Build/Intermediates/RBSpeech.build/Debug/RBSpeech.build/RBSpeech- own-target-headers.hmap -I/Users/tim/Library/Developer/Xcode/DerivedData/RBSpeech-gglcnsigefizlfbidk whbsxvlwng/Build/Intermediates/RBSpeech.build/Debug/RBSpeech.build/RBSpeech- all-target-headers.hmap -iquote /Users/tim/Library/Developer/Xcode/DerivedData/RBSpeech-gglcnsigefizlfbidkwh bsxvlwng/Build/Intermediates/RBSpeech.build/Debug/RBSpeech.build/RBSpeech-pr oject-headers.hmap -I/Users/tim/Library/Developer/Xcode/DerivedData/RBSpeech-gglcnsigefizlfbidk whbsxvlwng/Build/Products/Debug/include -I/users/tim/developer/libraries/wxwidgets/include -I/users/tim/developer/libraries/cryptopp -I/users/tim/developer/libraries/boost_1_55_0 -I/users/tim/developer/sources/surfacereader -I/Users/tim/Library/Developer/Xcode/DerivedData/RBSpeech-gglcnsigefizlfbidk whbsxvlwng/Build/Intermediates/RBSpeech.build/Debug/RBSpeech.build/DerivedSo urces/x86_64 -I/Users/tim/Library/Developer/Xcode/DerivedData/RBSpeech-gglcnsigefizlfbidk whbsxvlwng/Build/Intermediates/RBSpeech.build/Debug/RBSpeech.build/DerivedSo urces -F/Users/tim/Library/Developer/Xcode/DerivedData/RBSpeech-gglcnsigefizlfbidk whbsxvlwng/Build/Products/Debug -I/Users/tim/developer/libraries/wxwidgets/build-debug/lib/wx/include/osx_co coa-unicode-static-2.9 -I/Users/tim/developer/libraries/wxwidgets/include -D_FILE_OFFSET_BITS=64 -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__ -include /Users/tim/Library/Developer/Xcode/DerivedData/RBSpeech-gglcnsigefizlfbidkwh bsxvlwng/Build/Intermediates/PrecompiledHeaders/RBSpeech-Prefix-filshqejewqv wmcnuphmjzrmapcf/RBSpeech-Prefix.pch -c /Users/tim/Developer/RBSpeech/../Sources/SurfaceReader/RBSpeech.mm -o /Users/tim/Library/Developer/Xcode/DerivedData/RBSpeech-gglcnsigefizlfbidkwh bsxvlwng/Build/Intermediates/RBSpeech.build/Debug/RBSpeech.build/Objects-nor mal/x86_64/RBSpeech.o cc1objplus: warning: -Wuninitialized is not supported without -O In file included from /users/tim/developer/libraries/boost_1_55_0/boost/type_traits/has_left_shift .hpp:43, from /users/tim/developer/libraries/boost_1_55_0/boost/lexical_cast.hpp:165, from /Users/tim/Developer/RBSpeech/../Sources/SurfaceReader/RBStringFuncs.hpp:11, from /Users/tim/Developer/RBSpeech/../Sources/SurfaceReader/RBSpeech.h:27, from /Users/tim/Developer/RBSpeech/../Sources/SurfaceReader/RBSpeech.mm:4: /users/tim/developer/libraries/boost_1_55_0/boost/type_traits/detail/has_bin ary_operator.hpp:155: error: expected unqualified-id before 'do' The project uses OSX10.8 as its base SDK, but has OSX10.6 as its deployment target to provide backward compatibility and I made sure that my Boost libraries specified the 10.6 SDK as a minimum. Can anybody advise, please? Best wishes. Tim Burgess
/users/tim/developer/libraries/boost_1_55_0/boost/type_traits/detail/has_bin ary_operator.hpp:155: error: expected unqualified-id before 'do'
That's strange as there is no 'do' in that file. Could you make a minimal example that we could test? Frédéric
/users/tim/developer/libraries/boost_1_55_0/boost/type_traits/detail/has_bin ary_operator.hpp:155: error: expected unqualified-id before 'do'
That's strange as there is no 'do' in that file. Could you make a minimal example that we could test?
I would suspect that "check" is defined as a macro on that platform: I seem to remember having to fix this in some other traits classes. John.
On Dec 27, 2013, at 5:31 AM, John Maddock
/users/tim/developer/libraries/boost_1_55_0/boost/type_traits/detail/has_bin ary_operator.hpp:155: error: expected unqualified-id before 'do'
That's strange as there is no 'do' in that file. Could you make a minimal example that we could test?
I would suspect that "check" is defined as a macro on that platform: I seem to remember having to fix this in some other traits classes.
This is exactly right. See https://svn.boost.org/trac/boost/ticket/6219 -- Marshall Marshall Clow Idio Software mailto:mclow.lists@gmail.com A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait). -- Yu Suzuki
Hi,
Sorry for the delay in responding to this. I read the article you linked to
but it didn't make a lot of sense to me as I'm a relative newbie in this
area. Can you be more explicit as to what I can do to get around this issue,
please?
Best wishes.
Tim Burgess
-----Original Message-----
From: Boost-users [mailto:boost-users-bounces@lists.boost.org] On Behalf Of
Marshall Clow
Sent: 28 December 2013 05:04
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] Compilation problem with has_binary_operator.hpp
on Mac OSX
On Dec 27, 2013, at 5:31 AM, John Maddock
/users/tim/developer/libraries/boost_1_55_0/boost/type_traits/detail/has_bin
ary_operator.hpp:155: error: expected unqualified-id before 'do'
That's strange as there is no 'do' in that file. Could you make a minimal example that we could test?
I would suspect that "check" is defined as a macro on that platform: I seem to remember having to fix this in some other traits classes.
This is exactly right. See https://svn.boost.org/trac/boost/ticket/6219 -- Marshall Marshall Clow Idio Software mailto:mclow.lists@gmail.com A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait). -- Yu Suzuki _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
On Jan 8, 2014, at 7:28 AM, "Tim Burgess"
Can you be more explicit as to what I can do to get around this issue, please?
I believe the advice is: Before your first Boost #include, add code like this: #ifdef check #undef check #endif
OK, that makes sense now, so I'll give it a try.
Many thanks for the clarification.
Best wishes.
Tim Burgess
-----Original Message-----
From: Boost-users [mailto:boost-users-bounces@lists.boost.org] On Behalf Of
Nat Goodspeed
Sent: 08 January 2014 12:55
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] Compilation problem with has_binary_operator.hpp
on Mac OSX
On Jan 8, 2014, at 7:28 AM, "Tim Burgess"
Can you be more explicit as to what I can do to get around this issue, please?
I believe the advice is: Before your first Boost #include, add code like this: #ifdef check #undef check #endif
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
OK,
This fix worked for me in clearing the issue around has_binary. However, I'm
still having a problem. The module I'm trying to build is an objective-c++
framework and, due to an earlier problem around anonymous enumerations, I
was told to use a later version of GCC than Apple's provided version. For
this reason I configured GCC 4.8.2 from MacPorts and set up a compiler
plug-in for Xcode 4.6 to build my framework using this version of the
compiler. I now appear to be in a Catch 22 scenario as GCC 4.8 apparently
does not support C blocks, giving me the following first error:
NSTask.h:69: Expected unqualified-id before '^'
I can clear this by reverting to Apple's GCC 4.2, but then I'll get
anonymous enum errors in Boost's decay.h.
I'm now way out of my depth and experience, so can anybody please offer any
help out of my dilemma?
Best wishes.
Tim Burgess
-----Original Message-----
From: Boost-users [mailto:boost-users-bounces@lists.boost.org] On Behalf Of
Tim Burgess
Sent: 08 January 2014 13:18
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] Compilation problem with has_binary_operator.hpp
on Mac OSX
OK, that makes sense now, so I'll give it a try.
Many thanks for the clarification.
Best wishes.
Tim Burgess
-----Original Message-----
From: Boost-users [mailto:boost-users-bounces@lists.boost.org] On Behalf Of
Nat Goodspeed
Sent: 08 January 2014 12:55
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] Compilation problem with has_binary_operator.hpp
on Mac OSX
On Jan 8, 2014, at 7:28 AM, "Tim Burgess"
Can you be more explicit as to what I can do to get around this issue, please?
I believe the advice is: Before your first Boost #include, add code like this: #ifdef check #undef check #endif
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
On Jan 10, 2014, at 8:08 AM, Tim Burgess
OK,
This fix worked for me in clearing the issue around has_binary. However, I'm still having a problem. The module I'm trying to build is an objective-c++ framework and, due to an earlier problem around anonymous enumerations, I was told to use a later version of GCC than Apple's provided version. For this reason I configured GCC 4.8.2 from MacPorts and set up a compiler plug-in for Xcode 4.6 to build my framework using this version of the compiler. I now appear to be in a Catch 22 scenario as GCC 4.8 apparently does not support C blocks, giving me the following first error:
NSTask.h:69: Expected unqualified-id before '^'
I can clear this by reverting to Apple's GCC 4.2, but then I'll get anonymous enum errors in Boost's decay.h.
I'm now way out of my depth and experience, so can anybody please offer any help out of my dilemma?
Best wishes. Tim Burgess
I don't know if this will help, or if it is even an option for you, but can you try Xcode 5 with clang?
I had problems building one of the other libraries I need (wxWidgets) using
clang, but I'll get their latest svn and see if it's resolved. If so, I'll
try clang with my Xcode 4.6 and see where that takes me.
Thanks.
Best wishes.
Tim Burgess
From: Boost-users [mailto:boost-users-bounces@lists.boost.org] On Behalf Of
Michael Olea
Sent: 10 January 2014 16:21
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] Compilation problem with has_binary_operator.hpp
on Mac OSX
On Jan 10, 2014, at 8:08 AM, Tim Burgess
OK,
Just reporting back in the hope that I can help others avoid the pain I've
been through with this.
My solution to getting Boost, wxWidgets, Crypto++ and an Objective-c++
module all to play happily together on my Mac is as follows:
- Boost 1.55.0;
- wxWidgets 3.0.0;
- Crypto++ 5.6.2;
- Xcode 5.0.2, as moving to Apple's version of clang keeps my
Objective-c++ module happy;
- Needed to use libstdc++ instead of libc++ for all modules as
Crypto++ wouldn't build using libc++, but earlier versions of wxWidgets
won't build with libstdc++, hence the move to 3.0.0;
Thanks to everybody who offered suggestions that took me forward - I can now
move onto debugging my own code instead of fighting librariesJ
Best wishes.
Tim Burgess
From: Boost-users [mailto:boost-users-bounces@lists.boost.org] On Behalf Of
Tim Burgess
Sent: 11 January 2014 14:48
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] Compilation problem with has_binary_operator.hpp
on Mac OSX
I had problems building one of the other libraries I need (wxWidgets) using
clang, but I'll get their latest svn and see if it's resolved. If so, I'll
try clang with my Xcode 4.6 and see where that takes me.
Thanks.
Best wishes.
Tim Burgess
From: Boost-users [mailto:boost-users-bounces@lists.boost.org] On Behalf Of
Michael Olea
Sent: 10 January 2014 16:21
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] Compilation problem with has_binary_operator.hpp
on Mac OSX
On Jan 10, 2014, at 8:08 AM, Tim Burgess
Hi,
Sorry for the delay in responding to this. I read the article you linked to
but it didn't make a lot of sense to me as I'm a relative newbie in this
area. Can you be more explicit as to what I can do to get around this issue,
please?
Best wishes.
Tim Burgess
-----Original Message-----
From: Boost-users [mailto:boost-users-bounces@lists.boost.org] On Behalf Of
Marshall Clow
Sent: 28 December 2013 05:04
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] Compilation problem with has_binary_operator.hpp
on Mac OSX
On Dec 27, 2013, at 5:31 AM, John Maddock
/users/tim/developer/libraries/boost_1_55_0/boost/type_traits/detail/has_bin
ary_operator.hpp:155: error: expected unqualified-id before 'do'
That's strange as there is no 'do' in that file. Could you make a minimal example that we could test?
I would suspect that "check" is defined as a macro on that platform: I seem to remember having to fix this in some other traits classes.
This is exactly right. See https://svn.boost.org/trac/boost/ticket/6219 -- Marshall Marshall Clow Idio Software mailto:mclow.lists@gmail.com A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait). -- Yu Suzuki _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (7)
-
Frédéric Bron
-
John Maddock
-
Marshall Clow
-
Michael Olea
-
Nat Goodspeed
-
Tim Burgess
-
Øystein Lekang