Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » circular 'uses' chain
circular 'uses' chain [message #38501] Thu, 20 December 2012 19:22 Go to next message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
Hi,

Don't know where to put this question... Perhaps here is the right place, as I think it's simple basic use of UPP...

Trying to develop some library, I get these warnings while compiling :
----- CtrlLib ( GUI GCC DEBUG SHARED DEBUG_FULL BLITZ LINUX POSIX ) (1 / 30)
CtrlLib: circular 'uses' chain
CtrlLib: circular 'uses' chain
----- PostalCode ( GUI GCC DEBUG SHARED DEBUG_FULL BLITZ LINUX POSIX ) (2 / 30)
PostalCode.cpp
----- CtrlCore ( GUI GCC DEBUG SHARED DEBUG_FULL BLITZ LINUX POSIX ) (3 / 30)
CtrlCore: circular 'uses' chain
CtrlCore: circular 'uses' chain
...

I guess that it's related with some
using namespace ...
instruction, but I cannot find what is wrong...

The code compiles without error and links, but executing it I just obtain an "invalid memory access!" message. I suppose that it's related to the warnings ?

How can I suppress these warnings ? What should I verify ? I'm just using
NAMESPACE_UPP

after including the standard .h files, as usually...
Re: circular 'uses' chain [message #38510 is a reply to message #38501] Fri, 21 December 2012 07:22 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi Jibe,

Actually, it has nothing to do with namespaces or with any code Smile It is just TheIDE telling you that some of your package dependencies are circular. Have a look in Package manager, there is some loop like package A uses package B which in turn uses C, but C uses A Smile The weird thing is that it involves CtrlLib and CtrlCore...

BTW: If you are lazy to go through all the packages or if you want to see the big picture of the package relations. A while ago I wrote a script that visualizes the relations (requirements are *nix shell and graphviz installed on your system). You should see any circular chain in the picture right away Smile

Best regards,
Honza
Re: circular 'uses' chain [message #38514 is a reply to message #38501] Fri, 21 December 2012 11:42 Go to previous messageGo to next message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
Hi Honza,

Thanks for your reply... and more especially for your very nice script Smile

As I am very very lazy, I used it to find the problem. And in a few seconds, I was able to see that no only there is a circular call between CtrlLib and CtrlCore, but that there is the same circular call with the AddressBook example !

As I never had this warning before, I suppose that it's just a problem with the 5648 version that I'm using and try to download the last nightly build.

Thanks again !

PS : Here is the package dependencies of AddressBook made with your script. We see well the circular dependency between CtrlLib and CtrlCore Smile
Re: circular 'uses' chain [message #38517 is a reply to message #38514] Fri, 21 December 2012 12:33 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi Jibe,

It must be your local change. CtrlCore.upp doesn't contain any mentions of CtrlLib and there has been no change to this file in more than a year Wink

I can check the contents of the package too, if you tell me where did you download it from, but I think problem is most probably only on your machine.

Honza
Re: circular 'uses' chain [message #38518 is a reply to message #38501] Fri, 21 December 2012 14:11 Go to previous messageGo to next message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
I'm surprised by what you say !

I updated to 5648 through your ppa (http://ppa.launchpad.net/dolik-rce/upp-nightly/ubuntu and http://ppa.launchpad.net/dolik-rce/upp-nightly/ubuntu) and re-synchronised just now to 5650 the same way, and the dependencies are very different (see attachment) !!!

I'll not say that it's impossible that I made some error, but I should very surprised...

Anyway, all seems to work well now. At least, this made me discover your nice script Very Happy .

Re: circular 'uses' chain [message #38525 is a reply to message #38518] Fri, 21 December 2012 16:27 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

The second image looks much better Smile The first one looks like you added Controls4U. I'm quite confident that it didn't come from the package Smile Just let me know if you run into some similar problems.

Honza
Re: circular 'uses' chain [message #38528 is a reply to message #38501] Fri, 21 December 2012 17:32 Go to previous message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
I didn't pay attention, but it's true that it seems that Control4U is added to the AddressBook package !

Probably I did a big mistake ! In the application I'm developping, I'm using Controls4U. But when I updated Upp, I was surprised to obtain a link error : Control4u was missing, when it was there before the update !!!

I'm guessing that I accidentally included it in some of the dependencies instead of in my application package. This could explain that we retrieve it in the Address Book !

But the weird thing is that I had no locally modified package mentionned when I updated upp, except some .t files that I modified when I made the french translation of upp packages !

Finally, I don't really know what happened, but surely the bug was between my chair and my keyboard !
Previous Topic: Who is doing the coping? [implicit-copy | deep-copy | pick constructor]
Next Topic: Questions about static casting Polymorphic Array Elements, iterator, Ptr and Pte
Goto Forum:
  


Current Time: Thu Apr 25 00:28:39 CEST 2024

Total time taken to generate the page: 0.03332 seconds