Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GNU/Linux. Range violation whle dependency calculation #137

Closed
NCrashed opened this issue Oct 19, 2013 · 2 comments
Closed

GNU/Linux. Range violation whle dependency calculation #137

NCrashed opened this issue Oct 19, 2013 · 2 comments

Comments

@NCrashed
Copy link

Platform: Fedora 19 x86
Dub version: v0.9.19-2-gb08454b
dmd version: v2.063.2

Running on CI server, thus jenkins $HOME dir is /var/lib/jenkins. Package borey-engine is added as local package (doesn't updated in dub registry):

git clone https://github.com/NCrashed/BoreyEngine.git
cd BoreyEngine && dub add-local . ~master

Original problem package is not available, but there is reduced package.json which cause problem:

{
    "name": "test",
    "sourcePaths": [],
    "targetPath": "bin",

    "configurations": [
        {
            "name": "client",
            "sourcePaths": ["source"],
            "libs-posix": ["dl"], 
            "targetType": "executable",
            "targetName": "client",
            "dependencies": 
            {
                "borey-engine": "~master",
                "borey-engine:interface": "~master",
            }
        }
    ]
}

source/app.d:

void main() {}

Dub is called with:

dub build --config=client --build=unittest --vverbose

Output:

dub: /lib/libcurl.so.4: no version information available (required by dub)
Using dub registry url 'http://code.dlang.org/'
Looking for local package map at /var/lib/dub/packages/local-packages.json
Looking for local package map at /var/lib/jenkins/.dub/packages/local-packages.json
Try to load local package map at /var/lib/jenkins/.dub/packages/local-packages.json
iterating dir /var/lib/jenkins/.dub/packages/
iterating dir /var/lib/jenkins/.dub/packages/ entry local-packages.json
iterating dir /var/lib/jenkins/.dub/packages/ entry derelict-master
Looking for local package map at /var/lib/dub/packages/local-packages.json
Looking for local package map at /var/lib/jenkins/.dub/packages/local-packages.json
Try to load local package map at /var/lib/jenkins/.dub/packages/local-packages.json
iterating dir /var/lib/jenkins/.dub/packages/
iterating dir /var/lib/jenkins/.dub/packages/ entry local-packages.json
iterating dir /var/lib/jenkins/.dub/packages/ entry derelict-master
Looking for local package map at /var/lib/dub/packages/local-packages.json
Looking for local package map at /var/lib/jenkins/.dub/packages/local-packages.json
Try to load local package map at /var/lib/jenkins/.dub/packages/local-packages.json
iterating dir /var/lib/jenkins/.dub/packages/
iterating dir /var/lib/jenkins/.dub/packages/ entry local-packages.json
iterating dir /var/lib/jenkins/.dub/packages/ entry derelict-master
Looking for local package map at /var/lib/dub/packages/local-packages.json
Looking for local package map at /var/lib/jenkins/.dub/packages/local-packages.json
Try to load local package map at /var/lib/jenkins/.dub/packages/local-packages.json
iterating dir /var/lib/jenkins/.dub/packages/
iterating dir /var/lib/jenkins/.dub/packages/ entry local-packages.json
iterating dir /var/lib/jenkins/.dub/packages/ entry derelict-master
Failed to run git: git rev-parse failed: fatal: Not a git repository: '/var/lib/jenkins/jobs/FMTG/workspace/testprj/.git'

Note: Failed to determine version of package test at /var/lib/jenkins/jobs/FMTG/workspace/testprj. Assuming ~master.
Collecting dependencies for test
Found dependency borey-engine:interface ~master: true
Collecting dependencies for borey-engine:interface
Found dependency derelict:util ~master: true
Collecting dependencies for derelict:util
Found dependency borey-engine ~master: true
Collecting dependencies for borey-engine
Found dependency derelict:opengl3 ~master: true
Collecting dependencies for derelict:opengl3
Found dependency derelict:glfw3 ~master: true
Collecting dependencies for derelict:glfw3
Checking dependencies in '/var/lib/jenkins/jobs/FMTG/workspace/testprj'
Try to resolve ["borey-engine"]
There are 1 packages missing.
Adding package to graph: borey-engine
Found installed package borey-engine ~master
Try to resolve ["derelict"]
There are 1 packages missing.
Adding package to graph: derelict
Found installed package derelict ~master
Required package 'borey-engine' found with version '~master'
Required package 'derelict' found with version '~master'
Generating using build
Creating build generator.
Including test client -> borey-engine:interface library
Including test client -> borey-engine application
Including borey-engine:interface library -> derelict:util library
Including borey-engine application -> derelict:opengl3 library
Including borey-engine application -> borey-engine:interface library
Including borey-engine application -> derelict:glfw3 library
Including borey-engine application -> derelict:util library
Including derelict:opengl3 library -> derelict:util library
Including borey-engine:interface library -> derelict:util library
Including derelict:glfw3 library -> derelict:util library
Error: Range violation

Full exception: [email protected](271): Range violation
----------------
dub(_d_array_bounds+0x2b) [0x826287b]
dub() [0x81e1153]
dub(const(immutable(char)[][immutable(char)[]] function(const(dub.compilers.compiler.BuildPlatform), immutable(char)[])) dub.project.Project.getPackageConfigs.bool isReachableByAllParentPacks(uint)+0x71) [0x81de005]
dub(const(immutable(char)[][immutable(char)[]] function(const(dub.compilers.compiler.BuildPlatform), immutable(char)[])) dub.project.Project.getPackageConfigs+0x1a9) [0x81dd6dd]
dub(const(void function(ref dub.compilers.compiler.BuildSettings, const(dub.compilers.compiler.BuildPlatform), immutable(char)[], const(dub.package_.Package))) dub.project.Project.addBuildSettings+0x63) [0x81de66f]
dub(void dub.generators.build.BuildGenerator.generateProject(dub.generators.generator.GeneratorSettings)+0x98) [0x81e5304]
dub(void dub.dub.Dub.generateProject(immutable(char)[], dub.generators.generator.GeneratorSettings)+0x6f) [0x81ca0c3]
dub(_Dmain+0x134c) [0x81c20d8]
dub(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void runMain()+0x10) [0x8262f38]
dub(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void tryExec(scope void delegate())+0x27) [0x8262ab7]
dub(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void runAll()+0x64) [0x8262fac]
dub(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void tryExec(scope void delegate())+0x27) [0x8262ab7]
dub(_d_run_main+0x162) [0x8262a72]
dub(main+0x2a) [0x82628fa]
/lib/libc.so.6(__libc_start_main+0xf3) [0x44058963]
Run 'dub help' for usage information.
@NCrashed
Copy link
Author

Problem appears with dependencies in configurations, for instance this will operate normally:

{
    "name": "test",
    "sourcePaths": [],
    "targetPath": "bin",

   "dependencies": 
    {
        "borey-engine": "~master",
        "borey-engine:interface": "~master",
    }

    "configurations": [
        {
            "name": "client",
            "sourcePaths": ["source"],
            "libs-posix": ["dl"], 
            "targetType": "executable",
            "targetName": "client",
        }
    ]
}

@NCrashed
Copy link
Author

Crash appears only on dub 0.9.18 and 0.9.19, 0.9.17 operates normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant