• 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: VWR-9541
Type: Bug Bug
Status: In Progress In Progress
Priority: Major Major
Assignee: Brad Linden
Reporter: Tomm Olifone
Votes: 24
Watchers: 21
Operations

If you were logged in you would be able to see more operations.
1. Second Life Viewer - VWR

Included boost libraries prevent VC90 from compiling and linking the second life source correctly

Created: 04/Oct/08 11:25 AM   Updated: 25/Feb/10 07:39 AM
Component/s: Source Code
Affects Version/s: 1.21 Release Candidate
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. Text File Snowglobe Revision3129 trunk Build output after remove funny character from lluistring.h.txt (6 kB)
2. Text File Snowglobe Revision3129 trunk First Build output.txt (527 kB)

Image Attachments:

1. funny_characters_in_lluistring.h.jpg
(99 kB)
Environment:
Microsoft Windows
Microsoft Visual Studio 2008
Issue Links:
Relates

Last Triaged: 30/Jul/09 09:06 AM
Linden Lab Issue ID: DEV-22207


 Description  « Hide
Please update the boost libraries included in the Second Life source to versions which are compatible with the VC90 linker.

Currently, building on MSVC90 causes the resulting client to hang on execution.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Eddy Stryker added a comment - 13/Oct/08 04:20 PM
I can confirm this behavior.

Soft Linden added a comment - 16/Oct/08 09:06 AM
MS Visual Studio 2005 is our standard Windows development environment. Does anyone know if there's a way to do a single set of boost libs that works with VS2005 and VS2008, or would this entail parallel libraries?

Tomm Olifone added a comment - 16/Oct/08 11:54 AM
Boost 1.36 compiles correctly under VC90, VC80, VC71

I'm gonna test a VC80 SL build with boost 1.36 to see how it goes...


Squash Otoro added a comment - 21/Oct/08 01:37 AM
Please resolve this; I'd really like to use VS2008 for development.

Soft Linden added a comment - 27/Oct/08 11:31 AM
@Tomm - anything interesting come out of your test?

Brad Linden added a comment - 28/Oct/08 02:36 PM
I will be working on this for the 1.22 viewer release.

Tomm Olifone added a comment - 28/Oct/08 02:51 PM
I'm afraid I haven't been able to investigate this, though the Meerkat team seem to have resolved this pretty successfully.

jodiah jensen added a comment - 28/Oct/08 06:51 PM
The title here is not precisely correct, the code compiles fine with the current configuration in VC90 (VC++ 2008), but the resulting executable loops indefinitely, consuming CPU resources but never displaying a window. Sorry if I am picking gnits here.

Tomm Olifone added a comment - 28/Oct/08 06:52 PM
I've changed the title.

SOb Zemlja added a comment - 28/Oct/08 10:48 PM
> Included boost libraries prevent VC90 from compiling and linking the second life source correctly

But you can compile boost 1.36 once and using it for build viewer.
Replace include/boost, i686-win32, check newview Linker > Additional Dependencies and... voila.


jodiah jensen added a comment - 29/Oct/08 12:16 AM - edited
>Replace include/boost, i686-win32, check newview Linker > Additional Dependencies and... voila.

[ Show » ] SOb Zemlja - 28/Oct/08 10:48 PM > Included boost libraries prevent VC90 from compiling and linking the second life source correctly But you can compile boost 1.36 once and using it for build viewer. Replace include/boost, i686-win32, check newview Linker > Additional Dependencies and... voila.

I have compiled the libraries (1.36) for program_options, Python, Regex, and signals, and placed them in the appropriate places in the source tree. I also copied all the boost headers from 'boost_1_36_0\boost' into the \linden\libraries\include\boost\ folder. This results in HUNDREDS of lines such as the following:

2>D:\SL_SRC\linden\libraries\include\boost/exception/detail/counted_base.hpp(45) : error C2220: warning treated as error - no 'object' file generated
2>D:\SL_SRC\linden\libraries\include\boost/exception/detail/counted_base.hpp(45) : warning C4265: 'boost::exception_detail::counted_base' : class has virtual functions, but destructor is not virtual
2> instances of this class may not be destructed correctly
2>D:\SL_SRC\linden\libraries\include\boost/exception/exception.hpp(33) : warning C4265: 'boost::exception_detail::error_info_container' : class has virtual functions, but destructor is not virtual
2> instances of this class may not be destructed correctly

