Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 134197 - net-proxy/dansguardian-2.8.0.6-r1 fails to compile against uclibc++ due to missing ctime include
Summary: net-proxy/dansguardian-2.8.0.6-r1 fails to compile against uclibc++ due to mi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Network Proxy Developers (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-24 05:19 UTC by Natanael Copa
Modified: 2006-05-31 14:25 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
dansguardian-2.8.0.6-ctime.patch (dansguardian-2.8.0.6-ctime.patch,2.31 KB, patch)
2006-05-24 05:23 UTC, Natanael Copa
Details | Diff
dansguardian-2.9.7.0-ctime.patch (dansguardian-2.9.7.0-ctime.patch,2.28 KB, patch)
2006-05-30 14:51 UTC, Natanael Copa
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Natanael Copa 2006-05-24 05:19:21 UTC
Some of the sourcefiles are missing '#include <ctime>' so compiling against uclibc++ fails.
Comment 1 Natanael Copa 2006-05-24 05:23:30 UTC
Created attachment 87386 [details, diff]
dansguardian-2.8.0.6-ctime.patch

The attatched patch fixes the problem and should not hurt anybody.

The dansguardian autoconf stuff is really wierd. CXX is not honored. I don't know how to fix it so I have just created a g++ symblink to g++-uc.
Comment 2 Alin Năstac (RETIRED) gentoo-dev 2006-05-30 10:50:39 UTC
Yeah, the configure script is really strange, but the alpha version fixes this.
Can you test the latest alpha version to see if it works on your system?
Comment 3 Natanael Copa 2006-05-30 14:04:58 UTC
Last time I tested it still missed the #include <ctime> in various places. I will test the current tomorrow.

I would prefer to not ship alpha packages on my product so I'd really want it fixed in the official stable dansguardian release too.
Comment 4 Alin Năstac (RETIRED) gentoo-dev 2006-05-30 14:24:06 UTC
Of course I will fix this in the stable version, but I need to know if the testing version is OK. 
I also intend to set CPP to $(tc-getCXX) in the Makefile before compiling. Please test if it fixes the other problem of yours. 
Comment 5 Natanael Copa 2006-05-30 14:31:57 UTC
Setting CPP=g++-uc does not work.

I gave up trying to fix the autoconf stuff and ended up linking g++ -> g++-uc.
Personally I'm ok with that until current alpha becomes stable.
Comment 6 Natanael Copa 2006-05-30 14:37:40 UTC
(In reply to comment #4)
> Of course I will fix this in the stable version, but I need to know if the
> testing version is OK. 

Its not.

if g++-uc -DHAVE_CONFIG_H -I. -I. -I..    -fexceptions -Os -pipe -MT DataBuffer.o -MD -MP -MF ".deps/DataBuffer.Tpo" -c -o DataBuffer.o DataBuffer.cpp; \
then mv -f ".deps/DataBuffer.Tpo" ".deps/DataBuffer.Po"; else rm -f ".deps/DataBuffer.Tpo"; exit 1; fi
ConnectionHandler.cpp: In member function `String ConnectionHandler::hashedURL(String*, int, std::string*, bool)':
ConnectionHandler.cpp:187: error: `time' was not declared in this scope
make[2]: *** [ConnectionHandler.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/var/tmp/portage/dansguardian-2.9.7.0_alpha/work/dansguardian-2.9.7.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/dansguardian-2.9.7.0_alpha/work/dansguardian-2.9.7.0'
make: *** [all] Error 2

Comment 7 Natanael Copa 2006-05-30 14:51:57 UTC
Created attachment 87914 [details, diff]
dansguardian-2.9.7.0-ctime.patch

Patch for 2.9.7.0 that adds the missing ctime includes.

The ebuild still fails on linking with:
fancy.o: In function `fancydm::bytestring(int)':
fancy.cpp:(.text+0x782): undefined reference to `floor'
fancy.cpp:(.text+0x807): undefined reference to `floor'
fancy.cpp:(.text+0x88f): undefined reference to `floor'
fancy.o: In function `fancydm::timestring(int)':
fancy.cpp:(.text+0x9a6): undefined reference to `floor'
fancy.cpp:(.text+0x9de): undefined reference to `floor'
collect2: ld returned 1 exit status
make[2]: *** [dansguardian] Error 1

Setting LDADD=-lm works it around. Seems like the autoconf scripts needs a better libmath detection.

This should probably be reported upstream.
Comment 8 Alin Năstac (RETIRED) gentoo-dev 2006-05-31 14:25:48 UTC
I've fixed both versions in cvs and I've contacted upstream.
Thanks!