You are not logged in.

#1 2007-03-18 14:47:21

Eóin
Administrator
From: Ireland
Registered: 2006-08-08
Posts: 473
Website

Actually how to compile Halite

Ok this is a continuation of Almost how to compile Halite... and you will have needed to follow that guide up to at least step 7.

Having done that much you are set for a very easy next few steps. First get yourself this package. It contains the latest WTL and libtorrent 12rc. The new Jamroot should be copied over the previous one. The only modifications to libtorrent were to the Jamfile and a file storage.cpp. The Jamfile modification is very minor, the storage.cpp changes were necessarily for libtorrent to work with the change to boost.filesystem in 1.34rc. I have no doubt Arvid will incorporate these changes himself soon.

Also included is the latest Halite source code. This is much improved from the one still on sourceforge. In fact I would recommend anyone wanting to compile Hailte to always use the most up to date SVN copy at

Code:

svn.geekisp.com/halite

Now cd'ing into the halite directory and issueing

Code:

..\BBv2.bat debug threading=multi

should (finger-crossed) work. If it doesn't start complaining to me and I'll endeavour to help smile .

Eoin.

Offline

 

#2 2007-03-19 06:54:16

Sparkster
Member
Registered: 2007-03-12
Posts: 15
Website

Re: Actually how to compile Halite

Excellent ill give this another shot tonight, please can you check the package link as is not working for me.

Thanks in advance

Offline

 

#3 2007-03-19 09:04:15

Eóin
Administrator
From: Ireland
Registered: 2006-08-08
Posts: 473
Website

Re: Actually how to compile Halite

Missed that, had "htpp" for the URL.

Offline

 

#4 2007-03-19 17:31:12

Sparkster
Member
Registered: 2007-03-12
Posts: 15
Website

Re: Actually how to compile Halite

Ive done every thing as directed in both part and now im getting the below error along with others at the begining of the batch then at the end it appears that all has gone well with the creation of a bin file but you get the error below about the exe being skipped.

The error all appear to be related to wtl, the rest of the compile run ok until Halite requests access to this wtl file.




compile-c-c++ bin\msvc-8.0\debug\threading-multi\wtl_app.obj
wtl_app.cpp
c:\development\wtl\include\atluser.h(844) : error C2061: syntax error : identifi
er 'PICONINFOEX'
        c:\development\wtl\include\atluser.h(898) : see reference to class templ
ate instantiation 'WTL::CIconT<t_bManaged>' being compiled

    call "C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat" x86 >nul
cl /Zm800 -nologo @"bin\msvc-8.0\debug\threading-multi\wtl_app.obj.rsp"

...failed compile-c-c++ bin\msvc-8.0\debug\threading-multi\wtl_app.obj...
compile-c-c++ bin\msvc-8.0\debug\threading-multi\Halite.obj

C:\development\wtl\include\atldlgs.h(647) : error C2653: 'IFileDialogEvents' : i
s not a class or namespace name
C:\development\wtl\include\atldlgs.h(647) : error C2061: syntax error : identifi
er 'IFileDialog'
C:\development\wtl\include\atldlgs.h(655) : error C2653: 'IFileDialogEvents' : i
s not a class or namespace name
C:\development\wtl\include\atldlgs.h(655) : error C2061: syntax error : identifi
er 'IFileDialog'
C:\development\wtl\include\atldlgs.h(663) : error C2653: 'IFileDialogEvents' : i
s not a class or namespace name
C:\development\wtl\include\atldlgs.h(663) : error C2061: syntax error : identifi
er 'IFileDialog'
C:\development\wtl\include\atldlgs.h(671) : error C2653: 'IFileDialogEvents' : i
s not a class or namespace name
C:\development\wtl\include\atldlgs.h(671) : error C2061: syntax error : identifi
er 'IFileDialog'
C:\development\wtl\include\atldlgs.h(679) : error C2653: 'IFileDialogEvents' : i
s not a class or namespace name
C:\development\wtl\include\atldlgs.h(679) : error C2061: syntax error : identifi
er 'IFileDialog'
C:\development\wtl\include\atldlgs.h(687) : error C2653: 'IFileDialogEvents' : i
s not a class or namespace name
C:\development\wtl\include\atldlgs.h(687) : error C2061: syntax error : identifi
er 'IFileDialog'
C:\development\wtl\include\atldlgs.h(695) : error C2653: 'IFileDialogEvents' : i
s not a class or namespace name
C:\development\wtl\include\atldlgs.h(695) : error C2061: syntax error : identifi
er 'IFileDialog'
C:\development\wtl\include\atldlgs.h(705) : error C2535: 'HRESULT WTL::CShellFil
eDialogImpl<T>::OnFileOk(void)' : member function already defined or declared


...skipped <pbin\msvc-8.0\debug\threading-multi>Halite.exe for lack of <pbin\msv
c-8.0\debug\threading-multi>wtl_app.obj...

