• All submissions to this site are governed by Second Life Project Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.
MAINTENANCE ANNOUNCEMENT - JIRA will undergo maintenance starting 1:00am PDT through 3:00am on Saturday 2010.03.20. Please do not enter issues during this time as the system maybe restarted.
Issue Details (XML | Word | Printable)

Key: SNOW-204
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Thickbrick Sleaford
Votes: 3
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
6. Second Life Snowglobe - SNOW

boost library is outdated, causes build failure with GCC 4.3 or later

Created: 27/Aug/09 09:33 AM   Updated: 24/Feb/10 10:21 AM
Component/s: Source Code
Affects Version/s: Snowglobe 1.2
Fix Version/s: Snowglobe 1.2

Time Tracking:
Not Specified

File Attachments: 1. Text File SNOW-204.patch (1.0 kB)

Environment: Linux, gcc version 4.3.3 (Debian 4.3.3-8)
Issue Links:
Relates

Last Triaged: 16/Oct/09 07:07 AM
Linden Lab Issue ID: DEV-41410
Patch attached: Patch attached


 Description  « Hide
Note: this doesn't affect LL's linux builds, because they are built with gcc 4.1

After the patch in SNOW-193 removed the compiler option -Wno-parentheses, building the viewer in regular (i.e. non-standalone) fails when using gcc 4.3 or later, because of warnings in boost/token_functions.hpp:

/home/brick/sldev/snowglobe/trunk/indra/../libraries/include/boost/token_functions.hpp:338: error: suggest explicit braces to avoid ambiguous 'else'
/home/brick/sldev/snowglobe/trunk/indra/../libraries/include/boost/token_functions.hpp:451: error: suggest explicit braces to avoid ambiguous 'else'

After changing these lines to add braces the build completes.

Techwolf Lupindo did some digging, and found this was fixed in upstream boost in version 1.35, in changeset 41302: https://svn.boost.org/trac/boost/changeset/41302#file0
Boost bug: https://svn.boost.org/trac/boost/ticket/1334

The boost versions downloaded by the build system are 1.32 for 32bit and 1.34.1 for 64bit.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Boroondas Gupte added a comment - 28/Aug/09 06:26 AM
Is there a straight forward way to control bundled vs. system libs on a per-library basis? I already have boost 1.35 installed anyway, so I might as well use it.

Robin Cornelius added a comment - 01/Sep/09 11:05 AM
Yes very irritating indeed,

Broondas, no not really with the current cmake rule set, would require some kind of hacking none of which would be very nice. We will probably have to do a conditional warning removal for GCC 4.3, i'll see what i can cook


Thickbrick Sleaford added a comment - 01/Sep/09 12:24 PM
We already had conditional -Wno-parentheses for GCC 4.3. The point of SNOW-193 was to remove it... Is there a way to get more fine grained control over these warnings than what was there before SNOW-193?

Boroondas Gupte added a comment - 01/Sep/09 12:39 PM
Is it difficult to have the build system fetch the newer boost libraries where the bug is fixed, instead of the older ones? I guess LL just has to push them to S3 and update some reference.

Robin Cornelius added a comment - 01/Sep/09 01:44 PM - edited
We are between a rock and a hard place, the only solution we can implement (this side of the firewall) is to reintroduce a conditional such as :-
 
Index: cmake/00-Common.cmake
===================================================================
--- cmake/00-Common.cmake	(revision 2713)
+++ cmake/00-Common.cmake	(working copy)
@@ -109,6 +109,14 @@
     endif (NOT ${GXX_VERSION} MATCHES " 4.1.*Red Hat")
   endif (${GXX_VERSION} STREQUAL ${CXX_VERSION})
 
+  #Lets actualy get a numerical version of gxx's version
+  STRING(REGEX REPLACE ".* ([0-9])\\.([0-9])\\.([0-9]).*" "\\1\\2\\3" CXX_VERSION ${CXX_VERSION})
+  
+  #gcc 4.3 and above don't like the LL boost
+  if(${CXX_VERSION} GREATER 429)
+    add_definitions(-Wno-parentheses)
+  endif (${CXX_VERSION} GREATER 429)
+
   # End of hacks.
 
   add_definitions(

but that will remain a hack to work around ancient boost libraries. The solution is to update boost to a newer version.


Rob Linden added a comment - 22/Sep/09 12:18 PM
Putting Robin's workaround into proper patch form. I'd like to apply this.

lindenrobot added a comment - 23/Sep/09 02:32 PM
Revision 2782 by rob.linden on 2009-09-23 16:32:16 -0500 (Wed, 23 Sep 2009)

SNOW-204: adding -Wno-parentheses to work around older Boost libraries

Files affected:
U projects/2009/snowglobe/trunk/doc/contributions.txt
U projects/2009/snowglobe/trunk/indra/cmake/00-Common.cmake


Rob Linden added a comment - 25/Sep/09 04:22 PM
Sorry for not yet updating the Boost library, but the patch will at least keep things building

lindenrobot added a comment - 26/Sep/09 01:07 PM
Revision 2794 by rob.linden on 2009-09-26 15:07:17 -0500 (Sat, 26 Sep 2009)

Fixup for SNOW-204 (setting JSONCPP_FIND_QUIETLY and JSONCPP_FIND_REQUIRED so that missing JsonCpp is reported)

Files affected:
U projects/2009/snowglobe/trunk/indra/cmake/JsonCpp.cmake


lindenrobot added a comment - 16/Oct/09 07:07 AM
Automated note to patch contributor: if you haven't done so already, please make sure you have a contribution agreement on file and that your patch includes an edit to doc/contributions.txt properly crediting yourself for this patch. See https://wiki.secondlife.com/wiki/Submitting_code for more details.