Sunday, December 07, 2008

Wascana 1.0 in Alpha Testing

Well, that didn't take very long. I've spent a few hours building my special p2 artifact repository that manages installed files, including extracting them from an archive and deleting at uninstall time, along with it's associated p2 touchpoint that hooks it all up. It's not a lot of code and you can see it in CDT's CVS space (repo: /cvsroot/tools, module: org.eclipse.cdt/p2).

I've also created a generator that creates p2 repositories that use that touchpoint to install remote artifacts from various locations, mostly on SourceForge. Currently I only have support for the MinGW toolchain and the MSYS shell environment. I'll add libraries as I build them with the 4.2.3 compiler I'm using here. I'll start with SDL and also do wxWidgets and boost. We can always add more later.

It's working very well. Managed build picks up the mingw toolchain and uses it when you select the MinGW toolchain. MSYS doesn't work yet for Makefile projects but managed is usable now. And here's how:

  1. Unzip the Eclipse IDE for C/C++ Developers anywhere you'd like on your machine. You can also start with any other Eclipse install as long as you have the CDT installed.

  2. In Software Updates, expand out the tools/cdt/releases/ganymede site into CDT Optional Features and install the Eclipse CDT p2 Toolchain Installer feature. Allow Eclipse to restart to make sure things are initialized (I'm not sure if you really have to do this, I'm just paranoid).

  3. Go back to Software Updates and add the Wascana repo site at http://wascana.sourceforge.net/repo. Install everything under the MinGW Toolchain category. This time you don't need to restart. You don't even need to apply changes.


Once you're done, you can go to the directory containing eclipse.exe and you'll see the mingw and msys directories there, ready to go. Well at least the mingw dir is, I still need to set up msys correctly to find the mingw compilers, but it is only an alpha :).

Feel free to give it a try and let me know what you think. I'm pretty excited with how this is going. While creating this, a new version of the win32 API component came out and I added it to the repo and the Update... feature found and installed it. Very cool!

It's a very interesting path where this is going. The ability to incrementally add in libraries and update new versions of the components will be a great showcase on how p2 can manage more than just bundles. Not to mention help me build one heck of a Windows development environment based on the CDT and open source tools and libraries.

