FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Some errors for build example
Goto page 1, 2  Next
 
Post new topic   Reply to topic     Forum Index -> Mango
View previous topic :: View next topic  
Author Message
lijie



Joined: 28 Oct 2005
Posts: 24
Location: Shenzhen, China

PostPosted: Fri Oct 28, 2005 12:10 pm    Post subject: Some errors for build example Reply with quote

DMD version: v0.137

F:\OSS-PR~1\mango\example>build @servlets
servlets.d(402): no 'this' for nested class PingEntry
servlets.d(438): no 'this' for nested class PingEntry
servlets.d(441): no 'this' for nested class PingThread

F:\OSS-PR~1\mango\example>build @pickle
pickle.d(106): function pickle.pickle2 is a nested function and cannot be accessed from create

F:\OSS-PR~1\mango\example>build @cserver
...
F:\OSS-PR~1\mango\example>cserver
Error: Access Violation

F:\OSS-PR~1\mango\example>build @alert
...
F:\OSS-PR~1\mango\example>alert
Error: circular initialization dependency with module Event

.....
What's wrong with me?
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Fri Oct 28, 2005 12:48 pm    Post subject: Re: Some errors for build example Reply with quote

lijie wrote:
DMD version: v0.137

F:\OSS-PR~1\mango\example>build @servlets
servlets.d(402): no 'this' for nested class PingEntry
servlets.d(438): no 'this' for nested class PingEntry
servlets.d(441): no 'this' for nested class PingThread

F:\OSS-PR~1\mango\example>build @pickle
pickle.d(106): function pickle.pickle2 is a nested function and cannot be accessed from create

F:\OSS-PR~1\mango\example>build @cserver
...
F:\OSS-PR~1\mango\example>cserver
Error: Access Violation

F:\OSS-PR~1\mango\example>build @alert
...
F:\OSS-PR~1\mango\example>alert
Error: circular initialization dependency with module Event

.....
What's wrong with me?

Apparently the compiler broke. You should be fine with the prior version of DMD. Thanks for letting me know!

- Kris
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Fri Oct 28, 2005 5:36 pm    Post subject: Reply with quote

I've checked in some updates that resolve these issues ~ pick them up from the SVN head, rather than the download zip files.

I also noticed an "Error: Access Violation" whilst 'compiling' certain programs (such as @randomio), though it went away after I appended some flags (such as -v) to the command line. I suspect that's perhaps an error with Build.exe?
Back to top
View user's profile Send private message
lijie



Joined: 28 Oct 2005
Posts: 24
Location: Shenzhen, China

PostPosted: Fri Oct 28, 2005 7:23 pm    Post subject: Reply with quote

kris wrote:
I've checked in some updates that resolve these issues ~ pick them up from the SVN head, rather than the download zip files.

I also noticed an "Error: Access Violation" whilst 'compiling' certain programs (such as @randomio), though it went away after I appended some flags (such as -v) to the command line. I suspect that's perhaps an error with Build.exe?


Is this a bug of DMD? I have updated the source, and has compiled and passed.

But alert and logging can't run:
Quote:
F:\OSS-PR~1\mango\example>logging
Error: circular initialization dependency with module Event

F:\OSS-PR~1\mango\example>alert
Error: circular initialization dependency with module Event


Could you tell me which edition of DMD is more steady? where can download to? I only saw the latest edition in DMD homepage.

Thanks.
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Fri Oct 28, 2005 9:21 pm    Post subject: Reply with quote

The circular dependency thing was not an issue for me today, which is strange. I compiled and ran both of those examples without problem (other than the strange access-violation which I think may be from build.exe rather than from the compiler).

As of today I'm using the latest v137 version of the compiler, and it seems to be OK. Perhaps you somehow have an old version of some Mango code? Are you linking against a mango library, or simply using Build.exe with the @files? It's a stretch, but I can't think of what could cause this.

The last time we saw a circular-dependency bug (in the compiler), it was affected by the order in which files were imported. I wonder if it's now somehow dependent upon the order of files fed to the compiler? For example, if Build.exe is somehow compiling files in a different order on your machine than on mine?

