Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Getting started with CDT dev

> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx 
> [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Chris Stankevitz
> Sent: Wednesday, October 17, 2012 3:04 PM
> To: CDT General developers list.
> Subject: Re: [cdt-dev] Getting started with CDT dev
> 
> On Wed, Oct 17, 2012 at 10:30 AM, Marc Khouzam
> <marc.khouzam@xxxxxxxxxxxx> wrote:
> > If the info is not documented, then it is very fair to ask about it.
> 
> Marc,
> 
> Thank you for your help.  I started to keep a log of my problems and
> their resolutions (see below if you are interested).  

Thank you.
I think we should make the CDT wiki non version-specific.
I think going to update the wiki at every release to change versions
is not going to happen.  Unless someone objects, we should instead
use "latest CDT" and "latest platform".

How about your first step into CDT conributions to be wiki changes?
If you are ok with it, you can make those modifications yourself.

> Currently item
> (D) below is unresolved so perhaps you can help me with that.  Here is
> the short version:
> 
> I'm supposed to install PDE/API/TED from
> http://download.eclipse.org/eclipse/updates/3.8milestones.
> Unfortunately, Eclipse does not want to install any software from that
> URL.

It is now: http://download.eclipse.org/eclipse/updates/3.8
or probably also http://download.eclipse.org/eclipse/updates/4.2

although I've never had to use those sites manually.  Everything
is automatically installed when installing the platform.
The only missing thing is Egit.

> 
> Thank you,
> 
> Chris
> 
> ===
> 
> A. Installing the CDT
> http://wiki.eclipse.org/Getting_started_with_CDT_development#E
> clipse_Setup
> "Install CDT on top on eclipse or install a separate copy of CDT 8.0".
>  I assume this means CDT 8.1.

Yes.  Let's use:
"... of the latest CDT".

> http://wiki.eclipse.org/CDT/policy#Using_API_Tooling
> "Download the official CDT release ... Choose the CDT zip file you
> just downloaded".  I'm confused that I'm offered only two download
> options.
> 
> 1) The first is called "p2 software repository:
> http://download.eclipse.org/tools/cdt/releases/juno";.  The URL is
> invalid from a web browser and I suspect this link is used by
> Eclipse's internal "app store" to install CDT.  Presumably this is not
> what I am to use as I am supposed to "download".

You are right.

> 2) The second link is called "Archived p2 repos:
> cdt-master-8.1.0.zip".  This seems odd due to the word "archived"
> which makes me think it is old.  Also weird is that it offers a .zip
> file yet I'm using linux where .tar.gz is customary.  I'm going to try
> to use this one.

Right again.  zip is ok on Linux although less popular.  Use the 'unzip'
command.

> Resolution: (2) worked fine.  I suspect option (1) would have worked
> fine using the "app store" which I think is called "p2" in
> eclipse-speak.

Thinking about it, I think we should reword the wiki to indicate
that CDT should be installed from an update site.  I think we are
moving away from those zip files.

> B. Creating a baseline
> 
> I don't know what a "baseline" is.  I assume it is a way for Eclipse
> to look at the plugins it currently has installed, retrieve the source
> code for them, and present the source code to me to edit.  Seems
> far-fetched, but if true that would be pretty powerful.

Not quite.
When you start making changes to CDT code you have to be careful not
to break some APIs.  The APO Tooling is a tool that will show you
errors in your build if you illegally modified such APIs.  To achieve
that, the tool needs to know what is the 'baseline' for the APIs.
So in Window->Preferences->Plug-in Development->API Baselines
you tell eclipse what is the code it should use as a reference
for the APIs.  Any changes will be compared to that baseline.

For the actual CDT code you will modify, you'll need to get the
git repository:
http://wiki.eclipse.org/CDT/git

> The last section of
> http://wiki.eclipse.org/CDT/policy#Using_API_Tooling says "Once this
> is done, a full build will be triggered."  Unfortunately for me "once
> this is done" I did not notice a build.  

You probably don't have any code 'checked-out', so there is nothing
to build.  Follow the git wiki above to get the code.

> Also I do not understand this instruction: "you can set it to its own
> installation if it has CDT in it".

> Update: Setting a baseline does not retrieve source.  I will use GIT
> to do this.  So I'm confused about how creating a baseline could
> possibly have caused a build to start.  Hopefully after I 'git
> checkout' the source the build will at that time "just start".

I see you are ahead of me :)
The wiki made the assumption that people already had the code checked
out when setting the baseline, which is why the build would normally
be triggered.

> C. Egit
> 
> naturally, I have no idea what Egit is.  I'm a little concerned about
> "you can get it from Indigo update site" since I am not using indigo.
> I'm going to assume this means "you can get it from the eclipse p2
> software installer app store".

The latest update site is called 'juno' and should be part
of your default eclipse installation.

> Resolution: Egit is a git frontend.  Just install it following the
> egit instructions for whatever version of eclipse you have.
> 
> D. PDE/API TED
> 
> "Install PDE/API Tools Environment Descriptions from update site
> http://download.eclipse.org/eclipse/updates/3.8milestones (see Bug
> 361660)".  Bug 361660 is resolved/fixed, so I wonder if I still need
> to do this.  Naturally, I have no idea what is a PDT/API/TED.  I'm
> going to try to skip this step.
> 
> Update: I am seeing bug 361660 errors so looks like I need this.
> 
> Update: "http://download.eclipse.org/eclipse/updates/3.8milestones";
> reports errors like "could not find" and "this repo is currently
> unavailable".  I'm stuck.

See my comment above.

> E. Cloning the git repo
> "Cut & Paste following url in the first page of wizard for cloning".
> I'm not sure what is "wizard for cloning".  I elected to instead use
> File | Import | Git.

Git is a Distributed Versioning System.  You will 'clone' a repository
and get the entire CDT code with all its history on your machine.
After that, no need to be connected to the network to do some work.
Eventually, you'll want your work to be 'pushed' back to the
main CDT repository, but we'll cross that bridge when we get there.

Once you have cloned the CDT repo you need to import the projects
you want to work on.  At this point might as well import all
CDT projects.  You'll get a couple more than you need but it is
the simplest way to go.  Some committers do this also.

A trick that I use is that I do _not_ install CDT on the eclipse
I will work on CDT in.  That way, the only CDT that will run when
I test is the projects I have imported.
If you do install CDT, then you don't have to import all projects
because the compiler will use the installation for anything
that is missing.  But then you don't have the latest code for
you compilation.  So, it is safer not to install CDT for your
development env.

> Update: this seems to be fine.  I'm a little overwhelmed about the
> projects I can import.  Partially because there are so many.  But
> mostly because I'm not sure why there is not just one "CDT" project.
> I don't know which ones to specify.  Since the bug I want to fix is
> related to the indexer I'm hoping I will find an "indexer" project.
> 
> Update: I saw nothing with "indexer" in the name.  I selected only the
> project called "org.eclipse.cdt.core"
> 
> Update: I'm happy to see that a build started!  And I see source code!
> 
> Update: I do not see an "indexer" component.  I'll have to 
> dig more for that.
> 
> Update: I see a build error related to PDE/API TED

I hope this helps.

Marc

Back to the top