25 comments:

  1. do you have documented all the steps required to build your CDT distribution? so that users that already got eclipse and CDT can get the extra stuff or config.

    Thanks for a great job.

    ReplyDelete
  2. I thought I mentioned that. If you already have the CDT you can skip the first step. You still need the CDT p2 feature, which is brand new, and then the Wascana repo.

    ReplyDelete
  3. Is there any reason that this doesn't work when I go into debug mode?

    It doesn't print lines which contain only a single number :\

    int main() {
    cout << "hello" << endl;
    cout << 5 << endl;
    cout << "world" << endl;
    return 0;
    }

    ReplyDelete
  4. Looks like a parsing error with the MI connection to gdb. The 5 is coming out on the gdb console. Since a number is the first token in an MI message, I'll assume it thinks it's an incoming MI message.

    Weird. Feel free to raise a bug against the CDT.

    ReplyDelete
  5. Hello, I'm trying to install Wascana 1.0 alpha but I get the following error:

    An error occurred while collecting items to be installed
    Problems downloading artifact: binary,wascana.msys.core,1.0.11.20080826.
    Exception connecting to http://downloads.sourceforge.net/mingw/msysCORE-1.0.11-20080826.tar.gz.
    Connection timed out: connect
    Exception connecting to http://downloads.sourceforge.net/mingw/msysCORE-1.0.11-20080826.tar.gz.
    Connection timed out: connect

    I've tried several times but always I get the same error but with different artifact.

    Thanks for make Wascana possible.

    ReplyDelete
  6. Very cool Doug! It seems that using p2 it will be possible to create solution for binary/source packaging (similar to RPM or APT on Linux) or sort of "eclipse ports" (similar to mac ports on Mac).

    ReplyDelete
  7. Forgot to mention: the easiest way to map mingw on msys console (all path setting already exist in /etc/profile) is to copy /etc/fastab.sample to /etc/fstab changing the correct directory for /mingw mapping.

    I'll try to see how easy would be building simple bash console inside Eclipse.

    ReplyDelete
  8. Yes, I know. I want to build a general file editing, sed-like feature for the touchpoint so I can code this up in the metadata. Then I'll be able to put the install dir into the fstab.

    ReplyDelete
  9. Maybe you were updating p2 repo, but I got errors - on first try:
    like "Micael Gallego" comment,

    later try:
    An error occurred while collecting items to be installed
    No repository found containing: wascana.mingw.binutils/binary/2.18.50.20080109-2
    No repository found containing: wascana.mingw.gcc4.core/binary/4.3.2.tdm-1
    No repository found containing: wascana.mingw.gcc4.g++/binary/4.3.2.tdm-1
    No repository found containing: wascana.mingw.gdb/binary/6.8.0.4
    No repository found containing: wascana.mingw.mingwrt/binary/4.15.1
    No repository found containing: wascana.mingw.w32api/binary/3.13.0
    No repository found containing: wascana.msys.core/binary/1.0.11.20080826

    ReplyDelete
  10. I think most of the connection issues you guys are having are with sourceforge itself. The files are there and I can access them myself. But being in Canada, I'm pretty close to the servers. If you are having trouble connecting, please let me know where you are connecting from to help me confirm/disprove that theory.

    ReplyDelete
  11. I think that your theory about sourceforge might be confrimed.
    I tried to install Wascana several times in past 2hours - sometimes few parts were downloaded succesfully and fast (120kb/s per 1 download, somtimes 3 parts were downloaded simulatenously). But then I always recieve that somting is missing (random): An error occurred while collecting items to be installed
    Problems downloading artifact: binary,wascana.mingw.gcc4.g++,4.3.2.tdm-1.
    Exception connecting to http://downloads.sourceforge.net/tdm-gcc/gcc-4.3.2-tdm-1-g++.tar.gz.
    Connection timed out: connect
    Exception connecting to http://downloads.sourceforge.net/tdm-gcc/gcc-4.3.2-tdm-1-g++.tar.gz.
    Connection timed out: connect
    Problems downloading artifact: binary,wascana.mingw.mingwrt,4.15.1.
    Exception connecting to http://downloads.sourceforge.net/mingw/mingwrt-3.15.1-mingw32.tar.gz.
    Connection timed out: connect
    Exception connecting to http://downloads.sourceforge.net/mingw/mingwrt-3.15.1-mingw32.tar.gz.
    Connection timed out: connect
    ....
    ....
    ....

    Good news
    Finally I got It on my work desktop - after 20 tries or sth;)

    I installed it without any problems yesterday at late evening at home.

    It look like there are problems with server load at sourceforge - when I put in mozilla address to eg. http://downloads.sourceforge.net/mingw/mingwrt-3.15.1-mingw32.tar.gz I also got timeout:
    The server at garr.dl.sourceforge.net is taking too long to respond.

    Sorry for my bad english, I live in Poland.

    ReplyDelete
  12. I live in Spain... far from Canada.

    Can p2 retry "always" in order to solve this kind of problems?

    If p2 works always in this way, people trying to install Wascana can think that something wrong is happening and not try anymore.

    Doug... do you think that can be some workaround to this sourceforge problem? more retries maybe?

    ReplyDelete
  13. Thanks, that's good information. I'll see what I can do for time outs. However this is fully under control of p2 itself which I can not change.

    ReplyDelete
  14. I'm getting an error when trying to install Wascana. I downloaded the Eclipse IDE for JAVA developers version and installed CDT stuff using Software Updates menu . After installing CDT, I added the Wascana repo information and attempted to install everything in the repo.

    Here's the error:
    An error occurred while collecting items to be installed
    The required Touchpoint: org.eclipse.cdt.p2.internal.touchpoint.SDKTouchpoint 1.0.0 touchpoint was not found

    ReplyDelete
  15. James, you skipped over the second step, which installs the touchpoint.

    ReplyDelete
  16. Yeah I discovered the Manage Sites button about 5 minutes after I posted the comment. Sorry to have bothered.

    ReplyDelete
  17. I've tried this a couple of times without success. First I tried adding CDT to an existing install. When that failed I started with a fresh version of eclipse (Step 1), then installed CDT.

    The CDT P2 toolchain installer is there (5.0.0.200812181648) but I get

    Cannot complete the request. See the details.
    Unsatisfied dependency: [org.eclipse.equinox.p2.user.ui.feature.group 1.0.0.v20080516-7d--ETu637E5se-QIGiA] requiredCapability: org.eclipse.equinox.p2.iu/org.eclipse.equinox.p2.engine/[1.0.0.v20080522-1735,1.0.0.v20080522-1735]
    Unsatisfied dependency: [org.eclipse.equinox.p2.user.ui.feature.group 1.0.0.v20080516-7d--ETu637E5se-QIGiA] requiredCapability: org.eclipse.equinox.p2.iu/org.eclipse.equinox.p2.artifact.repository/[1.0.0.v20080609-0850,1.0.0.v20080609-0850]
    Unsatisfied dependency: [org.eclipse.platform.ide 3.4.0.I20080617-2000] requiredCapability: org.eclipse.equinox.p2.iu/org.eclipse.equinox.p2.user.ui.feature.group/[1.0.0.v20080516-7d--ETu637E5se-QIGiA,1.0.0.v20080516-7d--ETu637E5se-QIGiA]
    Unsatisfied dependency: [org.eclipse.platform.feature.group 3.4.0.v20080610-9I96EhtEm-T_5LxIsybz-3MdGZmOA3uwv7Ka_M] requiredCapability: org.eclipse.equinox.p2.iu/org.eclipse.equinox.p2.user.ui.feature.group/[1.0.0.v20080516-7d--ETu637E5se-QIGiA,1.0.0.v20080516-7d--ETu637E5se-QIGiA]

    I hunted around for other P2 stuff in eclipse but I can't get past dependencies there.

    Are the updated bundles local to just one version of eclipse, or do I have to remove a folder in my home directory to get back to a pristine Eclipse?

    darrell

    ReplyDelete
  18. Since it's complaining about platform things, are you running 3.4.1 of the platform?

    ReplyDelete
  19. hi, now i try to understand the behavior of dlls. how i make a dll in wascana or msys?

    Eclipse C/C++ Development Tools
    Version: 4.0.3.200802251018
    Build id: 200802251018

    Eclipse Platform
    Version: 3.3.3.r33x_r20080129-_19UEl7Ezk_gXF1kouft
    Build id: M20080221-1800

    thank you!

    ReplyDelete
  20. Hey! I'm trying to compile dlls as well! :)

    Hey Doug, I've read a lot on how you somehow managed to use MSVC compiler with eclipse cdt ans wascana. The thing is that I'm using 3DVia VirTools and wanted to develop som libraries from eclipse, it's like the matlab way of compiling your plugins http://ngoonee.xanga.com/664222870/compiling-mexw32-mex-for-windows-files-using-eclipse-cdt-ide-mingw-gcc-compiler/ . But I keep getting weird errors. Any help would be appreciated.

    ReplyDelete
  21. is "rub salt in the wound" when i speek abuot the dll?
    why nobody answer?

    i go to install vc++

    ReplyDelete
  22. Hi Doug,
    First, thanks for this good job.
    When you announced this new way of installing the Wascana (with p2 tool-chain installer) I tried that and it worked flawlessly.
    Today (05/07/2009) I tried to install it again (on top of a new 3.4.2 CDT for Windows) and I got a weird error message after downloading Wascana tgz packages:

    An error occurred while installing the items
    No action found for: untar.
    No action found for: untar.

    Any idea? What is missing?
    Thanks, Peter.

    ReplyDelete
  23. Hi Peter, you've caught me in the middle of setting up the next release of Wascana. There have been some metadata changes and you will need to install a new version of the cdt p2 plugin. It'll be ready by the end of the week.

    BTW, please post to the Wascana forums so we can share the answers with everyone.

    ReplyDelete
  24. Hi Doug, I expected something similar. OK, next time I'll post to the forums.
    Thanks, Peter.

    ReplyDelete
  25. Hello Doug,
    I tried to post this in the wascana forum, but I cant log in, sorry.
    I'm having the same problem of Peter, above.
    Today is may/26/2009.
    Is it still the same issue of setting up the next release? Or is there anything else?
    Thank you
    ps. BTW is a pity you have to stop the project, I still prefer Eclipse rather than VC express ;)

    ReplyDelete