www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Has Anyone has this same Issue Please?

reply Ephrahim <olagokedammy gmail.com> writes:
Using this dub.json configuration

{
	"name": "app",
	"authors": [
		"Author"
	],
	"description": "App Description",
	"copyright": "Copyright © 2018, Author",
	"license": "Boost",
	"dependencies": {
         "arsd-official" : "~>2.1.2",
	"dub": "~>1.3.0",
	"vibe-d": "~>0.8.0",
         "fswatch": "~>0.3.0"
     }
}

And i've written a sample code just to get things running...

import std.stdio;
import vibe.d;

void main()
{
	writeln("JESUS IS LORD!!!!");
	auto settings = new HTTPServerSettings;
	settings.port = 8080;

	listenHTTP(settings, (req, res) { res.writeBody("Hello Vibe.d: " 
~ req.path); });
	runApplication();
}


But when i do "dub run", i get this error.

running C:\Users\user\Codes\DLang\Projects\app\dub.json
Performing "plain" build using C:\D\dmd2\windows\bin\dmd.exe for 
x86.
dub 1.3.0: building configuration "library"...
taggedalgebraic 0.10.11: building configuration "library"...
eventcore 0.8.36: building configuration "winapi-optlink"...
..\..\..\..\AppData\Local\dub\packages\eventcore-0.8.36\eventcore\source\eventcore\drivers\pos
x\driver.d(145,14): Error: safe function
'eventcore.drivers.posix.driver.PosixEventDriverCore!(SelectEventLoop,
LoopTimeoutTimerDriver, PosixEventDriverEvents!(SelectEventLoop,
PosixEventDriverSockets!(SelectEventLoop))).PosixEventDriverCore.dispose'
cannot call system function 'core.atomic.atomicStore!(cast(MemoryOrder)3,
Mutex, typeof(null)).atomicStore'
..\..\..\..\AppData\Local\dub\packages\eventcore-0.8.36\eventcore\source\eventcore\drivers\po
ix\select.d(26,27): Error: template instance
eventcore.drivers.posix.driver.PosixEventDriver!(SelectEventLoop) error
instantiating
..\..\..\..\AppData\Local\dub\packages\eventcore-0.8.36\eventcore\source\eventcore\drivers\pos
x\driver.d(210,22): Error: safe function
'eventcore.drivers.posix.driver.PosixEventDriverCore!(SelectEventLoop,
LoopTimeoutTimerDriver, PosixEventDriverEvents!(SelectEventLoop,
PosixEventDriverSockets!(SelectEventLoop))).PosixEventDriverCo
e.runInOwnerThread' cannot call system function
'core.atomic.atomicLoad!(cast(MemoryOrder)3, Mutex).atomicLoad'
..\..\..\..\AppData\Local\dub\packages\eventcore-0.8.36\eventcore\source\eventcore\drivers\pos
x\driver.d(211,24): Error: safe function
'eventcore.drivers.posix.driver.PosixEventDriverCore!(SelectEventLoop,
LoopTimeoutTimerDriver, PosixEventDriverEvents!(SelectEventLoop,
PosixEventDriverSockets!(SelectEventLoop))).PosixEventDriverCo
e.runInOwnerThread' cannot call system function
'core.atomic.atomicLoad!(cast(MemoryOrder)3, Handle!("event", Handle!("fd",
uint, 4294967295u), Handle(4294967295u))).atomicLoad'
..\..\..\..\AppData\Local\dub\packages\eventcore-0.8.36\eventcore\source\eventcore\drivers\po
ix\driver.d(41,22): Error: template instance
eventcore.drivers.posix.driver.PosixEventDriverCore!(SelectEventLoop,
LoopTimeoutTimerDriver, PosixEventDriverEvents!(SelectEventLoop,
PosixEventDriverSockets!(SelectEventLoop))) error instantiating
..\..\..\..\AppData\Local\dub\packages\eventcore-0.8.36\eventcore\source\eventcore\drivers\po
ix\select.d(26,27):        instantiated from here:
PosixEventDriver!(SelectEventLoop)
..\..\..\..\AppData\Local\dub\packages\eventcore-0.8.36\eventcore\source\eventcore\drivers\wi
api\core.d(112,22): Error: safe function
'eventcore.drivers.winapi.core.WinAPIEventDriverCore.runInOwnerThread' cannot
call system function 'core.atomic.atomicLoad!(cast(MemoryOrder)3,
Mutex).atomicLoad'
..\..\..\..\AppData\Local\dub\packages\eventcore-0.8.36\eventcore\source\eventcore\drivers\winap
\sockets.d(256,18): Error:
'eventcore.drivers.winapi.sockets.WinAPIEventDriverSockets.read.resetBuffers'
is not nothrow
..\..\..\..\AppData\Local\dub\packages\eventcore-0.8.36\eventcore\source\eventcore\drivers\winap
\sockets.d(261,17): Error:
'eventcore.drivers.winapi.sockets.WinAPIEventDriverSockets.read.resetBuffers'
is not nothrow
..\..\..\..\AppData\Local\dub\packages\eventcore-0.8.36\eventcore\source\eventcore\drivers\winap
\sockets.d(238,16): Error: function
'eventcore.drivers.winapi.sockets.WinAPIEventDriverSockets.read' is nothrow yet
may throw
C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.
C:\Users\user\Codes\DLang\Projects\app\dub.json has not been 
successfully executed
error: DUB has returned the status 2 (undeterminated meaning)



Please Help!!! I will be very grateful for your help sirs/ma
Oct 11 2018
parent Basile B. <b2.temp gmx.com> writes:
On Thursday, 11 October 2018 at 18:20:56 UTC, Ephrahim wrote:
 Using this dub.json configuration
0.8.36\eventcore\source\eventcore\drivers\posix\driver.d(145,14): Error: safe function 'eventcore.drivers.posix.driver.PosixEventDriverCore!(SelectEventLoop, LoopTimeoutTimerDriver, PosixEventDriverEvents!(SelectEventLoop, PosixEventDriverSockets!(SelectEventLoop))).PosixEventDriverCore.dispose' cannot call system function 'core.atomic.atomicStore!(cast(MemoryOrder)3, Mutex, typeof(null)).atomicStore'
 ..\..\..\..\AppData\Local\dub\packages\eventcore-0.8.36\eventcore\source\eventcore\drivers\po
ix\select.d(26,27): Error: template instance
eventcore.drivers.posix.driver.PosixEventDriver!(SelectEventLoop) error
instantiating
 ..\..\..\..\AppData\Local\dub\packages\eventcore-0.8.36\eventcore\source\eventcore\drivers\pos
x\driver.d(210,22): Error: safe function
'eventcore.drivers.posix.driver.PosixEventDriverCore!(SelectEventLoop,
LoopTimeoutTimerDriver, PosixEventDriverEvents!(SelectEventLoop,
PosixEventDriverSockets!(SelectEventLoop))).PosixEventDriverCo
e.runInOwnerThread' cannot call system function
'core.atomic.atomicLoad!(cast(MemoryOrder)3, Mutex).atomicLoad'
 ..\..\..\..\AppData\Local\dub\packages\eventcore-0.8.36\eventcore\source\eventcore\drivers\pos
x\driver.d(211,24): Error: safe function
'eventcore.drivers.posix.driver.PosixEventDriverCore!(SelectEventLoop,
LoopTimeoutTimerDriver, PosixEventDriverEvents!(SelectEventLoop,
PosixEventDriverSockets!(SelectEventLoop))).PosixEventDriverCo
e.runInOwnerThread' cannot call system function
'core.atomic.atomicLoad!(cast(MemoryOrder)3, Handle!("event", Handle!("fd",
uint, 4294967295u), Handle(4294967295u))).atomicLoad'
 ..\..\..\..\AppData\Local\dub\packages\eventcore-0.8.36\eventcore\source\eventcore\drivers\po
ix\driver.d(41,22): Error: template instance
eventcore.drivers.posix.driver.PosixEventDriverCore!(SelectEventLoop,
LoopTimeoutTimerDriver, PosixEventDriverEvents!(SelectEventLoop,
PosixEventDriverSockets!(SelectEventLoop))) error instantiating
 ..\..\..\..\AppData\Local\dub\packages\eventcore-0.8.36\eventcore\source\eventcore\drivers\po
ix\select.d(26,27):        instantiated from here:
PosixEventDriver!(SelectEventLoop)
 ..\..\..\..\AppData\Local\dub\packages\eventcore-0.8.36\eventcore\source\eventcore\drivers\wi
api\core.d(112,22): Error: safe function
'eventcore.drivers.winapi.core.WinAPIEventDriverCore.runInOwnerThread' cannot
call system function 'core.atomic.atomicLoad!(cast(MemoryOrder)3,
Mutex).atomicLoad'
 ..\..\..\..\AppData\Local\dub\packages\eventcore-0.8.36\eventcore\source\eventcore\drivers\winap
\sockets.d(256,18): Error:
'eventcore.drivers.winapi.sockets.WinAPIEventDriverSockets.read.resetBuffers'
is not nothrow
 ..\..\..\..\AppData\Local\dub\packages\eventcore-0.8.36\eventcore\source\eventcore\drivers\winap
\sockets.d(261,17): Error:
'eventcore.drivers.winapi.sockets.WinAPIEventDriverSockets.read.resetBuffers'
is not nothrow
 ..\..\..\..\AppData\Local\dub\packages\eventcore-0.8.36\eventcore\source\eventcore\drivers\winap
\sockets.d(238,16): Error: function
'eventcore.drivers.winapi.sockets.WinAPIEventDriverSockets.read' is nothrow yet
may throw
 C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.
 C:\Users\user\Codes\DLang\Projects\app\dub.json has not been 
 successfully executed
 error: DUB has returned the status 2 (undeterminated meaning)



 Please Help!!! I will be very grateful for your help sirs/ma
That's a programming error in 'eventcore' at first glance. Some attributes are not valid. Maybe the library is tested on x86_64 only and using it on x86 reveals issues. Also the error seem to happen in a module that's for linux or OSX but i see that the paths are windows-style. You should really report to the author. The error is not on your side.
Oct 12 2018