Common compilation problems
General Problems
Windows
Compiling on MSVC 2003
* newview error PRJ0019: A tool returned an error code from "Copying message template"
This is caused by the script trying to do a copy command, but the source path isn't in quotes. Open up newview.vsproj in notepad, and near the bottom there are 4 line that say:
CommandLine="copy $(InputPath) .\app_settings\message_template.msg
replace them with
CommandLine="copy "$(InputPath)" .\app_settings\message_template.msg
Compiling on MSVC 2005
There is now a step-by-step tutorial for Microsoft Windows - Visual Studio 2005 & Visual C++ 2005 Express
Mozilla is not compatible with visual studio 2005, so we have not migrated the codebase, so we do not know if it works.
What sort of errors are seen?
- Added my errors at User:Adam_Zaius/MSVS2005 Errors Adam Zaius 09:40, 8 January 2007 (PST)
- I'm still working through getting this to compile, but to get a good way further, In the property pages for the projects:
1) In C/C++, set 'Treat Warnings as Errors' to No
2) In C/C++-Language, set 'Treat wchar_t as Built-in Type' to No
- There are a couple calls to pow that use the now unsupported (int, int), check: http://msdn2.microsoft.com/en-us/library/da60x087(VS.80).aspx
for information and just cast them correctly.
- Looks like the last hurdle is going to be re-building Boost and Mozilla without libcp.lib dependencies (VC2005 uses libcpmt.lib; the multi-threaded
version, two versions of the crt won't play well together in the same app). [Update: Boost is easy enough, has vc8 build options, working with llmozlib it looks like we may have to bite the bullet and migrate to the FIREFOX_2_0_RELEASE. The version on http://ubrowser.com/downloads.php is already working with FIREFOX_2_0_RELEASE; but I've yet to get it to build. ] --Drake Stonewall 03:57, 9 January 2007 (PST)
- More research on the above, check out http://developer.mozilla.org/en/docs/Windows_Build_Prerequisites . It looks like we may have to use the Firefox 3 branch to get a VC2005 compile. The most recent patch for the llmozlib stuff breaks with it though (investigating now). --Drake Stonewall 14:04, 9 January 2007 (PST)
- To minimize the number of warnings for now: in C/C++-Preprocessor add ';_CRT_SECURE_NO_DEPRECATE' to the Preprocessor Definitions, that will supress deprecation warnings --Artm Udal 12:42, 8 January 2007 (PST)
- Got quite far with it (overnight). Left with 2 errors. [Update: 1 compiler error, boost and llmozlib linker errors]
see: User:Paula_Innis/MSVC2005_viewer_compile_progress for how -- Paula Innis 10:20, 9 January 2007 (GMT)
Mac OS X
Getting:
- /linden/indra/newview/../llwindow/llglheaders.h:377:31: error: GL/glh_extensions.h: No such file or directory
- This means you didn't merge the libraries right.
- /linden/indra/various-math-files: error: `isfinite' undeclared in namespace `std'
- Upgrade Xcode to 2.4.1
Linux
- Blino's SL build/linking patches for gcc4: http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/secondlife/current/
- From Mako Mabellon: Having a bit of trouble with ELFIO 1.0.3 under Linux - it wants to build a static library libELFIO.a, and Second Life appears to expect a shared library libelfio.so (judging from the build instructions on the Wiki)...
- Tofu says... 'You can rename the library to have the right case. I don't know why ours ended up lower-case and yours is upper-case - I'll look into it.'
- Something like: error: extra qualification 'LLMessageSystem::' on member 'init'
- Tofu says... 'This is likely a GCC 4.x thing. We need GCC 3.4 or thereabouts, for now. If you want to use GCC 4.x anyway, you can harmlessly remove the LLMessageSystem:: from the troublesome line. Other stuff will need fixing too; people are on it!'
- Something like: linden/indra/i686-linux-client-release/llrender/llimagegl.cpp:122: error: `glActiveTextureARB' was not declared in this scope
- Tofu says... 'You'll need to install OpenGL headers if you don't already have them: gl.h, gl_ext.h, glu.h (The ones from 'mesa' should work)
- a resident reports good luck on Gentoo after doing 'eselect opengl set xorg-x11' (but note!! You must know what you're doing; this may change your default system OpenGL drivers, and you will probably want to change them back again after the compile, e.g. 'eselect opengl set nvidia')'
- Tofu says... 'Try removing the space in ' ../libraries/' around line 121 of indra/SConstruct'
- Something like: indra.y.cpp:17: error: previous declaration of `int yyparse()'
- Tofu says... 'This appears to be a problem with some versions of flex/bison. A resident reports success when comment out the #ifdef __cplusplus lines in lscript/lscript_compile/indra.y'
- Compiler can't find gtk/gtk.h, but it's right there!
- This is probably peculiar to certain SCons versions. Edit the indra/SConstruct file and remove the leading spaces from the ' ../libraries/' strings from around line 187 onwards.
- Miscellaneous errors about classes not existing, or referencing an undefined type
- Seems to be a difference between GCC 4 and GCC 3, with 4 being more strict about things. The solution has been adding "class TheMissingClass;" to whatever header files are missing the reference. For example I had to add "class LLUICtrlFactory;" to llui/lluictrl.h and llui/llviewborder.h