llvm.org GIT mirror llvm / f96eb57
Remove most references to LLVM_LIB_SEARCH_PATH. It now only exists in the GettingStarted.html document in the environment section and only as an optional feature. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18944 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Spencer 14 years ago
4 changed file(s) with 17 addition(s) and 61 deletion(s). Raw diff Collapse all Expand all
131131 % cd build
132132 % ../src/configure --prefix=$CFEINSTALL --disable-threads --disable-nls \
133133 --disable-shared --enable-languages=c,c++
134 % gmake
135 % setenv LLVM_LIB_SEARCH_PATH `pwd`/gcc
136134 % gmake all; gmake install
137135
138136
142140 % cd build
143141 % ../src/configure --prefix=$CFEINSTALL --disable-threads --disable-nls \
144142 --disable-shared --enable-languages=c,c++ --disable-c-mbchar
145 % gmake
146 % setenv LLVM_LIB_SEARCH_PATH `pwd`/gcc
147143 % gmake all; gmake install
148144
149145
162158 % ../src/configure --prefix=$CFEINSTALL --disable-threads --disable-nls \
163159 --disable-shared --enable-languages=c,c++ --host=sparcv9-sun-solaris2.8 \
164160 --disable-c-mbchar
165 % gmake
166 % setenv LLVM_LIB_SEARCH_PATH `pwd`/gcc
167161 % gmake all; gmake install
168162
169163
232226 % gmake
233227 % mkdir $CFEINSTALL/lib
234228 % gmake -C runtime install-bytecode
235 % setenv LLVM_LIB_SEARCH_PATH $CFEINSTALL/lib
236229
237230
238231
  • Optionally, build a symbol table for the newly installed runtime

  • 346346
    347347
    348348
    349

    350 When I use the test suite, all of the C Backend tests fail. What is
    351 wrong?
    352

    353
    354
    355
    356

    357 If you build LLVM and the C Backend tests fail in llvm/test/Programs,
    358 then chances are good that the directory pointed to by the LLVM_LIB_SEARCH_PATH
    359 environment variable does not contain the libcrtend.a library.
    360

    361
    362

    363 To fix it, verify that LLVM_LIB_SEARCH_PATH points to the correct directory
    364 and that libcrtend.a is inside. For pre-built LLVM GCC front ends, this
    365 should be the absolute path to
    366 cfrontend/<platform>/llvm-gcc/lib. If you've
    367 built your own LLVM GCC front end, then ensure that you've built and installed
    368 the libraries in llvm/runtime and have LLVM_LIB_SEARCH_PATH pointing
    369 to the $LLVMGCCDIR/lib subdirectory.
    370

    371
    372
    373
    374349

    After CVS update, rebuilding gives the error "No rule to make target".

    375350
    376351
    457432
    458433
    459434

    460 In order to find libcrtend.a, you must have the directory in which it lives in
    461 your LLVM_LIB_SEARCH_PATH environment variable. For the binary distribution of
    462 the LLVM GCC front end, this will be the full path of the lib
    463 directory inside of the LLVM GCC distribution.
    464

    435 The only way this can happen is if you haven't installed the runtime library. To
    436 correct this, do:

    437
    
                      
                    
    438 % cd llvm/runtime
    439 % make clean ; make install-bytecode
    440
    465441
    466442
    467443
    184184
    185185
  • Build the LLVM Suite:
  • 186186
    187
  • Set your LLVM_LIB_SEARCH_PATH environment variable.
  • 188187
  • gmake -k |& tee gnumake.out
  • 189188    # this is csh or tcsh syntax
    190189
  • If you get an "internal compiler error (ICE)" see below.
  • 547546 .cshrc or .profile.
    548547
    549548
    550
    LLVM_LIB_SEARCH_PATH=LLVMGCCDIR/lib
    551
    552 This environment variable helps the LLVM GCC front end find bytecode
    553 libraries that it will need for compilation.
    554

    555
    556
    alias llvmgcc LLVMGCCDIR/bin/gcc
    557
    alias llvmg++ LLVMGCCDIR/bin/g++
    558
    559 These aliases allow you to use the LLVM C and C++ front ends without putting
    560 them in your PATH or typing in their complete pathnames.
    549
    LLVM_LIB_SEARCH_PATH=/path/to/your/bytecode/libs
    550
    This environment variable helps LLVM linking tools find the locations
    551 of your bytecode libraries. It is optional and provided only a convenience
    552 since you can specify the paths using the -L options of the tools.
    553
    554
    alias llvmgcc LLVMGCCDIR/bin/gcc
    555
    alias llvmg++ LLVMGCCDIR/bin/g++
    556
    These aliases allow you to use the LLVM C and C++ front ends
    557 without putting them in your PATH or typing in their complete
    558 pathnames.
    561559
    562560
    563561
    801799

    802800
    803801
    804

    In addition to running configure, you must set the

    805 LLVM_LIB_SEARCH_PATH environment variable in your startup shell
    806 scripts. This environment variable is used to locate "system" libraries like
    807 "-lc" and "-lm" when linking. This variable should be set to
    808 the absolute path of the lib subdirectory of the GCC front
    809 end, or LLVMGCCDIR/lib. For example, one might set
    810 LLVM_LIB_SEARCH_PATH to
    811 /home/vadve/lattner/local/x86/llvm-gcc/lib for the x86
    812 version of the GCC front end on our research machines.

    813
    814802
    815803
    816804
    473473

    474474
    475475
    
                      
                    
    476 5 3 * * * LLVM_LIB_SEARCH_PATH=.../llvm-gcc/lib $HOME/llvm/utils/NightlyTest.pl -parallel -enable-linscan ...CVSREPOSTRING... $HOME/buildtest-X86 $HOME/cvs/testresults-X86
    476 5 3 * * * $HOME/llvm/utils/NightlyTest.pl -parallel -enable-linscan ...CVSREPOSTORY... $HOME/buildtest-X86 $HOME/cvs/testresults-X86
    477477
    478478
    479479

    Or, you can create a shell script to encapsulate the running of the script.

    487487 export LLVMGCCDIR=/proj/work/llvm/cfrontend/install
    488488 export PATH=/proj/install/bin:$LLVMGCCDIR/bin:$PATH
    489489 export LD_LIBRARY_PATH=/proj/install/lib
    490 export LLVM_LIB_SEARCH_PATH=/proj/work/llvm/cfrontend/install/lib
    491490 cd $BASE
    492491 cp /proj/work/llvm/llvm/utils/NightlyTest.pl .
    493492 nice ./NightlyTest.pl -nice -release -verbose -parallel -enable-linscan -noexternals