Difference between revisions of "Common compilation problems"
Pedro Oval (talk | contribs) m (→C4018: '<' : signed/unsigned mismatch: <php> to <source> and change language) |
|||
(88 intermediate revisions by 40 users not shown) | |||
Line 1: | Line 1: | ||
{{CompileNav}} | |||
= General Problems = | = General Problems = | ||
* Make sure you download not only the source, but the artwork zipfile, and the appropriate zipfile/tarball of libraries for your platform | |||
= Windows = | |||
== Viewer 1.19.1.4 / VS2003 == | |||
=== C1083: Cannot open include file: 'dxdiag.h' === | |||
The DirectX SDK doesn't automatically insert its include directory into the VS2003 paths. For the June 2008 DirectX SDK release, go to Tools -> Options -> Projects (on left) -> VC++ Directories. On right show directories for Include files, and add: | |||
* C:\Program Files\Microsoft DirectX SDK (June 2008)\Include | |||
=== C1083: Cannot open include file: 'unistd.h' === | |||
On Apr 27, 2008 in thread ''[sldev] error while compiling on vc8/9 (unistd.h)'', SLDev contributor wuhanzymail <wuhanzymail@163.com> recommended the following: | |||
1) right-click project lscript_compile, choose properties, c/c++, Preprocessor, add ''YY_NO_UNISTD_H'' to Preprcessor Definitions. | |||
2) in lex_yy.cpp, line 5915 change: | |||
<source lang="cpp"> #ifndef __cplusplus | |||
extern int isatty (int ); | |||
#endif</source> | |||
to: | |||
<source lang="cpp"> #ifndef YY_NEVER_INTERACTIVE | |||
extern int isatty (int ); | |||
#endif</source> | |||
3) still in lex_yy.cpp, line 5943 change: | |||
<source lang="cpp"> b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;</source> | |||
to: | |||
<source lang="cpp"> #if YY_NEVER_INTERACTIVE | |||
b->yy_is_interactive = 0; | |||
#else | |||
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; | |||
#endif</source> | |||
=== C4018: '<' : signed/unsigned mismatch === | |||
On Apr 30, 2008 in thread ''[sldev] cygwin flex lscript_compile workaround'', SLDev contributor Steve Linden recommended the following: | |||
I'm not sure whether this has already been addressed here, but we | |||
discovered a problem with the latest version of Cygwin flex and | |||
lscript_compile and I thought I would share the workaround. We've | |||
committed the workaround to our release-candidate branche so it should | |||
be in an upcoming source drop as well. | |||
1. Add ''YY_NO_UNISTD_H'' to the list of Preprocessor Definitions in the | |||
lscript_compile project file. | |||
2. Apply the following patch it indra.l: | |||
<source lang="diff">Index: indra.l | |||
=================================================================== | |||
--- indra.l (revision 86342) | |||
+++ indra.l (revision 86343) | |||
@@ -12,6 +12,7 @@ | |||
#include "linden_common.h" | |||
// Deal with the fact that lex/yacc generates unreachable code | |||
#ifdef LL_WINDOWS | |||
+#pragma warning (disable : 4018) // warning C4018: signed/unsigned mismatch | |||
#pragma warning (disable : 4702) // warning C4702: unreachable code | |||
#endif // LL_WINDOWS | |||
#include "llmath.h" | |||
@@ -44,7 +45,10 @@ | |||
= Windows = | #define YYLMAX 16384 | ||
== | #define YY_NEVER_INTERACTIVE 1 /* stops flex from calling isatty() */ | ||
* newview error PRJ0019: A tool returned an error code from " | - | ||
+#ifdef LL_WINDOWS | |||
+#define isatty(x) 0 /* hack for bug in cygwin flex 2.5.35 */ | |||
+#endif | |||
+ | |||
#ifdef ECHO | |||
#undef ECHO | |||
#endif | |||
</source> | |||
=== [...] error result returned from 'link.exe' === | |||
By checking the Output window (View menu -> Other Windows), this shows up as an error saying: ''link: extra operand `/NOLOGO' '' | |||
As reported by Brad Linden, this is caused by having the compiler executable directories in the wrong order, with the Cygwin directory path listed above the Visual Studio paths. This causes the Cygwin linker to be used instead of Visual Studio's linker. | |||
Go to Tools -> Options -> Projects -> VC++ Directories, show directories for Executables, and move "C:\cygwin\bin" to the bottom of the list. | |||
== 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 a fairly recent DirectX SDK ("December 2006" or newer), 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 input file 'dxerr8.lib' == | |||
* ''fatal error LNK1104: cannot open file 'dxerr8.lib''' | |||
If you are using the most recent DirectX SDK ("November 2007"), the file dxerr8.lib does no longer exist. To fix this, you'll need to change the newview project to include 'dxerr9.lib' instead. To do this, right-lick newview > Configuration Properties > Linker > Input, click Additional Dependencies on the right to show a button labeled "..." on it at the very right on the line, then click the ... button. Scroll down the list to find 'dxerr8.lib'. Rewrite it to 'dxerr9.lib'. Remember to do this for both the ReleaseForDownload and the ReleaseNoOpt Configurations. | |||
<br/> | |||
<br/> | |||
== A tool returned an error code from "Building ytab.cpp" == | |||
* ''lscript_compile_fb error PRJ0019: A tool returned an error code from "Building ytab.cpp" '' | |||
One possible reason for this is that Visual Studio does not know where cygwin/bin is, especially if this is accompanied by an error relating to bison.exe being an invalid command. Even if the directory for cygwin is in the environment variable PATH, Visual Studio maintains its own separate copy which does not seem to be automatically synchronized after the initial installation. | |||
For Visual Studio .NET 2003, go to Tools > Options > Projects > VC++ Directories. In the "show directories for" dropdown, choose "Executable files". Make sure that your cygwin (default C:\cygwin\bin) and ActivePython (default C:\Python25) directories are listed. | |||
== 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: Manually copy "linden\indra\lscript\lscript_compile\ytab.hpp" to "linden\indra\lscript\lscript_compile\ytab.h" and build again. | |||
Note: The underlying issue is that in indra.y there is a postbuild step which should do this automatically, but which is missing in some configurations (e.g. in Debug builds). | |||
<br/> | |||
<br/> | |||
== Cannot open include file: 'png.h': No such file or directory == | |||
* ''imagepng.cpp : fatal error C1083: Cannot open include file: 'libpng12/png.h': No such file or directory.'' | |||
There are a couple of files missing since the 1.17. distribution. You can either get the missing files from the internet (from the libpng and zlib projects) or download a set with just the missing files from [http://www.blueflash.cc/users/nicholaz/~libs here] (see the readme.txt inside the png archive there). | |||
<br/> | |||
<br/> | |||
== Cannot open include file: 'glh/glh_linear.h' or 'glh/glh_convenience.h' == | |||
These files are currently missing from Linden Windlight distributions. See [https://jira.secondlife.com/browse/VWR-3415 JIRA VWR-3415] or grab a copy from [http://www.blueflash.cc/users/nicholaz/~libs here] and put the files into a folder named linden/libraries/include/glh. | |||
<br/> | |||
<br/> | |||
== Errors relating to "template_verifier.py" == | |||
With version 1.18 a template verifier script written in Python is used to ensure the message template is correct. In some distributions the file was missing. You will also get an error if you have skipped the Python install. In both cases it is safe to hack the prebuild.bat file in the newview folder as described on the JIRA [http://jira.secondlife.com/browse/VWR-1267 VWR-1267] | |||
<br/> | |||
<br/> | |||
This is caused by the script trying to do a copy command, but the source path isn't in quotes. Open up newview. | == 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 [[http://secondlife.com/developers/opensource/downloads/2007/04/slviewer-src-1.14.0.1.zip '''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 | |||
<br/> | |||
== 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 | CommandLine="copy $(InputPath) .\app_settings\message_template.msg | ||
replace them with | replace them with | ||
CommandLine="copy &quot;$(InputPath)&quot; .\app_settings\message_template.msg | CommandLine="copy &quot;$(InputPath)&quot; .\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 &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' == | |||
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% | |||
You might need to edit the above path to refer to your particular platform SDK. If you don't have the Microsoft Windows Platform SDK installed, then you can download it for free from Microsoft. It is version specific and can be tricky to find on their website. | |||
If you're having problems with windows.h in Visual Studio Express 2005, check out this forum post: | |||
[http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1995837&SiteID=1 MSDN Forum Post] | |||
<br/> | |||
== 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. | |||
Also make sure that in newview, properties, linker, input, input libraries, no libraries named ll*.lib and lscript_compile.lib are listed there (remove them if you find them). | |||
Also be sure that your error does not come from previously in the log: like the cgywin component bison not being found. For MSVS2005 Express, you may need to go to tools>options>Projects and Solutions>VC++ Directories>Executable files and add the directory for cgywin. | |||
<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/> | |||
== Cannot open include file: 'ares.h' == | |||
download src from http://daniel.haxx.se/projects/c-ares/ | |||
compile c-ares-1.4.0/vc/areslib | |||
copy c-ares-1.4.0/vc/areslib/Release/areslib.lib to linden/libraries/i686-win32/lib_release and to lib_debug | |||
copy c-ares-1.4.0/*.h to linden/libraries/i686-win32/include/ares | |||
===FMOD=== | |||
FMOD headers and libs need to be copied into the viewer build directory BUT on Windows the manifests are not currently moving the libs to the correct location post build so the application will fail to run, to resolve copy fmod.dll to indra/build-vc71/newview/debug and indra/build-vc71/newview/relwithdebinfo and indra/build-vc71/newview/release | |||
===Boost and VS 2008=== | |||
If you use Visual Studio C++ 2008 (VC90), you may find that the Boost library will lock up solid and the viewer will not tun consuming 50-100% of CPU doing nothing. The only solutions are to use Visual Studio 2005 OR to get a newer version/rebuild boost with Visual Studio 2008. | |||
This problem is being worked on. Look here for updates: [https://jira.secondlife.com/browse/VWR-9541 VWR-9541] | |||
===Express editions of Visual C++=== | |||
Express editions do not have some of the extra features that VSTool.exe requires, VSTool is a little application that sets a few default project options, like which project is the startup and which build configuration to use. | |||
===LLKDU=== | |||
This is not present in the automated libs download but is required at least on windows by the copy_win_scrips script. The file is not actually needed for the viewer to run (if present it will be used for jpeg2000 decoding in preference to Openjpeg. The solution is to remove the lines from newview/copy_win_scripts that reference llkdu and this should then allow this custom build step to run without issue | |||
=== [...]/CMakeDetermineCompilerABI_C.bin cannot be read. === | |||
Occurs on Windows 7, make sure your running the cmd shell (or whatever your using to run the "python develop.py") with Administrator privileges. | |||
== fatal error C1060: compiler is out of heap space == | |||
If you are not using Incredibuild and have precompiled headers disabled, you may encounter this error. | |||
Try enabling building with precompiled headers: | |||
<pre>autobuild configure -c [configuration] -- -DUSE_PRECOMPILED_HEADERS:BOOL=ON</pre> | |||
== 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]] [[User:Adam Zaius|Adam Zaius]] 09:40, 8 January 2007 (PST) | * Added my errors at [[User:Adam_Zaius/MSVS2005 Errors]] [[User:Adam Zaius|Adam Zaius]] 09:40, 8 January 2007 (PST) | ||
Line 21: | Line 236: | ||
* 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/> | |||
= Mac OS X = | = Mac OS X = | ||
Line 29: | Line 243: | ||
*/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 [[Compiling the viewer (Mac OS X)#Viewer Source, Libraries, and Artwork|merge the libraries]] right. | ||
<br/> | |||
= Linux = | |||
=== libGL === | |||
Sometimes the provide libGL.a can cause issues. To avoid linker errors, you may need to remove indra/libraries/i686-linux/release/libGL.a and indra/libraries/i686-linux/debug/libGL.a | |||
=== Packaging errors === | |||
The final packaging step may fail with errors about the manifest if you are not using the <i>slviewer-linux-libs</i> 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 <b>indra/newview/viewer_manifest.py</b> | |||
=== Various Compilation problems === | |||
====Various missing libraries==== | |||
<pre>g++-3.4 -o linux_crash_logger/linux-crash-logger-i686-bin-globalsyms --no-keep-memory --reduce-memory-overheads /tmp/paul/home/paul/builds/secondlife/src/linden/indra/i686-linux-client-release/llcrashlogger/llcrashlogger.o /tmp/paul/home/paul/builds/secondlife/src/linden/indra/i686-linux-client-release/linux_crash_logger/linux_crash_logger.o /tmp/paul/home/paul/builds/secondlife/src/linden/indra/i686-linux-client-release/linux_crash_logger/llcrashloggerlinux.o -Llib_release_client/i686-linux -L/home/paul/builds/secondlife/src/linden/libraries/i686-linux/lib_release_client -lllui -lllxml -lllmessage -lllvfs -lllmath -lllcommon -lcurl -lssl -lcrypto -laprutil-1 -lapr-1 -lcares -lexpat -ldb-4.2 -lgtk-x11-2.0 | |||
/usr/bin/ld: skipping incompatible /home/paul/builds/secondlife/src/linden/libraries/i686-linux/lib_release_client/libcurl.a when searching for -lcurl | |||
/usr/bin/ld: skipping incompatible /home/paul/builds/secondlife/src/linden/libraries/i686-linux/lib_release_client/libssl.so when searching for -lssl | |||
/usr/bin/ld: skipping incompatible /home/paul/builds/secondlife/src/linden/libraries/i686-linux/lib_release_client/libcrypto.so when searching for -lcrypto | |||
/usr/bin/ld: skipping incompatible /home/paul/builds/secondlife/src/linden/libraries/i686-linux/lib_release_client/libaprutil-1.so when searching for -laprutil-1 | |||
/usr/bin/ld: skipping incompatible /home/paul/builds/secondlife/src/linden/libraries/i686-linux/lib_release_client/libapr-1.so when searching for -lapr-1 | |||
/usr/bin/ld: skipping incompatible /home/paul/builds/secondlife/src/linden/libraries/i686-linux/lib_release_client/libcares.a when searching for -lcares | |||
/usr/bin/ld: skipping incompatible /home/paul/builds/secondlife/src/linden/libraries/i686-linux/lib_release_client/libexpat.so when searching for -lexpat | |||
/usr/bin/ld: skipping incompatible /home/paul/builds/secondlife/src/linden/libraries/i686-linux/lib_release_client/libdb-4.2.so when searching for -ldb-4.2 | |||
/usr/bin/ld: cannot find -ldb-4.2 | |||
collect2: ld returned 1 exit status</pre> | |||
[paul@myhost secondlife]$ pacman -Q db | |||
db 4.6.21-2 | |||
[paul@myhost secondlife]$ uname -a | |||
Linux myhost 2.6.23-ARCH #1 SMP PREEMPT Tue Jan 15 07:17:51 CET 2008 x86_64 Intel(R) Celeron(R) CPU 2.66GHz GenuineIntel GNU/Linux | |||
And using:<pre> | |||
source=('secondlife.desktop' 'secondlife.install' 'secondlife.launcher' \ | |||
"http://secondlife.com/developers/opensource/downloads/2008/01/slviewer-src-RC-${pkgver}.tar.gz" \ | |||
'http://secondlife.com/developers/opensource/downloads/2007/12/slviewer-artwork-RC-1.18.6.2.zip' \ | |||
'http://secondlife.com/developers/opensource/downloads/2007/12/slviewer-linux-libs-RC-1.18.6.2.tar.gz' \ | |||
'http://www.fmod.org/index.php/release/version/fmodapi375linux.tar.gz' \ | |||
'http://secondlife.com/developers/opensource/downloads/2007/12/llmozlib-src-20071221.tar.gz')</pre> | |||
Hum ok, I was trying to use: | |||
scons DISTCC=no BTARGET=client BUILD=release MOZLIB=yes | |||
I'll retry with: | |||
scons BUILD=release ARCH=x86_64 BTARGET=client DISTCC=no MOZLIB=yes FMOD=yes GSTREAMER=yes STANDALONE=yes | |||
(Sconstruct says that with STANDALONE=yes -db-4.2 will not be used) | |||
But at the beginning I get: | |||
<pre> | |||
scons: Reading SConscript files ... | |||
Building client 1.18.6.2 on x86_64-linux (release) | |||
No CCACHE_DIR set. | |||
scons: warning: Two different environments were specified for target /tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llcrashlogger/llcrashlogger.o>, | |||
but they appear to have the same action: $CXX -o $TARGET -c $CXXFLAGS $_CCCOMCOM $SOURCES | |||
File "/home/paul/builds/secondlife/src/linden/indra/SConstruct", line 568, in create_executable | |||
scons: done reading SConscript files. | |||
scons: Building targets ...</pre> | |||
well, the new scons line give different problem: | |||
<pre>g++ -o /tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llmath/llquaternion.o -c -g -pipe -Wall -Wno-reorder -Wno-trigraphs -Wno-sign-compare -Werror -fexceptions -pthread -D_REENTRANT -fno-math-errno -fsigned-char -fno-strict-aliasing -falign-loops=16 -ffast-math -O2 -D_FORTIFY_SOURCE=2 -DLL_STANDALONE -DLL_MESA_HEADLESS=0 -DLL_MESA=0 -DLL_LINUX=1 -DAPPID=secondlife -DLL_SDL=1 -DLL_FMOD=0 -DLL_X11=1 -DLL_GTK=1 -DLL_LIBXUL_ENABLED=1 -DLL_GSTREAMER_ENABLED=1 -DNDEBUG -DLL_RELEASE=1 -Illcommon -Illmath -Illwindow -Illaudio -Illcharacter -Illcrashlogger -Illdatabase -Illhavok -Illimage -Illinventory -Illmedia -Illmessage -Illprimitive -Illrender -Illscene -Illui -Illvfs -Illwindow -Illxml -Ilscript -Ilscript/lscript_compile -I/home/paul/builds/secondlife/src/linden/libraries/include -I/home/paul/builds/secondlife/src/linden/libraries/include/havok -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include -I/usr/include/atk-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/SDL -I/usr/include/apr-1 -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include/gstreamer-0.10 -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include/glib-2.0 -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include/glib-2.0/include -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include/libxml2 /tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llmath/llquaternion.cpp | |||
cc1plus: warnings being treated as errors | |||
/tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llmath/llquaternion.cpp: In function 'const char* OrderToString(LLQuaternion::Order)': | |||
/tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llmath/llquaternion.cpp:701: warning: deprecated conversion from string constant to 'char*' | |||
/tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llmath/llquaternion.cpp:704: warning: deprecated conversion from string constant to 'char*' | |||
/tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llmath/llquaternion.cpp:707: warning: deprecated conversion from string constant to 'char*' | |||
/tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llmath/llquaternion.cpp:710: warning: deprecated conversion from string constant to 'char*' | |||
/tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llmath/llquaternion.cpp:713: warning: deprecated conversion from string constant to 'char*' | |||
/tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llmath/llquaternion.cpp:716: warning: deprecated conversion from string constant to 'char*' | |||
scons: *** [/tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llmath/llquaternion.o] Error 1 | |||
scons: building terminated because of errors.</pre> | |||
Well, STANDALONE=yes make it use g++ rather than g++-3.4, so I decided to remove it, keeping | |||
ARCH=X86_64 and others, but I get: | |||
<pre>ranlib lib_release_client/x86_64-linux/libllprimitive.a | |||
g++-3.4 -o /tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llrender/llfont.o -c -g -pipe -Wall -Wno-reorder -Wno-trigraphs -Wno-sign-compare -Werror -fexceptions -pthread -D_REENTRANT -fno-math-errno -fsigned-char -fno-strict-aliasing -falign-loops=16 -ffast-math -O2 -D_FORTIFY_SOURCE=2 -DLL_MESA_HEADLESS=0 -DLL_MESA=0 -DLL_LINUX=1 -DAPPID=secondlife -DLL_SDL=1 -DLL_FMOD=0 -DLL_X11=1 -DLL_GTK=1 -DLL_LIBXUL_ENABLED=1 -DLL_GSTREAMER_ENABLED=1 -DNDEBUG -DLL_RELEASE=1 -Illcommon -Illmath -Illwindow -Illaudio -Illcharacter -Illcrashlogger -Illdatabase -Illhavok -Illimage -Illinventory -Illmedia -Illmessage -Illprimitive -Illrender -Illscene -Illui -Illvfs -Illwindow -Illxml -Ilscript -Ilscript/lscript_compile -I/home/paul/builds/secondlife/src/linden/libraries/include -I/home/paul/builds/secondlife/src/linden/libraries/include/havok -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include/ELFIO -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include/atk-1.0 -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include/glib-2.0 -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include/gtk-2.0 -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include/llfreetype2 -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include/pango-1.0 -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include/gstreamer-0.10 -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include/glib-2.0 -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include/glib-2.0/include -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include/libxml2 /tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llrender/llfont.cpp | |||
/tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llrender/llfont.cpp:41:44: llfreetype2/freetype/ft2build.h: No such file or directory | |||
/tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llrender/llfont.cpp:56: error: `FT_Render_Mode' does not name a type | |||
/tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llrender/llfont.cpp:60: error: `FT_Library' does not name a type | |||
/tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llrender/llfont.cpp: In constructor `LLFontManager::LLFontManager()': | |||
/tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llrender/llfont.cpp:78: error: `gFTLibrary' was not declared in this scope | |||
... [many more errors]</pre> | |||
oh well, SConstruct says I need: cairo glib-2.0 atk gmobile-2.0 gdk-2.0 gdk-pixbuf-2.0 pango pangoft2 pangox pangoxft gtk+-2.0 sdl vorbis vorbisenc vorbisfile | |||
Maybe this is pangoft2 that is missing. | |||
* This part is probably not relevant anymore --[[USER:Thickbrick Sleaford|Thickbrick]] | |||
===="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: <b>'newview/linux_tools/exposed-symbols.txt'</b>: 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: <b>/usr/bin/ld: cannot find -lz</b>==== | |||
* Nadia says: Install the zlib development headers. (Ubuntu package zlib1g-dev, Red Hat zlib-devel.) | |||
====Something like: indra.y.cpp:17: <b>error: previous declaration of `int yyparse()'</b>==== | |||
* 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</b> | |||
* Abi says: I forgot to install bison. Once I did that, problem solved. | |||
====Linking failures ("script not found") due to spaces in the LINKFLAGS variable?==== | |||
* I saw a [http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4665538 report], and modified the SConstruct file to drop the trailing arguments (and spaces) in LINKFLAGS. | |||
====''cp: target `SecondLife_i686_1_13_1_7/app_settings/*’ is not a directory''==== | |||
Building [https://lists.secondlife.com/pipermail/sldev/2007-January/000091.html 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 --[[User:Signore Iredell|Signore Iredell]] 06:09, 9 June 2007 (PDT) | |||
====`['.../lscript/lscript_compile/indra.l.cpp']': Don't know how to build a file with suffix `.l'==== | |||
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. --[[User:Random73 Janus|Random73 Janus]] 07:43, 16 May 2007 (PDT) | |||
====`glActiveTextureARB' was not declared in this scope==== | |||
Something like: linden/indra/i686-linux-client-release/llrender/llimagegl.cpp:122: <b>error: `glActiveTextureARB' was not declared in this scope</b> | |||
* 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' (<b>but note!!</b> 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')' | |||
* Note that the above xorg-x11/nvidia issue is addressed in [http://jira.secondlife.com/browse/VWR-9557 VWR-9557] which includes patches! | |||
====Building Shared Library ELFIO==== | |||
Building Shared Library ELFIO [[Compiling_the_viewer_%28Linux%29]] 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''' | |||
* I got around this with "export CXXFLAGS=-fPIC" before configuring ELFIO. | |||
====incompatible libopenjpeg.a when searching for -lopenjpeg==== | |||
Building Client on Ubuntu 7.04 AMD64 | |||
/usr/bin/ld: skipping incompatible /home/dereck/Desktop/SLdev/linden/libraries/i686-linux/lib_release_client/libopenjpeg.a when searching for -lopenjpeg | |||
/usr/bin/ld: cannot find -lopenjpeg | |||
collect2: ld returned 1 exit status | |||
* I went to the OpenJPEG website, downloaded the source, compiled for my system, installed it. The VWR compile was happy after that. Although it's not done yet and I'm still fixing another error, that I assume is unrelated. | |||
====C-Ares compatability issue.==== | |||
Compiling with c-ares version 1.5.1 got a compile error in llares.cpp: | |||
linden/indra/x86_64-linux-client-release/llcommon/llares.cpp: In member function `void LLAres::getHostByName(const char*, LLAres::HostResponder*, int)': | |||
linden/indra/x86_64-linux-client-release/llcommon/llares.cpp:147: error: invalid conversion from `void (*)(void*, int, hostent*)' to `void (*)(void*, int, int, hostent*)' | |||
Fixed with patch from https://jira.secondlife.com/browse/VWR-3480 | |||
====memset used with constant zero length parameter==== | |||
Building with -t Release causes memset error in /usr/include/bits/string3.h:82 | |||
The error is "/usr/include/bits/string3.h:82: error: call to `__warn_memset_zero_len' declared with attribute warning: memset used with constant zero length parameter; this could be due to transposed parameters" | |||
Patch: [http://jira.secondlife.com/browse/VWR-10001 VWR-10001] | |||
= | ====Boost errors in Snowglobe (GCC >= 4.3)==== | ||
Build stops with errors: "../libraries/include/boost/token_functions.hpp:338: error: suggest explicit braces to avoid ambiguous 'else'" | |||
See [http://jira.secondlife.com/browse/SNOW-204 SNOW-204] | |||
====Gentoo: undefined reference to `FT_Realloc'* from libpangoft2-1.0.so==== | |||
* | If you get an undefined reference to `FT_Realloc'* from libpangoft2-1.0.so, you might have to delete some bundled libraries. [http://imprudenceviewer.org/wiki/How_to_compile#Removing_Bad_Libraries_on_Gentoo_Linux See here] | ||
[[Category:Compiling viewer]] | |||
Latest revision as of 10:06, 1 July 2015
General Problems
- Make sure you download not only the source, but the artwork zipfile, and the appropriate zipfile/tarball of libraries for your platform
Windows
Viewer 1.19.1.4 / VS2003
C1083: Cannot open include file: 'dxdiag.h'
The DirectX SDK doesn't automatically insert its include directory into the VS2003 paths. For the June 2008 DirectX SDK release, go to Tools -> Options -> Projects (on left) -> VC++ Directories. On right show directories for Include files, and add:
- C:\Program Files\Microsoft DirectX SDK (June 2008)\Include
C1083: Cannot open include file: 'unistd.h'
On Apr 27, 2008 in thread [sldev] error while compiling on vc8/9 (unistd.h), SLDev contributor wuhanzymail <wuhanzymail@163.com> recommended the following:
1) right-click project lscript_compile, choose properties, c/c++, Preprocessor, add YY_NO_UNISTD_H to Preprcessor Definitions.
2) in lex_yy.cpp, line 5915 change:
#ifndef __cplusplus
extern int isatty (int );
#endif
to:
#ifndef YY_NEVER_INTERACTIVE
extern int isatty (int );
#endif
3) still in lex_yy.cpp, line 5943 change:
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
to:
#if YY_NEVER_INTERACTIVE
b->yy_is_interactive = 0;
#else
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
#endif
C4018: '<' : signed/unsigned mismatch
On Apr 30, 2008 in thread [sldev] cygwin flex lscript_compile workaround, SLDev contributor Steve Linden recommended the following:
I'm not sure whether this has already been addressed here, but we discovered a problem with the latest version of Cygwin flex and lscript_compile and I thought I would share the workaround. We've committed the workaround to our release-candidate branche so it should be in an upcoming source drop as well.
1. Add YY_NO_UNISTD_H to the list of Preprocessor Definitions in the lscript_compile project file.
2. Apply the following patch it indra.l:
Index: indra.l
===================================================================
--- indra.l (revision 86342)
+++ indra.l (revision 86343)
@@ -12,6 +12,7 @@
#include "linden_common.h"
// Deal with the fact that lex/yacc generates unreachable code
#ifdef LL_WINDOWS
+#pragma warning (disable : 4018) // warning C4018: signed/unsigned mismatch
#pragma warning (disable : 4702) // warning C4702: unreachable code
#endif // LL_WINDOWS
#include "llmath.h"
@@ -44,7 +45,10 @@
#define YYLMAX 16384
#define YY_NEVER_INTERACTIVE 1 /* stops flex from calling isatty() */
-
+#ifdef LL_WINDOWS
+#define isatty(x) 0 /* hack for bug in cygwin flex 2.5.35 */
+#endif
+
#ifdef ECHO
#undef ECHO
#endif
[...] error result returned from 'link.exe'
By checking the Output window (View menu -> Other Windows), this shows up as an error saying: link: extra operand `/NOLOGO'
As reported by Brad Linden, this is caused by having the compiler executable directories in the wrong order, with the Cygwin directory path listed above the Visual Studio paths. This causes the Cygwin linker to be used instead of Visual Studio's linker.
Go to Tools -> Options -> Projects -> VC++ Directories, show directories for Executables, and move "C:\cygwin\bin" to the bottom of the list.
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 a fairly recent DirectX SDK ("December 2006" or newer), 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 input file 'dxerr8.lib'
- fatal error LNK1104: cannot open file 'dxerr8.lib'
If you are using the most recent DirectX SDK ("November 2007"), the file dxerr8.lib does no longer exist. To fix this, you'll need to change the newview project to include 'dxerr9.lib' instead. To do this, right-lick newview > Configuration Properties > Linker > Input, click Additional Dependencies on the right to show a button labeled "..." on it at the very right on the line, then click the ... button. Scroll down the list to find 'dxerr8.lib'. Rewrite it to 'dxerr9.lib'. Remember to do this for both the ReleaseForDownload and the ReleaseNoOpt Configurations.
A tool returned an error code from "Building ytab.cpp"
- lscript_compile_fb error PRJ0019: A tool returned an error code from "Building ytab.cpp"
One possible reason for this is that Visual Studio does not know where cygwin/bin is, especially if this is accompanied by an error relating to bison.exe being an invalid command. Even if the directory for cygwin is in the environment variable PATH, Visual Studio maintains its own separate copy which does not seem to be automatically synchronized after the initial installation.
For Visual Studio .NET 2003, go to Tools > Options > Projects > VC++ Directories. In the "show directories for" dropdown, choose "Executable files". Make sure that your cygwin (default C:\cygwin\bin) and ActivePython (default C:\Python25) directories are listed.
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: Manually copy "linden\indra\lscript\lscript_compile\ytab.hpp" to "linden\indra\lscript\lscript_compile\ytab.h" and build again.
Note: The underlying issue is that in indra.y there is a postbuild step which should do this automatically, but which is missing in some configurations (e.g. in Debug builds).
Cannot open include file: 'png.h': No such file or directory
- imagepng.cpp : fatal error C1083: Cannot open include file: 'libpng12/png.h': No such file or directory.
There are a couple of files missing since the 1.17. distribution. You can either get the missing files from the internet (from the libpng and zlib projects) or download a set with just the missing files from here (see the readme.txt inside the png archive there).
Cannot open include file: 'glh/glh_linear.h' or 'glh/glh_convenience.h'
These files are currently missing from Linden Windlight distributions. See JIRA VWR-3415 or grab a copy from here and put the files into a folder named linden/libraries/include/glh.
Errors relating to "template_verifier.py"
With version 1.18 a template verifier script written in Python is used to ensure the message template is correct. In some distributions the file was missing. You will also get an error if you have skipped the Python install. In both cases it is safe to hack the prebuild.bat file in the newview folder as described on the JIRA VWR-1267
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%
You might need to edit the above path to refer to your particular platform SDK. If you don't have the Microsoft Windows Platform SDK installed, then you can download it for free from Microsoft. It is version specific and can be tricky to find on their website.
If you're having problems with windows.h in Visual Studio Express 2005, check out this forum post: MSDN Forum Post
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.
Also make sure that in newview, properties, linker, input, input libraries, no libraries named ll*.lib and lscript_compile.lib are listed there (remove them if you find them).
Also be sure that your error does not come from previously in the log: like the cgywin component bison not being found. For MSVS2005 Express, you may need to go to tools>options>Projects and Solutions>VC++ Directories>Executable files and add the directory for cgywin.
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
Cannot open include file: 'ares.h'
download src from http://daniel.haxx.se/projects/c-ares/
compile c-ares-1.4.0/vc/areslib
copy c-ares-1.4.0/vc/areslib/Release/areslib.lib to linden/libraries/i686-win32/lib_release and to lib_debug
copy c-ares-1.4.0/*.h to linden/libraries/i686-win32/include/ares
FMOD
FMOD headers and libs need to be copied into the viewer build directory BUT on Windows the manifests are not currently moving the libs to the correct location post build so the application will fail to run, to resolve copy fmod.dll to indra/build-vc71/newview/debug and indra/build-vc71/newview/relwithdebinfo and indra/build-vc71/newview/release
Boost and VS 2008
If you use Visual Studio C++ 2008 (VC90), you may find that the Boost library will lock up solid and the viewer will not tun consuming 50-100% of CPU doing nothing. The only solutions are to use Visual Studio 2005 OR to get a newer version/rebuild boost with Visual Studio 2008.
This problem is being worked on. Look here for updates: VWR-9541
Express editions of Visual C++
Express editions do not have some of the extra features that VSTool.exe requires, VSTool is a little application that sets a few default project options, like which project is the startup and which build configuration to use.
LLKDU
This is not present in the automated libs download but is required at least on windows by the copy_win_scrips script. The file is not actually needed for the viewer to run (if present it will be used for jpeg2000 decoding in preference to Openjpeg. The solution is to remove the lines from newview/copy_win_scripts that reference llkdu and this should then allow this custom build step to run without issue
[...]/CMakeDetermineCompilerABI_C.bin cannot be read.
Occurs on Windows 7, make sure your running the cmd shell (or whatever your using to run the "python develop.py") with Administrator privileges.
fatal error C1060: compiler is out of heap space
If you are not using Incredibuild and have precompiled headers disabled, you may encounter this error. Try enabling building with precompiled headers:
autobuild configure -c [configuration] -- -DUSE_PRECOMPILED_HEADERS:BOOL=ON
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
libGL
Sometimes the provide libGL.a can cause issues. To avoid linker errors, you may need to remove indra/libraries/i686-linux/release/libGL.a and indra/libraries/i686-linux/debug/libGL.a
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
Various missing libraries
g++-3.4 -o linux_crash_logger/linux-crash-logger-i686-bin-globalsyms --no-keep-memory --reduce-memory-overheads /tmp/paul/home/paul/builds/secondlife/src/linden/indra/i686-linux-client-release/llcrashlogger/llcrashlogger.o /tmp/paul/home/paul/builds/secondlife/src/linden/indra/i686-linux-client-release/linux_crash_logger/linux_crash_logger.o /tmp/paul/home/paul/builds/secondlife/src/linden/indra/i686-linux-client-release/linux_crash_logger/llcrashloggerlinux.o -Llib_release_client/i686-linux -L/home/paul/builds/secondlife/src/linden/libraries/i686-linux/lib_release_client -lllui -lllxml -lllmessage -lllvfs -lllmath -lllcommon -lcurl -lssl -lcrypto -laprutil-1 -lapr-1 -lcares -lexpat -ldb-4.2 -lgtk-x11-2.0 /usr/bin/ld: skipping incompatible /home/paul/builds/secondlife/src/linden/libraries/i686-linux/lib_release_client/libcurl.a when searching for -lcurl /usr/bin/ld: skipping incompatible /home/paul/builds/secondlife/src/linden/libraries/i686-linux/lib_release_client/libssl.so when searching for -lssl /usr/bin/ld: skipping incompatible /home/paul/builds/secondlife/src/linden/libraries/i686-linux/lib_release_client/libcrypto.so when searching for -lcrypto /usr/bin/ld: skipping incompatible /home/paul/builds/secondlife/src/linden/libraries/i686-linux/lib_release_client/libaprutil-1.so when searching for -laprutil-1 /usr/bin/ld: skipping incompatible /home/paul/builds/secondlife/src/linden/libraries/i686-linux/lib_release_client/libapr-1.so when searching for -lapr-1 /usr/bin/ld: skipping incompatible /home/paul/builds/secondlife/src/linden/libraries/i686-linux/lib_release_client/libcares.a when searching for -lcares /usr/bin/ld: skipping incompatible /home/paul/builds/secondlife/src/linden/libraries/i686-linux/lib_release_client/libexpat.so when searching for -lexpat /usr/bin/ld: skipping incompatible /home/paul/builds/secondlife/src/linden/libraries/i686-linux/lib_release_client/libdb-4.2.so when searching for -ldb-4.2 /usr/bin/ld: cannot find -ldb-4.2 collect2: ld returned 1 exit status
[paul@myhost secondlife]$ pacman -Q db db 4.6.21-2
[paul@myhost secondlife]$ uname -a Linux myhost 2.6.23-ARCH #1 SMP PREEMPT Tue Jan 15 07:17:51 CET 2008 x86_64 Intel(R) Celeron(R) CPU 2.66GHz GenuineIntel GNU/Linux
And using:
source=('secondlife.desktop' 'secondlife.install' 'secondlife.launcher' \ "http://secondlife.com/developers/opensource/downloads/2008/01/slviewer-src-RC-${pkgver}.tar.gz" \ 'http://secondlife.com/developers/opensource/downloads/2007/12/slviewer-artwork-RC-1.18.6.2.zip' \ 'http://secondlife.com/developers/opensource/downloads/2007/12/slviewer-linux-libs-RC-1.18.6.2.tar.gz' \ 'http://www.fmod.org/index.php/release/version/fmodapi375linux.tar.gz' \ 'http://secondlife.com/developers/opensource/downloads/2007/12/llmozlib-src-20071221.tar.gz')
Hum ok, I was trying to use:
scons DISTCC=no BTARGET=client BUILD=release MOZLIB=yes
I'll retry with:
scons BUILD=release ARCH=x86_64 BTARGET=client DISTCC=no MOZLIB=yes FMOD=yes GSTREAMER=yes STANDALONE=yes
(Sconstruct says that with STANDALONE=yes -db-4.2 will not be used)
But at the beginning I get:
scons: Reading SConscript files ... Building client 1.18.6.2 on x86_64-linux (release) No CCACHE_DIR set. scons: warning: Two different environments were specified for target /tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llcrashlogger/llcrashlogger.o>, but they appear to have the same action: $CXX -o $TARGET -c $CXXFLAGS $_CCCOMCOM $SOURCES File "/home/paul/builds/secondlife/src/linden/indra/SConstruct", line 568, in create_executable scons: done reading SConscript files. scons: Building targets ...
well, the new scons line give different problem:
g++ -o /tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llmath/llquaternion.o -c -g -pipe -Wall -Wno-reorder -Wno-trigraphs -Wno-sign-compare -Werror -fexceptions -pthread -D_REENTRANT -fno-math-errno -fsigned-char -fno-strict-aliasing -falign-loops=16 -ffast-math -O2 -D_FORTIFY_SOURCE=2 -DLL_STANDALONE -DLL_MESA_HEADLESS=0 -DLL_MESA=0 -DLL_LINUX=1 -DAPPID=secondlife -DLL_SDL=1 -DLL_FMOD=0 -DLL_X11=1 -DLL_GTK=1 -DLL_LIBXUL_ENABLED=1 -DLL_GSTREAMER_ENABLED=1 -DNDEBUG -DLL_RELEASE=1 -Illcommon -Illmath -Illwindow -Illaudio -Illcharacter -Illcrashlogger -Illdatabase -Illhavok -Illimage -Illinventory -Illmedia -Illmessage -Illprimitive -Illrender -Illscene -Illui -Illvfs -Illwindow -Illxml -Ilscript -Ilscript/lscript_compile -I/home/paul/builds/secondlife/src/linden/libraries/include -I/home/paul/builds/secondlife/src/linden/libraries/include/havok -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include -I/usr/include/atk-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/SDL -I/usr/include/apr-1 -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include/gstreamer-0.10 -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include/glib-2.0 -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include/glib-2.0/include -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include/libxml2 /tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llmath/llquaternion.cpp cc1plus: warnings being treated as errors /tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llmath/llquaternion.cpp: In function 'const char* OrderToString(LLQuaternion::Order)': /tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llmath/llquaternion.cpp:701: warning: deprecated conversion from string constant to 'char*' /tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llmath/llquaternion.cpp:704: warning: deprecated conversion from string constant to 'char*' /tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llmath/llquaternion.cpp:707: warning: deprecated conversion from string constant to 'char*' /tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llmath/llquaternion.cpp:710: warning: deprecated conversion from string constant to 'char*' /tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llmath/llquaternion.cpp:713: warning: deprecated conversion from string constant to 'char*' /tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llmath/llquaternion.cpp:716: warning: deprecated conversion from string constant to 'char*' scons: *** [/tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llmath/llquaternion.o] Error 1 scons: building terminated because of errors.
Well, STANDALONE=yes make it use g++ rather than g++-3.4, so I decided to remove it, keeping ARCH=X86_64 and others, but I get:
ranlib lib_release_client/x86_64-linux/libllprimitive.a g++-3.4 -o /tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llrender/llfont.o -c -g -pipe -Wall -Wno-reorder -Wno-trigraphs -Wno-sign-compare -Werror -fexceptions -pthread -D_REENTRANT -fno-math-errno -fsigned-char -fno-strict-aliasing -falign-loops=16 -ffast-math -O2 -D_FORTIFY_SOURCE=2 -DLL_MESA_HEADLESS=0 -DLL_MESA=0 -DLL_LINUX=1 -DAPPID=secondlife -DLL_SDL=1 -DLL_FMOD=0 -DLL_X11=1 -DLL_GTK=1 -DLL_LIBXUL_ENABLED=1 -DLL_GSTREAMER_ENABLED=1 -DNDEBUG -DLL_RELEASE=1 -Illcommon -Illmath -Illwindow -Illaudio -Illcharacter -Illcrashlogger -Illdatabase -Illhavok -Illimage -Illinventory -Illmedia -Illmessage -Illprimitive -Illrender -Illscene -Illui -Illvfs -Illwindow -Illxml -Ilscript -Ilscript/lscript_compile -I/home/paul/builds/secondlife/src/linden/libraries/include -I/home/paul/builds/secondlife/src/linden/libraries/include/havok -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include/ELFIO -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include/atk-1.0 -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include/glib-2.0 -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include/gtk-2.0 -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include/llfreetype2 -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include/pango-1.0 -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include/gstreamer-0.10 -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include/glib-2.0 -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include/glib-2.0/include -I/home/paul/builds/secondlife/src/linden/libraries/x86_64-linux/include/libxml2 /tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llrender/llfont.cpp /tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llrender/llfont.cpp:41:44: llfreetype2/freetype/ft2build.h: No such file or directory /tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llrender/llfont.cpp:56: error: `FT_Render_Mode' does not name a type /tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llrender/llfont.cpp:60: error: `FT_Library' does not name a type /tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llrender/llfont.cpp: In constructor `LLFontManager::LLFontManager()': /tmp/paul/home/paul/builds/secondlife/src/linden/indra/x86_64-linux-client-release/llrender/llfont.cpp:78: error: `gFTLibrary' was not declared in this scope ... [many more errors]
oh well, SConstruct says I need: cairo glib-2.0 atk gmobile-2.0 gdk-2.0 gdk-pixbuf-2.0 pango pangoft2 pangox pangoxft gtk+-2.0 sdl vorbis vorbisenc vorbisfile
Maybe this is pangoft2 that is missing.
- This part is probably not relevant anymore --Thickbrick
"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
- Abi says: I forgot to install bison. Once I did that, problem solved.
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.
cp: target `SecondLife_i686_1_13_1_7/app_settings/*’ is not a directory
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)
`['.../lscript/lscript_compile/indra.l.cpp']': Don't know how to build a file with suffix `.l'
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)
`glActiveTextureARB' was not declared in this scope
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')'
- Note that the above xorg-x11/nvidia issue is addressed in VWR-9557 which includes patches!
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
- I got around this with "export CXXFLAGS=-fPIC" before configuring ELFIO.
incompatible libopenjpeg.a when searching for -lopenjpeg
Building Client on Ubuntu 7.04 AMD64 /usr/bin/ld: skipping incompatible /home/dereck/Desktop/SLdev/linden/libraries/i686-linux/lib_release_client/libopenjpeg.a when searching for -lopenjpeg /usr/bin/ld: cannot find -lopenjpeg collect2: ld returned 1 exit status
- I went to the OpenJPEG website, downloaded the source, compiled for my system, installed it. The VWR compile was happy after that. Although it's not done yet and I'm still fixing another error, that I assume is unrelated.
C-Ares compatability issue.
Compiling with c-ares version 1.5.1 got a compile error in llares.cpp:
linden/indra/x86_64-linux-client-release/llcommon/llares.cpp: In member function `void LLAres::getHostByName(const char*, LLAres::HostResponder*, int)':
linden/indra/x86_64-linux-client-release/llcommon/llares.cpp:147: error: invalid conversion from `void (*)(void*, int, hostent*)' to `void (*)(void*, int, int, hostent*)'
Fixed with patch from https://jira.secondlife.com/browse/VWR-3480
memset used with constant zero length parameter
Building with -t Release causes memset error in /usr/include/bits/string3.h:82 The error is "/usr/include/bits/string3.h:82: error: call to `__warn_memset_zero_len' declared with attribute warning: memset used with constant zero length parameter; this could be due to transposed parameters"
Patch: VWR-10001
Boost errors in Snowglobe (GCC >= 4.3)
Build stops with errors: "../libraries/include/boost/token_functions.hpp:338: error: suggest explicit braces to avoid ambiguous 'else'"
See SNOW-204
Gentoo: undefined reference to `FT_Realloc'* from libpangoft2-1.0.so
If you get an undefined reference to `FT_Realloc'* from libpangoft2-1.0.so, you might have to delete some bundled libraries. See here