MrcSnm / redub

Alternative implementation of dub, speed and consistency oriented
https://code.dlang.org/packages/redub
MIT License
31 stars 7 forks source link

[MAYBE MACHINE DEPENDANT] Segmentation fault #18

Closed vabenil closed 3 months ago

vabenil commented 3 months ago

When trying to compile the project attached below. I get the following:

[ vabenil@arch-pc: sync/D/mblas ]$ redub -f
Dependencies resolved in 0 ms for "debug" using /usr/bin/dmd [linux-x86_64]
Project mblas is single dependency, performing single threaded build
Segmentation fault (core dumped)

This happens both in redub-1.7.8 and also in the latest git redub version.

Project files: mblas.zip

When compiling normally I get the following, though I suspect this may be an error specific to my machine:

[ vabenil@arch-pc: sync/D/mblas ]$ dub
    Starting Performing "debug" build using /usr/bin/dmd for x86_64.
    Building mblas ~master: building configuration [application]
     Linking mblas
/usr/bin/ld: -f may not be used without -shared
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
       cc /home/vabenil/.dub/cache/mblas/~master/build/application-debug-FP-wj8rju3IMj2OEdhNFiw/mblas.o -o /home/vabenil/.dub/cache/mblas/~master/build/application-debu
g-FP-wj8rju3IMj2OEdhNFiw/mblas -g -m64 -Xlinker --no-as-needed -Xlinker -fopenmp -Xlinker --export-dynamic -lopenblas -L/usr/lib -Xlinker -Bstatic -lphobos2 -Xlinker -B
dynamic -lpthread -lm -lrt -ldl 
Error /usr/bin/dmd failed with exit code 1.

Lastly, this maybe best in an a separate issue, but when trying to compile with redub the cblas project (https://github.com/DlangScience/cblas). I get the following error:

object.Exception@source/redub/buildapi.d(681): Project named 'cblas which is a sourceLibrary, can not depend on project mir-core since it can only depend on sourceLibrary. Dependency is a library
----------------
/usr/include/dlang/ldc/std/exception.d:522 pure @safe noreturn std.exception.bailOut!(Exception).bailOut(immutable(char)[], ulong, scope const(char)[]) [0x57cf98dd8617]
/usr/include/dlang/ldc/std/exception.d:442 [0x57cf98d94698]
source/redub/tree_generators/dub.d:127 [0x57cf98d9324e]
source/redub/tree_generators/dub.d:37 [0x57cf98d930f2]
source/redub/api.d:207 [0x57cf98dd5acc]
source/app.d:261 [0x57cf98dd7848]
source/app.d:76 [0x57cf98dd63dc]
??:? void rt.dmain2._d_run_main2(char[][], ulong, extern (C) int function(char[][])*).runAll() [0x75161157906c]
??:? _d_run_main2 [0x751611578e86]
??:? _d_run_main [0x751611578cdc]
??:? [0x751610d4ec87]
??:? __libc_start_main [0x751610d4ed4b]
??:? [0x57cf98d92e34]

Compiling this project with dub works normally.

Lastly I am currently using Arch Linux, dub version is 1.38.1 and dmd version is 2.109.1

MrcSnm commented 3 months ago

I'm slightly confused on why a project that simples is not building, I'm currently debugging it

MrcSnm commented 3 months ago

Fixed error 1 on 1.7.9

MrcSnm commented 3 months ago

@vabenil

On the second project:

image

MrcSnm commented 3 months ago

I'll close this with the new release, if you find other issues, feel free to open a new issue