looks to me like the 1.36 headers are not compatible, or I am missing a step somewhere.

Also, I have no idea what you mean by "check newview Linker>Additional Dependencies". I see no project named "newview" in the solution explorer... could you elaborate please?

Thanks,
Jodiah


jodiah jensen added a comment - 01/Nov/08 11:56 AM - edited
I have managed to get the 1.21-r99587 version of the source code to compile and run (from within the VS2008 IDE only), and actually logged in to Agni successfully!

My workaround feels a bit kludgy to me, I'm sure I'm missing something, but for anyone interested, I posted my workaround here:

https://wiki.secondlife.com/wiki/User:Jodiah_Jensen#UPDATING_BOOST_LIBRARIES_TO_WORK_WITH_VS2008

any feedback, commentary, or improvements on this will be GREATLY appreciated! (especially in regard to the fact that my solution seems to require BOTH the vc80 and vc90 versions of the .libs)

Hope this helps someone. (even if it ends up not being the "best" solution, maybe it will entice someone to find the optimal workaround until Brad sorts the issue out)

Regards,
Jodiah


SOb Zemlja added a comment - 24/Dec/08 04:27 AM
jodiah, my note not guide, sorry. It's only direction. You should not anymore change Additional Dependencies, now boost libs descripted in "linden\indra\cmake\Boost.cmake". Need change this files (version and boost libs filenames) before run cmake or develop.py.

If you got many errors in cloning_base.hpp and counted_base.hpp just change destructors in this files: virtual ~cloning_base() throw(), virtual ~counted_base() throw().


Maldoror Bowman added a comment - 08/Jan/09 01:58 AM - edited
There are prebuilt 1.36 boost VC9 libraries at http://www.boostpro.com/products/free for those that don't like jam. These work just fine provided (a) you hack the solution file or (better) add lines for VC9 to boost.cmake and (b) you somehow get rid of the spurious complaint about virtual destructors that jodiah mentions.

Tomm Olifone added a comment - 30/Mar/09 05:55 PM
Since Microsoft are discontinuing support for VC++ Express Edition 2005 on March 31st, I believe this should be approached with a little more urgency now.

Any luck, Brad?

I've just uploaded a zip archive containing modified include files, the appropriate boost 1.35 libraries and updated CMake rules to provide VC90 support to the viewer.

check it out here: http://www.streamsense.net/viewer-boostfix.zip

1. I don't know if this still supports VS2005... could somebody test, and maybe bugfix any issues?

2. Please note that develop.py will overwrite these includes and libraries the first time it is run, so run develop.py before you extract these, then run again to make sure your project files are up to date.

~Tomm


Hawk Carter added a comment - 01/Apr/09 05:05 AM - edited
Took me a bit, but Tomm it worked for me on 2005

But i'll switch to 2008 Express from now on too, hope others will follow...to get 2008 (Express as well VS2008) as standard eviroment for the future.

2005 will not work to 100% on Windows 7 btw, as i understood it right from a local msdn member here in my city.

Greetings

Hawk Carter

Update: A fresh compile on VC90 (Express 2008) didnt worked..i'll post the error asap.


Tomm Olifone added a comment - 01/Apr/09 12:33 PM - edited
A fresh compile from the latest release (1.22.11) does indeed compile perfectly with 2008 with my patch, as demonstrated here:

http://pastebin.com/f6e914e7b

Please make sure that you run develop.py first, /then/ delete the boost includes, and then apply the patch, and then run develop.py configure.

Also, note that part of the problem /is/ that you can't run visual studio 2005 and 2008 on the same OS install and not expect conflicts =)


Ayamo Nozaki added a comment - 23/Apr/09 01:50 AM
Failed during linking, regex related errors?

http://pastebin.com/m8bcb221

I'm unsure where to step next.

Windows 7, Visual C++ 2008 Express, Intel Core i7.


Aeron Kohime added a comment - 28/Apr/09 01:21 AM - edited
Where 'is' your patch Tomm, the pastebin only holds a log. Which doesn't help to much. (maybe someone overwrote your patch with a log)

EDIT: Nevermind silly question. (I missed the comment entirely)


Chalice Yao added a comment - 10/May/09 03:08 PM
Hmhmhm. I've tried to have the viewer solely use the newer libboost libs and headers, and the error I get in almost every project and many files is

