Difference between revisions of "Common compilation problems"
Robert Pitre (talk | contribs) (Mentioning Link error related to DirectX SDK lib path) |
Tofu Linden (talk | contribs) (→Linux: remove some obsolete (fixed) problems) |
||
Line 58: | Line 58: | ||
* 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 <b>libelfio.so</b> (judging from the build instructions on the Wiki)... | * 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 <b>libelfio.so</b> (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.' | ** 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: <b>/usr/bin/ld: cannot find -lz</b> | * Something like: <b>/usr/bin/ld: cannot find -lz</b> | ||
Line 73: | Line 65: | ||
** Tofu says... 'This appears to be a problem with some versions of flex/bison. A resident reports success when comment out the <i>#ifdef __cplusplus</i> lines in lscript/lscript_compile/indra.y' | ** Tofu says... 'This appears to be a problem with some versions of flex/bison. A resident reports success when comment out the <i>#ifdef __cplusplus</i> 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: <b>undefined reference to `yyparse'</b>, after the zlib headers are installed. | ** Nadia says: install the zlib development headers first and try recompiling. Commenting out those lines results in a error indra.l:666: <b>undefined reference to `yyparse'</b>, after the zlib headers are installed. | ||
* Miscellaneous errors about classes not existing, or referencing an undefined type | * Miscellaneous errors about classes not existing, or referencing an undefined type |
Revision as of 03:03, 20 January 2007
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.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)"
- 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
Compiling on MSVC 2005
There is now a step-by-step tutorial for Microsoft Windows - Visual Studio 2005 & Visual C++ 2005 Express
What sort of errors are seen?
- fatal error LNK1181: cannot open input file 'dxguid.lib' in win_crash_logger
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
- 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.
- /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: /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.