vibe.d icon indicating copy to clipboard operation
vibe.d copied to clipboard

Invalid variable: DC

Open jamesragray opened this issue 1 year ago • 7 comments

When trying to use vibe-d 0.9.5 I get the error message "Invalid variable: DC" when compiling with dub build . Using vibe-d 0.9.5-beta.1 works fine.

My dub.selections looks like this:

{
        "fileVersion": 1,
        "versions": {
                "automem": "0.6.7",
                "diet-ng": "1.8.1",
                "eventcore": "0.9.20"
                "libasync": "0.8.6",
                "memutils": "1.0.4",
                "mir-linux-kernel": "1.0.1",
                "openssl": "3.2.2",
                "stdx-allocator": "2.77.5",
                "sumtype": "1.1.4",
                "taggedalgebraic": "0.11.22",
                "test_allocator": "0.3.3",
                "tinyredis": "2.2.1",
                "unit-threaded": "2.0.5",
                "vibe-core": "1.22.4",
                "vibe-d": "0.9.5"
        }
}

Here is the version that works:

{
        "fileVersion": 1,
        "versions": {
                "automem": "0.6.7",
                "botan": "1.12.19",
                "botan-math": "1.0.3",
                "diet-ng": "1.8.1",
                "eventcore": "0.9.20",
                "libasync": "0.8.6",
                "memutils": "1.0.4",
                "mir-linux-kernel": "1.0.1",
                "openssl": "1.1.6+1.0.1g",
                "stdx-allocator": "2.77.5",
                "sumtype": "1.1.4",
                "taggedalgebraic": "0.11.22",
                "test_allocator": "0.3.3",
                "tinyredis": "2.2.1",
                "unit-threaded": "2.0.5",
                "vibe-core": "1.22.4",
                "vibe-d": "0.9.5-beta.1"
        }
}

jamesragray avatar Jul 21 '22 13:07 jamesragray

Looks like we filed the exact same bug at the same time (#2678) :smile:

Andriamanitra avatar Jul 21 '22 13:07 Andriamanitra

This comes from https://github.com/D-Programming-Deimos/openssl/releases/tag/v3.2.1

There are a few possible workarounds:

  • Use library-manual-version as a subConfiguration to openssl as described here. Note that you might need to depend explicitly on openssl from your dub.json / dub.sdl for it to work;
  • Fix the openssl version to <=3.2.0 so that you don't get v3.2.1;
  • Disable SSL in Vibe.d (not tested);

I'll look into a proper fix.

Geod24 avatar Jul 21 '22 14:07 Geod24

I was pretty sure dub always defines DC: https://github.com/dlang/dub/blob/ead1edac76547bec597b9ea68d3b7c62b7425828/source/dub/generators/generator.d#L1005

kinke avatar Jul 21 '22 14:07 kinke

@jamesragray : What version of DUB are you using ? @Andriamanitra mentions v1.23.0 which is a bit old (but should still be supported).

Geod24 avatar Jul 21 '22 16:07 Geod24

Thanks for the workarounds. My dub is 1.26.1

jamesragray avatar Jul 21 '22 19:07 jamesragray

Can you try with v1.29.0 ? You can get a binary from here.

Geod24 avatar Jul 21 '22 19:07 Geod24

My version of gzip doesn't seem to recognize those binaries as gzip files. So I cloned dub and build v1.29.0. It seems to work with openssl 3.2.2

jamesragray avatar Jul 22 '22 07:07 jamesragray

Confirmed fixed in #2678

Geod24 avatar Jan 05 '23 14:01 Geod24