7>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\complex(370) : error C2589: '(' : illegal token on right side of '::'
7>C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\complex(370) : error C2059: syntax error : '::'

Something is not playing well with VS9 and the boost code, methinks. works when the old libboost headers get used, but then I get linker errors, of course.


Huns Valen added a comment - 25/Jul/09 02:49 PM
I'm getting the exact same problem as Chalice. Using the latest Boost, 1.39.0. I used Tomm Olifone's Boost.cmake (altered to be version 1.39 instead of .35), re-ran develop.py -G VC90, built Boost 1.39, then copied the headers & libs into the Linden source tree. Now it's giving me all those illegal token errors, in a file that's a part of Visual C++ Express.

It's no longer possible to get the old version of VC++ Express. At this point, anyone who wants to jump in & doesn't have the old tools already has to "find" a copy of VC++ 2005. I'd love to contribute, but I don't know how to proceed from here.


Valter Bravin added a comment - 19/Oct/09 01:29 AM
I can confirm that the same as Chalice and Huns happens with Boost 1.40.

Darsin Feldragonne added a comment - 08/Feb/10 03:04 PM
I've done as you said tomm
I followed each step but i can only get to this point were i get 137 errors based on boost.

http://pastebin.com/mf6b9288


Kadah Coba added a comment - 08/Feb/10 05:03 PM
I've been using, I think, Boost 1.36 for my personal build of the 1.24 viewer since August. It required a few modifications to boost defines in the viewer code, but it seems to run quiet a bit better than a VC80 build.

TANAKAAKIO Inshan added a comment - 11/Feb/10 07:32 AM - edited
I am C and C++ newcomer.
So, I can not modify source code correctly nor boost defines of course.
Anyway I want to diddle SL viewer.
Thank you for the valuable information with effort.

I succeeded in compiling and linking SL viewer ver1.22.11 by following Cygwin batch command using Tomm's patch.
http://www.streamsense.net/viewer-boostfix.zip
Then ran and connected to agni and aditi.
I am using Japanese WindowsXP SP2 and VisualC++ 2008 Express Edition SP1.

I failed to compile latest release SL viewer ver 1.23.5.
I'll try compile SL viewer ver 1.23.5 one more.

Simply copy and paste the commands to Cygwin console.
These commands use unzip in Cygwin.
Add unzip to Cygwin.
unzip is not default install.
I used default installed Python 2.5.2 in Cygwin.
If Python is not installed in Cygwin, Cygwin may use external Python which has system path on Windows.

Place Source, Artwork and Libs(win32) zip files in same directory.
'linden' directory will be made under 'otdir'.
Do not use a space in file and directory names.
'olibs' is proprietary libraries in
http://wiki.secondlife.com/wiki/Compiling_the_viewer_%28MSVS2005%29
'/cygdrive/d' means 'd:' in Windows.
A directory(file) separator is not '\' but '/'.

######  Cygwin batch commands START ######
indir=/cygdrive/d/SL_SRC/1-22-11-1
otdir=/cygdrive/d/SL_SRC/1-22-11-1
art=slviewer-artwork-viewer-1.22.11-r113941.zip
win=slviewer-win32-libs-viewer-1.22.11-r113941.zip
src=slviewer-src-viewer-1.22.11-r113941.zip

olibs=/cygdrive/d/SL_SRC/olibs
boostpatch=/cygdrive/d/SL_SRC/viewer-boostfix.zip

mount
unzip -o ${indir}/${art} -d ${otdir}
unzip -o ${indir}/${win} -d ${otdir}
unzip -o ${indir}/${src} -d ${otdir}

cd ${otdir}
cp ${olibs}/linden ./ -r

cd ${otdir}/linden/indra
python develop.py -G vc90
exit()

rm ../libraries/include/boost -r
unzip -o ${boostpatch} -d ${otdir}

python develop.py -G vc90 configure
exit()
######  Cygwin batch commands END ######

TANAKAAKIO Inshan added a comment - 11/Feb/10 09:04 AM - edited
I got error LNK2005 linking SL viewer ver 1.23.5, too.
Maybe viewer updating raised inconsistency between source code and Tomm's patch.

Kadah Coba added a comment - 11/Feb/10 10:47 AM
Tanakaakio, there are a lot of changes between 1.22 and 1.23 than make that make not possible for that patch to work.

I propose that this issue be retasked to Snowglobe. It relates to SNOW-431. I've been attempting to compile the trunk with VC90 and have managed to get it to crash during log in at best.