...failed updating 17 targets...
...skipped 1 target...
...updated 50 targets...

Any ideas on what is wrong ?


Thanks in advance.

Mark

Last edited by Sparkster (2007-03-19 17:33:18)

Offline

 

#5 2007-03-21 09:02:48

Eóin
Administrator
From: Ireland
Registered: 2006-08-08
Posts: 473
Website

Re: Actually how to compile Halite

Hi Sparkster, was very busy yesterday, I'll try and look into this properly this evening smile .

Offline

 

#6 2007-03-21 14:20:35

Sparkster
Member
Registered: 2007-03-12
Posts: 15
Website

Re: Actually how to compile Halite

Excellent, thank you.

Im on Windows XP using the VS 2005 compiler.

Offline

 

#7 2007-03-21 14:45:02

Eóin
Administrator
From: Ireland
Registered: 2006-08-08
Posts: 473
Website

Re: Actually how to compile Halite

Right, the problem was actually a change I'd made to support the new Vista SDK. Fixing should be rather simple.

You need to open the file "Hailte\src\stdAfx.hpp" and change defines on lines 4 & 5 from 0x0600 to 0x0500. Do basicially the same to line 106 of "libtorrent\Jamfile" and lines 4 & 5 of "Halite\src\globals\wtl_app.cpp".

The number 0x0500 refeers to Win2k while 0x0600 is WinXP, I'd made the change to XP when I was testing the Vista SDK. The annoying this is that building this way won't support 2k anyway. You seem to need a file shlwapi.h with emulates some crucial but missing functionality in the winsock dll shipped with 2k, the freely availible SDKs from Microsoft don't seem to include this sad .

P.S. When you say the VS 2005 compiler do you mean the full one? Then you would be able to do Win2k supporting builds. Ideally I like to do some conditional compilation hackery so that these changes won't need to be made manually.

Offline

 

#8 2007-03-21 15:23:17

Sparkster
Member
Registered: 2007-03-12
Posts: 15
Website

Re: Actually how to compile Halite

I did mean the full vs suite compiler.

Excellent that worked a charm, i have now successfully compiled Halite using the Jamfile method.

Next step is to get it working in VS but no hurry for that.

Thank you for your help.

Last edited by Sparkster (2007-03-21 16:50:36)

Offline

 

#9 2007-03-21 17:44:39

Eóin
Administrator
From: Ireland
Registered: 2006-08-08
Posts: 473
Website

Re: Actually how to compile Halite

Well thank you for running through my instructions and pointing out the mistakes. I'm thinking of setting up a dokuwiki, when I do it would be a nice place to write up guides like this one.

Anyway in the mean time have fun playing with the source.

Offline

 

#10 2007-03-23 05:59:01

Sparkster
Member
Registered: 2007-03-12
Posts: 15
Website

Re: Actually how to compile Halite

Thank you i will.

Just one more thing i do get the following warning during compile since i changed the 0600 to 0500.

c:\development\halite\src\stdAfx.hpp(5) : warning C4005: '_WIN32_WINNT' : macro
redefinition
        command-line arguments : see previous definition of '_WIN32_WINNT'

It does appear to be anything major as its just a warning but any quick ideas on how to iron out the warnings?

No issues if you cant.

Thanks again for all your help.

Offline

 

#11 2007-07-27 10:33:53

Eóin
Administrator
From: Ireland
Registered: 2006-08-08
Posts: 473
Website

Re: Actually how to compile Halite

Hi just want to mention an update to the source bundle which makes it easier to compile Halite. It now includes the latest libtorrent and so supports protocol encryption. As such I have added openssl to the bundle and include some binaries compiled with VS 2005. All you should need to add to this is boost v 1.34.

The halite code though is 'in-between' releases, so you might find the latest snapshot code as hosted by sourceforge more useful. I'm working hard to get the next snapshot out the door.

http://www.binarynotions.com/halite/Halite.cpp.7z

Offline

 

#12 2007-07-27 12:14:08

nicolade
New member
Registered: 2007-07-26
Posts: 8

Re: Actually how to compile Halite

Hi Eóin,

7-Zip shows me it ain't a valid 7zip archive.
Could you try to upload it again? I can't unpack it.

Thanks for your help.

Last edited by nicolade (2007-07-27 18:30:19)

Offline

 

#13 2007-07-27 19:30:43

twizttid13
Member
Registered: 2007-04-18
Posts: 13

Re: Actually how to compile Halite

That makes two people. I tried opening with WinRar and it says its corrupt. Not that I would do anything with the source anyways because thats beyond my knowledge, was just checking though.

Offline

 

#14 2007-07-30 11:05:38

nicolade
New member
Registered: 2007-07-26
Posts: 8

Re: Actually how to compile Halite

One more question Eoin :>

What did you change in libtorrent in order to get it to work with halite?

Last edited by nicolade (2007-07-30 11:07:52)

Offline

 

#15 2007-07-30 16:01:30

