Compiling dcplusplus/client v0.401 fails under Linux

Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.

Moderator: Moderators

Locked
Lucretia
Posts: 6
Joined: 2004-03-28 09:50

Compiling dcplusplus/client v0.401 fails under Linux

Post by Lucretia » 2004-03-28 09:57

Hi,

I thought i'd at least try to compile the client to see if it worked, unforunately, I don't think the source has been kept up to date for other platforms, g++ ends up quitting with an internal error on a number of files, I've had a look, but I can't see anything obvious. Is somebody likely to update the files?

Here's my makefile:

Code: Select all

CXX			=	g++
CXXFLAGS	=	-c -ggdb -Wall
AR			=	ar
ARFLAGS		=	rcs

TARGET		=	libdc++.a

OBJS		=	ADLSearch.o \
				BZUtils.o \
				BufferedSocket.o \
				Client.o \
				ClientManager.o \
				ConnectionManager.o \
				CryptoManager.o \
				DCPlusPlus.o \
				DirectoryListing.o \
				DownloadManager.o \
				Encoder.o \
				Exception.o \
				FinishedManager.o \
				HashManager.o \
				HttpConnection.o \
				HubManager.o \
				LogManager.o \
				QueueManager.o \
				ResourceManager.o \
				SFVReader.o \
				SearchManager.o \
				ServerSocket.o \
				SettingsManager.o \
				ShareManager.o \
				SimpleXML.o \
				Socket.o \
				StringDefs.o \
				StringTokenizer.o \
				Thread.o \
				TigerHash.o \
				TimerManager.o \
				UploadManager.o \
				User.o \
				UserConnection.o \
				Util.o \
				ZUtils.o \
				stdinc.o

all: $(TARGET)

$(TARGET): $(OBJS)
	$(AR) $(ARFLAGS) $(TARGET) $(OBJS)
	
.cpp.o:
	$(CXX) $(CXXFLAGS) -o $@ $<

.PHONY: clean
	
clean:
	$(RM) *.o *~ $(TARGET)
Inside the ShareManager.cpp it fails whils trying to add files to the File::Set, from what I can tell it's due to the change in the template, as it takes size, root, etc. and the non-win32 version doesn't match properly.

Anyway.

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2004-03-28 10:24

The dc++ code isn't directly compileable(does this word exist?) under linux as it uses some os dependant functions and most of them isn't ported to anything what I know.

TheParanoidOne
Forum Moderator
Posts: 1420
Joined: 2003-04-22 14:37

Post by TheParanoidOne » 2004-03-28 10:43

There was a certain point though, when it *did* compile cleanly and I think one of arne's goals was to keep the client section platform independent (or at least easily portable).
The world is coming to an end. Please log off.

DC++ Guide | Words

Lucretia
Posts: 6
Joined: 2004-03-28 09:50

Post by Lucretia » 2004-03-28 10:46

joakim_tosteberg wrote:The dc++ code isn't directly compileable(does this word exist?) under linux as it uses some os dependant functions and most of them isn't ported to anything what I know.
Well, I've looked at the source and it uses pthreads for Semaphore.h, CriticalSection.h, Thread.[h|cpp] for non-win32 stuff.

It also uses sockets, which are cross platform.

The rest of it seems to be pretty much cross platform.

So...it just doesn't pass through g++ cleanly because a) there is a "#warning FIXME" in Thread.h and some of the files cause compiler errors, which is probably down to the heavy use of templates. BTW, how ANSI is the stlport code?

Thanks.

Lucretia
Posts: 6
Joined: 2004-03-28 09:50

Why didn't he use wxWidgets?

Post by Lucretia » 2004-03-28 11:00

He's already gone as far as producing a cross platform client lib, why not go the whoe hog and produce a version with wxWidgets instead of WTL?

Strange.

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-03-28 12:57

There's already one group I know of that's porting DC++ to linux. I believe they're mentioned in this thread:
http://dcplusplus.sourceforge.net/forum ... php?t=1585

There's also an OSX port being attempted:
http://sourceforge.net/projects/macdcpp/

If you want to help with the linux port, I can forward your email address along to the person in charge.

Lucretia
Posts: 6
Joined: 2004-03-28 09:50

Post by Lucretia » 2004-03-28 13:12

GargoyleMT wrote:There's already one group I know of that's porting DC++ to linux. I believe they're mentioned in this thread:
http://dcplusplus.sourceforge.net/forum ... php?t=1585
Yeah, I read this earlier on, but I couldn't find any link to their stuff anywhere on the net.

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-03-28 15:20

Lucretia wrote:Yeah, I read this earlier on, but I couldn't find any link to their stuff anywhere on the net.
It's not downloadable anywhere, to ensure only serious people offer their help.

Lucretia
Posts: 6
Joined: 2004-03-28 09:50

Post by Lucretia » 2004-03-28 15:32

GargoyleMT wrote:
Lucretia wrote:Yeah, I read this earlier on, but I couldn't find any link to their stuff anywhere on the net.
It's not downloadable anywhere, to ensure only serious people offer their help.
Fair enough, but it would be nice to be able to monitor the progress. Are you sure it's not dead?

Also, is it going to be wxWidgets or Qt?

Thanks.

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-03-28 15:48

Lucretia wrote:Fair enough, but it would be nice to be able to monitor the progress. Are you sure it's not dead?
No, I'm not sure it's not dead. I only make contact with the programmer occasionally, since he's also doing this on his free time, and I try not to appear too greedy or demanding, though I would also like DC++ to be multiplatform.
Lucretia wrote:Also, is it going to be wxWidgets or Qt?
It's using neither - GTK.

TheParanoidOne
Forum Moderator
Posts: 1420
Joined: 2003-04-22 14:37

Post by TheParanoidOne » 2004-03-28 16:02

GargoyleMT wrote:
Lucretia wrote:Also, is it going to be wxWidgets or Qt?
It's using neither - GTK.
There a folder in the project webspace with some GTK style DC++(ish) screenshots. Are they from this?
The world is coming to an end. Please log off.

DC++ Guide | Words

Lucretia
Posts: 6
Joined: 2004-03-28 09:50

Post by Lucretia » 2004-03-28 16:43

TheParanoidOne wrote:
GargoyleMT wrote:
Lucretia wrote:Also, is it going to be wxWidgets or Qt?
It's using neither - GTK.
There a folder in the project webspace with some GTK style DC++(ish) screenshots. Are they from this?
Well, they don't appear to be in the main source archive.

TheParanoidOne
Forum Moderator
Posts: 1420
Joined: 2003-04-22 14:37

Post by TheParanoidOne » 2004-03-28 17:13

They're not. They're somehwere in the project workspace. I think in a section only accessible to the developers.
The world is coming to an end. Please log off.

DC++ Guide | Words

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-03-30 22:17

TheParanoidOne wrote:They're not. They're somewhere in the project workspace. I think in a section only accessible to the developers.
Hmm, I poked around a bit, and couldn't find anything. Perhaps, though.

TheParanoidOne
Forum Moderator
Posts: 1420
Joined: 2003-04-22 14:37

Post by TheParanoidOne » 2004-03-31 05:27

Strange. It seems they have been deleted. I'll check on my computer to see if I still have them.
The world is coming to an end. Please log off.

DC++ Guide | Words

arnetheduck
The Creator Himself
Posts: 296
Joined: 2003-01-02 17:15

Post by arnetheduck » 2004-03-31 06:52


Sarge
Posts: 7
Joined: 2004-05-22 09:36

Post by Sarge » 2004-05-23 05:51

Anyone following this thread?

I really think is time to take action to continue implementing the gtk part of dc++ so
linux users (and other os:s) can use dc++ on their comps. I've been trying out other
dc clients but frankly, IMHO, they suck.

Could the persons that worked on the gtk port please make the code available, even if
its incomplete? As a patch or better in the cvs. This also goes for make support (automake/autoconf).

Making this code availble would enable other people like myself to contribute code and
to test it.

paskharen
Posts: 29
Joined: 2004-01-27 14:32

Post by paskharen » 2004-06-04 11:06

I have some code if you desperately what it. There are some issues with the client code, apart from the gcc bug arne mentioned however that make it non trivial to port. The ServerSocet class uses some kind of windows api trick that calls a function (ServerSocket::incoming) every time a connection is made to the socket. So there is no need for a blocking call to accept, as one would typically do in unix. (and windows) Thus, in my client you can connect to other hubs, chat, search etc but you can never download anything because connections back to you from the other clients are never accepted.

There is however a better client made by a guy called unixman. Mine has a very hackish interface that I was going to polish when everything was working, while his has a very polished ui alredy. We were talking about merging and starting a serious porting project with some other guys a couple of moths ago but I haven't heard from anyone in a long time... So my advice is perhaps that you try to contact him instead.

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-06-04 12:07

