libmir / mir

Mir (backports): Sparse tensors, Hoffman
http://mir.libmir.org
Boost Software License 1.0
210 stars 20 forks source link

Main package must have a binary target type, not sourceLibrary. Cannot build. #323

Closed timotheecour closed 8 years ago

timotheecour commented 8 years ago

How to build latest version of mir?

dub fetch mir
cd ~/.dub/packages/mir-0.15.3/mir
dub build --config=static-lib
#works
dub fetch mir --version=0.17.0-alpha2
cd ~/.dub/packages/mir-0.17.0-alpha2/mir
dub build --config=???
#doesn't work
timotheecour commented 8 years ago

after git clone https://github.com/libmir/mir/issues/323, replacing "targetType": "sourceLibrary", by "targetType": "library", and typing dub build works

9il commented 8 years ago

99% of source code is templates. Building Mir will just produce ModuleInfo. dub test mir should work anyway. Why you need to build it?

timotheecour commented 8 years ago

Well otherwise I get: undefined reference to `_D3mir4glas2l312__ModuleInfoZ'

it works with pragma(lib, "mir") and proper -L-L flags

if it's <100%, why not allow building it?

unless you have a better way?

(PS: i'd like to use mir in an application that's not necessarily built via dub; it all works so long i can have a libmir that's built)

9il commented 8 years ago

OK will add it back soon

9il commented 8 years ago

For 0.17.0-alpha3: dub build --config=static

wilzbach commented 8 years ago

FWIW those targets are also needed for the ArchLinux packages