Hi, I was trying to use gold plugin to compile and run some of my passes on some large softwares like mysql, apache etc. When I compile using llvm-gcc, everything works fine. But, when I followed the instructions on http://llvm.org/docs/GoldPlugin.html#build to use gold plugin, I got errors like: /home/vadve/ssahoo2/local/bin/ld: error: modules/standard/libstandard.a: no archive symbol table (run ranlib) /home/vadve/ssahoo2/local/bin/ld: error: modules/extra/libextra.a: no archive symbol table (run ranlib) /home/vadve/ssahoo2/local/bin/ld: error: main/libmain.a: no archive symbol table (run ranlib) .... I tried ranlib/llvm-ranlib, but it didn't work. Can someone help me, if I am doing anything wrong here? Thanks, Swarup. ************************************* Swarup Kumar Sahoo Thomas M. Siebel Center for Computer Science University of Illinois at Urbana Champaign 201 N Goodwin Avenue Urbana, IL-61801 Phone - 614 264 9574 ************************************* Swarup Kumar Sahoo Thomas M. Siebel Center for Computer Science University of Illinois at Urbana Champaign 201 N Goodwin Avenue Urbana, IL-61801 Phone - 614 264 9574
Hi, I am giving more details about the commands which gave these errors below, which may be helpful in figuring out the problem.> >Hi, > I was trying to use gold plugin to compile and run some of my passes on some large softwares like mysql, apache etc. When I compile using llvm-gcc, everything works fine. But, when I followed the instructions on http://llvm.org/docs/GoldPlugin.html#build to use gold plugin, I got errors like: > >/home/vadve/ssahoo2/local/bin/ld: error: modules/standard/libstandard.a: no archive symbol table (run ranlib) >/home/vadve/ssahoo2/local/bin/ld: error: modules/extra/libextra.a: no archive symbol table (run ranlib) >/home/vadve/ssahoo2/local/bin/ld: error: main/libmain.a: no archive symbol table (run ranlib) >....I got these errors when build system was running the following command: lvm-gcc -use-gold-plugin -DLINUX=2 -DUSE_HSREGEX -DUSE_EXPAT -I./lib/expat-lite -DNO_DL_NEEDED -O4 `./apaci` -o httpd buildmark.o modules.o modules/standard/libstandard.a modules/extra/libextra.a main/libmain.a ./os/unix/libos.a ap/libap.a regex/libregex.a lib/expat-lite/libexpat.a -lm -lcrypt When I replace llvm-gcc with the following ld -plugin command, I also get the same errors: ld -plugin ~/local/lib/libLLVMgold.so -o httpd buildmark.o modules.o modules/standard/libstandard.a modules/extra/libextra.a main/libmain.a ./os/unix/libos.a ap/libap.a regex/libregex.a lib/expat-lite/libexpat.a -lm -lcrypt> >I tried ranlib/llvm-ranlib, but it didn't work. Can someone help me, if I am doing anything wrong here? > >Thanks, >Swarup. >************************************* Swarup Kumar Sahoo Thomas M. Siebel Center for Computer Science University of Illinois at Urbana Champaign 201 N Goodwin Avenue Urbana, IL-61801 Phone - 614 264 9574
Swarup Kumar Sahoo wrote:> Hi, > I was trying to use gold plugin to compile and run some of my passes on some large softwares like mysql, apache etc. When I compile using llvm-gcc, everything works fine. But, when I followed the instructions on http://llvm.org/docs/GoldPlugin.html#build to use gold plugin, I got errors like: > > /home/vadve/ssahoo2/local/bin/ld: error: modules/standard/libstandard.a: no archive symbol table (run ranlib) > /home/vadve/ssahoo2/local/bin/ld: error: modules/extra/libextra.a: no archive symbol table (run ranlib) > /home/vadve/ssahoo2/local/bin/ld: error: main/libmain.a: no archive symbol table (run ranlib) > .... > > I tried ranlib/llvm-ranlib, but it didn't work. Can someone help me, if I am doing anything wrong here?You shouldn't need ranlib nor llvm-ranlib. I'm not entirely sure what's up with the .a files. It looks like ar has grown a --plugin options to match gold, whereas I seem to recall it used to just look in a fixed directory. Rafael, have you been following what binutils has done with plugins for ar, nm and friends? It looks like we might need to update llvm-gcc to pass the gold plugin flag to ar and nm. Nick> > Thanks, > Swarup. > > ************************************* > Swarup Kumar Sahoo > Thomas M. Siebel Center for Computer Science > University of Illinois at Urbana Champaign > 201 N Goodwin Avenue > Urbana, IL-61801 > Phone - 614 264 9574 > > ************************************* > Swarup Kumar Sahoo > Thomas M. Siebel Center for Computer Science > University of Illinois at Urbana Champaign > 201 N Goodwin Avenue > Urbana, IL-61801 > Phone - 614 264 9574 > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
---- Original message ---->Date: Wed, 10 Mar 2010 22:09:22 -0800 >From: Nick Lewycky <nicholas at mxc.ca> >Subject: Re: [LLVMdev] glod plugin use >To: Swarup Kumar Sahoo <ssahoo2 at illinois.edu> >Cc: llvmdev at cs.uiuc.edu, Rafael Espindola <espindola at google.com> > >Swarup Kumar Sahoo wrote: >> Hi, >> I was trying to use gold plugin to compile and run some of my passes on some large softwares like mysql, apache etc. When I compile using llvm-gcc, everything works fine. But, when I followed the instructions on http://llvm.org/docs/GoldPlugin.html#build to use gold plugin, I got errors like: >> >> /home/vadve/ssahoo2/local/bin/ld: error: modules/standard/libstandard.a: no archive symbol table (run ranlib) >> /home/vadve/ssahoo2/local/bin/ld: error: modules/extra/libextra.a: no archive symbol table (run ranlib) >> /home/vadve/ssahoo2/local/bin/ld: error: main/libmain.a: no archive symbol table (run ranlib) >> .... >> >> I tried ranlib/llvm-ranlib, but it didn't work. Can someone help me, if I am doing anything wrong here? > >You shouldn't need ranlib nor llvm-ranlib. > >I'm not entirely sure what's up with the .a files. It looks like ar has >grown a --plugin options to match gold, whereas I seem to recall it used >to just look in a fixed directory. > >Rafael, have you been following what binutils has done with plugins for >ar, nm and friends? It looks like we might need to update llvm-gcc to >pass the gold plugin flag to ar and nm.Yes, ar and nm actually take -plugin option and if I pass this option, then I don't get these errors. But, llvm-gcc doesn't automatically pass this option to ar.> >Nick > >> >> Thanks, >> Swarup. >> >> ************************************* >> Swarup Kumar Sahoo >> Thomas M. Siebel Center for Computer Science >> University of Illinois at Urbana Champaign >> 201 N Goodwin Avenue >> Urbana, IL-61801 >> Phone - 614 264 9574 >> >> ************************************* >> Swarup Kumar Sahoo >> Thomas M. Siebel Center for Computer Science >> University of Illinois at Urbana Champaign >> 201 N Goodwin Avenue >> Urbana, IL-61801 >> Phone - 614 264 9574 >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> >************************************* Swarup Kumar Sahoo Thomas M. Siebel Center for Computer Science University of Illinois at Urbana Champaign 201 N Goodwin Avenue Urbana, IL-61801 Phone - 614 264 9574
> You shouldn't need ranlib nor llvm-ranlib. > > I'm not entirely sure what's up with the .a files. It looks like ar has > grown a --plugin options to match gold, whereas I seem to recall it used to > just look in a fixed directory. > > Rafael, have you been following what binutils has done with plugins for ar, > nm and friends? It looks like we might need to update llvm-gcc to pass the > gold plugin flag to ar and nm.ar and nm are supposed to try to use plugins automatically. Swarup, can you check that you can run nm in a file with LLVM IL and it displays the symbols?> Nick >Cheers, -- Rafael Ávila de Espíndola