llvm-config is broken ?

I am trying to compile llvm in AIX 7.1 machine..

I was able to run "gmake libs-only" and it worked well. However, gmake
failed with the following error ..

# pwd
/usr/llvm/llvm-3.1.src/tools
#gmake
gmake[2]: Leaving directory `/usr/llvm/llvm-3.1.src/tools/llvm-config'
gmake[2]: Entering directory `/usr/llvm/llvm-3.1.src/tools/opt'
gmake[2]: *** No rule to make target
`/usr/llvm/llvm-3.1.src/tools/lib/libLLVMipo.a', needed by
`/usr/llvm/llvm-3.1.src/Release+Asserts/bin/opt'. Stop.
gmake[2]: Leaving directory `/usr/llvm/llvm-3.1.src/tools/opt'
gmake[1]: *** [opt/.makeall] Error 2
gmake[1]: Leaving directory `/usr/llvm/llvm-3.1.src/tools'
gmake: *** [all] Error 1

^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  seems you're building in the source tree? Please note that
LLVM does NOT recommand/support in source tree build [1].

HTH,
chenwj

[1] http://llvm.org/docs/CMake.html#quick-start

thanks for the reply ..I tried building it from outside ...but got a similar
error ..

# ls /llvm/src ==> src directory
llvm-3.1.src

# pwd
/llvm/build ==> build directory

#gmake libs-only
...
...

gmake[2]: Leaving directory `/llvm/build/lib/DebugInfo'
gmake[1]: Leaving directory `/llvm/build/lib'
gmake[1]: Entering directory `/llvm/build/tools/llvm-config'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/llvm/build/tools/llvm-config'
gmake[1]: Entering directory `/llvm/build/unittests'
gmake[2]: Entering directory `/llvm/build/unittests/ADT'
gmake[2]: *** No rule to make target
`/llvm/build/unittests/lib/libLLVMSupport.a', needed by
`Release+Asserts/ADTTests'. Stop.
gmake[2]: Leaving directory `/llvm/build/unittests/ADT'
gmake[1]: *** [ADT/.makeall] Error 2
gmake[1]: Leaving directory `/llvm/build/unittests'
gmake: *** [all] Error 1

Hi sunilsaggar,

thanks for the reply ..I tried building it from outside ...but got a similar
error ..

# ls /llvm/src ==> src directory
llvm-3.1.src

# pwd
/llvm/build ==> build directory

#gmake libs-only
...

gmake[2]: Leaving directory `/llvm/build/lib/DebugInfo'
gmake[1]: Leaving directory `/llvm/build/lib'
gmake[1]: Entering directory `/llvm/build/tools/llvm-config'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/llvm/build/tools/llvm-config'
gmake[1]: Entering directory `/llvm/build/unittests'
gmake[2]: Entering directory `/llvm/build/unittests/ADT'
gmake[2]: *** No rule to make target
`/llvm/build/unittests/lib/libLLVMSupport.a', needed by
`Release+Asserts/ADTTests'. Stop.

are you sure something didn't go wrong earlier? I.e. something that wasn't
reported as an error (but maybe should have been)? Another possibility is
that the library libLLVMSupport.a was built but in a different place or with
a slightly different name.

Ciao, Duncan.

"陳韋任 (Wei-Ren Chen)" <chenwj@iis.sinica.edu.tw> writes: