dftbplus / dftd3-lib

Library version of S. Grimmes DFTD3 code.
Other
11 stars 4 forks source link

Fails to build: Can't open module file 'dftd3_extras.mod' #4

Closed yurivict closed 6 years ago

yurivict commented 6 years ago

While trying to create the FreeBSD port, I get this error:

gfortran7 -Wl,-rpath=/usr/local/lib/gcc7 -I../lib -c main.f90 -o main.o
main.f90:34:6:

   use dftd3_extras
      1
Fatal Error: Can't open module file 'dftd3_extras.mod' for reading at (1): No such file or directory

Where 'dftd3_extras.mod' should come from?

aradi commented 6 years ago

It comes from extras.f90 in the prg/ folder. When issuing make dftd3, it is compiled automatically (at least in my environment). Note, that if you only want to build the library (as with make lib), you won't need either main.f90 or extras.f90.

yurivict commented 6 years ago

I think you forgot to link the module in https://github.com/dftbplus/dftbplus/tree/master/external/dftd3. It should have origin linked to dftd3-lib.

aradi commented 6 years ago

I don't understand your problem. If you download the dftd3-dependency via ./utils/geo_opt_externals as explained in the installation guide, the content of origin is exactly the dftd3-lib project, including the lib/ and prg/ folders. During the build of DFTB+, we of course only build the content of the lib/ as we don't need to build the stand-alone dftd3 binary.

By the way, please note, that DFTB+ and dftd3-lib have incompatible licenses, so those sources can not be distributed together, and a build containing both sources can also not be distributed...

yurivict commented 6 years ago

dftd3-lib is GPLv1 https://github.com/dftbplus/dftd3-lib/blob/master/LICENSE, and DFTB++ is GPLv3: https://github.com/dftbplus/dftbplus/blob/master/LICENSE.

IANAL, but aren't two GPL licenses compatible because they are both GPL?

bhourahine commented 6 years ago

Unfortunately LGPL3 (not GPL3) for DFTB+ and GPL 1 (only) for dftd3-lib, which is an incompatible combination: https://www.gnu.org/licenses/license-list.html

yurivict commented 6 years ago

Thank you, I never knew this!

What if dftd3-lib is made into a separate port, instead of bundling it with DFTD++? Obviously, there is is lot of other software that has all sorts of licenses, and they depend on each other, but don't include each other, and they seem to be fine?

aradi commented 6 years ago

Oh, I've just realized, that the GPLv1 license of dftd3-lib does actually contain the "any later version" option, so according to the GPL compatibility matrix you could indeed link them together. The resulting code would have then the GPLv3 license.

yurivict commented 6 years ago

Ok, thanks, I will change the overall license to GPLv3 then.