Eóin
Administrator
From: Ireland
Registered: 2006-08-08
Posts: 473
Website

Re: Actually how to compile Halite

Sorry about the archive guys, didn't check think to check it. As it happens the file should be over 5mb while the corrupted one was about 1.5mb. It should work properly now.

nicolade, currently there are actually no changes needed to libtorrent source. In the past I had to fix a unicode problem which only showed up under windows but that is no longer necessary.

What I do still continue to change however is the Jamfile. Basicially I hardset all the feature options. This means you don't get overly nested 'bin' directories which won't fit Windows hardcode MAX_PATH of 160. For simplicity I name my Jamfile with the v2 extension and delete the original together with the projectroot file.

Offline

 

#16 2007-07-31 10:31:18

DuelMonster
Member
Registered: 2007-07-19
Posts: 17

Re: Actually how to compile Halite

I got the following error when trying to compile revision 242:

error: Attempt to redeclare already existing project id

any ideas?

Offline

 

#17 2007-08-01 18:04:07

nicolade
New member
Registered: 2007-07-26
Posts: 8

Re: Actually how to compile Halite

It's compiled without any errors, it starts without any errors. I can add torrent as well.But when the first peer connecting to me, halite is crashing every time.
"vector subscript out of range"


I tried to debug via Visual Studio 2005,here are the corresponding screenshots:
-removed -

Last edited by nicolade (2007-08-02 17:57:22)

Offline

 

#18 2007-08-01 18:53:31

Eóin
Administrator
From: Ireland
Registered: 2006-08-08
Posts: 473
Website

Re: Actually how to compile Halite

DuelMonster- There must be a conflict in the Jamfiles. You'll need to check the 'use-project' lines. Probably the libtorrent Jamfile.v2 is at fault but it is tricky to debug these things because bjam doesn't always give enough diagnostic messages.

nicolade- The screenshots you posted would indicate that an assertion with checked iterators is failing. Unfortunatly this appears to be occurring very much in the heart of the libtorrent library. What version are you using? If you got it from SVN you may have just been unlucky to get bugged snapshot.

Offline

 

#19 2007-08-01 19:30:20

nicolade
New member
Registered: 2007-07-26
Posts: 8

Re: Actually how to compile Halite

I used that package what you posted above.
http://www.binarynotions.com/halite/Halite.cpp.7z

I really don't know what should I do sad

Offline

 

#20 2007-08-02 05:58:11

Eóin
Administrator
From: Ireland
Registered: 2006-08-08
Posts: 473
Website

Re: Actually how to compile Halite

Does this happen for the Halite source in both the package posted and also the latest snapshot on sourceforge? My first guess would be conflicting runtimes but bjam shouldn't allow that to happen. Are you getting any link warnings?

If you can't figure it out then email me the debug build and I'll take a look. You'll need to include the .pdb file file too which is massive, but 7z does a very good job compressing it.

Offline

 

#21 2007-08-02 06:46:55

nicolade
New member
Registered: 2007-07-26
Posts: 8

Re: Actually how to compile Halite

I just tried with that version of Halite what you included in the package.
Ok, I got rev 243 via svn, I'll try to compile it, and I'll post here the results.

Thanks for your help Eoin!


edit: I get same error with revision 243.
edit2: Now I',trying to compile with Halite rev 217 from SF.net.
edit3: same error with rev 217

Ok, I'll send you the debug build to eoin@binarynotions.com

Last edited by nicolade (2007-08-02 08:56:15)

Offline

 

#22 2007-08-02 09:22:21

nicolade
New member
Registered: 2007-07-26
Posts: 8

Re: Actually how to compile Halite

It seems I can't email it to you, so I can give you this:

-removed-

Last edited by nicolade (2007-08-02 17:57:38)

Offline

 

#23 2007-08-02 11:03:14

Eóin
Administrator
From: Ireland
Registered: 2006-08-08
Posts: 473
Website

Re: Actually how to compile Halite

Hi nicolade, I received your email correctly. Bad news, I have no idea what the problem could be. I did an identical compile (same sources) but got a slightly different exe. Are you compiling with VS 2005? Do you have Sp1 installed?

Offline

 

#24 2007-08-02 12:14:09

nicolade
New member
Registered: 2007-07-26
Posts: 8

Re: Actually how to compile Halite

Yes, I have Visual Studio 2005 +sp1 + platform SDK installed.

BTW, I downloaded libtorrent rev 1425, seems Arvid fixed few vector related things,and now Halite runs fine with this revision of Libtorrent:)

Offline

 

#25 2007-08-02 12:51:13

Eóin
Administrator
From: Ireland
Registered: 2006-08-08
Posts: 473
Website

Re: Actually how to compile Halite

That's excellent news, I'll have to update to that revision myself. Hope you can follow my code, if you've any questions just fire away. And if you are new to WTL I'd recommend checking out codeproject for some introductions. It has little or no documentation itself as you may have gathered.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2008 PunBB