Re: Updated D then undefined symbols in vibed

2016-11-24 Thread Jot via Digitalmars-d-learn

On Thursday, 24 November 2016 at 20:18:16 UTC, Jot wrote:

On Thursday, 24 November 2016 at 17:46:38 UTC, ag0aep6g wrote:

On 11/24/2016 06:15 PM, Jot wrote:
I think you are failing to realize the first axiom I 
presented. I only
updated dmd2. This shouldn't change the object and library 
files. They
should essentially compile to the same thing and it shouldn't 
matter.


As far as I can tell, this isn't generally true. For example, 
dmd may get fixes/changes in name mangling, making it 
incompatible with old object files. Since you've already 
cleaned everything, this doesn't seem to be the issue here. 
But don't assume that a newer dmd is guaranteed to work with 
older object files. It isn't.


And dmd2.exe does not recognize that an object file is out of 
date? Seems like a bug to me...


So, the issue was I was not using phobos updated libraries.

Should dmd2.exe not complain about such things? They are easy 
checks and can solve some hard to track bugs by simply storing a 
a date in the files and comparing to what it is expecting.





Re: Updated D then undefined symbols in vibed

2016-11-24 Thread ag0aep6g via Digitalmars-d-learn

On 11/24/2016 09:18 PM, Jot wrote:

And dmd2.exe does not recognize that an object file is out of date?
Seems like a bug to me...


I don't know enough about these things to make definite statements, but 
I wouldn't expect dmd to detect such situations. Do object file formats 
have ways to store information such as the compiler version?


Re: Updated D then undefined symbols in vibed

2016-11-24 Thread Jot via Digitalmars-d-learn

On Thursday, 24 November 2016 at 17:46:38 UTC, ag0aep6g wrote:

On 11/24/2016 06:15 PM, Jot wrote:
I think you are failing to realize the first axiom I 
presented. I only
updated dmd2. This shouldn't change the object and library 
files. They
should essentially compile to the same thing and it shouldn't 
matter.


As far as I can tell, this isn't generally true. For example, 
dmd may get fixes/changes in name mangling, making it 
incompatible with old object files. Since you've already 
cleaned everything, this doesn't seem to be the issue here. But 
don't assume that a newer dmd is guaranteed to work with older 
object files. It isn't.


And dmd2.exe does not recognize that an object file is out of 
date? Seems like a bug to me...





Re: Updated D then undefined symbols in vibed

2016-11-24 Thread ag0aep6g via Digitalmars-d-learn

On 11/24/2016 06:15 PM, Jot wrote:

I think you are failing to realize the first axiom I presented. I only
updated dmd2. This shouldn't change the object and library files. They
should essentially compile to the same thing and it shouldn't matter.


As far as I can tell, this isn't generally true. For example, dmd may 
get fixes/changes in name mangling, making it incompatible with old 
object files. Since you've already cleaned everything, this doesn't seem 
to be the issue here. But don't assume that a newer dmd is guaranteed to 
work with older object files. It isn't.


Re: Updated D then undefined symbols in vibed

2016-11-24 Thread Jot via Digitalmars-d-learn
On Thursday, 24 November 2016 at 16:49:20 UTC, Rene Zwanenburg 
wrote:

On Thursday, 24 November 2016 at 16:17:19 UTC, Jot wrote:
Any more ideas? Obviously something isn't getting linked in in 
the VS project.


This is definitely a stale object file problem. From that error 
message it appears to use the .dub directory to store object 
files of your dependencies. Try nuking it, then run dub to 
recreate it.


Nope, I tried that and tried again. As I've said, I cleaned the 
project completely(deleted all generated files) and regenerated 
the visual d project with no change.


I tried updating and upgrading and all that.

I think you are failing to realize the first axiom I presented. I 
only updated dmd2. This shouldn't change the object and library 
files. They should essentially compile to the same thing and it 
shouldn't matter. Again, my projects never changed(was working 
fine before) and everything else was updated before hand.



-- Build started: Project: test, Configuration: debug Win32 
--

Building \test\test.exe...
Compiling Diet HTML template index.dt...
Compiling Diet HTML template error.dt...
OPTLINK (R) for Win32  Release 8.00.17
Copyright (C) Digital Mars 1989-2013  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
.dub\obj\debug\test\source\app.obj(app)
 Error 42: Symbol Undefined 
_D4vibe4core3net14NetworkAddress15toAddressStringMxFNfZAya 
(const(@safe immutable(char)[] function()) 
vibe.core.net.NetworkAddress.toAddressString)

.dub\obj\debug\test\source\app.obj(app)
 Error 42: Symbol Undefined 
_D4vibe4http6common11HTTPRequest21contentTypeParametersMxFNdZAya 
(const(@property immutable(char)[] function()) 
vibe.http.common.HTTPRequest.contentTypeParameters)

.dub\obj\debug\test\source\app.obj(app)
 Error 42: Symbol Undefined 
_D4vibe4http6server17HTTPServerRequest7fullURLMxFNdZS4vibe4inet3url3URL (const(@property vibe.inet.url.URL function()) vibe.http.server.HTTPServerRequest.fullURL)

.dub\obj\debug\test\source\app.obj(app)
 Error 42: Symbol Undefined 
_D4vibe4http6server17HTTPServerRequest7rootDirMxFNdZAya 
(const(@property immutable(char)[] function()) 
vibe.http.server.HTTPServerRequest.rootDir)

.dub\obj\debug\test\source\app.obj(app)
 Error 42: Symbol Undefined 
_D4vibe4http6common11HTTPRequest4hostMxFNdZAya (const(@property 
immutable(char)[] function()) vibe.http.common.HTTPRequest.host)

.dub\obj\debug\test\source\app.obj(app)
 Error 42: Symbol Undefined 
_D4vibe4http6common11HTTPRequest11contentTypeMxFNdZAya 
(const(@property immutable(char)[] function()) 
vibe.http.common.HTTPRequest.contentType)

.dub\obj\debug\test\source\app.obj(app)
 Error 42: Symbol Undefined 
_D4vibe4http10fileserver8sendFileFMC4vibe4http6server17HTTPServerRequestMC4vibe4http6server18HTTPServerResponseS4vibe4inet4path4PathC4vibe4http10fileserver22HTTPFileServerSettingsZv (void vibe.http.fileserver.sendFile(scope vibe.http.server.HTTPServerRequest, scope vibe.http.server.HTTPServerResponse, vibe.inet.path.Path, vibe.http.fileserver.HTTPFileServerSettings))

.dub\obj\debug\test\source\app.obj(app)
 Error 42: Symbol Undefined 
_D4vibe4inet4path4Path6__ctorMFNaNcAyaZS4vibe4inet4path4Path 
(pure ref vibe.inet.path.Path 
vibe.inet.path.Path.__ctor(immutable(char)[]))

.dub\obj\debug\test\source\app.obj(app)
 Error 42: Symbol Undefined 
_D4vibe4http6router9URLRouter6__ctorMFAyaZC4vibe4http6router9URLRouter (vibe.http.router.URLRouter vibe.http.router.URLRouter.__ctor(immutable(char)[]))

.dub\obj\debug\test\source\app.obj(app)
 Error 42: Symbol Undefined 
_D4vibe2db5mongo6client11MongoClient13getCollectionMFAyaZS4vibe2db5mongo10collection15MongoCollection (vibe.db.mongo.collection.MongoCollection vibe.db.mongo.client.MongoClient.getCollection(immutable(char)[]))

.dub\obj\debug\test\source\app.obj(app)
 Error 42: Symbol Undefined 
_D4vibe4http6server18HTTPServerSettings6__ctorMFZC4vibe4http6server18HTTPServerSettings (vibe.http.server.HTTPServerSettings vibe.http.server.HTTPServerSettings.__ctor())

.dub\obj\debug\test\source\app.obj(app)
 Error 42: Symbol Undefined 
_D4vibe4http6server18HTTPServerSettings7__ClassZ

.dub\obj\debug\test\source\app.obj(app)
 Error 42: Symbol Undefined 
_D4vibe2db5mongo5mongo14connectMongoDBFAyaZC4vibe2db5mongo6client11MongoClient (vibe.db.mongo.client.MongoClient vibe.db.mongo.mongo.connectMongoDB(immutable(char)[]))

.dub\obj\debug\test\source\app.obj(app)
 Error 42: Symbol Undefined 
_D4vibe2db5mongo6client11MongoClient11getDatabaseMFAyaZS4vibe2db5mongo8database13MongoDatabase (vibe.db.mongo.database.MongoDatabase vibe.db.mongo.client.MongoClient.getDatabase(immutable(char)[]))

.dub\obj\debug\test\source\app.obj(app)
 Error 42: Symbol Undefined 
_D4vibe4http6router9URLRouter3getMFAyaPFC4vibe4http6server17HTTPServerRequestC4vibe4http6server18HTTPServerResponseZvZC4vibe4http6router9URLRouter (vibe.http.router.URLRouter vibe.http.router.URLRouter.get(immutable(char)[], void function(vibe.http.server.HTTPServerRequest, vibe.http.server.HTTPServerResponse)

Re: Updated D then undefined symbols in vibed

2016-11-24 Thread Rene Zwanenburg via Digitalmars-d-learn

On Thursday, 24 November 2016 at 16:17:19 UTC, Jot wrote:
Any more ideas? Obviously something isn't getting linked in in 
the VS project.


This is definitely a stale object file problem. From that error 
message it appears to use the .dub directory to store object 
files of your dependencies. Try nuking it, then run dub to 
recreate it.


Re: Updated D then undefined symbols in vibed

2016-11-24 Thread Jot via Digitalmars-d-learn
On Thursday, 24 November 2016 at 10:04:36 UTC, Rene Zwanenburg 
wrote:

On Thursday, 24 November 2016 at 09:52:32 UTC, Jot wrote:
Seems like someone decided to screw up a lot of people by 
removing a lot of stuff ;/ I guess I should learn my lesson 
about assuming a "stable" dmd release won't completely kill my 
project.


There are still some old object files or libs hanging around. 
MSBuild doesn't know you've updated DMD and reuses them.


Dub shouldn't have this problem. If you've generated the 
solution from a dub file, try a rebuild with Dub first. I 
suspect MSbuild will work after that.


I cleaned the project several times and then manually deleted all 
the files.


I ran dub and it compiled fine. Then tried VS/VD again and same 
errors.


I then tried to have dub create the visual d project again, yet 
same errors.


So,

1. All I did was replace dmd2 2.71 with dmd2 manually, retaining 
sc.ini
2. tried to compile project, tried to clean project, then other 
stuff... all same problems:


e.g.,
.dub\lib\vibe-d_redis.lib(redis)
 Error 42: Symbol Undefined 
_D3std11concurrency15MessageMismatch6__ctorMFNaNfAyaZC3std11concurrency15MessageMismatch (pure @safe std.concurrency.MessageMismatch std.concurrency.MessageMismatch.__ctor(immutable(char)[]))



3. I tried updating and regenerating the project using dub, same 
problem.


Builds using dub but not VD. Worked fine before. I repeat, all I 
did was update dmd to 2.72. This should not break anything.


Any more ideas? Obviously something isn't getting linked in in 
the VS project.






Re: Updated D then undefined symbols in vibed

2016-11-24 Thread John Colvin via Digitalmars-d-learn

On Thursday, 24 November 2016 at 09:52:32 UTC, Jot wrote:
Using vibe D. designed to update dmd to latest and then I now 
get the following errors:


.dub\obj\debug\dev\source\app.obj(app)
 Error 42: Symbol Undefined 
_D3std6format12arrayPtrDiffFNaNbNiNexAvxAvZi

.dub\obj\debug\dev\source\app.obj(app)
 Error 42: Symbol Undefined 
_D3std5stdio4File17LockingTextWriter7handle_MFNdNeZPS4core4stdc5stdio6_iobuf (@property @trusted core.stdc.stdio._iobuf* std.stdio.File.LockingTextWriter.handle_())

.dub\obj\debug\dev\source\app.obj(app)
 Error 42: Symbol Undefined 
_D3std8datetime7SysTime6toHashMxFNaNbNiNfZk


when I clean the solution I eventually end up with a bunch more 
errors.


Symbol Undefined 
_D3std6random109__T21MersenneTwisterEngineTkVki32Vki624Vki397Vki31Vki2567483615Vki11Vki7Vki263691417EDFC9546C199E5D72A199057D68B


Symbol Undefined 
_D3std5regex8internal6parser7CodeGen8popFixupMFZk (uint 
std.regex.internal.parser.CodeGen.popFixup())


Symbol Undefined 
_D3std5regex8internal6parser7CodeGen13genNamedGroupMFAyaZv 
(void 
std.regex.internal.parser.CodeGen.genNamedGroup(immutable(char)[]))


Symbol Undefined 
_D3std5regex8internal6parser7CodeGen6lengthMFNdZk (@property 
uint std.regex.internal.parser.CodeGen.length())


etc...

Seems like someone decided to screw up a lot of people by 
removing a lot of stuff ;/ I guess I should learn my lesson 
about assuming a "stable" dmd release won't completely kill my 
project.


those are internal symbols, meaning that it's very (like 99% 
certain, unless you or one of your dependencies is manually 
redeclaring those symbols using their mangled names) likely that 
the cause is that something, somewhere, hasn't been cleaned 
properly.


Re: Updated D then undefined symbols in vibed

2016-11-24 Thread Rene Zwanenburg via Digitalmars-d-learn

On Thursday, 24 November 2016 at 09:52:32 UTC, Jot wrote:
Seems like someone decided to screw up a lot of people by 
removing a lot of stuff ;/ I guess I should learn my lesson 
about assuming a "stable" dmd release won't completely kill my 
project.


There are still some old object files or libs hanging around. 
MSBuild doesn't know you've updated DMD and reuses them.


Dub shouldn't have this problem. If you've generated the solution 
from a dub file, try a rebuild with Dub first. I suspect MSbuild 
will work after that.