TANAKAAKIO Inshan added a comment - 11/Feb/10 11:55 PM - edited
My Snowglobe Revision3129 trunk build.

I replaced Japanese VisualC++2008 Express Edition with English one.
However, the current code page remains (932) due to Japanese Windows XP.

I got 317 error(s), 1887 warning(s).
https://jira.secondlife.com/secure/attachment/35055/Snowglobe+Revision3129+trunk+First++Build+output.txt
There were many errors as follows.

20>d:\sg_src\my3128\linden\indra\llui\lluistring.h : error C2220: warning treated as error - no 'object' file generated
20>d:\sg_src\my3128\linden\indra\llui\lluistring.h : warning C4819: The file contains a character that cannot be represented in the current code page (932). Save the file in Unicode format to prevent data loss

I do not know this happens in English VC++2008 on English Windows XP.
I opened 'lluistring.h' and found funny characters.
https://jira.secondlife.com/secure/attachment/35059/funny_characters_in_lluistring.h.jpg
I removed the funny characters then built again.
As a result, errors decreased sharply.
https://jira.secondlife.com/secure/attachment/35060/Snowglobe+Revision3129+trunk+Build+output+after+remove+funny+character+from+lluistring.h.txt
There are following error messages.

1>LINK : fatal error LNK1104: cannot open file 'libboost_signals-vc90-mt-1_39.lib'

Values of Additional dependencies in linker input of secondlife-bin and windows-crash-logger projects are 'libboost_signals-vc80-mt-1_39.lib'.
I think inconsistency between 'vc80' and 'vc90' relates to SNOW-431


TANAKAAKIO Inshan added a comment - 14/Feb/10 12:04 AM - edited
I succeeded in build the latest Emerald viewer ver 1.23.5.1101 with Visual C++2008 Express Edition.
And then have connected to agni and OSGrid.
There is no probrem of Boost Hell.
In my case many a few types of funny characters are scattered in source comments from place to place though.

For more detail.
http://tanakaakio.slmame.com/e833102.html


Thomas Shikami added a comment - 25/Feb/10 07:39 AM
The boost libraries for Emerald were compiled (and deleted) by me. I wrote a howto how to make your own boost libraries to compile and these can even mix (can put VS2003 2005 and 2008 boost libraries into the same set).
Okay here the howto:

Since LL changed from static runtime libraries to shared runtime dlls,
new libraries are needed. One of them is boost, and compiling it oneself
and using it caused 0xbaadf00d for me in signals. I finally found out
how to compile boost specifically for 1.23.4. Here's the full
instructons so far for VS2005: (for VS2008 replace msvc-8.0 with
msvc-9.0 and vs80 with vs90)

  • Download & extract boost_1_36_0.7z source for win32 into an empty
    folder (ex. "boost-source").
  • Copy the "boost_1_36_0\boost" folder to "libraries\include\".

NOTE: the Boost Wiki says to use the Visual Studio command prompt
instead of the regular command prompt.

  • Open the visual studio command prompt
  • Change Directory into "boost_1_36_0\tools\jam\src"
  • Run "build.bat"
  • Change Directory back to "boost_1_36_0" ( cd ..\..\.. )
  • Copy "boost_1_36_0\tools\jam\src\bin.ntx86\bjam.exe" to
    "boost_1_36_0\"
  • Using the command prompt, build the static libraries: (inside
    boost_1_36_0, if you have python 2.6 installed)
    o set PYTHON_ROOT=C:\Python26
    o set PYTHON_VERSION=2.6
    o bjam --build-dir=..\boost-build --toolset=msvc-8.0
    --with-signals --with-program_options --with-regex
    --with-python variant=release link=static threading=multi
    runtime-link=shared define="_SECURE_SCL=0,_SECURE_STL=0" stage
    o bjam --build-dir=..\boost-build --toolset=msvc-8.0
    --with-signals --with-program_options --with-regex
    --with-python variant=debug link=static threading=multi
    runtime-link=shared define="_SECURE_SCL=0,_SECURE_STL=0" stage
  • copy
    "boost_1_36_0\stage\lib\libboost_program_options-vc80-mt-1_36.lib"
    to "\libraries\i686-win32\lib\release\"
  • copy
    "boost_1_36_0\stage\lib\libboost_program_options-vc80-mt-gd-1_36.lib"
    to "\libraries\i686-win32\lib\debug\"
  • copy "boost_1_36_0\stage\lib\libboost_regex-vc80-mt-1_36.lib" to
    "\libraries\i686-win32\lib\release\"
  • copy "boost_1_36_0\stage\lib\libboost_regex-vc80-mt-gd-1_36.lib"
    to "\libraries\i686-win32\lib\debug\"
  • copy "boost_1_36_0\stage\lib\libboost_python-vc80-mt-1_36.lib" to
    "\libraries\i686-win32\lib\release\"
  • copy "boost_1_36_0\stage\lib\libboost_python-vc80-mt-gd-1_36.lib"
    to "\libraries\i686-win32\lib\debug\"
  • copy "boost_1_36_0\stage\lib\libboost_signals-vc80-mt-1_36.lib" to
    "\libraries\i686-win32\lib\release\"
  • copy "boost_1_36_0\stage\lib\libboost_signals-vc80-mt-gd-1_36.lib"
    to "\libraries\i686-win32\lib\debug\"