paskharen wrote:I have some code if you desperately what it. There are some issues with the client code, apart from the gcc bug arne mentioned however that make it non trivial to port. The ServerSocet class uses some kind of windows api trick that calls a function (ServerSocket::incoming) every time a connection is made to the socket.
Nice. Even if the whole client doesn't compile/work (i.e. only your changes to client), I think arne would include your changes in the official client...

I plan on checking the OSX port for similar changes that will benefit everyone.

Naga
Posts: 45
Joined: 2003-12-02 11:24
Location: Sweden

Post by Naga » 2004-06-04 13:53

How about adding a dir to the CVS where the Linux UI code would reside? If so perhaps more users would help (I know I would try to).
Thanks to all open source programmers!
They enable the rest of us to learn a lot!

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-06-04 14:49

Naga wrote:How about adding a dir to the CVS where the Linux UI code would reside? If so perhaps more users would help (I know I would try to).
If Unixman contributes his source, that's a good suggestion - the windows gui code already lives in a subdirectory. The same could be done for the OSX code as well.

But the point was just that anything to get client compiling under linux is a good improvement :)

Sarge
Posts: 7
Joined: 2004-05-22 09:36

Post by Sarge » 2004-06-11 12:51

Please try to submit the patches to arne so he can include them in the cvs or/and make them public somewhere.
The client lib should be made os independent (i.e., do not use unstandard features from windoze).

Target system / gui stuff goes into subdirs.

Example:

client/ - Generic os independent protocol code
windows/ - MFC windows gui code
osx/ - Mac OSX port
gtk/ - GTK (linux and other *nix systems) gui code

Different build system(s) needs to reside somewhere too without cross contamination.
- automake/autoconf for most systems
- devstudio proj files for windows
- whatever is used for OSX programs

numb
Posts: 1
Joined: 2004-07-17 07:41

Post by numb » 2004-07-17 07:53

Hi all, I'm interested in helping out with the Linux port. Is there any work done yet? Who should I contact?

icey
Posts: 6
Joined: 2004-08-16 02:15

Post by icey » 2004-08-18 23:59

if you look at this thread http://dcplusplus.sourceforge.net/forum ... 5&start=50
You will see i am about 80% finished in a port over to a linux 2.6 kernel. :D

gifu
Posts: 5
Joined: 2004-01-14 05:57

Post by gifu » 2004-08-19 10:56

Additional Comment #8 From Mark Mitchell 2004-03-30 23:52
Fixed in GCC 3.4 and GCC 3.5.

Additional Comment #12 From Gabriel Dos Reis 2004-05-01 20:31
Fixed in 3.3.4 too.

clev
Posts: 21
Joined: 2004-07-05 19:15

Post by clev » 2004-08-19 13:04

Sarge>
windows/ - win32api
GTK++ could cover all crossplatforming(win32,linux x,macos x), so currently it is specially developed only for win32api by arnet

paskharen
Posts: 29
Joined: 2004-01-27 14:32

Post by paskharen » 2004-08-19 18:04

icey wrote:if you look at this thread You will see i am about 80% finished in a port over to a linux 2.6 kernel. :D
Cool! Have you made any progress with the client code? Or, to put it differently, have you made any changes to client/ServerSocket (the stuff I was rambling about above :D ) I'd love to see your work if you have, I kind of quit when I hit that one (plus I discovered bittorrent...)

icey
Posts: 6
Joined: 2004-08-16 02:15

Post by icey » 2004-08-19 23:34

yes the client code is all finished and working , i had a few issues with the hash table but i have sorted them out now , I am working on the gui for everything at the moment , the sockets and everything are the same but i have added one feature in that is your download fails or the person you have connected to leaves for whatever reason it will latch onto somebody else that has the same file and an available slot and resume from where you left off.

I am hopeing to post some screen shots in about 2 weeks time of the final front end gui.

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-08-20 10:13

icey wrote:You will see i am about 80% finished in a port over to a linux 2.6 kernel. :D
What features are you using that makes the port specific to kernel 2.6.*?
icey wrote:I am working on the gui for everything at the moment , ...
I am hopeing to post some screen shots in about 2 weeks time of the final front end gui.
Why not make the source available? None of the linux ports in the past have done so.

Two weeks may be slightly optimistic for designing the user interface.

I think I set paskharen up with the other group who's been working on the port - you see some patches credited to the main coder in changelog.txt (grep for palm).

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-08-20 10:16

clev wrote:Sarge>
windows/ - win32api
GTK++ could cover all crossplatforming(win32,linux x,macos x), so currently it is specially developed only for win32api by arnet
Hmm? The windows/ directory uses WTL for windowing, which is not cross platform. If you're under the impression we use GTK, but somehow are making it win32 only, that's a misconception.

