From: Andrew R. <and...@us...> - 2011-11-27 22:14:19
|
On Sun, Nov 27, 2011 at 01:06:10PM -0800, Alan Irwin wrote: > Hi Andrew: > > On 2011-11-27 20:18-0000 Andrew Ross wrote: > > > On Fri, Nov 25, 2011 at 03:38:53PM -0800, Alan Irwin wrote: > >> By default D is compiled statically because the shared D build is > >> broken on Debian stable because of a bug in D support on that > >> platform. Has that bug been fixed for Debian unstable? In other > >> words, do you get good results for the combination of > >> -DNON_TRANSITIVE=ON and -Dplplotdmd_SHARED=ON? > > > > Well, trying with -Dplplotdmd_SHARED=ON fails with the default gdc > > (gdc-4.4) with an error message about one of the .a files needing > > recompiling with -fPIC. Is this the error you are talking about? > > Yes. Unless we are doing something wrong in our search for the *.so > version of that library, that's a pretty basic bug in D support for > shared libraries on Debian, and I cannot imagine why it hasn't been > fixed yet. > > > > > I also tried gdc-4.6 which is also available in unstable. This > > fails during the cmake D compiler checks. Cmake adds the -fversion=Posix > > option to the compiler, which does not seem to be allowed by gdc-4.6. > > Not sure if this is a gdc error (flag should be supported) or a cmake > > issue. I can't find any documentation on -fversion=Posix to confirm > > or deny this. Anyone with any D lanugage experience able to offer > > advice? > > We have complete control of that Posix flag since we implement our own > D language support. That is, -fversion=Posix is set in > plplot_cmake_qt/cmake/modules/language_support/cmake/Platform/Linux-gdc.cmake > and -version=Posix is set in Darwin-dmd.cmake and Linux-dmd.cmake in > that same directory. So when the D language support was put together > by the developers at http://www.dsource.org/projects/cmaked (which we > have mostly just copied from although you should check their files > again to see if anything has changed modulo the changes we have > deliberately added since we copied their files), they must have > thought "Posix" was an important flag. > > You may also want to check with the CMake D language support files at > http://code.google.com/p/cmaked2/. "D2" is apparently a new variant > of the D computing language (see > http://d-programming-language.org/D1toD2.html). I don't know whether > our D bindings and examples are written in that or D1 or whether > gdc-4.6 compiles D1 or D2, but regardless of those D1 versus D2 > questions, cmaked2 language support may actually be independent of > whether we are dealing with D1 or D2 so what those D2 CMake language > support files say about "Posix" may be relevant. Well it seems that gdc-4.6 supports D2. Commenting out the -fversion=Posix option gets me a little further, but then we don't have a check for the Phobos2 library so it fails again. I suspect we need to port some of the code from cmaked2. (Incidentally cmaked2 has already commented out the Posix flag). By the way, the shared library problem is with gdc upstream, not just Debian. There is an open bug about it https://bitbucket.org/goshawk/gdc/issue/166/add-shared-lib-support Andrew |