On Sun, 29 Jan 2017 19:26:03 GMT, dan hitt wrote:

On Sun, 29 Jan 2017 14:38:34 +0100, Mike Wey wrote:

On 01/29/2017 01:02 AM, dan hitt wrote:

I am running a Debian 8.7.1 system, which i just put on my box, and then i installed the gdc package.

I can compile 3.3.0 without error (just doing 'make').

However, for 3.5.1 the compile fails on src/gtkc/Loader.d, with the error message

src/gtkc/Loader.d:389: error: no property 'fromStringz' for type 'char*'

Sure enough fromStringz is present in the 3.5.1 version, but not in the 3.3.0 version of that file.

Don't know if this is language evolution, or something about gdc, or debian, or something else, but would appreciate any advice. And 3.3.0 is awesome, so i could stick with it, but naturally i'd prefer the latest version if i can compile it with gdc.

TIA for any info or advice!


fromStringz was added to std.string about 3 years ago, so i would
suggest to use a more recent version of gdc.

If that is not possible, you could comment out line 389 in Loader.d.

Thanks Mike!

I didn't realize my debian version was so ancient --- prior to a few days ago, i was using what ubuntu presented as 2.068.2 (although apparently it wasn't), which did not compile 3.3.0 correctly (gdc bug 231).

I heard word that debian's gdc did not suffer from this problem, but i did not realize that the reason it did not suffer from this problem was that it was even older.

(The debian version is so old that 'gcc -v -c test_file.d' does not yield a version string for d.)

So what i really need is a reliable way of telling the version of gcd, and i need to get a version of gcd dating after Christmas 2016 (which is when i understand the fix for 231 went i).

Will have to research it some more!

And thanks again, i would have never guessed that my 3.3.0 problem was fixed by reverting to an older compiler.

Just a little more information here in case somebody having a similar problem encounters this thread in a search.

There is a version of debian which has a gcd compiler which is both late enough to have the string functions for Loader as well as correcting bug 231 and which compiles gtkd 3.5.1. That is 9.0 ("stretch" or currently debian testing). (This was actually pointed out to me by Sebastien Alaiwan, but i was so clueless that i didn't realize that "debian testing" identified a particular version of debian, and consequently had different packages.)

The library compiles, and installs, and the compiler identifies new items in my code to warn me about, so i'm pretty sure it is all new. It also links successfully against my code and it seems to work ok, so i think it's fine.

The "make all" fails with some linking error on symbols like crc32 and adler32 that are present in zlib. That's not an issue for me, because if i ever get that error, i'll just explicitly link zlib in.
(I guess i should that after a failure with "make all", you must run "make clean" before trying "make", but that's one point of having a "clean" target.)

Thanks again Mike and all the others who have worked on making gtkd and making it available.

It sure helps me a lot.