(there's a long thread in the Mango forum about this topic from about 6 months ago).

Can anyone else confirm this issue on their machine? I can't replicate it here
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Fri Oct 28, 2005 9:30 pm    Post subject: Reply with quote

Are you on Linux or Win32?
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Fri Oct 28, 2005 10:39 pm    Post subject: Reply with quote

For comparative purposes, here's alert.d built and run on this machine:

Quote:
C:\D\mango\example>build -DCPATH\d\dmd\bin @alert
C:\d\dmd\bin\..\..\dm\bin\link.exe alert+C:\D\mango\mango\cache\model\IPayload+C:\D\mango\mango\cluster\model\IConsumer+C:\D\mango\mango\for
mat\Double+C:\D\mango\mango\io\Resource+C:\D\mango\mango\io\model\IWriter+C:\D\mango\mango\io\Conduit+C:\D\mango\mango\io\PickleRegistry+C:\
D\mango\mango\log\Layout+C:\D\mango\mango\utils\Text+C:\D\mango\mango\io\model\IReader+C:\D\mango\mango\format\Styled+C:\D\mango\mango\io\Da
tagramSocket+C:\D\mango\mango\cluster\Client+C:\D\mango\mango\utils\Random+C:\D\mango\mango\io\Exception+C:\D\mango\mango\io\Uri+C:\D\mango\
mango\io\EndianReader+C:\D\mango\mango\sys\Epoch+C:\D\mango\mango\io\FileStyle+C:\D\mango\mango\cluster\qos\socket\Cluster+C:\D\mango\mango\
io\MulticastSocket+C:\D\mango\mango\cluster\qos\socket\ProtocolReader+C:\D\mango\mango\io\model\IResource+C:\D\mango\mango\cache\Payload+C:\
D\mango\mango\io\model\IPickle+C:\D\mango\mango\cluster\model\ICluster+C:\D\mango\mango\cluster\qos\socket\ProtocolWriter+C:\D\mango\mango\f
ormat\Number+C:\D\mango\mango\cluster\Message+C:\D\mango\mango\io\EndianWriter+C:\D\mango\mango\format\Int+C:\D\mango\mango\log\Appender+C:\
D\mango\mango\io\Socket+C:\D\mango\mango\io\Tokenizer+C:\D\mango\mango\cluster\model\IEvent+C:\D\mango\mango\io\ConduitStyle+C:\D\mango\mang
o\io\FileProxy+C:\D\mango\mango\io\DeviceConduit+C:\D\mango\mango\io\ArrayAllocator+C:\D\mango\mango\cluster\qos\socket\ClusterEvent+C:\D\ma
ngo\mango\log\Event+C:\D\mango\mango\io\Buffer+C:\D\mango\mango\cluster\model\IMessage+C:\D\mango\mango\io\Writer+C:\D\mango\mango\io\Token+
C:\D\mango\mango\log\model\ILogger+C:\D\mango\mango\io\model\IConduit+C:\D\mango\mango\sys\ByteSwap+C:\D\mango\mango\log\DateLayout+C:\D\man
go\mango\io\FilePath+C:\D\mango\mango\format\Format+C:\D\mango\mango\cluster\qos\socket\RollCall+C:\D\mango\mango\log\ConsoleAppender+C:\D\m
ango\mango\io\PickleReader+C:\D\mango\mango\io\Stdout+C:\D\mango\mango\io\FileConst+C:\D\mango\mango\log\model\ILevel+C:\D\mango\mango\log\M
anager+C:\D\mango\mango\io\Utf+C:\D\mango\mango\cache\HashMap+C:\D\mango\mango\io\DisplayWriter+C:\D\mango\mango\utils\HeapSlice+C:\D\mango\
mango\format\Long+C:\D\mango\mango\io\Properties+C:\D\mango\mango\io\PickleWriter+C:\D\mango\mango\sys\Type+C:\D\mango\mango\io\model\IBuffe
r+C:\D\mango\mango\cluster\NetworkAlert+C:\D\mango\mango\io\FlushWriter+C:\D\mango\mango\sys\System+C:\D\mango\mango\cluster\model\IChannel+
C:\D\mango\mango\io\FileConduit+C:\D\mango\mango\io\SocketConduit+C:\D\mango\mango\io\SocketListener+C:\D\mango\mango\log\Hierarchy+C:\D\man
go\mango\io\Reader+C:\D\mango\mango\log\Logger+C:\D\mango\mango\log\Configurator,alert.exe,,wsock32.lib+user32+kernel32,alert.def/noi;

C:\D\mango\example>alert
3 INFO example.broadcast - press <ctrl-c> to quit
6 INFO example.broadcast - creating bulletin consumer for channel 'my.kind.of.alert'
7 INFO example.broadcast - broadcasting alert
9 INFO example.broadcast - Recieved message on channel my.kind.of.alert
^C
C:\D\mango\example>
Back to top
View user's profile Send private message
lijie



Joined: 28 Oct 2005
Posts: 24
Location: Shenzhen, China

PostPosted: Fri Oct 28, 2005 11:04 pm    Post subject: Reply with quote

kris wrote:
Are you on Linux or Win32?


On windows 2003 and fedora 4 (vmware),
I have checked out and rebuild all, but 'alert ' and 'logging' can't run.

build version: v2.9 (1197)
dmd version: v0.137
link version: 7.50B1
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Sat Oct 29, 2005 12:09 am    Post subject: Reply with quote

That's annoying.

Can you post the console output from a compile, please? Like the one above?
Back to top
View user's profile Send private message
lijie



Joined: 28 Oct 2005
Posts: 24
Location: Shenzhen, China

PostPosted: Sat Oct 29, 2005 2:19 am    Post subject: Reply with quote

on windows 2003:
Quote:

F:\OSS-PR~1\mango\example>build @alert
D:\dmd\bin\..\..\dm\bin\link.exe F:\OSS-PR~1\mango\mango\cache\HashMap+F:\OSS-PR~1\mango\mango\cluster\qos\socket\RollCall+F:
\OSS-PR~1\mango\mango\io\FileStyle+F:\OSS-PR~1\mango\mango\cache\model\IPayload+F:\OSS-PR~1\mango\mango\io\model\IWriter+F:\O
SS-PR~1\mango\mango\io\FileProxy+F:\OSS-PR~1\mango\mango\utils\Random+F:\OSS-PR~1\mango\mango\io\PickleReader+F:\OSS-PR~1\man
go\mango\cluster\qos\socket\ProtocolWriter+F:\OSS-PR~1\mango\mango\log\model\ILevel+F:\OSS-PR~1\mango\mango\io\FlushWriter+F:
\OSS-PR~1\mango\mango\sys\System+F:\OSS-PR~1\mango\mango\io\SocketConduit+F:\OSS-PR~1\mango\mango\log\Event+F:\OSS-PR~1\mango
\mango\log\model\ILogger+F:\OSS-PR~1\mango\mango\io\Utf+F:\OSS-PR~1\mango\mango\io\model\IPickle+F:\OSS-PR~1\mango\mango\sys\
ByteSwap+F:\OSS-PR~1\mango\mango\cluster\model\IEvent+F:\OSS-PR~1\mango\mango\io\Conduit+F:\OSS-PR~1\mango\mango\io\EndianRea
der+F:\OSS-PR~1\mango\mango\utils\Text+F:\OSS-PR~1\mango\mango\cache\Payload+F:\OSS-PR~1\mango\mango\io\ConduitStyle+F:\OSS-P
R~1\mango\mango\cluster\model\ICluster+F:\OSS-PR~1\mango\mango\cluster\Client+F:\OSS-PR~1\mango\mango\log\DateLayout+F:\OSS-P
R~1\mango\mango\format\Number+F:\OSS-PR~1\mango\mango\io\Buffer+F:\OSS-PR~1\mango\mango\io\Reader+F:\OSS-PR~1\mango\mango\uti
ls\HeapSlice+F:\OSS-PR~1\mango\mango\format\Format+alert+F:\OSS-PR~1\mango\mango\io\model\IBuffer+F:\OSS-PR~1\mango\mango\io\
model\IReader+F:\OSS-PR~1\mango\mango\cluster\NetworkAlert+F:\OSS-PR~1\mango\mango\cluster\qos\socket\Cluster+F:\OSS-PR~1\man
go\mango\io\Uri+F:\OSS-PR~1\mango\mango\io\DatagramSocket+F:\OSS-PR~1\mango\mango\cluster\qos\socket\ProtocolReader+F:\OSS-PR
~1\mango\mango\cluster\Message+F:\OSS-PR~1\mango\mango\io\Socket+F:\OSS-PR~1\mango\mango\io\SocketListener+F:\OSS-PR~1\mango\
mango\log\Logger+F:\OSS-PR~1\mango\mango\log\Hierarchy+F:\OSS-PR~1\mango\mango\log\ConsoleAppender+F:\OSS-PR~1\mango\mango\io
\DisplayWriter+F:\OSS-PR~1\mango\mango\log\Configurator+F:\OSS-PR~1\mango\mango\cluster\model\IConsumer+F:\OSS-PR~1\mango\man
go\io\Properties+F:\OSS-PR~1\mango\mango\cluster\model\IChannel+F:\OSS-PR~1\mango\mango\io\Writer+F:\OSS-PR~1\mango\mango\io\
Tokenizer+F:\OSS-PR~1\mango\mango\log\Layout+F:\OSS-PR~1\mango\mango\io\Exception+F:\OSS-PR~1\mango\mango\io\FileConst+F:\OSS
-PR~1\mango\mango\sys\Epoch+F:\OSS-PR~1\mango\mango\io\Resource+F:\OSS-PR~1\mango\mango\log\Manager+F:\OSS-PR~1\mango\mango\c
luster\model\IMessage+F:\OSS-PR~1\mango\mango\io\PickleWriter+F:\OSS-PR~1\mango\mango\io\FilePath+F:\OSS-PR~1\mango\mango\io\
Stdout+F:\OSS-PR~1\mango\mango\cluster\qos\socket\ClusterEvent+F:\OSS-PR~1\mango\mango\io\Token+F:\OSS-PR~1\mango\mango\io\mo
del\IResource+F:\OSS-PR~1\mango\mango\io\FileConduit+F:\OSS-PR~1\mango\mango\io\model\IConduit+F:\OSS-PR~1\mango\mango\io\Dev
iceConduit+F:\OSS-PR~1\mango\mango\io\MulticastSocket+F:\OSS-PR~1\mango\mango\sys\Type+F:\OSS-PR~1\mango\mango\io\EndianWrite
r+F:\OSS-PR~1\mango\mango\log\Appender+F:\OSS-PR~1\mango\mango\io\PickleRegistry+F:\OSS-PR~1\mango\mango\io\ArrayAllocator+F:
\OSS-PR~1\mango\mango\format\Int+F:\OSS-PR~1\mango\mango\format\Styled+F:\OSS-PR~1\mango\mango\format\Long+F:\OSS-PR~1\mango\
mango\format\Double,alert.exe,,wsock32.lib+user32+kernel32,alert.def/noi;

F:\OSS-PR~1\mango\example>@alert
Error: circular initialization dependency with module Event


on fedora 4:
Quote:
[lijie@localhost example]$ build @alert
gcc /home/lijie/d/mango/mango/io/Buffer.o /home/lijie/d/mango/mango/io/Reader.o /home/lijie/d/mango/mango/utils/HeapSlice.o /home/lijie/d/mango/mango/io/EndianW riter.o /home/lijie/d/mango/mango/log/DateLayout.o /home/lijie/d/mango/mango/clu ster/model/IConsumer.o /home/lijie/d/mango/mango/cluster/qos/socket/Cluster.o /h ome/lijie/d/mango/mango/format/Int.o /home/lijie/d/mango/mango/io/SocketConduit. o /home/lijie/d/mango/mango/io/FilePath.o /home/lijie/d/mango/mango/cluster/Clie nt.o /home/lijie/d/mango/mango/cluster/qos/socket/ProtocolWriter.o /home/lijie/d /mango/mango/io/PickleReader.o /home/lijie/d/mango/mango/cluster/qos/socket/Roll Call.o /home/lijie/d/mango/mango/utils/Text.o /home/lijie/d/mango/mango/io/model /IConduit.o /home/lijie/d/mango/mango/cache/HashMap.o /home/lijie/d/mango/mango/ format/Styled.o /home/lijie/d/mango/mango/io/DatagramSocket.o /home/lijie/d/mang o/mango/log/Hierarchy.o /home/lijie/d/mango/mango/format/Double.o /home/lijie/d/ mango/mango/sys/System.o /home/lijie/d/mango/mango/log/ConsoleAppender.o /home/l ijie/d/mango/mango/io/FileConduit.o /home/lijie/d/mango/mango/cluster/model/IClu ster.o /home/lijie/d/mango/mango/io/model/IWriter.o /home/lijie/d/mango/mango/io /EndianReader.o /home/lijie/d/mango/mango/io/Tokenizer.o /home/lijie/d/mango/man go/io/Exception.o /home/lijie/d/mango/mango/io/FileConst.o /home/lijie/d/mango/m ango/io/ConduitStyle.o alert.o /home/lijie/d/mango/mango/sys/Epoch.o /home/lijie /d/mango/mango/utils/Random.o /home/lijie/d/mango/mango/io/Token.o /home/lijie/d /mango/mango/io/Socket.o /home/lijie/d/mango/mango/io/MulticastSocket.o /home/li jie/d/mango/mango/log/model/ILevel.o /home/lijie/d/mango/mango/io/model/IPickle. o /home/lijie/d/mango/mango/sys/Type.o /home/lijie/d/mango/mango/cache/Payload.o /home/lijie/d/mango/mango/cluster/qos/socket/ProtocolReader.o /home/lijie/d/man go/mango/log/Event.o /home/lijie/d/mango/mango/io/Writer.o /home/lijie/d/mango/m ango/log/Appender.o /home/lijie/d/mango/mango/io/Utf.o /home/lijie/d/mango/mango /log/model/ILogger.o /home/lijie/d/mango/mango/cluster/model/IEvent.o /home/liji e/d/mango/mango/cluster/Message.o /home/lijie/d/mango/mango/cluster/model/IChann el.o /home/lijie/d/mango/mango/cache/model/IPayload.o /home/lijie/d/mango/mango/ io/Stdout.o /home/lijie/d/mango/mango/io/SocketListener.o /home/lijie/d/mango/ma ngo/io/FlushWriter.o /home/lijie/d/mango/mango/format/Number.o /home/lijie/d/man go/mango/cluster/qos/socket/ClusterEvent.o /home/lijie/d/mango/mango/io/PickleRe gistry.o /home/lijie/d/mango/mango/io/ArrayAllocator.o /home/lijie/d/mango/mango /io/Conduit.o /home/lijie/d/mango/mango/io/Resource.o /home/lijie/d/mango/mango/ log/Logger.o /home/lijie/d/mango/mango/cluster/model/IMessage.o /home/lijie/d/ma ngo/mango/io/model/IBuffer.o /home/lijie/d/mango/mango/io/model/IReader.o /home/ lijie/d/mango/mango/log/Manager.o /home/lijie/d/mango/mango/format/Format.o /hom e/lijie/d/mango/mango/io/Properties.o /home/lijie/d/mango/mango/io/DeviceConduit .o /home/lijie/d/mango/mango/io/PickleWriter.o /home/lijie/d/mango/mango/log/Lay out.o /home/lijie/d/mango/mango/io/model/IResource.o /home/lijie/d/mango/mango/i o/FileStyle.o /home/lijie/d/mango/mango/cluster/NetworkAlert.o /home/lijie/d/man go/mango/io/FileProxy.o /home/lijie/d/mango/mango/format/Long.o /home/lijie/d/ma ngo/mango/sys/ByteSwap.o /home/lijie/d/mango/mango/io/DisplayWriter.o /home/liji e/d/mango/mango/io/Uri.o /home/lijie/d/mango/mango/log/Configurator.o -o alert - lphobos -lpthread -lm
[lijie@localhost example]$ ./alert
Error: circular initialization dependency with module Event
[lijie@localhost example]$
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Sat Oct 29, 2005 10:59 am    Post subject: Reply with quote

Thanks.

Well, the file order is certainly different ~ that would suck badly if that's the only difference.

Here's the prior topic on this: http://www.dsource.org/forums/viewtopic.php?t=570

I'd suggest downloading an older version of DMD and trying that, but don't know which version to suggest. Perhaps v130? You can get each version of the compiler by clicking on the big version-numbers within this page (here's v114, for example, noting the prior fix for this kind of problem) http://digitalmars.com/d/changelog.html#new0114

In the meantime, I'll ask Walter if he changed anything within this arena.
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Sat Oct 29, 2005 12:00 pm    Post subject: Reply with quote

I've also posted on the Build forum to find out what would cause the order of compilation to be different between two machines.

BTW: I just downloaded Mango + DMD + Build onto a laptop and managed to build and run everything cleanly. It seems the issue might be somewhat elusive ~ for now, we'll have to wait for further input.
Back to top
View user's profile Send private message
lijie



Joined: 28 Oct 2005
Posts: 24
Location: Shenzhen, China

PostPosted: Sat Oct 29, 2005 12:55 pm    Post subject: Reply with quote

Yes. this is a bug of Build v2.9, and the 2.08 edtion is OK.

Thanks.
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Sat Oct 29, 2005 1:27 pm    Post subject: Reply with quote

lijie wrote:
Yes. this is a bug of Build v2.9, and the 2.08 edtion is OK.

Thank goodness!

Still, it's likely to be a bug in DMD rather than Build itself ~ one triggered by a change in compilation order. Hopefully Derek and Walter can help us get to the bottom of this.

Thanks again for bringing this up ~ can you post a console listing of the working compilation please? Like the one you posted above? That will help to construct a test case.
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Mon Oct 31, 2005 12:24 pm    Post subject: Reply with quote

lijie wrote:
Yes. this is a bug of Build v2.9, and the 2.08 edtion is OK.

Lijie, would you mind posting a console listing of the successful build?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Mango All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group