The problem lies with deactivating secure SCL and secure STL in the
viewer compiles. Libraries that are mixed between secure and non-secure
seem to clash and cause weird crashing behaviour.
Same can be done with VS2008 as well, resulting into a libraries package
for boost, that works with both VS2005 and VS2008. Change Boost.cmake
accordingly:

# -*- cmake -*-
include(Prebuilt)

set(Boost_FIND_QUIETLY ON)
set(Boost_FIND_REQUIRED ON)

if (STANDALONE)
  include(FindBoost)

  set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
  set(BOOST_REGEX_LIBRARY boost_regex-mt)
  set(BOOST_SIGNALS_LIBRARY boost_signals-mt)
else (STANDALONE)
  use_prebuilt_binary(boost)
  set(Boost_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)

  if (WINDOWS)
    set(BOOST_VERSION 1_36)
    if (MSVC71)
      set(BOOST_PROGRAM_OPTIONS_LIBRARY
          optimized libboost_program_options-vc71-mt-${BOOST_VERSION}
          debug libboost_program_options-vc71-mt-gd-${BOOST_VERSION})
      set(BOOST_REGEX_LIBRARY
          optimized libboost_regex-vc71-mt-${BOOST_VERSION}
          debug libboost_regex-vc71-mt-gd-${BOOST_VERSION})
      set(BOOST_SIGNALS_LIBRARY
          optimized libboost_signals-vc71-mt-${BOOST_VERSION}
          debug libboost_signals-vc71-mt-gd-${BOOST_VERSION})
    elseif (MSVC80)
      set(BOOST_PROGRAM_OPTIONS_LIBRARY
          optimized libboost_program_options-vc80-mt-${BOOST_VERSION}
          debug libboost_program_options-vc80-mt-gd-${BOOST_VERSION})
      set(BOOST_REGEX_LIBRARY
          optimized libboost_regex-vc80-mt-${BOOST_VERSION}
          debug libboost_regex-vc80-mt-gd-${BOOST_VERSION})
      set(BOOST_SIGNALS_LIBRARY
          optimized libboost_signals-vc80-mt-${BOOST_VERSION}
          debug libboost_signals-vc80-mt-gd-${BOOST_VERSION})
    elseif (MSVC90)
      set(BOOST_PROGRAM_OPTIONS_LIBRARY
          optimized libboost_program_options-vc90-mt-${BOOST_VERSION}
          debug libboost_program_options-vc90-mt-gd-${BOOST_VERSION})
      set(BOOST_REGEX_LIBRARY
          optimized libboost_regex-vc90-mt-${BOOST_VERSION}
          debug libboost_regex-vc90-mt-gd-${BOOST_VERSION})
      set(BOOST_SIGNALS_LIBRARY
          optimized libboost_signals-vc90-mt-${BOOST_VERSION}
          debug libboost_signals-vc90-mt-gd-${BOOST_VERSION})
    endif (MSVC71)
  elseif (DARWIN)
    set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
    set(BOOST_REGEX_LIBRARY boost_regex-mt)
    set(BOOST_SIGNALS_LIBRARY boost_signals-mt)
  elseif (LINUX)
    set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
    set(BOOST_REGEX_LIBRARY boost_regex-mt)
    set(BOOST_SIGNALS_LIBRARY boost_signals-mt)
  endif (WINDOWS)
endif (STANDALONE)