svn trunk comilation error

Hi there,

I'm having some trouble compiling llvm from trunk in the svn.

I configured it with: CC=gcc CXX=g++ ./configure --enable-optimisation=yes --enable-assertions=no
But I have this error:

llvm[1]: Building llvm-config BuildVariables.inc file.
llvm[1]: Compiling llvm-config.cpp for Release build
3.1_svn/llvm/tools/llvm-config/llvm-config.cpp:45:35: fatal error: LibraryDependencies.inc: No such file or directory
compilation terminated.
/bin/rm: cannot remove ‘3.1_svn/build/tools/llvm-config/Release/llvm-config.d.tmp’: No such file or directory
make[1]: *** [3.1_svn/build/tools/llvm-config/Release/llvm-config.o] Error 1
make[1]: Leaving directory `3.1_svn/build/tools/llvm-config'
make: *** [all] Error 1

I have aslo a lot of output like this one:

Traceback (most recent call last):
  File "3.1_svn/llvm/utils/llvm-build/llvm-build", line 3, in <module>
    import llvmbuild
  File "3.1_svn/llvm/utils/llvm-build/llvmbuild/__init__.py", line 1, in <module>
    from main import main
ImportError: No module named main

I also trie to compile it with a simple configure with no flag and I have the same error.

Is correct to assume that the trunk will normally compile without problems (I used this doc: http://llvm.org/docs/GettingStarted.html#quickstart) or I should an other "path" (like tags/RELEASE_31/rc2 or branches/release_31)?

Thx
Cheers

I configured it with: CC=gcc CXX=g++ ./configure --enable-optimisation=yes --enable-assertions=no

                                       ^^^^^^^^^^^

  I recommend you use out-of-tree build, which means you check out the source
into one directory (llvm.src/), then build in another directory (llvm.obj).
Something like,

Hi,

Sorry I did not precise that, but I'm already doing that...

I have, as you say, two different director, one for source and one for build (where I run my configure)...

Cheers

Hi Rinaldini,

  You probably need to illustrate what your enviroment is, what revision you
checkout and how you build LLVM. I have no problem build LLVM svn here. Have
you checked tools/llvm-config/LibraryDependencies.inc is exist?

Regards,
chenwj

Hi Julien,

Traceback (most recent call last):
File "3.1_svn/llvm/utils/llvm-build/llvm-build", line 3, in <module>
import llvmbuild
File "3.1_svn/llvm/utils/llvm-build/llvmbuild/__init__.py", line 1, in <module>
from main import main
ImportError: No module named main

I've encountered this error (or one very similar to it) when the main
python binary was a version of Python 3.x instead of 2.x. At a glance
it might produce the kind of error you're getting above too.

Tim.

De : 陳韋任 [chenwj@iis.sinica.edu.tw]
Date d'envoi : mardi 8 mai 2012 11:37
À : Rinaldini Julien
Cc: LLVM Developers Mailing List
Objet : Re: [LLVMdev] RE : svn trunk comilation error

Hi Rinaldini,

You probably need to illustrate what your enviroment is, what revision you
checkout and how you build LLVM. I have no problem build LLVM svn here. Have
you checked tools/llvm-config/LibraryDependencies.inc is exist?

Regards,
chenwj

--
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj

Ok, I'll check that tomorow... I'm not at work today and it seems that my ssh is down :frowning:
Thx again...

De : Tim Northover [t.p.northover@gmail.com]
Date d'envoi : mardi 8 mai 2012 11:38
À : Rinaldini Julien
Cc: LLVM Developers Mailing List
Objet : Re: [LLVMdev] svn trunk comilation error

I've encountered this error (or one very similar to it) when the main
python binary was a version of Python 3.x instead of 2.x. At a glance
it might produce the kind of error you're getting above too.

Tim.

I though of something like this... I'll try to alias python to python2 tomorow...

Cheers

De : 陳韋任 [chenwj@iis.sinica.edu.tw]
Date d'envoi : mardi 8 mai 2012 11:37
À : Rinaldini Julien
Cc: LLVM Developers Mailing List
Objet : Re: [LLVMdev] RE : svn trunk comilation error

Hi Rinaldini,

You probably need to illustrate what your enviroment is, what revision you
checkout and how you build LLVM. I have no problem build LLVM svn here. Have
you checked tools/llvm-config/LibraryDependencies.inc is exist?

Regards,
chenwj

--
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj

Hi,

I made an svn update this morning, I'm at revision 156468.
I checked... I don't have tools/llvm-config/LibraryDependencies.inc in the source folder.

And:
$ alias python=python2

Don't get rid of the python error...

Cheers

Ok, nevermind...

I changed llvm/utils/llvm-build/llvm-build:
#!/usr/bin/env python

import llvmbuild

if __name__ == '__main__':
   llvmbuild.main()

into:
#!/usr/bin/env python2

import llvmbuild

if __name__ == '__main__':
   llvmbuild.main()

And it worked!

Thx all,
Cheers