[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] managed build flexibility: building glibc
|
On 06/20/2012 01:28 PM, Jeff Johnston wrote:
Hi Wainer,
See my comments below:
On 06/15/2012 04:15 PM, Wainer dos Santos Moschetta wrote:
Hi all,
I would like to describe my experience to build GNU/Glibc with CDT
because I think it may give you folks more information about how to make
it more flexible.
I'm relatively new to the CDT world so I might have done some mistakes
when I tried to use it. Using Eclipse 3.8RC2 with CDT 8.1.0RC3....
Here goes the steps I followed:
1. Cloned glibc git repository (~/src/glibc). (OK).
2. Imported glibc as "Existing code as Makefile Project". Chose "GNU
Autotools Toolchain" since glibc is a autotools-based project. (OK)
3. Eclipse hangs when indexing the source code. Noticed 500MB, 700MB and
1GB of heap weren't enough to index it. Kept it increasing until 2GB and
it was enough although consuming system swap a lot! Just as references:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=322431 and
https://bugs.eclipse.org/bugs/show_bug.cgi?id=382674 (ERRORS)
4. Converted the project to autotools (File > New > C/C++ > Convert to a
C/C++ Autotools Project). (OK)
5. Set configure options (Properties > Autotools > Configure Settings >
Additional command-line options) (OK)
6. Configure (R-click project > reconfigure project). (ERROR)
It failed because glibc build process is as follow:
wainersm@muon:~/src> cd build/
wainersm@muon:~/src/build> /home/wainersm/src/glibc/configure
--build=powerpc64-linux --host=powerpc64-linux --prefix=/
--exec-prefix=/ --with-tls --with-__thread --enable-shared
--with-selinux=no --with-cpu=power6 --enable-add-ons=nptl
wainersm@muon:~/src/build> cd ../glibc/
wainersm@muon:~/src/glibc> make
glibc build process demands you to run in a separate directory. CDT
Autotools doesn't seems togive me the option change workdir.
You can achieve this by creating a new configuration. Use the Manage
Configurations button at the top of the Autotools Configure settings
page and create a new configuration (Just copy the default). Give it
a name and make it Active. When you build, it will use the
configuration name to create a build directory and will configure there.
In glibc build, you ought to run configure in a directory external to
the root working directory (i.e. outside of project scope). I didn't
find a way to do that.
glibc build process demands you to just run 'configure' script only. CDT
Autotools will always run "sh -c autoreconf" when reconfiguring the
project. There isn't no option to simply run 'configure'.
I can add an RFE for this, but to be fair, the autoreconf phase should
do amything unless you have an out of date generated file with respect
to its source file. Can you track down what is failing in the
autoreconf phase? Is there some input file that has been updated that
no longer generates properly? You can try touching the generated file
to keep autoreconf -i from doing anything as a work-around.
Yes, having a 'run configure only' option will make autotols plug-in
even more generic. It doesn't hurt, I guess.
7. Reconfigured manually and thus tried to build it via eclipse. It
still fails because autoreconf will always run before managed build take
over the process. (ERROR)
I could gave up of handling it as an autotools project, import as
regular makefile project, run 'configure' as a step before 'make'.
However, I'm not able to add pre/post build steps because it doesn't
have that option in build settings (if you create a cdt managed project
then you will see 'Build steps' tab available to users).
One left option is to created a custom 'Builder' and run as an external
tool. I didn't have to try it though.
I hope that helps.
Thanks,
Wainer
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev