botan icon indicating copy to clipboard operation
botan copied to clipboard

Botan fails to build with D 2.084

Open p-mitana opened this issue 7 years ago • 13 comments

Botan fails to build with DMD 2.084.

Performing "debug" build using /usr/bin/dmd for x86_64.
botan-math 1.0.3: target for configuration "regular" is up to date.
memutils 0.4.11: target for configuration "secure" is up to date.
botan 1.12.10: building configuration "full"...
Enhanced memory security is enabled.
Memory debugger enabled
../../../.dub/packages/botan-1.12.10/botan/source/botan/cert/x509/ocsp.d(261,8): Deprecation: Symbol `core.sync.mutex.Mutex` is not visible from module `ocsp` because it is privately imported in module `concurrency`
/usr/include/dmd/druntime/import/object.d(518,9): Error: union `object.destroy!(true, RTSS).destroy.UntypedInit` has forward references
../../../.dub/packages/memutils-0.4.11/memutils/source/memutils/utils.d(163,56): Error: template instance `object.destroy!(true, RTSS)` error instantiating
../../../.dub/packages/memutils-0.4.11/memutils/source/memutils/vector.d(74,24):        instantiated from here: `freeArray!(RTSS, ThreadMem)`
../../../.dub/packages/botan-1.12.10/botan/source/botan/constructs/tss.d(43,12):        instantiated from here: `Vector!(RTSS, ThreadMem)`
../../../.dub/packages/memutils-0.4.11/memutils/source/memutils/refcounted.d(13,2): Error: mixin `memutils.refcounted.RefCounted!(Vector!(RTSS, ThreadMem), ThreadMem).RefCounted.Embed!(m_object, false)` error instantiating
../../../.dub/packages/memutils-0.4.11/memutils/source/memutils/vector.d(299,12): Error: template instance `memutils.refcounted.RefCounted!(Vector!(RTSS, ThreadMem), ThreadMem)` error instantiating
../../../.dub/packages/botan-1.12.10/botan/source/botan/constructs/tss.d(43,12):        instantiated from here: `Vector!(RTSS, ThreadMem)`
../../../.dub/packages/botan-1.12.10/botan/source/botan/test.d(80,8): Deprecation: struct `std.datetime.StopWatch` is deprecated - Use std.datetime.stopwatch.StopWatch.
../../../.dub/packages/botan-1.12.10/botan/source/botan/test.d(80,8): Deprecation: struct `std.datetime.StopWatch` is deprecated - Use std.datetime.stopwatch.StopWatch.
../../../.dub/packages/botan-1.12.10/botan/source/botan/test.d(81,11): Deprecation: struct `std.datetime.StopWatch` is deprecated - Use std.datetime.stopwatch.StopWatch.
/usr/bin/dmd failed with exit code 1.

Note: I forgot to mention: Botan does build successfully for with DMD 2.083.1 or earlier.

p-mitana avatar Jan 04 '19 19:01 p-mitana

It seems like an issue with the version of memutils that Botan uses.

Perhaps it should use a later version like 0.4.13

bausshf avatar Jan 08 '19 13:01 bausshf

Nope. From Botan's dub.json:

"memutils": { "version": "~>0.4.8" },

So the latest 0.4.x will be used - and there's no 0.5 currently. I have run dub upgrade, what changed memutils' version to 0.4.13 and am still getting exactly the same error.

Note that memutils itself builds successfully.

p-mitana avatar Jan 09 '19 09:01 p-mitana

Going to assume that memutils have made breaking changes then which Botan has not updated to.

Try an earlier memutils version and force it to that and see when the change happen.

That way you'll be able to tell exactly what commit etc. made the change.

I will do it myself later if you haven't by then.

bausshf avatar Jan 09 '19 09:01 bausshf

Downgraded to memutils 0.4.8, as oldest accepted by dub.json. Still the same error.

p-mitana avatar Jan 09 '19 10:01 p-mitana

Try downgrading Botan then.

Wait... Looking here: https://ci.appveyor.com/project/etcimon/botan

It looks like it's a problem with LDC.

Are you perhaps compiling using LDC?


Edit again:

Okay it does seem like a DMD problem.

It was introduced sometime after dmd-2.074.0

bausshf avatar Jan 09 '19 10:01 bausshf

From the top of this ticket ;)

Botan fails to build with DMD 2.084

I have tried neither GDC nor LDC. What I forgot to mention in the ticket (but mentioned in the thead on D forum) is that Botan builds successfully with DMD 2.083.1.

So if it is DMD's problem, it must have been introduced exactly in DMD 2.084.

p-mitana avatar Jan 09 '19 10:01 p-mitana

So if it is DMD's problem, it must have been introduced exactly in DMD 2.084.

I think I found it:

https://dlang.org/changelog/2.084.0.html#destroy_noinit

bausshf avatar Jan 09 '19 10:01 bausshf

OK. I'll report an issue in DMD, as braking changes should not happen without the deprecation period. I'll also leave this issue here for now.

p-mitana avatar Jan 09 '19 10:01 p-mitana

Here is the commit: https://github.com/dlang/druntime/commit/6a99ed19ab7a0fb9b6326b6fb1b52fca50fcbd17

bausshf avatar Jan 09 '19 10:01 bausshf

so what is the current status of this? Are we waiting on an update to DMD? What version of DMD should we use in the mean time?

sam0x17 avatar Feb 28 '19 07:02 sam0x17

I have actually decided to move to openssl. For me it looks like the Botan's development has stopped more then half a year ago.

p-mitana avatar Feb 28 '19 08:02 p-mitana

:(

sam0x17 avatar Mar 07 '19 03:03 sam0x17

This sucks

aberba avatar Jun 14 '20 11:06 aberba