Difference between revisions of "Common compilation problems"
MIT Bourne (talk | contribs) |
|||
Line 20: | Line 20: | ||
If you are using the most recent DirectX SDK ("December 2006"), your VC++ Libraries Directory may be wrong because the SDK's lib folder now has 2 sub-folders for x64 and x86. Try changing the path from ''C:\Program Files\Microsoft DirectX SDK (December 2006)\Lib'' to ''C:\Program Files\Microsoft DirectX SDK (December 2006)\'' '''Lib\x86''' | If you are using the most recent DirectX SDK ("December 2006"), your VC++ Libraries Directory may be wrong because the SDK's lib folder now has 2 sub-folders for x64 and x86. Try changing the path from ''C:\Program Files\Microsoft DirectX SDK (December 2006)\Lib'' to ''C:\Program Files\Microsoft DirectX SDK (December 2006)\'' '''Lib\x86''' | ||
<br/> | |||
<br/> | |||
== Cannot open include file: 'ytab.h': No such file or directory == | == Cannot open include file: 'ytab.h': No such file or directory == | ||
Line 28: | Line 28: | ||
Workaround: | Workaround: | ||
copy "linden\indra\lscript\lscript_compile\ytab.hpp" to "linden\indra\lscript\lscript_compile\ytab.h" and build again. | copy "linden\indra\lscript\lscript_compile\ytab.hpp" to "linden\indra\lscript\lscript_compile\ytab.h" and build again. | ||
<br/> | |||
<br/> | |||
== Missing resources == | == Missing resources == | ||
* ''.\res\newViewRes.rc(64) : error RC2135 : file not found: ll_icon.ico'' | * ''.\res\newViewRes.rc(64) : error RC2135 : file not found: ll_icon.ico'' | ||
Line 37: | Line 37: | ||
Missing folder in recent release, "'''1.17.0.12'''" which causes the SecondLife to hang while loading into the world. | Missing folder in recent release, "'''1.17.0.12'''" which causes the SecondLife to hang while loading into the world. | ||
* Go to the previous source and copy the missing folder, "Character" and place it into the "newview" folder | * Go to the previous source and copy the missing folder, "Character" and place it into the "newview" folder | ||
<br/> | |||
<br/> | |||
== Error code from "Copying message template" == | == Error code from "Copying message template" == | ||
* ''newview error PRJ0019: A tool returned an error code from "Copying message template"'' | * ''newview error PRJ0019: A tool returned an error code from "Copying message template"'' | ||
Line 48: | Line 49: | ||
should become: | should become: | ||
CommandLine="copy &quot;$(TargetDir)\$(TargetFileName)&quot; &quot;$(ProjectDir)&quot; | CommandLine="copy &quot;$(TargetDir)\$(TargetFileName)&quot; &quot;$(ProjectDir)&quot; | ||
<br/> | |||
== Can not find library ll*.lib == | |||
If you get a compile error for missing libraries with names of the projects (lscript_compile.lib, llaudio.lib, llcharacter.lib, etc.) go to newview > Properties > Linker > Input and remove these from the list of input libraries (they will be linked through the dependencies and should not be in the list). | |||
<br/> | |||
<br/> | |||
== Cannot open include file: 'windows.h' == | == Cannot open include file: 'windows.h' == | ||
If you run into this problem: | If you run into this problem: | ||
Line 57: | Line 61: | ||
set LIB=C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib;%LIB% | set LIB=C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib;%LIB% | ||
<br/> | |||
== Unresolved external symbol "int __cdecl lscript_compile (VS2005) == | == Unresolved external symbol "int __cdecl lscript_compile" (VS2005) == | ||
* ''llcompilequeue.obj : error LNK2019: unresolved external symbol "int __cdecl lscript_compile(char const *,char const *,char const *,int)" (?lscript_compile@@YAHPBD00H@Z) referenced in function "protected: void __thiscall LLFloaterCompileQueue::compile(char const *,class LLUUID const &)" (?compile@LLFloaterCompileQueue@@IAEXPBDABVLLUUID@@@Z)'' | * ''llcompilequeue.obj : error LNK2019: unresolved external symbol "int __cdecl lscript_compile(char const *,char const *,char const *,int)" (?lscript_compile@@YAHPBD00H@Z) referenced in function "protected: void __thiscall LLFloaterCompileQueue::compile(char const *,class LLUUID const &)" (?compile@LLFloaterCompileQueue@@IAEXPBDABVLLUUID@@@Z)'' | ||
* ''llpreviewscript.obj : error LNK2001: unresolved external symbol "int __cdecl lscript_compile(char const *,char const *,char const *,int)" (?lscript_compile@@YAHPBD00H@Z)'' | * ''llpreviewscript.obj : error LNK2001: unresolved external symbol "int __cdecl lscript_compile(char const *,char const *,char const *,int)" (?lscript_compile@@YAHPBD00H@Z)'' | ||
This is not entirely clear, but there seems to be a problem with VS2005 if projects are unloaded while being in the dependency tree. I have seen this error while I had win_crash_logger and win_updater unloaded from the project tree and the problem went away when I loaded them back and excluded them from the newview dependency first. | This is not entirely clear, but there seems to be a problem with VS2005 if projects are unloaded while being in the dependency tree. I have seen this error while I had win_crash_logger and win_updater unloaded from the project tree and the problem went away when I loaded them back and excluded them from the newview dependency first. | ||
<br/> | |||
<br/> | |||
== Unresolved external symbol __invalid_parameter_noinfo (VS2005) == | |||
* ''llmozlib-vc80.lib(llembeddedbrowserwindow.obj) : error LNK2019: unresolved external symbol __invalid_parameter_noinfo referenced'' | |||
You are most likely trying a debug build under VS2005. For debug builds, see the compile instruction section on [[finding_leaks]] | |||
<br/> | |||
<br/> | |||
== Other (older) notes == | == Other (older) notes == | ||
* Mozilla is not compatible with visual studio 2005, so we have not migrated the codebase, so we do not know if it works. | * Mozilla is not compatible with visual studio 2005, so we have not migrated the codebase, so we do not know if it works. | ||
Line 71: | Line 81: | ||
* 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 --[[User:Artm Udal|Artm Udal]] 12:42, 8 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 --[[User:Artm Udal|Artm Udal]] 12:42, 8 January 2007 (PST) | ||
<br/> | |||
<br/> | |||
<br/> | |||
= Mac OS X = | = Mac OS X = | ||
Line 78: | Line 90: | ||
*/linden/indra/newview/../llwindow/llglheaders.h:377:31: error: GL/glh_extensions.h: No such file or directory | */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. | ** This means you didn't merge the libraries right. | ||
<br/> | |||
<br/> | |||
<br/> | |||
= Linux = | = Linux = | ||
Revision as of 05:58, 30 June 2007
General Problems
Windows
Unresolved external symbol _CLSID_DxDiagProvider/_IID_IDxDiagProvider
- newview error LNK2001: unresolved external symbol _CLSID_DxDiagProvider
- newview error LNK2001: unresolved external symbol _IID_IDxDiagProvider
These errors reportedly occur with MSVC 2003 and certain versions of the DirectX SDK. To workaround, edit lldxhardware.cpp and replace the following (line 35):
#include <dxdiag.h>
with...
#define INITGUID #include <dxdiag.h> #undef INITGUID
Cannot open input file 'dxguid.lib'
- fatal error LNK1181: cannot open input file 'dxguid.lib' in ...
If you are using the most recent DirectX SDK ("December 2006"), your VC++ Libraries Directory may be wrong because the SDK's lib folder now has 2 sub-folders for x64 and x86. Try changing the path from C:\Program Files\Microsoft DirectX SDK (December 2006)\Lib to C:\Program Files\Microsoft DirectX SDK (December 2006)\ Lib\x86
Cannot open include file: 'ytab.h': No such file or directory
- indra.l (20) : fatal error C1083: Cannot open include file: 'ytab.h': No such file or directory.
Workaround:
copy "linden\indra\lscript\lscript_compile\ytab.hpp" to "linden\indra\lscript\lscript_compile\ytab.h" and build again.
Missing resources
- .\res\newViewRes.rc(64) : error RC2135 : file not found: ll_icon.ico
Some releases have missing files, which were reported to be last seen in the 1.14.0.1 release.
- Go to the source downloads page and grab the [1.14.0.1 viewer] sources.
- Explore the archive to "linden/indra/newview/res" folder and extract content to your "linden/indra/newview/res" folder into current revision.
Missing folder in recent release, "1.17.0.12" which causes the SecondLife to hang while loading into the world.
- Go to the previous source and copy the missing folder, "Character" and place it into the "newview" folder
Error code from "Copying message template"
- 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.vcproj 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
The source and destination paths on line 158 may also require wrapping in quotes. In which case:
CommandLine="copy $(TargetDir)\$(TargetFileName) $(ProjectDir)
should become:
CommandLine="copy "$(TargetDir)\$(TargetFileName)" "$(ProjectDir)"
Can not find library ll*.lib
If you get a compile error for missing libraries with names of the projects (lscript_compile.lib, llaudio.lib, llcharacter.lib, etc.) go to newview > Properties > Linker > Input and remove these from the list of input libraries (they will be linked through the dependencies and should not be in the list).
Cannot open include file: 'windows.h'
If you run into this problem:
..\..\..\boost/regex/v4/fileiter.hpp(44) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
Fix it with this: (thanks Fairlight!)
set INCLUDE=C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include;%INCLUDE% set LIB=C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib;%LIB%
Unresolved external symbol "int __cdecl lscript_compile" (VS2005)
- llcompilequeue.obj : error LNK2019: unresolved external symbol "int __cdecl lscript_compile(char const *,char const *,char const *,int)" (?lscript_compile@@YAHPBD00H@Z) referenced in function "protected: void __thiscall LLFloaterCompileQueue::compile(char const *,class LLUUID const &)" (?compile@LLFloaterCompileQueue@@IAEXPBDABVLLUUID@@@Z)
- llpreviewscript.obj : error LNK2001: unresolved external symbol "int __cdecl lscript_compile(char const *,char const *,char const *,int)" (?lscript_compile@@YAHPBD00H@Z)
This is not entirely clear, but there seems to be a problem with VS2005 if projects are unloaded while being in the dependency tree. I have seen this error while I had win_crash_logger and win_updater unloaded from the project tree and the problem went away when I loaded them back and excluded them from the newview dependency first.
Unresolved external symbol __invalid_parameter_noinfo (VS2005)
- llmozlib-vc80.lib(llembeddedbrowserwindow.obj) : error LNK2019: unresolved external symbol __invalid_parameter_noinfo referenced
You are most likely trying a debug build under VS2005. For debug builds, see the compile instruction section on finding_leaks
Other (older) notes
- Mozilla is not compatible with visual studio 2005, so we have not migrated the codebase, so we do not know if it works.
- Added my errors at User:Adam_Zaius/MSVS2005 Errors Adam Zaius 09:40, 8 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)
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.
Linux
Packaging errors
The final packaging step may fail with errors about the manifest if you are not using the slviewer-linux-libs bundle; in this case, if you still wish to end up with an end-user viewer package incorporating your own libraries, you can edit the manifest file found at indra/newview/viewer_manifest.py
Various Compilation problems
- "Unable to initialize communications"
- If the viewer just displays the error message " Unable to initialize communications" and exits, it can't find message_template.msg. You did remember to copy it over, right?
- Blino's SL build/linking patches for gcc4: http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/secondlife/current/
- objcopy: 'newview/linux_tools/exposed-symbols.txt': No such file
- Tofu says... 'This is an omission from our manifest which I'll fix. Meanwhile it's a safe fix to create an empty file with that name.'
- Something like: /usr/bin/ld: cannot find -lz
- Nadia says: Install the zlib development headers. (Ubuntu package zlib1g-dev, Red Hat zlib-devel.)
- 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'
- Nadia says: install the zlib development headers first and try recompiling. Commenting out those lines results in a error indra.l:666: undefined reference to `yyparse', after the zlib headers are installed.
- 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
- Linking failures ("script not found") due to spaces in the LINKFLAGS variable?
- I saw a report, and modified the SConstruct file to drop the trailing arguments (and spaces) in LINKFLAGS.
- Building 20070112a using BUILD=releasefordownload I get many [: 89: ==: unexpected operator errors; cp: target `SecondLife_i686_1_13_1_7/app_settings/*’ is not a directory error, and same thing for character, fonts, help, skins, res-sdl; [: 111: ==: unexpected operator, [: 120: SecondLife_i686_1_13_1_7.tar.bz2: unexpected operator. I can succesfully run the client from the source tree.
- i think this has been fixed --Signore Iredell 06:09, 9 June 2007 (PDT)
- scons: *** While building `['.../linden/indra/i686-linux-client-release/lscript/lscript_compile/indra.l.cpp']': Don't know how to build a file with suffix `.l'.
- You probably don't have all the dependencies installed (I had the same problem). Check that you have flex and bison. --Random73 Janus 07:43, 16 May 2007 (PDT)
- 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, glext.h, glu.h (The ones from 'mesa' should work)
- two residents report 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')'
- Building Shared Library ELFIO Compiling_the_viewer_(Linux) on AMD64 ubuntu 6.10
g++-3.4 -shared *.o -o libelfio.so /usr/bin/ld: ELFIDynamic.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC ELFIDynamic.o: could not read symbols: Bad value