I agree with sarge, though. I would love for each platform to have a directory, and add more developers to maintain those ports. That goes for the macdcpp effort as well.

estrato
Posts: 2
Joined: 2004-08-23 21:49
Contact:

Any estimate on amount of work required for porting?

Post by estrato » 2004-08-23 22:15

Hello,

My friend and I are considering to use/port dc++ client in/to Linux, too, and we'd like to know what kind of workload we are looking at. Could anyone who's tried porting come up with a rough estimate of how much time it took? Man-months, man-days?

The impression I'm getting from reading previous posts is that no-one has yet released (under GPL) a working linux port, am I wrong on this one?

I'm only talking about the dc-client-portion, not the graphical interface.

Thanks in advance,
Estrato

P.S. I've ignorantly e-mailed one of the dc++ developers about things I've just asked here, so if the unlucky victim of my temporary insanity is reading this, please accept my apologies. :oops: The idea to search the forums here struck me 5 seconds after I clicked "send"...

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Re: Any estimate on amount of work required for porting?

Post by GargoyleMT » 2004-08-24 11:46

estrato wrote:The impression I'm getting from reading previous posts is that no-one has yet released (under GPL) a working linux port, am I wrong on this one?

I'm only talking about the dc-client-portion, not the graphical interface.
No, you're correct, nobody has released their code yet. (They don't get to choose their license.)

The client portion isn't er... fully functional as a client. Both DCTC and DC-GUI (Valknut) include back-end libraries that speak the DC protocol, perhaps that's more what you want to use.

estrato
Posts: 2
Joined: 2004-08-23 21:49
Contact:

Re: Any estimate on amount of work required for porting?

Post by estrato » 2004-08-24 13:33

GargoyleMT wrote:No, you're correct, nobody has released their code yet. (They don't get to choose their license.)
Well, yes it has to be GPL, afaik, or are you talking about some special license that might apply to dc++ client code?
GargoyleMT wrote:The client portion isn't er... fully functional as a client.
Are you saying that we'd need to add some dc/dc++ protocol support that isn't found in dc++ client code? Or do you rather mean that the client code is a collection of classes and don't compile into a program/library?

The latter wouldn't be a problem, because regardless of what library or code we'll end up using in our project, it will be wrapped in a stand-alone back-end with our own interface towards the front-end, which is also stand-alone.
GargoyleMT wrote:Both DCTC and DC-GUI (Valknut) include back-end libraries that speak the DC protocol, perhaps that's more what you want to use.
We've been using DCTC as our back-end for a couple of years, but we've decided to switch because of some problems we've had with it. Valknut would be a viable option, but its dc-client library API doesn't seem to be documented. Using original dc++ client code would save us the trouble of implementing all dc-protocol extensions supported by dc++, seeing how dc++ has become something of a standard nowadays.

So I guess the question is: would figuring out Valknut's dclib API be substantially easier and wiser than incorporating client code from dc++?

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Re: Any estimate on amount of work required for porting?

Post by GargoyleMT » 2004-08-24 15:49

estrato wrote:So I guess the question is: would figuring out Valknut's dclib API be substantially easier and wiser than incorporating client code from dc++?
Good question. If you can persuade one of the porting teams to liberate their code, that'd also be a welcome solution. ^_^

paskharen
Posts: 29
Joined: 2004-01-27 14:32

Re: Any estimate on amount of work required for porting?

Post by paskharen » 2004-08-29 12:51

