Try using the --with-llvmsrc and --with-llvmobj options to explicitly set the locations of your LLVM source tree and object tree, respectively. I faintly recall seeing this error and seem to recall using these options to work around it. -- John T. ________________________________________ From: llvmdev-bounces at cs.uiuc.edu [llvmdev-bounces at cs.uiuc.edu] On Behalf Of Lane Schwartz [dowobeha at gmail.com] Sent: Saturday, April 12, 2008 1:29 PM To: LLVM Developers Mailing List Subject: Re: [LLVMdev] Setting up new project On Sat, Apr 12, 2008 at 1:26 PM, Lane Schwartz <dowobeha at gmail.com> wrote:> John, > > Thanks for the advice. The script you sent gives me the same problem. > I am now able to work around the issue by making the following change > to the AutoRegen.sh script that comes with the sample project: > > 16,17c16,17 > < llvm_src_root=../../.. > < llvm_obj_root=../../.. > --- > > llvm_src_root=../.. > > llvm_obj_root=../..Hmm... I may have spoken too soon... After making the above change to AutoRegen.sh, $ ./AutoRegen.sh Regenerating aclocal.m4 with aclocal Regenerating configure with autoconf 2.5x $ cd .. $ ./configure configure: creating ./config.status config.status: creating Makefile.common config.status: executing setup commands config.status: executing Makefile commands config.status: executing lib/Makefile commands config.status: executing lib/sample/Makefile commands config.status: executing tools/Makefile commands config.status: executing tools/sample/Makefile commands $ make ../Makefile.common:22: ../../Makefile.common: No such file or directory make[1]: *** No rule to make target `../../Makefile.common'. Stop. make: *** [all] Error 1 So I guess my AutoRegen.sh fix isn't so great after all... Lane _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
For a local project, I applied the attached patch to ./configure to make it work, IIRC. It moves the src/obj dir evaluation earlier. I don't know whether this is a good solution though. Torvald -------------- next part -------------- A non-text attachment was scrubbed... Name: patch Type: text/x-diff Size: 1538 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080413/d5cb7e3e/attachment.diff>
On Sat, Apr 12, 2008 at 3:52 PM, Criswell, John T <criswell at ad.uiuc.edu> wrote:> Try using the --with-llvmsrc and --with-llvmobj options to explicitly set the locations of your LLVM source tree and object tree, respectively. I faintly recall seeing this error and seem to recall using these options to work around it.OK. Here are the complete steps required to successfully build the sample project: $ cd llvm/projects $ cp -r sample/ myproject $ cd myproject $ cd autoconf Make the following edit to AutoRegen.sh: 16,17c16,17 < llvm_src_root=../../.. < llvm_obj_root=../../.. ---> llvm_src_root=../.. > llvm_obj_root=../..$ ./AutoRegen.sh Regenerating aclocal.m4 with aclocal Regenerating configure with autoconf 2.5x $ cd .. $ ./configure --with-llvmsrc=/opt/src-llvm --with-llvmobj=/opt/src-llvm configure: creating ./config.status config.status: creating Makefile.common config.status: executing setup commands config.status: executing Makefile commands config.status: executing lib/Makefile commands config.status: executing lib/sample/Makefile commands config.status: executing tools/Makefile commands config.status: executing tools/sample/Makefile commands (Obviously change the above path from /opt/src-llvm to wherever your llvm directory is) $ make llvm[2]: Compiling sample.c for Release build llvm[2]: Building Release Archive Library libsample.a llvm[2]: Compiling main.c for Release build llvm[2]: Linking Release executable Sample (without symbols) llvm[2]: ======= Finished Linking Release Executable Sample (without symbols) Might I suggest that the above edit be applied to llvm/projects/sample/autoconf/AutoRegen.sh, and perhaps mention in the "Creating an LLVM Project" page that the --with-llvmsrc and --with-llvmobj flags are required? Thanks for all the help, Lane
Lane Schwartz wrote:> On Sat, Apr 12, 2008 at 3:52 PM, Criswell, John T <criswell at ad.uiuc.edu> wrote: > >> Try using the --with-llvmsrc and --with-llvmobj options to explicitly set the locations of your LLVM source tree and object tree, respectively. I faintly recall seeing this error and seem to recall using these options to work around it. >> > > OK. Here are the complete steps required to successfully build the > sample project: > > $ cd llvm/projects > $ cp -r sample/ myproject > $ cd myproject > > $ cd autoconf > > Make the following edit to AutoRegen.sh: > > 16,17c16,17 > < llvm_src_root=../../.. > < llvm_obj_root=../../.. > --- > >> llvm_src_root=../.. >> llvm_obj_root=../.. >> > > > $ ./AutoRegen.sh > Regenerating aclocal.m4 with aclocal > Regenerating configure with autoconf 2.5x >Hmm, if you don't regenerate configure, it works without giving it --with-llvmsrc. The problems seems to be that when running AutoRegen.sh, the current directory is projects/sample/autoconf, but when you run the created configure, the directory is projects/sample. Was AutoRegen.sh once in project/sample, and later got moved to autoconf/ ? Best regards, --Edwin