All submissions to this site are governed by the Second Life Viewer Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.

Review Board 1.6.11

Welcome to the Second Life Viewer Code Review tool.
See the documentation on our wiki for how to use this site.

OPEN-38: autobuild support for StandAlone

Review Request #167 - Created Feb. 26, 2011 and submitted

Aleric Inglewood Reviewers
viewer
OPEN-38
None oz_linden/viewer-autobuild
Oz: please merge into your repository.
configures, compiles, runs.
Posted (Feb. 26, 2011, 2:44 p.m.)
Can you give some instructions on how to do a standalone build with these changes? I tried the following:

patch -p1 < /home/das-g/slsrc/patches/autobuild-standalone.diff
autobuild install glh_linear
autobuild configure -c OpenSourceStandAloneRelWithDebInfo

but this fails with:

CMake Error at cmake/FindGLH.cmake:26 (message):
  Could not find GLH


Thanks
  1. The usual way, you have to include the path where you installed your library to CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH.
    For GLH just CMAKE_INCLUDE_PATH is enough since it only exists of headers.
    
    hikaru:/usr/src/secondlife/viewers/snowstorm/viewer-autobuild>echo $CMAKE_INCLUDE_PATH
    /usr/src/secondlife/llqtwebkit/install-imprudence/include:/usr/src/secondlife/viewers/snowstorm/viewer-autobuild/include:/sl/usr/include
    
    hikaru:/usr/src/secondlife/viewers/snowstorm/viewer-autobuild>ls -l /usr/src/secondlife/viewers/snowstorm/viewer-autobuild/include
    total 0
    lrwxrwxrwx 1 aleric src 48 Feb 25 20:33 GL -> ../linden/build-linux-x86_64/packages/include/GL/
    lrwxrwxrwx 1 aleric src 49 Feb 25 20:33 glh -> ../linden/build-linux-x86_64/packages/include/glh/
    lrwxrwxrwx 1 aleric src 49 Feb 25 20:33 tut -> ../linden/build-linux-x86_64/packages/include/tut/
    
    As you see, I created symbolic links in some random directory (that I then added to CMAKE_INCLUDE_PATH)
    to whereever the respective packages are installed by an 'autobuild install'. I did that because
    if you add */packages/include to CMAKE_INCLUDE_PATH it finds ALL packages that you installed,
    which might not be what you want if you use the same source tree for standlone and non-standalone
    testing.
    
Ship it!
Posted (Feb. 27, 2011, 3:47 a.m.)
Ah, with that, configuration succeeds and GLH_INCLUDE_DIR gets correctly set to the dir with the symlinks. Could the need for that symlink dir be avoided by having the user directly set the GLH_INCLUDE_DIR CMake variable?
  1. There is long standing issue (from the days of Rob Linden) that I wanted to address once things finally get running smoothly... I don't think that now is the time to address this. What needs to be done for tut and glh_linear is to install them in an architecture independent directory and then use them for standalone and non-standalone. The same goes for the slvoice stuff. Some packages ARE needed even on standalone, but the current setup doesn't support it well enough because LL never tests standalone is therefore unaware of the difference between packages that are only needed for non-standalone and packages that are needed for both.
indra/cmake/Linking.cmake (Diff revision 1)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
I thought the removal of the NOT STANDALONE condition here would give standalone the same (repository-local) include directories that non-standalone has, so that it'd find autobuild-installed dependencies. But it seems those are just for the library binaries? Or is this just about the creation of those directories, not their addition to the search path?
  1. No, this just sets variables to certain (path) values. No test should ever test if they are set (that would be a wrong design), so they might as well be set. In fact, they ARE being used (at least some of them) on standalone (the staging directories), which is why I removed the if. Also, it's a Good Thing(tm) that the auto-build installed packages (and header files!) are completely invisible on standalone. This should not change. What we need, as I remarked in my other comment, is that we need to create a separate directory where packages can be installed that ARE needed on standalone and then use that, so that we ONLY get packages that we really want/need, and not left-overs from a non-standalone build as well).
    
Building still fails for me, with

Linking CXX shared library libllcommon.so
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../libbreakpad_client.so when searching for -lbreakpad_client
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../libbreakpad_client.a when searching for -lbreakpad_client
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libbreakpad_client.so when searching for -lbreakpad_client
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libbreakpad_client.a when searching for -lbreakpad_client
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lbreakpad_client
collect2: ld returned 1 exit status
make[2]: *** [llcommon/libllcommon.so] Error 1
make[1]: *** [llcommon/CMakeFiles/llcommon.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

and

In file included from /usr/include/curl/curl.h:36,
                 from [...]/indra/llmessage/llcurl.h:39,
                 from [...]/indra/llmessage/llurlrequest.h:42,
                 from [...]/indra/llmessage/llhttpclient.h:38,
                 from [...]/indra/llmessage/message.h:53,
                 from [...]/indra/llinventory/llcategory.cpp:30:
/usr/include/curl/curlrules.h:144: error: size of array ‘__curl_rule_01__’ is negative
/usr/include/curl/curlrules.h:154: error: size of array ‘__curl_rule_02__’ is negative

but I guess those are both 32bit/64bit issues and not related to your changes here, so "Ship it!".
  1. The curl error means you have a wrongly configured curl; you seem to be including a 32-bit version while now compiling for 64-bit (or visa versa). This definitely doesn't have anything to do with my changes ;).
    
    The fact that it can't find -lbreakpad_client seems to be the same problem: it is skipping /usr/lib/libbreakpad_client.a because that is incompatible (was compiled for 32-bit while now you are compiling 64-bit, or visa versa).
    
Ship it!
Posted (Aug. 27, 2011, 7:18 a.m.)
work on debian/sid 32bit, imho "ship it"
Posted (Sept. 14, 2011, 1:57 p.m.)
Can someone please explain "NO_SYSTEM_ENVIRONMENT_PATH" in the find_path. The only reason I can think of for that is to work around a broken build box.