estrato wrote: My friend and I are considering to use/port dc++ client in/to Linux, too, and we'd like to know what kind of workload we are looking at. Could anyone who's tried porting come up with a rough estimate of how much time it took? Man-months, man-days?
Well, my semi-functional port (that can do everything except download files :))
took about 2-3 hours work per day for one month or so. I could have spent a lot more time on the UI tho, but I wanted something working first to get more motivation.
estrato wrote: The impression I'm getting from reading previous posts is that no-one has yet released (under GPL) a working linux port, am I wrong on this one?
Please understand that I'm 100% interested in releasing my code. However, I didn't want to fragment the porting effort, and since unixmans program (of whitch I've never seen any source btw) seemed more mature I wanted that code to be the one people worked at. However, a long time has passed and I have kind of lost fait in that ever happening, so I think the time has come :D

So, the question is, how would you prefer it? Should I start a sf.net project? Just put a tarball up for download somewhere? Try get it into the main dcplusplus cvs? (and who would I contact to get that done, in that case?)
I am willing to participate in a porting effort, but the time I have to devote is pretty limited at the moment.

Sedulus
Forum Moderator
Posts: 687
Joined: 2003-01-04 09:32
Contact:

Post by Sedulus » 2004-08-29 13:34

if you donh't have much time to devote atm
a tarball would be nice

let some people look at the code, and they can decide if it's worth a try to send stuff to arne

if you have more time and you want more control over cvs/svn commits, start a sf.net/berlios.de (the latter one has serious issues these last couple of days) project.
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Re: Any estimate on amount of work required for porting?

Post by GargoyleMT » 2004-08-30 19:17

paskharen wrote:So, the question is, how would you prefer it? Should I start a sf.net project? Just put a tarball up for download somewhere? Try get it into the main dcplusplus cvs? (and who would I contact to get that done, in that case?)
I am willing to participate in a porting effort, but the time I have to devote is pretty limited at the moment.
Well, for any changes to client/*, send unified diff patches to arne, whose email address is in every source file. Take a look at compile.txt for the general advice on patches.

He may be interested in having the linux gui in the main project, or he may like for it to be a separate project like macdcpp (though I don't think they've talked with him).

paskharen
Posts: 29
Joined: 2004-01-27 14:32

Ok, free code for everyone

Post by paskharen » 2004-08-30 19:30

Ok, spent ~4hrs updating my code to fit with the latest client code, so if I write anything strange that's why... It was a pretty nice experience tho, I like the changes they've made. I feel a lot more motivated to start working on this again.

Anyway, enough rambling. Here's the code, check the readme and mail/post any comments. I'll contact arne with the changes I made to the client (not that I made a lot, only one) and talk to him about joining the project or starting a new one.

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Re: Ok, free code for everyone

Post by GargoyleMT » 2004-08-30 21:03

paskharen wrote:Anyway, enough rambling. Here's the code, check the readme and mail/post any comments.
Nice and thank you.

Guitarm
Forum Moderator
Posts: 385
Joined: 2004-01-18 15:38

Post by Guitarm » 2004-08-31 04:59

Hmmm.....Interresting, nice initiative, me like :)
"Nothing really happens fast. Everything happens at such a rate that by the time it happens, it all seems normal."

tomyl
Posts: 3
Joined: 2004-05-25 19:28
Location: Sweden, Luleå
Contact:

Re: Ok, free code for everyone

Post by tomyl » 2004-09-03 18:03

paskharen wrote:I feel a lot more motivated to start working on this again.
Hmm, we should perhaps have a discussion... Earlier this summer I also made a GTKmm port, Indirect Disconnect (only available from a SVN repository for now). Downloading works but there are segfaults and deadlocks lurking. The deadlocks are due to a fundamental threading problem in how I use GTK, so I plan to rewrite my client sometime. I will also probably make it a library and write a wrapper for Python. It's much nicer to write the GUI in a high-level language...

tomyl
Posts: 3
Joined: 2004-05-25 19:28
Location: Sweden, Luleå
Contact:

Re: Ok, free code for everyone

Post by tomyl » 2004-09-03 18:45

tomyl wrote: Indirect Disconnect (only available from a SVN repository for now).
I have uploaded a tarball now.

paskharen
Posts: 29
Joined: 2004-01-27 14:32

Re: Ok, free code for everyone

Post by paskharen » 2004-09-05 08:26

tomyl wrote: Hmm, we should perhaps have a discussion... Earlier this summer I also made a GTKmm port, Indirect Disconnect (only available from a SVN repository for now).
Cool, I'm all for discussion. Don't know if this is the place, but this thread went off-topic a long time ago anyway. Like the name of your client btw...
tomyl wrote: Downloading works but there are segfaults and deadlocks lurking.
I got it working as well two or three days ago, it's an ugly hack but it works :D.
tomyl wrote: I will also probably make it a library and write a wrapper for Python.
Well, with the separation between gui and client code it is kind of a library already, all you need is a makefile that links it into one... But I understand what you mean, and I agree. In my dream world there would be someone on the main dc++ team that made sure the client part was 100% portable and provided good, clean headers for people making ports to use. If this was the case, writing a gui in just about any language would be easy & fun for everyone *sigh*

edit: better english

tomyl
Posts: 3
Joined: 2004-05-25 19:28
Location: Sweden, Luleå
Contact:

Re: Ok, free code for everyone

Post by tomyl » 2004-09-05 19:59

paskharen wrote: Cool, I'm all for discussion.
Nice, I'll mail you.


Locked